A battery module, wherein the battery module is configured to discharge to a terminal device, and the battery module comprises a detection and control unit, a buck-boost unit, and a cell pack; the detection and control unit is configured to: receive a terminal-required voltage sent by the terminal device; and control the buck-boost unit to discharge to the terminal device through the cell pack based on the terminal-required voltage; characterized in that the control unit is further configured to: receive a load input voltage that is of the terminal device in a first period and that is sent by the terminal device, where the load input voltage in the first period is a load port voltage detected by the terminal device in the first period; obtain a line voltage drop in the second period based on the load input voltage of the terminal device in the first period and the output voltage of the buck-boost unit in the second period; and after obtaining the line voltage drop in the second period, obtain a line impedance based on the output current of the buck-boost unit in the second period and the line voltage drop in the second period; obtain a line voltage drop in the first period based on the line impedance and an output current of the buck-boost unit in the first period; obtain a fourth target output voltage based on the line voltage drop in the first period and the terminal-required voltage; and control the buck-boost unit to discharge to the terminal device based on the fourth target output voltage through the cell pack. receive a terminal-required voltage sent by the terminal device; and control the buck-boost unit to discharge to the terminal device through the cell pack based on the terminal-required voltage; characterized in that the control unit is further configured to: receive a load input voltage that is of the terminal device in a first period and that is sent by the terminal device, where the load input voltage in the first period is a load port voltage detected by the terminal device in the first period; obtain a line voltage drop in the second period based on the load input voltage of the terminal device in the first period and the output voltage of the buck-boost unit in the second period; and after obtaining the line voltage drop in the second period, obtain a line impedance based on the output current of the buck-boost unit in the second period and the line voltage drop in the second period; obtain a line voltage drop in the first period based on the line impedance and an output current of the buck-boost unit in the first period; obtain a fourth target output voltage based on the line voltage drop in the first period and the terminal-required voltage; and control the buck-boost unit to discharge to the terminal device based on the fourth target output voltage through the cell pack. receive a load input voltage that is of the terminal device in a first period and that is sent by the terminal device, where the load input voltage in the first period is a load port voltage detected by the terminal device in the first period; obtain a line voltage drop in the second period based on the load input voltage of the terminal device in the first period and the output voltage of the buck-boost unit in the second period; and after obtaining the line voltage drop in the second period, obtain a line impedance based on the output current of the buck-boost unit in the second period and the line voltage drop in the second period; obtain a line voltage drop in the first period based on the line impedance and an output current of the buck-boost unit in the first period; obtain a fourth target output voltage based on the line voltage drop in the first period and the terminal-required voltage; and control the buck-boost unit to discharge to the terminal device based on the fourth target output voltage through the cell pack. <EOS>