Graph Database Edge Indexing for Timing Data
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for managing graph data in timing graphs are inefficient due to the need to store all attributes in both primary and secondary indexes, leading to high storage overheads and low scanning efficiency.
Innovation Solution
A method and apparatus for managing graph data that uses a primary index to store only the timestamp of edges and a secondary index to store all attributes, with the secondary index key including the timestamp, allowing for efficient edge scanning and updating operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a secondary index is introduced to improve edge scanning efficiency by including timestamp in the key, then the efficiency of edge scanning operation is improved, but the storage overhead increases because attributes need to be stored in two copies (primary index and secondary index)
Solution Approach 1:
The patent combines the primary index and secondary index into a unified index structure where the timestamp-containing key enables both primary lookup and time-range scanning operations. By merging the functionality of both indexes into a single structure, the patent eliminates the need to store attributes in two separate copies while maintaining the ability to perform efficient edge scanning operations based on time ranges.
2Device complexity
If the primary index key does not include timestamp, then the primary index structure is simpler, but the edge scanning operation efficiency is reduced
Solution Approach 1:
The patent adds the timestamp dimension to the index key structure, transforming the traditional primary index key into a multi-dimensional key that includes both the original identifying attributes and the timestamp. This dimensional extension enables the index to support time-range based scanning operations while maintaining the structural organization needed for efficient lookup, thus improving edge scanning efficiency without significantly increasing structural complexity.
Data Source
AI summary
A method is applied to a graph database, the graph database stores edge data of a timing graph, the edge data records a plurality of attributes of an edge in the timing graph, the plurality of attributes include a timestamp, an index of the edge data includes a primary index and a secondary index, a value of the primary index is the timestamp, the secondary index stores the plurality of attributes, and a key of the secondary index includes the timestamp. The method includes: receiving a first request, where the first request is used to request to perform an edge scanning operation on the edge data based on a time range; and performing the edge scanning operation on the edge in the timing graph by using the timestamp in the key of the secondary index, to obtain an edge whose timestamp falls within the time range in the timing graph.


