An electronic device connected to a second electronic device, comprising: a first switch module, a first electrical connection terminal, a second electrical connection terminal, and a control module, wherein the first switch module is electrically connected between the first electrical connection terminal and the second electrical connection terminal, the first electrical connection terminal is configured to electrically connect to a third electrical connection terminal of a second electronic device, and the second electrical connection terminal is configured to electrically connect to a fourth electrical connection terminal of the second electronic device; the control module is connected to the first switch module to control the first switch module to switch between an on state and an off state; and when the first switch module is in the on state, the electronic device outputs a first current; or when the first switch module is in the off state, the electronic device outputs a second current; the electronic device further comprises: a first power supply, a second power supply (Vcc1, Vcc2), a second switch module, and a third switch module (K1, K2), and the control module is connected to the second switch module and the third switch module respectively; the first power supply is connected to the first electrical connection terminal, and the second power supply is connected to the second electrical connection terminal; a first end of the second switch module is electrically connected to the first power supply, and a second end of the second switch module is electrically connected to the first electrical connection terminal; and a first end of the third switch module is electrically connected to the second power supply, and a second end of the third switch module is electrically connected to the second electrical connection terminal; characterised in that the the first electrical connection terminal is a data positive, DP pin of the electronic device, the second electrical connection terminal is a data negative, DM pin of the electronic device, the third electrical connection terminal is the DP pin of the second electronic device, and the fourth electrical connection terminal is the DM pin of the second electronic device; the electronic device is connected to the second electronic device by a universal serial bus, USB connection cable; an identification, ID pin of the USB connection cable of the second electronic device is grounded. the first switch module is electrically connected between the first electrical connection terminal and the second electrical connection terminal, the first electrical connection terminal is configured to electrically connect to a third electrical connection terminal of a second electronic device, and the second electrical connection terminal is configured to electrically connect to a fourth electrical connection terminal of the second electronic device; the control module is connected to the first switch module to control the first switch module to switch between an on state and an off state; and when the first switch module is in the on state, the electronic device outputs a first current; or when the first switch module is in the off state, the electronic device outputs a second current; the electronic device further comprises: a first power supply, a second power supply (Vcc1, Vcc2), a second switch module, and a third switch module (K1, K2), and the control module is connected to the second switch module and the third switch module respectively; the first power supply is connected to the first electrical connection terminal, and the second power supply is connected to the second electrical connection terminal; a first end of the second switch module is electrically connected to the first power supply, and a second end of the second switch module is electrically connected to the first electrical connection terminal; and a first end of the third switch module is electrically connected to the second power supply, and a second end of the third switch module is electrically connected to the second electrical connection terminal; characterised in that the the first electrical connection terminal is a data positive, DP pin of the electronic device, the second electrical connection terminal is a data negative, DM pin of the electronic device, the third electrical connection terminal is the DP pin of the second electronic device, and the fourth electrical connection terminal is the DM pin of the second electronic device; the electronic device is connected to the second electronic device by a universal serial bus, USB connection cable; an identification, ID pin of the USB connection cable of the second electronic device is grounded.