The product, a zwitterionic polymer, has good viscosification property, heat stability and chemical compatibility in acid fluid. The viscosity of acid fluid prepared by the product and other additives can increase with rising temperature. It can decrease the reaction rate of acid and rock and the deep acidification can be realized.