The invention discloses an intelligent device control method in a heterogeneous computing environment, an intelligent device comprises a host end and an MCU end, the control method comprises the following steps: S1, writing a function control code in the same set of high-level language, adding a specified mark to an entry function executed at the MCU end, and calling a corresponding
basic service function at a place where MCU hardware IO needs to be accessed; s2, converting a function executed by the MCU end in the function control code into a lightweight
byte code, and transmitting the lightweight
byte code to the MCU end; and S3, only sending periodic real-
time function control, sensor reading and
actuator operation write-in tasks to the MCU end for execution. According to the invention, the logic of the host and the MCU end is compiled by using the high-level language in a unified manner, multi-language splitting is avoided, and meanwhile, the MCU end adopts lightweight
byte code interpretation and periodic
memory management, so that occupation during operation can be compressed, and the industrial-level real-time
performance requirement can be met.