An electronic device comprising: a communication circuit configured to communicate with an external electronic device; at least one processor operatively connected to the communication circuit; and a memory operatively connected to the at least one processor, wherein, the memory is configured to store instructions which, when executed, cause the at least one processor to control the electronic device to: acquire first information on types of a plurality of objects disposed within a first space and second information on locations of the plurality of objects in a first direction for the first space, select a target object to be named from among the plurality of objects, generate at least one first name of the target object based on information on a type of the target object in the first information, generate at least one second name of at least one counterpart object based on information on a type of the counterpart object disposed within a specified distance of the target object in the first information, determine a relative location relation between the target object and the at least one counterpart object based on the second information, generate at least one third name of the target object based on the at least one first name, the at least one second name, and the relative location relation between the target object and the at least one counterpart object, identify the target object based on the at least one third name included in a result of voice recognition result on a voice input of a user, and transmit, to the target object, a signal corresponding to an instruction included in the result of the voice recognition. a communication circuit configured to communicate with an external electronic device; at least one processor operatively connected to the communication circuit; and a memory operatively connected to the at least one processor, wherein, the memory is configured to store instructions which, when executed, cause the at least one processor to control the electronic device to: acquire first information on types of a plurality of objects disposed within a first space and second information on locations of the plurality of objects in a first direction for the first space, select a target object to be named from among the plurality of objects, generate at least one first name of the target object based on information on a type of the target object in the first information, generate at least one second name of at least one counterpart object based on information on a type of the counterpart object disposed within a specified distance of the target object in the first information, determine a relative location relation between the target object and the at least one counterpart object based on the second information, generate at least one third name of the target object based on the at least one first name, the at least one second name, and the relative location relation between the target object and the at least one counterpart object, identify the target object based on the at least one third name included in a result of voice recognition result on a voice input of a user, and transmit, to the target object, a signal corresponding to an instruction included in the result of the voice recognition. acquire first information on types of a plurality of objects disposed within a first space and second information on locations of the plurality of objects in a first direction for the first space, select a target object to be named from among the plurality of objects, generate at least one first name of the target object based on information on a type of the target object in the first information, generate at least one second name of at least one counterpart object based on information on a type of the counterpart object disposed within a specified distance of the target object in the first information, determine a relative location relation between the target object and the at least one counterpart object based on the second information, generate at least one third name of the target object based on the at least one first name, the at least one second name, and the relative location relation between the target object and the at least one counterpart object, identify the target object based on the at least one third name included in a result of voice recognition result on a voice input of a user, and transmit, to the target object, a signal corresponding to an instruction included in the result of the voice recognition.