A method for switching state, applied in a first apparatus (120,31) comprising a first Universal Serial Bus 'USB' interface and a first USB interface circuit, comprising: when it is detected that the first USB interface is connected with a second USB interface of a second apparatus (140,32) via a connecting cable, acquiring an apparatus state of the first apparatus (120,31), the apparatus state indicating that the first apparatus (120,31) is in a master apparatus state or a slave apparatus state; and displaying a state switching prompt box (311,321) at least containing the apparatus state and a state switching control option, the state switching control option being used for triggering a state switching instruction; receiving the state switching instruction triggered with the state switching control option, for instructing the first apparatus to change its current apparatus state; when the state switching instruction instructs the first apparatus (120,31) to perform a master-to-slave switch, setting a level of a Configuration Channel 'CC' pin in the USB interface circuit from a high level to a low level via a logic controller; when the state switching instruction instructs the first apparatus (120,31) to perform a slave-to-master switch, setting the level of the CC pin in the first USB interface circuit from the low level to the high level via the logic controller; sending a level changing signal to the second apparatus (140,32) via the connecting cable, the level changing signal being used for indicating the second apparatus (140, 32) to change the level of the CC pin in a second USB interface circuit in the second apparatus (140, 32); when it is detected that the level of the CC pin in the second USB interface circuit in the second apparatus (140, 32) changes from the low level to the high level, displaying master-to-slave switching success information, the master-to-slave switching success information being used for indicating that the first apparatus (120,31) has been switched from the master apparatus state to the slave apparatus state; when it is detected that the level of the CC pin in the second USB interface circuit in the second apparatus (140, 32) changes from the high level to the low level, displaying slave-to-master switching success information, the slave-to-master switching success information being used for indicating that the first apparatus (120, 31) has been switched from the slave apparatus state to the master apparatus state. when it is detected that the first USB interface is connected with a second USB interface of a second apparatus (140,32) via a connecting cable, acquiring an apparatus state of the first apparatus (120,31), the apparatus state indicating that the first apparatus (120,31) is in a master apparatus state or a slave apparatus state; and displaying a state switching prompt box (311,321) at least containing the apparatus state and a state switching control option, the state switching control option being used for triggering a state switching instruction; receiving the state switching instruction triggered with the state switching control option, for instructing the first apparatus to change its current apparatus state; when the state switching instruction instructs the first apparatus (120,31) to perform a master-to-slave switch, setting a level of a Configuration Channel 'CC' pin in the USB interface circuit from a high level to a low level via a logic controller; when the state switching instruction instructs the first apparatus (120,31) to perform a slave-to-master switch, setting the level of the CC pin in the first USB interface circuit from the low level to the high level via the logic controller; sending a level changing signal to the second apparatus (140,32) via the connecting cable, the level changing signal being used for indicating the second apparatus (140, 32) to change the level of the CC pin in a second USB interface circuit in the second apparatus (140, 32); when it is detected that the level of the CC pin in the second USB interface circuit in the second apparatus (140, 32) changes from the low level to the high level, displaying master-to-slave switching success information, the master-to-slave switching success information being used for indicating that the first apparatus (120,31) has been switched from the master apparatus state to the slave apparatus state; when it is detected that the level of the CC pin in the second USB interface circuit in the second apparatus (140, 32) changes from the high level to the low level, displaying slave-to-master switching success information, the slave-to-master switching success information being used for indicating that the first apparatus (120, 31) has been switched from the slave apparatus state to the master apparatus state.