The application belongs to the technical field of computers and discloses a general
metadata operation method and
system based on a
graph database, which comprises the following steps: S1, using a configuration file yml of SpringBoot to configure to create a
connection pool SessionPool of a NebulaGraph
Database graph database based on a NebulaPool custom implementation, containing definitions of maxCountSession, minCountSession, hostAndPort, userName and
passWord parameters; S2, defining parameter models for accepting different interfaces, including a model for creating a graph space, a model for creating a point, a model for creating an edge, a model for creating an index and a general query model; S3, using an independently developed NebulaUtil tool to automatically arrange nGQL statements for the accepted parameter models according to the input models; S4, defining different Controller
layers to provide an open and unified Api interface externally; S5, using an execution service of a GraphCommonService
graph database to obtain an effective connection of the NebulaGraph
Database graph
database from the SessionPool; and S6, executing the nGQL statements automatically arranged by the NebulaUtil tool and analyzing and returning a result model, and uniformly returning the result.