A method for identifying a master battery pack, comprising: obtaining, by a first battery pack, an identifier of the first battery pack after the first battery pack is connected to a battery cabinet of a power cabinet; obtaining, by the first battery pack, identifiers of one or more other battery packs in their respective battery cabinets of the power cabinet through a communication bus, wherein a number of the one or more other battery packs plus the first battery pack is N, wherein N is a positive integer; sorting, by the first battery pack, the identifier of the first battery pack and the identifiers of the one or more other battery packs to obtain a sorted result; identifying, by the first battery pack, the master battery pack and one or more slave battery packs among the first battery pack and the one or more other battery packs according to the sorted result; characterized by : detecting, by the first battery pack, that the master battery pack is removed from its battery cabinet; detecting, by the first battery pack, that a new battery pack is not connected to any of the battery cabinets within a time period after the master battery pack is removed, wherein the time period indicates a longest time that the power cabinet continues to operate in its current configuration after the master battery pack is removed; and identifying, by the first battery pack, a new master battery pack and new slave battery packs according to the sorted result when the new battery pack is not connected to any of the battery cabinets within the time period. obtaining, by a first battery pack, an identifier of the first battery pack after the first battery pack is connected to a battery cabinet of a power cabinet; obtaining, by the first battery pack, identifiers of one or more other battery packs in their respective battery cabinets of the power cabinet through a communication bus, wherein a number of the one or more other battery packs plus the first battery pack is N, wherein N is a positive integer; sorting, by the first battery pack, the identifier of the first battery pack and the identifiers of the one or more other battery packs to obtain a sorted result; identifying, by the first battery pack, the master battery pack and one or more slave battery packs among the first battery pack and the one or more other battery packs according to the sorted result; characterized by : detecting, by the first battery pack, that the master battery pack is removed from its battery cabinet; detecting, by the first battery pack, that a new battery pack is not connected to any of the battery cabinets within a time period after the master battery pack is removed, wherein the time period indicates a longest time that the power cabinet continues to operate in its current configuration after the master battery pack is removed; and identifying, by the first battery pack, a new master battery pack and new slave battery packs according to the sorted result when the new battery pack is not connected to any of the battery cabinets within the time period. detecting, by the first battery pack, that the master battery pack is removed from its battery cabinet; detecting, by the first battery pack, that a new battery pack is not connected to any of the battery cabinets within a time period after the master battery pack is removed, wherein the time period indicates a longest time that the power cabinet continues to operate in its current configuration after the master battery pack is removed; and identifying, by the first battery pack, a new master battery pack and new slave battery packs according to the sorted result when the new battery pack is not connected to any of the battery cabinets within the time period. <EOS>