CPC G06F 16/29 (2019.01) [G06F 9/54 (2013.01); G06F 16/2255 (2019.01); G06F 16/258 (2019.01)] | 16 Claims |
1. A method for dividing geographical regions performed at a computing device, the method comprising:
encoding latitudes and longitudes in a first dataset to obtain a second dataset, the first dataset recording N groups of latitudes and longitudes, each pair of latitude and longitude corresponding to a respective geographical region, N being a positive integer, and N≥1, and the second dataset recording N region numbers, and each of the N region numbers being used for representing a corresponding geographical region;
obtaining a third dataset from the second dataset, the third dataset including M groups of region numbers, each group of region numbers representing central point latitudes and central point longitudes in the geographical regions represented by the group of region numbers, M being a positive integer, M≥1, and M being a quantity of groups of region numbers; and
dividing the geographical regions represented by the M groups of region numbers into P regions according to the third dataset, including:
selecting an unmarked central point from M central points corresponding to M groups of region numbers as a current central point;
marking, according to a quantity of central points other than the current central point existing in a predetermined range, the current central point as a core object, a non-core object, or a noise object;
determining a first region in the P regions based on the marked current central point and at least one of the central points other than the current central point existing in the predetermined range;
determining a second region neighboring the first region in the P regions, the quantity of the geographical regions comprised in the first region being less than a fourth predetermined threshold;
adding the geographical regions comprised in the first region to the second region; and
displaying, by the computing device, the P regions and/or the geographical regions represented by the M groups of region numbers on an electronic map to a client,
wherein P being a positive integer, P≥1, and each of the regions comprising at least one of the geographical regions represented by the corresponding group of region numbers.
|