The comprehensive security system provides more stable, reliable and efficient upgrade services for the terminal, supporting intermittent transfer, power failure protection, intelligent restoration and a traceable security mechanism to protect each upgrade from malicious alteration.