Two 5V Raspberry Pi UPS Idea
I'll just comment on the first proposal.


  The first solution uses a relay that switches the 5 V output from power supply to 20000 mAh bank power. In order not to reset the raspberry when relay switching power source, the voltage for 2 seconds is maintained by the super capacitors. When blackout end, the relay should switch back to the power supply.


Let's draw a simplified circuit with the mains power on.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. A simplified version of the mains-powered switching.


Mains is switched on. U1 generates DC output.
RLY1 is energised. A great big spark occurs on the relay contact as C1 initially appears as a super-short circuit and has to be charged.
C1 charges up at a rate determined by the current limit of the PSU.
Mains power is lost.
Current now flows backwards from C1 to the relay coil through the NO contact. The relay remains energised until C1 discharges below the relay hold-on voltage. This is typically 40 to 60% of the pick-up voltage. It then slowly drops out until the contacts open and the rest of the contact transfer motion occurs quickly.
Meanwhile the Pi has lost power and will reboot when the battery connects.


Option 2 has a better chance of success.