A method for controlling an Internet of Things (IoT) device, applied to a terminal device, comprising: acquiring (S210) parameter information of a triggered key of a mouse, wherein the parameter information includes a key value of the key and a state of the key; determining (S220) a target device and target operation information acting on the target device based on the parameter information; and sending (S230) device information of the target device and the target operation information to a server; wherein determining (S220) the target device and the target operation information acting on the target device based on the parameter information comprises: acquiring (S320) configuration information, wherein the configuration information is configured to represent a correspondence between the key value of the key and the IoT device and a correspondence between the state of the key and operation information; and determining (S330) the target device and the target operation information acting on the target device based on the parameter information and the configuration information; and wherein the key value of a left key of the mouse corresponds to a first IoT device, the key value of a right key of the mouse corresponds to a second IoT device, and the key value of a middle key of the mouse corresponds to a third IoT device. acquiring (S210) parameter information of a triggered key of a mouse, wherein the parameter information includes a key value of the key and a state of the key; determining (S220) a target device and target operation information acting on the target device based on the parameter information; and sending (S230) device information of the target device and the target operation information to a server; wherein determining (S220) the target device and the target operation information acting on the target device based on the parameter information comprises: acquiring (S320) configuration information, wherein the configuration information is configured to represent a correspondence between the key value of the key and the IoT device and a correspondence between the state of the key and operation information; and determining (S330) the target device and the target operation information acting on the target device based on the parameter information and the configuration information; and wherein the key value of a left key of the mouse corresponds to a first IoT device, the key value of a right key of the mouse corresponds to a second IoT device, and the key value of a middle key of the mouse corresponds to a third IoT device. acquiring (S320) configuration information, wherein the configuration information is configured to represent a correspondence between the key value of the key and the IoT device and a correspondence between the state of the key and operation information; and determining (S330) the target device and the target operation information acting on the target device based on the parameter information and the configuration information; and wherein the key value of a left key of the mouse corresponds to a first IoT device, the key value of a right key of the mouse corresponds to a second IoT device, and the key value of a middle key of the mouse corresponds to a third IoT device. <EOS>