A High-Speed Time-Optimal Trajectory Generation Strategy via a Two-layer Planning Model