This application belongs to the field of
computer technology, specifically relating to a
data query method, a
data query device, a computer-readable medium, an electronic device, and a
computer program product. The method includes:
parsing a
data query request to obtain query conditions, the query conditions including one or more of a subject, an object, and a predicate, the predicate representing the
logical relationship between the subject and the object; determining a target data partition in a
graph database based on the query conditions, the
graph database including a first-
level data partition obtained by dividing regions according to the density relationship between nodes, the first-
level data partition including a second-
level data partition obtained by dividing regions according to the
logical relationship between nodes; and retrieving data query results matching the query conditions from the target data partition. This application can improve data query efficiency and reduce
resource consumption in the data query process.