The aging process of society requires more rehabilitation talents and medical resources to help the elderly and patients who need lower limb rehabilitation training. The wearable lower limb rehabilitation robot can help doctors to help patients complete the corresponding exercise training, breaking through the time and space constraints. The energy of such robots mainly comes from batteries. In addition to the corresponding battery management, the energy optimization of robots is its development trend. In this paper, the key gait recognition model of robot is constructed based on deep learning, and an energy optimization strategy is introduced to achieve energy saving by planning most trajectories. The experimental results show that the results of models with different layers tend to be stable. Comparing different gait pattern recognition errors, it is found that the error recognition rate between walking on the ground and going up and down stairs is higher, and the recognition error between squatting posture and standing posture is also higher. The model can effectively recognize and classify gait patterns. Compared with other algorithms, the error rate of the model is small, and the recognition and classification results are consistent with the actual motion features. Compared with other models, the wearable lower limb rehabilitation robot based on deep learning can effectively recognize different gait patterns, effectively reduce the error rate and achieve better classification results. At the same time, it can effectively realize the classification of gait stages under different motion states, while maintaining high accuracy.