Method of determining device location and electronic device performing the method
Provided are a method of determining a location of a device and/or an electronic device for performing the method. An electronic device according to various example embodiments may include a processor, a communication module which may communicate with a device stored in a memory, wherein the memory which is electronically connected to the processor and stores the device and an instruction to be executed by the processor, and the memory, when operated by the processor, may identify a location of the electronic device in a plurality of areas where the device may be located, determine a candidate location of the device in the plurality of areas based on a signal received from the device and the location of the electronic device, collect a control history of the device using the communication module, and determine the location of the device among the candidate locations based on the control history and the location of the electronic device.
1 . An electronic device comprising:
at least one processor comprising processing circuitry;
a communication module, comprising communication circuitry, configured to communicate with an external device registered in a memory of the electronic device, wherein the external device is physically separate from the electronic device; and
the memory storing instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to:
identify a location of the electronic device in a plurality of areas where the external device may be located,
determine a candidate location of the external device in the plurality of areas based on a signal received from the external device and a location of the electronic device,
obtain a control history of the external device via the communication module, wherein the control history of the external device includes information related to an offline history and an online history, wherein the information related to the offline history is based on records when a control signal is input directly to the external device, and wherein the information related to the online history is based on records when a control signal input by the user in an apparatus other than the external device is transmitted to the external device via the communication module, and
determine a location of the external device among the candidate locations based on the control history and the location of the electronic device.
2 . The electronic device of claim 1 , wherein the memory stores instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to determine the candidate location as an area close to the location of the external device among the plurality of areas, using the strength of the signal, as the strength of the signal becomes stronger.
3 . The electronic device of claim 1 , wherein the memory stores instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to determine the candidate location as an area of the location of the electronic device among the plurality of areas, using the strength of the signal, when the strength of the signal is within a set range.
4 . The electronic device of claim 1 , wherein
the plurality of areas are areas labeled according to a purpose of the area; and
the memory stores instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to determine the candidate location at least by considering the labeling of the plurality of areas and the information of the external device received at least by using the communication module.
5 . The electronic device of claim 1 , wherein the memory stores instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to:
determine the location of the external device at least by comparing a location of the electronic device at a time when the offline control history is generated and the candidate location.
6 . The electronic device of claim 5 , wherein the memory stores instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to determine a location of the external device at least by considering a movement path of the electronic device and the state information of the electronic device when the offline control history is generated.
7 . The method of determining the location of the external device of claim 1 , wherein the memory stores instructions which, when executed individually and/or collectively by the at least one processor, controls the electronic device to periodically collect the signal transmitted from the external device.
8 . A method of determining a location of a device, the method comprising:
identifying a location of an electronic device in a plurality of areas where an external device registered in a memory may be located, wherein the external device is physically separate from the electronic device;
collecting a signal transmitted from the external device to the electronic device;
determining a candidate location of the external device in the plurality of areas based on the location of the electronic device and the signal;
obtaining a control history of the external device, wherein the control history of the external device includes information related to an offline history and an online history, wherein the information related to the offline history is based on records when a control signal is input directly to the external device, and wherein the information related to the online history is based on records when a control signal input by the user in an apparatus other than the external device is transmitted to the external device via the communication module, and
determining the location of the external device from the candidate location based on the control history and the location of the electronic device.
9 . The method of claim 8 , wherein the determining of the candidate location of the external device comprises determining the candidate location as an area close to the location of the electronic device among the plurality of areas, as a strength of the signal becomes stronger.
10 . The method of claim 8 , wherein the determining of the candidate location of the external device comprises determining the candidate location as an area of the location of the electronic device among the plurality of areas, when the strength of the signal is within a set range.
11 . The method of claim 8 , wherein:
the plurality of areas is an area labeled according to a purpose of the area; and
determining the candidate location of the external device determines the candidate location at least by considering the labeling of the plurality of areas and the received information of the external device.
12 . The method of claim 8 , wherein the determining of the location of the external device comprises determining the location of the external device by comparing the location of the electronic device at a time when an offline control history is generated and the candidate location.
13 . The method of claim 12 , wherein determining of the location of the external device comprises determining the location of the external device at least by considering a movement path of the electronic device and the information of the state of the electronic device at a time when the offline control history is generated.
14 . The method of claim 8 , wherein the collecting of the signal periodically comprises collecting the signal transmitted from the external device.