The invention discloses a data protection method for preventing power down, and belongs to the field of information safety. The method includes A, powering on a
java card
virtual machine, judging whether power on and
data recovery are necessary or not, if so, writing
backup page data into a target storing area, and executing B; if not, executing B directly; B, when triggered operation for writing data to the target storing area is detected, acquiring a current target storage page number according to address computing of data to be written; C, judging whether the current target storage page number exists in cache or not, if so, using the data to be written to modify cache data, and executing D; if not, writing target storage page data in a
backup page firstly, then writing in the cache, using the data to be written to modify the cache data, and executing D; D, when the data to be written is processed completely, writing the cache data into the target storing area, and
data recovery is omitted while powering on. By adopting the technical scheme, when power down occurs in unknown conditions, original
storage area data can be recovered and safety of the
original data is guaranteed.