Early access to electricity, charging capacitor C1 passes through 10 k resistor R1 charge, C1 electricity increase from low level to Vcc slowly and become stablePower cuts, C1 potential close to Vcc, through two road IC the Vcc power supply end of the discharge, all the way through the R1 discharge, all the way through the diode discharge quickly, without the presence of D1, C1 only through 10 k resistor to discharge to the Vcc power supply end of the IC slowly, so, the presence of D1, discharge speed is much faster than the speed of charging.