The electronic structures of Heusler alloys X2RuPb (X=Lu, Y) under different conditions are investigated using the first-principles calculations. It is found that the alloys become the real topological insulators under a proper lattice deformation or doping. The spin-orbital coupling and the interatomic hybridization effect reinforce each other to perform the band inversion in X2RuPb (X=Lu, Y) compounds and they play roles to different degrees for the materials with different compositions. The ideal topological insulators are easier to obtain using simultaneously lattice deformation and doping artifices, which is available in practical material preparation.