The invention discloses a track space-time conflict based integer programming modeling method, which comprises the steps of station route information collection, train selectable route matching, integer programming modeling and model solving and operation process output, wherein in the step of station route information collection, information of tracks required to be passed in order to use each in-route at a conflict-free state, turnout information and occupation time information of each track are collected; in the step of train selectable route matching, a train route matching operation is performed on each train with an operation plan to be compiled, and an in-route pair set is generated; in the step of integer programming modeling, variable and symbol definition, constraint definition and target definition are performed, and a plurality of object lists are generated; and in the step of model solving and operation process output, a model is solved by using a branch and bound method, and the train is compiled. The method disclosed by the invention is high in equipment utilization rate and high in compiling efficiency, and can set different compiling objectives, optimize the compiling structure and avoid conflicts of trains; and the safety on the aspects of time and space is guaranteed.