In the field of autonomous driving trajectory planning, it’s virtual to ensure real-time planning while guaranteeing feasibility and robustness. Current widely adopted approaches include decoupling path planning and velocity planning based on optimization method, which can’t always yield optimal solutions, especially in complex dynamic scenarios. Furthermore, search-based and sampling-based solutions encounter limitations due to their low resolution and high computational costs. This paper presents a novel spatio-temporal trajectory planning approach that integrates both search-based planning and optimization-based planning method. This approach retains the advantages of search-based method, allowing for the identification of a global optimal solution through search. To address the challenge posed by the non-convex nature of the original solution space, we introduce a spatio-temporal semantic corridor structure, which constructs a convex feasible set for the problem. Trajectory optimization is then performed through numerical optimization methods, resulting in real-time and robust spatio-temporal trajectory planning. The proposed approach initiates by constructing a 3D spatio- temporal map that incorporates information such as dynamic obstacles. Improved A* algorithm is used to search for a preliminary spatio- temporal trajectory, serving as an initial approximation for the trajectory. Based on this initial approximation, a spatio-temporal corridor is constructed as locally convex feasible driving area, then a quintic monomial polynomial is employed to represent a trajectory, considering vehicle kinematics, continuity, and other constraints, this formulation transforms the problem into a general quadratic programming problem. Ultimately, the generated trajectories are rigorously tested through simulations in scenarios involving overtaking and side car cut-in. The results indicate that the generated trajectories are feasible, reasonable, and exhibit good real-time performance.