A charging and discharging device, the charging and discharging device being a charging pile, the charging and discharging device comprising a first direct current/direct current, DC/DC, converter, a unidirectional alternating current/direct current, AC/DC, converter and a control unit, the first DC/DC converter being a unidirectional DC/DC converter, and the control unit being configured to: receive a first charging current sent by a battery management system, BMS, of a battery, and control the unidirectional AC/DC converter and the first DC/DC converter to charge the battery through an alternative current, AC, power source based on the first charging current, the battery being a power battery; receive a first discharging current sent by the BMS, and control the battery to release power based on the first discharging current, wherein the first discharging current is a discharging current sent by the BMS when a first cumulative charge amount of the battery is greater than or equal to a first cumulative charge amount threshold and a voltage of a battery cell of the battery does not exceed a full charge voltage of the battery cell; and receive a second charging current sent by the BMS, and control the unidirectional AC/DC converter and the first DC/DC converter to charge the battery through the AC power source based on the second charging current, wherein the second charging current is a charging current sent by the BMS when a first cumulative discharge amount of the battery is greater than or equal to a first cumulative discharge amount threshold; wherein a first end of the unidirectional AC/DC converter is connected to an AC power source, a second end of the unidirectional AC/DC converter is connected to a first end of the first DC/DC converter, and a second end of the first DC/DC converter is connected to the battery; wherein the charging and discharging device further comprises a second DC/DC converter; and the control unit is specifically configured to: control, based on the first discharging current, the second DC/DC converter to release the power of the battery into an energy storage unit; wherein a second end of the second DC/DC converter is connected to the battery and the second end of the first DC/DC converter, and a first end of the second DC/DC converter is connected to an energy storage unit. receive a first charging current sent by a battery management system, BMS, of a battery, and control the unidirectional AC/DC converter and the first DC/DC converter to charge the battery through an alternative current, AC, power source based on the first charging current, the battery being a power battery; receive a first discharging current sent by the BMS, and control the battery to release power based on the first discharging current, wherein the first discharging current is a discharging current sent by the BMS when a first cumulative charge amount of the battery is greater than or equal to a first cumulative charge amount threshold and a voltage of a battery cell of the battery does not exceed a full charge voltage of the battery cell; and receive a second charging current sent by the BMS, and control the unidirectional AC/DC converter and the first DC/DC converter to charge the battery through the AC power source based on the second charging current, wherein the second charging current is a charging current sent by the BMS when a first cumulative discharge amount of the battery is greater than or equal to a first cumulative discharge amount threshold; wherein a first end of the unidirectional AC/DC converter is connected to an AC power source, a second end of the unidirectional AC/DC converter is connected to a first end of the first DC/DC converter, and a second end of the first DC/DC converter is connected to the battery; wherein the charging and discharging device further comprises a second DC/DC converter; and the control unit is specifically configured to: control, based on the first discharging current, the second DC/DC converter to release the power of the battery into an energy storage unit; wherein a second end of the second DC/DC converter is connected to the battery and the second end of the first DC/DC converter, and a first end of the second DC/DC converter is connected to an energy storage unit. control, based on the first discharging current, the second DC/DC converter to release the power of the battery into an energy storage unit; wherein a second end of the second DC/DC converter is connected to the battery and the second end of the first DC/DC converter, and a first end of the second DC/DC converter is connected to an energy storage unit.