1. A graph data query method, applied to query of graph data in a graph data whole set, wherein the graph data whole set comprises multiple vertices and an edge between every two vertices that have a connection relationship; partitioning and layering are performed on the multiple vertices in the graph data whole set; a number of a partition in which a vertex is located is used as a partition number of the vertex; a shortest distance between a vertex and a partition border of a partition in which the vertex is located is used as a layer number of the vertex; the method comprising: acquiring a query condition, and a partition number and a layer number of a query vertex indicated by the query condition; determining, based on the partition number and the layer number of the query vertex, a partition number and a layer number of a candidate vertex indicated by the query condition, and using the partition number and the layer number of the candidate vertex respectively as a candidate partition number and a candidate layer number, wherein the candidate vertex is a vertex that needs to be queried according to the query condition; forming a candidate set using a vertex whose partition number and layer number satisfy any group of a candidate partition number and a candidate layer number; and performing graph data query in the candidate set according to the query condition.
2. The method according to claim 1 , wherein a layer number of a vertex incapable of reaching a partition border of a partition in which the vertex is located is a default layer number, and the default layer number is different from a layer number of a vertex capable of reaching a partition border of a partition in which the vertex is located; and when the layer number of the query vertex is the default layer number, forming the candidate set using the vertex whose partition number and layer number satisfy any group of the candidate partition number and the candidate layer number comprises: forming a candidate set using a vertex whose partition number is the partition number of the query vertex and whose layer number is the default layer number.