This paper proposes a trajectory optimization algorithm with an intelligent decision mechanism and a trajectory smoothing improvement algorithm for robot-assisted rehabilitation therapy. An improved genetic algorithm and an adaptive variable time weight improved trapezoidal velocity algorithm are designed to obtain a better solution and provide comfortable and high-quality rehabilitation training for patients.