主权项 |
1. A method in a computing device for determining a plurality of server placement locations, the method comprising:
generating, by the computing device, a first plurality of clusters by performing a first clustering algorithm on a graph, wherein the graph includes a plurality of nodes representing a plurality of users and a plurality of edges connecting the plurality of nodes according to known relationships between the plurality of users, wherein each edge of the plurality of edges includes an edge weight, wherein each cluster of the first plurality of clusters includes a centroid and a set of one or more nodes of the plurality of nodes, wherein each node of the set of nodes is included in only one cluster of the first plurality of clusters; generating, by the computing device, a second plurality of clusters by performing a second clustering algorithm comprising,
for each pair of clusters of one or more pairs of clusters of the first plurality of clusters, swapping nodes between the pair of clusters when a swap will:
reduce a total cut weight of the graph, wherein the total cut weight is a sum of edge weights of all edges of the plurality of edges that connect nodes in different clusters, andlocate each node of the pair of nodes, when swapped to the other cluster of the pair of clusters, within a defined maximum distance from the centroid of the other cluster; and causing, by the computing device, information describing geographic locations associated with centroids of the second plurality of clusters to be presented to a user as the plurality of server placement locations. |