The intelligent anti-seismic device for the shallow foundation ancient building of claim 1, wherein the second earthquake proof mechanism comprises a third pedestal, a second mounting seat, a third rubber seat, a fourth pedestal and a fourth rubber seat, the third pedestal is symmetrically fixed on an upper surface of the well-shaped base and the third pedestal is fixedly connected with the grillage beam, the second mounting seat is fixed on a top of that third pedestal, the third rubber seat is fixed on a top of the second mounting seat, the fourth pedestal is arranged above the third pedestal, and the fourth rubber seat is fixed on a bottom of the fourth pedestal and the third rubber seat is matched with the fourth rubber seat. 3. The intelligent anti-seismic device for the shallow foundation ancient building of claim 2, wherein the correction mechanism comprises a fixed shell, a rotating shaft, a gear, a rack and an encoder, the fixed shell is fixed on an upper surface of the first mounting seat, the rotating shaft is rotatably connected with an inner wall of the fixed shell through a bearing, the gear is fixed in a middle of the rotating shaft, the rack is fixed on the bottom of the second pedestal and the gear is meshed with the rack, the encoder is fixed on one side of the fixed shell, and an input end of the encoder is fixedly connected with the rotating shaft.