A charging method, applicable in a master device whose multifunctional input/output I/O interface is connected to a multifunctional I/O interface of a slave device by means of a connecting line, comprising: receiving a setting signal, and determining a charging direction according to the setting signal; determining that a charging operation comprises the slave device being charged by the master device when the charging direction is a first charging direction; determining that the charging operation comprises the master device is charged by the slave device when the charging direction is a second charging direction; and sending a corresponding charging instruction to a power management chip of the master device and to a power management chip of the slave device according to the charging operation; characterized in that receiving a setting signal, and determining a charging direction according to the setting signal comprises: displaying initial electric power information by means of an electric power control progress bar, wherein the initial electric power information comprises a percentage of total remaining electric power that is master device initial remaining electric power and the percentage of total remaining electric power that is slave device initial remaining electric power, and the total remaining electric power is equal to the sum of the master device initial remaining electric power and the slave device initial remaining electric power; receiving a sliding operation on the electric power control progress bar; determining target electric power information according to the sliding operation, wherein the target electric power information comprises a percentage of master device target remaining electric power accounting for the total remaining electric power and the percentage of slave device target remaining electric power accounting for the total remaining electric power; and determining the charging direction according to the initial electric power information and the target electric power information. receiving a setting signal, and determining a charging direction according to the setting signal; determining that a charging operation comprises the slave device being charged by the master device when the charging direction is a first charging direction; determining that the charging operation comprises the master device is charged by the slave device when the charging direction is a second charging direction; and sending a corresponding charging instruction to a power management chip of the master device and to a power management chip of the slave device according to the charging operation; characterized in that receiving a setting signal, and determining a charging direction according to the setting signal comprises: displaying initial electric power information by means of an electric power control progress bar, wherein the initial electric power information comprises a percentage of total remaining electric power that is master device initial remaining electric power and the percentage of total remaining electric power that is slave device initial remaining electric power, and the total remaining electric power is equal to the sum of the master device initial remaining electric power and the slave device initial remaining electric power; receiving a sliding operation on the electric power control progress bar; determining target electric power information according to the sliding operation, wherein the target electric power information comprises a percentage of master device target remaining electric power accounting for the total remaining electric power and the percentage of slave device target remaining electric power accounting for the total remaining electric power; and determining the charging direction according to the initial electric power information and the target electric power information. displaying initial electric power information by means of an electric power control progress bar, wherein the initial electric power information comprises a percentage of total remaining electric power that is master device initial remaining electric power and the percentage of total remaining electric power that is slave device initial remaining electric power, and the total remaining electric power is equal to the sum of the master device initial remaining electric power and the slave device initial remaining electric power; receiving a sliding operation on the electric power control progress bar; determining target electric power information according to the sliding operation, wherein the target electric power information comprises a percentage of master device target remaining electric power accounting for the total remaining electric power and the percentage of slave device target remaining electric power accounting for the total remaining electric power; and determining the charging direction according to the initial electric power information and the target electric power information.