The invention provides a method and device for importing data into a gallery based on rocksdb and a storage medium, and the method comprises the steps: classifying the data to be imported into the gallery to obtain a plurality of data categories, setting a
category identifier for each data category, and setting an edge relation between the data in each data category; based on a rocksdb vertex duplicate removal
database, performing duplicate removal on data in each data category, and inserting the data into the image
library as a vertex; and based on the rocksdb edge duplicate removal
database,performing duplicate removal on the edge relationship among the data, and inserting the edge relationship into the image
library as an edge. According to the method, firstly, a rocksdb vertex duplicate removal
database and a rocksdb edge duplicate removal database which correspond to data types are constructed; the method comprises the following steps of: importing data into a gallery; accordingto the technical scheme, the vertex importing is firstly carried out, and then the vertex importing is carried out after the vertex importing is completed, so that the problem that the actual data isrepeated and unavailable due to the fact that id is not duplicated when the Titan / Janus Graph image
library is imported is solved, and due to the fact that the duplicate removal library of multiple types is established, the duplicate removal efficiency is improved, and the user experience is improved.