Energy storage charging pile detection and charging method