Variable white dwarfs in TMTS: asteroseismological analysis of a ZZ Ceti star, TMTS J17184064+2524314