CN113177142A - Method, system, equipment and storage medium for storing extended graph database - Google Patents
Method, system, equipment and storage medium for storing extended graph database Download PDFInfo
- Publication number
- CN113177142A CN113177142A CN202110310437.5A CN202110310437A CN113177142A CN 113177142 A CN113177142 A CN 113177142A CN 202110310437 A CN202110310437 A CN 202110310437A CN 113177142 A CN113177142 A CN 113177142A
- Authority
- CN
- China
- Prior art keywords
- attribute data
- graph database
- preset
- vertex
- storage engine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000012545 processing Methods 0.000 claims abstract description 31
- 238000001914 filtration Methods 0.000 claims abstract description 24
- 238000006243 chemical reaction Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 13
- 230000009466 transformation Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 10
- 238000013500 data storage Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000013499 data model Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a method, a system, equipment and a storage medium for storing an expansion map database, wherein the method comprises the following steps: the attribute data in the graph database comprises first attribute data and second attribute data, the attribute data in the graph database is subjected to preset naming processing, the first attribute data and the second attribute data in the graph database are separated through preset filtering processing, the first attribute data comprise vertex core attribute data and edge attribute data, the second attribute data comprise vertex non-core attribute data, the first attribute data are stored in the graph database, and the second attribute data are stored in an external storage engine. By the method and the device, the problems that the graph database has excessive attributes and the loading occupies excessive memory resources are solved, the detailed information of the vertexes can be selectively inquired in an external storage engine, and the efficiency of inquiring the relation of the graph library is improved.
Description
Technical Field
The present application relates to the field of graph databases, and in particular, to a method, a system, a device, and a storage medium for an extended graph database storage structure.
Background
The internet data exponentially increases, the relationship between data is more and more complex, the result cannot be calculated in effective time along with the increase of data volume and depth in the traditional relational database, and the database technology can store the relational information as an entity and flexibly expand a data model. However, as the data volume and depth increase, the graph database also has problems of excessive vertex attributes and excessive memory resources occupied by loading, and this problem also becomes one of the problems to be solved in the current graph database field.
At present, no effective solution is provided for the problem that graph database vertex attributes are excessive and loading occupies excessive memory resources in the related technology.
Disclosure of Invention
The embodiment of the application provides a method, a system, equipment and a storage medium for expanding a graph database storage structure, which are used for at least solving the problems that graph database vertex attributes are too much and loading occupies too much memory resources in the related technology.
In a first aspect, an embodiment of the present application provides a method for extending a database storage structure, where the method includes:
attribute data in the graph database includes first attribute data and second attribute data;
performing preset naming processing on attribute data in the graph database, and separating first attribute data and second attribute data in the graph database through preset filtering processing, wherein the first attribute data comprise vertex core attribute data and edge attribute data, and the second attribute data comprise vertex non-core attribute data;
and saving the first attribute data in the graph database, and saving the second attribute data in an external storage engine.
In some embodiments, the performing a preset naming process on attribute data in a graph database, and the separating a first attribute data and a second attribute data in the graph database by a preset filtering process includes:
naming first attribute data in the graph database by beginning with a character uniformly; naming second attribute data in the graph database uniformly without beginning with a character;
and separating the first attribute data and the second attribute data in the graph database through preset filtering processing according to the preset naming processing rule.
In some of these embodiments, saving the first attribute data in the graph database and saving the second attribute data in an external storage engine comprises:
storing the second attribute data in a preset cache;
after the first attribute data are stored in the graph database, returning a unique ID number of a vertex;
saving the second attribute data and the vertex unique ID number in an external storage engine.
In some of these embodiments, saving the second attribute data and the vertex unique ID number in an external storage engine comprises:
according to an SPI mechanism in JAVA, searching a preset file in a preset folder under a preset path, automatically loading an elastic search storage engine extension class defined in the preset file, and performing storage logic conversion on the second attribute data and the unique ID number of the vertex to obtain conversion attribute data;
and storing the conversion attribute data in the Elasticissearch storage engine through an http interface of the Elasticissearch storage engine.
In some of these embodiments, the conversion attribute data is saved after the Elasticsearch storage engine through an http interface of the Elasticsearch storage engine, the method further comprising: the vertex non-core attribute data included in the second attribute data can be obtained by searching the elastic search storage engine through a data operating program using the graph database.
In a second aspect, embodiments of the present application provide a system for extending a graph database storage structure, the system including a graph database and an external storage engine;
attribute data in the graph database comprises first attribute data and second attribute data;
performing preset naming processing on attribute data in the graph database, and separating first attribute data and second attribute data in the graph database through preset filtering processing, wherein the first attribute data comprise vertex core attribute data and edge attribute data, and the second attribute data comprise vertex non-core attribute data;
and storing the first attribute data in the graph database, and storing the second attribute data in the external storage engine.
In some embodiments, the performing a preset naming process on the attribute data in the graph database, and the separating the first attribute data and the second attribute data in the graph database by the preset filtering process includes:
naming first attribute data in the graph database by beginning with a character uniformly; naming second attribute data in the graph database uniformly without beginning with a character;
and separating the first attribute data and the second attribute data in the graph database through preset filtering processing according to the preset naming processing rule.
In some of these embodiments, saving the first attribute data in the graph database and saving the second attribute data in the external storage engine comprises:
storing the second attribute data in a preset cache;
after the first attribute data are stored in the graph database, returning a unique ID number of a vertex;
saving the second attribute data and the vertex unique ID number in the external storage engine.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method of the extended database storage structure according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for extending a database storage structure according to the first aspect.
Compared with the related art, the method, the system, the equipment and the storage medium for the storage structure of the expansion map database are provided by the embodiment of the application; the attribute data in the graph database comprises first attribute data and second attribute data, the attribute data in the graph database is subjected to preset naming processing, the first attribute data and the second attribute data in the graph database are separated through preset filtering processing, the first attribute data comprise vertex core attribute data and edge attribute data, the second attribute data comprise vertex non-core attribute data, the first attribute data are stored in the graph database, and the second attribute data are stored in an external storage engine.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a first diagram illustrating a data storage structure according to an adjacency list;
FIG. 2 is a diagram II illustrating a data storage structure according to an adjacency list;
FIG. 3 is a flowchart of a method for storing an extended graph database according to an embodiment of the present application;
FIG. 4 is a block diagram of an extended graph database storage architecture system according to an embodiment of the present application;
fig. 5 is an internal structural diagram of an electronic device according to an embodiment of the present application.
Description of the drawings: 41. a graph database; 42. an external storage engine.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
A graph database is a database specifically designed for storing graphs. Unlike conventional Relational Databases (RDMS), graph databases operate (add-drop-and-modify-check) particularly quickly with respect to such data structures.
Graph (Graph) is a data structure composed of two Graph elements — a point (node) and an edge (relationship). A relationship connects two nodes, called a start point and an end point, respectively. Points and edges may also have multiple properties (properties) when used in the industry. The graph may be used to generally describe a social network (e.g., each point in the graph is an individual, edges are friends between individuals, attributes of the individual have age and gender, attributes of friends have chat duration), a money network (e.g., each point in the graph is an account, edges are transfer relationships between accounts, attributes of the account have balance, attributes of the transfer relationships have transfer time and amount).
The janussgraph database is indexed with the ElasticSearch, Hbase is the database that is constructed by storage, the data requires that the cells must be sorted by column and that a subset of cells specified by a range of columns must be efficiently retrieved, with Hbase just native to the supporting key ordering.
There are two ways to represent the storage structure of Graph (Graph): adjacency matrix and adjacency list, the JanusGraph database is a database using an adjacency list graph storage structure. The adjacency list is a storage method combining an array and a linked list;
FIG. 1 is a first diagram illustrating a data storage structure according to an adjacency list;
FIG. 2 is a diagram illustrating a data storage structure according to an adjacency list.
The data storage structure of the adjacency list will be described with reference to fig. 1 and 2: in the graph, a vertex is stored by using a one-dimensional array, and in addition, for the vertex array, each data element also needs to store a pointer pointing to a first adjacent point so as to search the side information of the vertex; all the adjacent points of each vertex vi in the graph form a linear table, and because the number of the adjacent points is not fixed, the linear table is stored by using a single linked list, an undirected graph is called as an edge table of the vertex vi, and a directed graph is called as an edge exit table of an arc tail.
The graph database in the following application examples is embodied by a JanusGraph database, and the external storage engine is embodied by an elastic search storage engine. The graph databases in this application may be other graph databases; the external storage engine in the present application may be another external storage engine, and the concept of implementing the structure of storing the extended graph database is the same as the following embodiments of the present application.
An embodiment of the present application provides a method for storing an extended graph database, and fig. 3 is a flowchart of a method for storing an extended graph database according to an embodiment of the present application, as shown in fig. 3, the method includes the following steps:
s302, the attribute data in the graph database comprise first attribute data and second attribute data; performing preset naming processing on attribute data in a graph database, and separating first attribute data and second attribute data in the graph database through preset filtering processing, wherein the first attribute data comprise vertex core attribute data and edge attribute data, and the second attribute data comprise vertex non-core attribute data;
s304, the first attribute data is stored in the graph database, and the second attribute data is stored in the external storage engine.
Through steps S302 to S304 in the embodiment of the present application, the attribute data in the graph database is subjected to the preset naming process, the first attribute data and the second attribute data in the graph database are separated according to the preset filtering process, the first attribute data is stored in the graph database, and the second attribute data is stored in the external storage engine, so that the problems that the graph database has excessive vertex attributes and occupies excessive memory resources due to loading are solved, the vertex detailed information is selectively queried in the external storage engine, and the efficiency of querying the relationship of the graph library is improved.
Optionally, in some embodiments, the performing a preset naming process on the attribute data in the graph database, and the separating the first attribute data and the second attribute data in the graph database by the preset filtering process includes:
naming first attribute data in a graph database by beginning with a character uniformly; naming second attribute data in the graph database uniformly without beginning with a character;
and according to the rule of the preset naming processing, separating the first attribute data and the second attribute data in the graph database through preset filtering processing.
Optionally, in some embodiments, storing the first attribute data in the graph database and storing the second attribute data in the external storage engine comprises:
storing the second attribute data in a preset cache;
after the first attribute data are stored in the graph database, the unique ID number of the vertex is returned;
the second attribute data and the vertex unique ID number are saved in the external storage engine.
Optionally, in some embodiments, saving the second attribute data and the vertex unique ID number in the external storage engine comprises:
according to an SPI mechanism in JAVA, searching a preset file in a preset folder under a preset path, automatically loading an elastic search storage engine extension class defined in the preset file, and performing storage logic conversion on second attribute data and a vertex unique ID number to obtain conversion attribute data;
and storing the conversion attribute data in the Elasticissearch storage engine through an http interface of the Elasticissearch storage engine.
Optionally, in some embodiments, the converting attribute data is saved after the Elasticsearch storage engine through an http interface of the Elasticsearch storage engine, and the method further includes: the vertex non-core attribute data included in the second attribute data can be obtained by searching the elastic search storage engine through a data operating program using the graph database.
In the specific embodiment of the present application, the Graph database is a Janus Graph database, the external storage engine is an elastic search storage engine, and table 1 shows a data format of the Janus Graph database in Hbase according to the specific embodiment of the present application;
TABLE 1
Vetex id | property | property | property | property | edge |
Vetex id | property | property | property | edge | edge |
Vetex id | property | property | property | property | edge |
Attribute data in the Janus Graph database comprises first attribute data and second attribute data, wherein the first attribute data comprises vertex core attribute data and edge attribute data, the second attribute data comprises vertex non-core attribute data, and table 2 shows a first attribute data format of the Janus Graph database according to the specific embodiment of the present application;
TABLE 2
Vetex id | property | edge | |
Vetex id | property | edge | edge |
Vetex id | property | property | edge |
Table 3 shows a second attribute data format of the Janus Graph database according to an embodiment of the present application;
TABLE 3
property | property | property |
property | property | |
property | property |
Naming first attribute data in the Janus Graph database by beginning with a character uniformly; naming second attribute data in the Janus Graph database uniformly without beginning with a character;
and according to the rule of preset naming processing, separating the first attribute data and the second attribute data in the Janus Graph database through preset filtering processing.
Storing the second attribute data in a preset cache, storing the first attribute data in a Janus Graph database, and returning the unique ID number of the vertex;
finally, according to an SPI mechanism in JAVA, searching a preset file in a META-INF/services folder under a ClassPath path, automatically loading an elastic search storage engine extension class defined in the preset file, performing storage logic conversion on the second attribute data and the unique ID number of the vertex to obtain conversion attribute data,
and storing the conversion attribute data in the Elasticissearch storage engine through an http interface of the Elasticissearch storage engine. Meanwhile, the conversion attribute data is written into the Elasticissearch storage engine, and the efficiency of data transmission is ensured by a batch-submitted write mode instead of a single write mode; the conversion attribute data is written into an elastic search storage engine, and a failed record log is written into the elastic search storage engine in an asynchronous multithreading mode, so that the failed record is redone, and the robustness of data transmission is improved; according to the deployed machine performance, the number of submitted records and the number of concurrent threads of each batch of conversion attribute data written into the Elasticissearch storage engine are set through the configuration file, and controllability of data transmission based on hardware conditions is achieved.
The vertex non-core attribute data included in the second attribute data can be obtained by searching the elastic search storage engine through a data operating program using the graph database.
According to the embodiment of the specific application, the first attribute data and the second attribute data in the Janus Graph database are named according to the naming rule of the beginning of the character, the first attribute data and the second attribute data in the Graph database are separated according to preset filtering processing, the first attribute data are stored in the Janus Graph database, the second attribute data are stored in the Elasticissearch storage engine, the problems that the vertex attributes of the Janus Graph database are too much and too much memory resources are occupied by loading are solved, the detailed information of the vertex in the Elasticissearch storage engine is selectively inquired, and the efficiency of inquiring the relation of the Graph library is improved.
Fig. 4 is a block diagram illustrating an extended graph database storage structure system according to an embodiment of the present application, and as shown in fig. 4, the system includes a graph database 41 and an external storage engine 42;
the attribute data in the map database 41 includes first attribute data and second attribute data;
performing preset naming processing on attribute data in the graph database 41, and separating first attribute data and second attribute data in the graph database 41 through preset filtering processing, wherein the first attribute data comprises vertex core attribute data and edge attribute data, and the second attribute data comprises vertex non-core attribute data;
the first attribute data is stored in the map database 41, and the second attribute data is stored in the external storage engine 42.
According to the embodiment of the application, the attribute data in the graph database 41 is subjected to preset naming processing, the first attribute data and the second attribute data in the graph database 41 are separated according to preset filtering processing, the first attribute data is stored in the graph database 41, and the second attribute data is stored in the external storage engine 42, so that the problems that the vertex attributes of the graph database 41 are excessive, and excessive memory resources are occupied by loading are solved, the detailed information of the vertex is selectively inquired in the external storage engine 42, and the efficiency of inquiring the relation of the graph library is improved.
In some embodiments, the performing a preset naming process on the attribute data in the map database 41, and the separating the first attribute data and the second attribute data in the map database 41 by the preset filtering process includes:
naming first attribute data in the map database 41 uniformly beginning with a character; naming the second attribute data in the map database 41 uniformly without beginning with a _ character;
the first attribute data and the second attribute data in the map database 41 are separated by a preset filtering process according to the rule of the preset naming process.
In some embodiments, storing the first attribute data in the database 41 and the second attribute data in the external storage engine 42 comprises:
storing the second attribute data in a preset cache;
after the first attribute data is stored in the graph database 41, the unique ID number of the vertex is returned;
the second attribute data and the vertex unique ID number are saved in the external storage engine 42.
In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of extending a database storage structure. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In one embodiment, fig. 5 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, an electronic device is provided, where the electronic device may be a server, and the internal structure diagram may be as shown in fig. 5. The electronic device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the electronic device is used for storing data. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement an extended database storage structure method.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device to which the present application is applied, and a particular electronic device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method for extending a graph database storage structure, the method comprising:
attribute data in the graph database includes first attribute data and second attribute data;
performing preset naming processing on attribute data in the graph database, and separating the first attribute data and the second attribute data in the graph database through preset filtering processing, wherein the first attribute data comprises vertex core attribute data and edge attribute data, and the second attribute data comprises vertex non-core attribute data;
and saving the first attribute data in the graph database, and saving the second attribute data in an external storage engine.
2. The method according to claim 1, wherein the attribute data in the graph database is subjected to a preset naming process, and the separating of the first attribute data and the second attribute data in the graph database by the preset filtering process comprises:
naming first attribute data in the graph database by beginning with a character uniformly; naming second attribute data in the graph database uniformly without beginning with a character;
and separating the first attribute data and the second attribute data in the graph database through preset filtering processing according to the preset naming processing rule.
3. The method of claim 1, wherein saving the first attribute data in the graph database and saving the second attribute data in an external storage engine comprises:
storing the second attribute data in a preset cache;
after the first attribute data are stored in the graph database, returning a unique ID number of a vertex;
saving the second attribute data and the vertex unique ID number in an external storage engine.
4. The method of claim 3, wherein saving the second attribute data and the vertex unique ID number in an external storage engine comprises:
according to an SPI mechanism in JAVA, searching a preset file in a preset folder under a preset path, automatically loading an elastic search storage engine extension class defined in the preset file, and performing storage logic conversion on the second attribute data and the unique ID number of the vertex to obtain conversion attribute data;
and storing the conversion attribute data in the Elasticissearch storage engine through an http interface of the Elasticissearch storage engine.
5. The method of claim 4, wherein the transformation attribute data is saved after the Elasticissearch storage engine through an http interface of the Elasticissearch storage engine, the method further comprising: the vertex non-core attribute data included in the second attribute data can be obtained by searching the elastic search storage engine through a data operating program using the graph database.
6. A system for extending a graph database storage structure, said system comprising a graph database and an external storage engine;
attribute data in the graph database comprises first attribute data and second attribute data;
performing preset naming processing on attribute data in the graph database, and separating first attribute data and second attribute data in the graph database through preset filtering processing, wherein the first attribute data comprise vertex core attribute data and edge attribute data, and the second attribute data comprise vertex non-core attribute data;
and storing the first attribute data in the graph database, and storing the second attribute data in the external storage engine.
7. The system according to claim 6, wherein the attribute data in the graph database is subjected to a preset naming process, and the separating of the first attribute data and the second attribute data in the graph database by the preset filtering process comprises:
naming first attribute data in the graph database by beginning with a character uniformly; naming second attribute data in the graph database uniformly without beginning with a character;
and separating the first attribute data and the second attribute data in the graph database through preset filtering processing according to the preset naming processing rule.
8. The system of claim 6, wherein saving the first attribute data in the graph database and the second attribute data in the external storage engine comprises:
storing the second attribute data in a preset cache;
after the first attribute data are stored in the graph database, returning a unique ID number of a vertex;
saving the second attribute data and the vertex unique ID number in the external storage engine.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a method of extending a graph database storage structure according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a method for an extended graph database storage structure according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110310437.5A CN113177142A (en) | 2021-03-23 | 2021-03-23 | Method, system, equipment and storage medium for storing extended graph database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110310437.5A CN113177142A (en) | 2021-03-23 | 2021-03-23 | Method, system, equipment and storage medium for storing extended graph database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113177142A true CN113177142A (en) | 2021-07-27 |
Family
ID=76922308
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110310437.5A Pending CN113177142A (en) | 2021-03-23 | 2021-03-23 | Method, system, equipment and storage medium for storing extended graph database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113177142A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115658329A (en) * | 2022-12-22 | 2023-01-31 | 杭州欧若数网科技有限公司 | Method, system and medium for optimizing memory of graph data structure |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170337260A1 (en) * | 2015-02-13 | 2017-11-23 | Guangzhou Shenma Mobile Information Technology Co. Ltd. | Method and device for storing data |
CN109255055A (en) * | 2018-08-06 | 2019-01-22 | 四川蜀天梦图数据科技有限公司 | A kind of diagram data access method and device based on packet associated table |
CN109271458A (en) * | 2018-09-14 | 2019-01-25 | 南威软件股份有限公司 | A kind of network of personal connections querying method and system based on chart database |
CN109670089A (en) * | 2018-12-29 | 2019-04-23 | 颖投信息科技(上海)有限公司 | Knowledge mapping system and its figure server |
CN111858480A (en) * | 2019-04-30 | 2020-10-30 | 中移(苏州)软件技术有限公司 | Data processing method and device and computer storage medium |
CN112445889A (en) * | 2020-11-30 | 2021-03-05 | 杭州海康威视数字技术股份有限公司 | Method for storing data and retrieving data and related equipment |
-
2021
- 2021-03-23 CN CN202110310437.5A patent/CN113177142A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170337260A1 (en) * | 2015-02-13 | 2017-11-23 | Guangzhou Shenma Mobile Information Technology Co. Ltd. | Method and device for storing data |
CN109255055A (en) * | 2018-08-06 | 2019-01-22 | 四川蜀天梦图数据科技有限公司 | A kind of diagram data access method and device based on packet associated table |
CN109271458A (en) * | 2018-09-14 | 2019-01-25 | 南威软件股份有限公司 | A kind of network of personal connections querying method and system based on chart database |
CN109670089A (en) * | 2018-12-29 | 2019-04-23 | 颖投信息科技(上海)有限公司 | Knowledge mapping system and its figure server |
CN111858480A (en) * | 2019-04-30 | 2020-10-30 | 中移(苏州)软件技术有限公司 | Data processing method and device and computer storage medium |
CN112445889A (en) * | 2020-11-30 | 2021-03-05 | 杭州海康威视数字技术股份有限公司 | Method for storing data and retrieving data and related equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115658329A (en) * | 2022-12-22 | 2023-01-31 | 杭州欧若数网科技有限公司 | Method, system and medium for optimizing memory of graph data structure |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107391628B (en) | Data synchronization method and device | |
CN109255055B (en) | Graph data access method and device based on grouping association table | |
CN109379398B (en) | Data synchronization method and device | |
CN115033722B (en) | Method, system, device and medium for accelerating data query of database | |
CN108427736B (en) | Method for querying data | |
CN113220659B (en) | Data migration method, system, electronic device and storage medium | |
CN110569255A (en) | Paging query method and device for database sub-tables and computer equipment | |
CN111914020A (en) | Data synchronization method and device and data query method and device | |
CN104424240A (en) | Multi-table correlation method and system, main service node and computing node | |
CN113177142A (en) | Method, system, equipment and storage medium for storing extended graph database | |
CN114780537A (en) | Flow table storage and message forwarding method, device, computing equipment and medium | |
Gu et al. | Parallel Longest Increasing Subsequence and van Emde Boas Trees | |
CN110609924A (en) | Method, device and equipment for calculating total quantity relation based on graph data and storage medium | |
CN112860412B (en) | Service data processing method and device, electronic equipment and storage medium | |
CN109359176A (en) | Data extraction method, device, computer equipment and storage medium | |
CN112527950A (en) | MapReduce-based graph data deleting method and system | |
CN110674086A (en) | Data merging method and device, electronic equipment and storage medium | |
CN115328950A (en) | Secondary index-based hbase query method, terminal device and storage medium | |
CN111857662B (en) | Programming method for describing specific constitution of object based on MAP and interface | |
CN113822757A (en) | Abnormal transaction prediction method, device, equipment and storage medium based on hypergraph | |
CN113961730A (en) | Graph data query method, system, computer device and readable storage medium | |
CN107301208A (en) | A kind of tables of data treating method and apparatus | |
CN110032564B (en) | Method and device for determining association relation of data table | |
US10795875B2 (en) | Data storing method using multi-version based data structure | |
CN115374301B (en) | Cache device, method and system for realizing graph query based on cache device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210727 |
|
RJ01 | Rejection of invention patent application after publication |