1. A snapshot data processing method, applied to an electronic device, the method comprising: obtaining, by a processor, a predicted size of snapshot data according to a used size of a main storage device of the electronic device and a previous compression ratio; determining, by the processor, a size of a space according to the predicted size of the snapshot data; generating, by the processor, the snapshot data in the main storage device of the electronic device when the electronic device is entering a hibernation state; allocating, by an allocator, a space in a non-volatile storage device of the electronic device for storing the snapshot data; storing the snapshot data in the space of the non-volatile storage device directly without encrypting the snapshot data using the first encryption algorithm; enciphering, by the processor, other data which is needed to be stored in the non-volatile storage by the first encryption algorithm; and restoring, by the processor, a system state according to the snapshot data when the electronic device is awakened from the hibernation state.