What is claimed is:
1. An electronic device comprising:
a sensor configured to sense a magnetic field;
memory storing instructions; and
at least one processor,
wherein the instructions, when executed individually or collectively by the at least one processor, cause the electronic device to:
collect multiple pieces of first path data based on at least a plurality of first magnetic data obtained during multiple movements of the electronic device in an indoor space by using at least the sensor, each of the multiple pieces of the first path data corresponding to a different path traveled by the electronic device;
identify multiple pieces of second path data, which are similar to each other at a predetermined level or higher, from among the multiple pieces of the first path data;
determine an intersection area in which each of the different paths corresponding to the multiple pieces of the second path data traveled by the electronic device at least partially overlap each other;
determine a first space and a second space in the indoor space based on at least the intersection area and areas corresponding to the identified multiple pieces of second path data, wherein the intersection area is between the first space and the second space.
2. The electronic device of claim 1 , wherein the at least one processor is further configured to group multiple pieces of fourth magnetic data having mutually identical and/or similar first distribution characteristics with reference to the multiple pieces of second path data among the multiple pieces of the first path data, and
group multiple pieces of fifth magnetic data having mutually identical and/or similar second distribution characteristics, different from the first distribution characteristics, with reference to the multiple pieces of second path data among the multiple pieces of the first path data.
3. The electronic device of claim 2 , wherein the at least one processor is further configured to determine an area range, in which the multiple pieces of fourth magnetic data are collected, to be the first space in a designated indoor space related to the collection of the multiple pieces of the first path data, and
determine an area range, in which the multiple pieces of fifth magnetic data are collected, to be the second space within the designated indoor space.
4. The electronic device of claim 2 , wherein the at least one processor is further configured to collect the first magnetic data at each of multiple points on a path corresponding to a designated time interval, with regard to each of multiple paths regarding multiple movements of the electronic device, and
generate a virtual marker for a point on the path, on which the first magnetic data has been collected, by using at least the first magnetic data.
5. The electronic device of claim 4 , wherein the at least one processor is further configured to generate a first index for the first space including multiple first virtual markers generated based on at least the multiple pieces of fourth magnetic data, and
generate a second index for the second space including multiple second virtual markers generated based on at least the multiple pieces of fifth magnetic data.
6. The electronic device of claim 5 , wherein the at least one processor is further configured to compare third magnetic data acquired via the sensor with at least one of the multiple first virtual markers and the multiple second virtual markers.
7. The electronic device of claim 6 , wherein the at least one processor is further configured to determine a space, in which the electronic device is located, to be the first space when the third magnetic data is similar to at least one of the multiple first virtual markers at a designated level or higher, and
determine a space, in which the electronic device is located, to be the second space when the third magnetic data is similar to at least one of the multiple second virtual markers at a predetermined level or higher.
8. A positioning method by an electronic device, the positioning method comprising:
collecting multiple pieces of first path data based on at least a plurality of first magnetic data obtained during multiple movements of the electronic device in an indoor space by using at least a sensor configured to sense a magnetic field, each of the multiple pieces of the first path data corresponding to a different path traveled by the electronic device;
identifying multiple pieces of second magnetic-path data, which are similar to each other at a predetermined level or higher, from among the multiple pieces of the first path data;
determining an intersection area in which each of the different paths corresponding to the multiple pieces of the second path data traveled by the electronic device at least partially overlap each other;
determining a first space and a second space in the indoor space based on at least the intersection area and areas corresponding to the identified multiple pieces of second path data, wherein the intersection area is between the first space and the second space.
9. The positioning method of claim 8 , wherein the determining of the first space and the second space comprises:
grouping multiple pieces of fourth magnetic data having mutually identical and/or similar first distribution characteristics with reference to the multiple pieces of second path data among the multiple pieces of the first path data; and
grouping multiple pieces of fifth magnetic data having mutually identical and/or similar second distribution characteristics, different from the first distribution characteristics, with reference to the multiple pieces of second path data among the multiple pieces of the first path data.
10. The positioning method of claim 9 , wherein the determining of the first space and the second space further comprises:
determining an area range, in which the multiple pieces of fourth magnetic data are collected, to be the first space in a designated indoor space related to the collection of the multiple pieces of the first path data; and
determining an area range, in which the multiple pieces of fifth magnetic data are collected, to be the second space within the designated indoor space.
11. The positioning method of claim 9 , wherein the collecting of multiple pieces of path data based on at least the first magnetic data comprises:
collecting the first magnetic data at each of multiple points on a path corresponding to a designated time interval, with regard to each of multiple paths regarding the multiple movements of the electronic device; and
generating a virtual marker for a point on the path, on which the first magnetic data has been collected, by using at least the first magnetic data.
12. The positioning method of claim 11 , wherein the generating of the virtual marker comprises:
generating a first index for the first space including multiple first virtual markers generated using at least the multiple pieces of fourth magnetic data; and
generating a second index for the second space including multiple second virtual markers generated using at least the multiple pieces of fifth magnetic data.
13. The positioning method of claim 12 , wherein the determining of a space in which the electronic device is located comprises comparing third magnetic data acquired via the sensor with at least one of the multiple first virtual markers and the multiple second virtual markers.
14. The positioning method of claim 13 , wherein the determining of a space in which the electronic device is located further comprises:
determining a space, in which the electronic device is located, to be the first spac