The embodiments of this specification disclose a group query method, apparatus, and device, belonging to the field of graph data technology. The method includes: obtaining node-related data for offline calculation, wherein the offline calculation includes: a priori step, a setting step, and a discovery step; in the priori step, obtaining group prior knowledge of a portion of nodes in a graph topology
data set; in the setting step, setting group labels for each portion of nodes as supervision data based on the group prior knowledge, and initializing the group labels of each remaining node; in the discovery step, performing
group discovery in the graph topology
data set based on the supervision of the supervision data and the initialized group labels;
synchronizing the results of the
group discovery to an online storage
database; and upon receiving a query
data set containing multiple nodes submitted by a user, querying the online storage
database for the groups to which at least some of the multiple nodes belong, and responding to the user based on the query results.