One or more non-transitory computer-readable storage media storing one or more computer programs including computer-executable instructions that, when executed by one or more processors individually or collectively, cause a cordless vacuum cleaner comprising a main body, a suction fan, a suction motor arranged inside the main body and configured to rotate the suction fan, a plurality of batteries charged and discharged through a charging circuit, and the one or more processors communicatively coupled to the suction motor, the charging circuit, the plurality of batteries, and the memory, to perform operations, the operations comprising:
- receiving, by the processor, state information about each of the plurality of batteries included in the cordless vacuum cleaner,
- selecting, based on the state information about each of the plurality of batteries, a battery having a longest life of the plurality of batteries,
- controlling, by the one or more processors, the selected battery to discharge for operating the suction motor, and
- in response to the controlling of the selected battery for operating the suction motor, controlling to suspend discharging of batteries of the plurality of batteries other than the selected battery,
- wherein the state information comprises a battery discharge amount and a life state of each of the plurality of batteries.