The extensive application of electric vehicles will make a series influence on power gird. Based on V2G technology this paper discusses the charging and discharging strategies, combining the peak-valley price and the travel habit. We propose a non-cooperation master-slave game model, in which the power company decides discharging price, and the owner of electric vehicles decides the amount of charging and discharging. In this game, we incorporate the loss of power grid into the total cost, and the amount of discharging is limited by the surplus power. At the game equilibrium point, both of the participants will achieve the maximum benefits.