Public transportation scheduling aims to optimize the allocation of transportation resources, enhance transportation efficiency, and increase passenger satisfaction, which is crucial for building a sustainable urban transportation system. As a complement to public transportation, shared bikes provide users with a solution for the last mile of travel, compensating for the lack of flexibility in public transportation and helping to improve its utilization rate. Due to the characteristics of shared bikes, such as peak usage periods in the morning and evening and significant fluctuations in demand across different areas, the optimization of shared bike dispatch can better meet user needs, thereby reducing vehicle vacancy rates and increasing operating revenue. Addressing this issue, this paper designs a comprehensive decision-making approach for spatio-temporal demand prediction and bike dispatch optimization. For demand prediction, we designed a T-GCN based bike demand prediction model. In terms of dispatch optimization, we considered factors such as dispatch capacity, distance restrictions, and dispatch costs, and designed an optimization solution based on genetic algorithms. Finally, this paper validates the approach using shared bike operating data, shows that T-GCN can effectively predict short-term demand for shared bikes. Meanwhile, the optimization model based on genetic algorithms provides a complete dispatch solution verifying the model’s effectiveness. The shared bike dispatch approach proposed in this paper, which combines demand prediction with resource scheduling. This scheme can also be extended to other transportation scheduling problems with uncertain demand, such as store replenishment delivery and intercity inventory dispatch.