US 11,693,843 B2
Data processing method and system of a distributed graph database
Tong Yue, Hangzhou (CN); Bosheng Chen, Hangzhou (CN); and Xiaomeng Ye, Hangzhou (CN)
Assigned to VESOFT INC, Zhejiang (CN)
Filed by Vesoft Inc., Hangzhou (CN)
Filed on Jun. 4, 2021, as Appl. No. 17/303,669.
Claims priority of application No. 202010899494.7 (CN), filed on Aug. 31, 2020; and application No. 202010984750.2 (CN), filed on Sep. 18, 2020.
Prior Publication US 2022/0067011 A1, Mar. 3, 2022
Int. Cl. G06F 16/00 (2019.01); G06F 16/23 (2019.01); G06F 16/27 (2019.01); G06F 16/248 (2019.01); G06F 16/28 (2019.01); G06F 16/22 (2019.01)
CPC G06F 16/235 (2019.01) [G06F 16/2365 (2019.01); G06F 16/248 (2019.01); G06F 16/278 (2019.01); G06F 16/28 (2019.01); G06F 16/2255 (2019.01)] 7 Claims
OG exemplary drawing
 
1. A data processing method of a distributed graph database, comprising:
obtaining a write request of a vertex or an edge;
generating a vertex index of the vertex according to a tag identity (tagID) of the vertex, wherein, the vertex comprises a vertex identity (vertexID) and the tagID;
writing the vertex and the vertex index into a graph partition by performing a hash operation on the vertexID and storing the vertex and the vertex index in the graph partition;
generating an edge index of the edge according to an edgetype of the edge, wherein, the edge comprises a source vertexID and the edgetype;
writing the edge and the edge index into the graph partition by performing a hash operation on the source vertexID and storing the edge and the edge index in the graph partition;
obtaining a data update request of the vertex or the edge, wherein, the data update request comprises a data record to be updated and data update information;
detecting whether the data record is valid, wherein the step of detecting whether the data record is valid comprises:
detecting whether the data record exists;
determining whether the data record has expired if the data record exists;
determining the data record is valid if the data record exists and the data record has not expired;
determining the data record is invalid if the data record does not exist or the data record has expired;
returning update failure information if the data record is invalid;
updating the vertex or the edge according to the data update information if the data record is valid,
wherein the step of updating the vertex or the edge according to the data update information if the data record is valid comprises:
determining whether the data record is valid;
determining whether the data record meets a preset filter condition if the data record is valid;
returning filtering failure information if the data record does not meet the preset filter condition; and
updating the vertex or the edge according to the data update information if the data record meets the preset filter condition; and
wherein after the step of writing the vertex and the vertex index into the graph partition or the step of the edge and the edge index are written into the graph partition, the method further comprises:
obtaining a data query request sent by an application programming interface (API) client, verifying the validity of the data query request by calling a metadata server, sending the data query request to a graph partition in a storage server by a storage client, performing parallel index scanning on the graph partition according to the data query request, wherein, a query range of the data query request is determined by a graph partitionID and the tagID, or determined by a graph partitionID and the edgetype; and
obtaining result set by querying the storage server, summarizing the result set and returning summarized result set to the API client.