Algorithm principle of energy storage charging pile