A method for controlling a control device using a control signal based on a virtual code, the method comprising: receiving, by a wireless communication unit of the control device, the control signal generated at a specific time point, from a control signal generating means, wherein the control signal includes the virtual code and the virtual code is generated by combining a plurality of detailed codes depending on a specific rule; extracting, by a control module of the control device, the plurality of detailed codes included in the virtual code; searching, by the control module, for a specific command based on the plurality of detailed codes; and verifying whether the virtual code is generated within a preset time range including a current time point based on the plurality of detailed codes, characterized in that the plurality of detailed codes are generated differently for each unit count that is changed per a specific time interval elapses, wherein the plurality of virtual code generation functions includes a first code generation function and a second code generation function, wherein the first code generation function and the second code generation function generate a different code when a corresponding command or unit count is different, wherein the detailed code includes: a first code for setting a search start point of the specific command; and a second code for setting a search path from the search start point to the specific command depending on a specific search method, and wherein the first code and the second code are changed for each unit count. receiving, by a wireless communication unit of the control device, the control signal generated at a specific time point, from a control signal generating means, wherein the control signal includes the virtual code and the virtual code is generated by combining a plurality of detailed codes depending on a specific rule; extracting, by a control module of the control device, the plurality of detailed codes included in the virtual code; searching, by the control module, for a specific command based on the plurality of detailed codes; and verifying whether the virtual code is generated within a preset time range including a current time point based on the plurality of detailed codes, characterized in that the plurality of detailed codes are generated differently for each unit count that is changed per a specific time interval elapses, wherein the plurality of virtual code generation functions includes a first code generation function and a second code generation function, wherein the first code generation function and the second code generation function generate a different code when a corresponding command or unit count is different, wherein the detailed code includes: a first code for setting a search start point of the specific command; and a second code for setting a search path from the search start point to the specific command depending on a specific search method, and wherein the first code and the second code are changed for each unit count. a first code for setting a search start point of the specific command; and a second code for setting a search path from the search start point to the specific command depending on a specific search method, and wherein the first code and the second code are changed for each unit count.