This article deals with numerical solution and identification of the fractional orders for the generalized nonlocal elastic model. Based on the collocation-finite difference scheme for the forward operator, a regularized method is proposed for solving of the forward problem with Tikhonov regularization, which gives a feasible approach to numerical solution of the nonlocal elastic model. The inverse problem of determining the fractional orders is solved by using the optimal perturbation algorithm with additional observations at some measurable points. The inversion solutions with noisy data give good approximations to the exact orders demonstrating the effectiveness of the numerical algorithms.