The invention provides a method and 
system for achieving railway locomotive operation control from an off-line mode to an on-line mode. A 
sequence pattern excavation method is used for obtaining a control gear sequence from original operation data of a locomotive in an off-line mode, an off-line optimization 
algorithm is used for optimizing the 
time distribution proportions of specific gears in the control gear sequence, a neural 
network model is constructed according to the 
time distribution proportion sequence with the optimal 
energy consumption, association rules of the specific locomotive, line parameters and the control gear sequence are obtained according to the neural 
network model, finally, the control sequence with the optimal 
energy consumption is used for guiding the locomotive to operate in an on-line mode. Due to the fact that off-line calculation is not affected by time factors so that an off-line part can own better optimized space, and in the operation process of the locomotive, a good energy-saving effect can be achieved by utilizing the control gear sequence of operation of the locomotive, wherein the control gear sequence is obtained in the off-line mode. In addition, an on-line control operation result of the locomotive serves as the 
data input of the off-line 
sequence pattern excavation method and the optimization 
algorithm, and therefore off-line learning can be adjusted and optimized continuously.