Data access method and device
A data access and equipment technology, applied in the database field, can solve the problem of low data access efficiency and achieve the effect of improving data access efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0035] Such as figure 1 As shown, it is a schematic diagram of the method steps of data access in Embodiment 1 of the present invention, and the method includes:
[0036] Step 101: Receive an access request from an access user, the access request carries an access path, and the access path includes at least one node name.
[0037] In the solution of the first embodiment, when an access user wishes to access content in a database such as an object storage system, an access request carrying an access path is sent to the database through an access interface provided by the database.
[0038] The node name in the access path includes the node name of the node actually desired by the access user, and the node names of the nodes passed on the path from the root node where the node is located to the node. When multiple node names are included in the access path, each node name can be arranged according to the relationship order of the hierarchy level, or can be arranged out of order...
Embodiment 2
[0055] Embodiment 2 of the present invention is based on Embodiment 1, and details how to independently store the first node ID between the node ID of the parent node and the node IDs of the child nodes at the level below the parent node in a database such as an object storage system. One correspondence, a scheme of a second correspondence between the node identifier and the metadata of the node.
[0056] When initializing the database, you can use the key-value pair (Key-Value) database building method to generate two database files for the content stored in the database, as follows:
[0057] 1. A directory relationship file, which records the first corresponding relationship between the node identifier of the parent node and the node identifiers of the child nodes of the lower level of the parent node.
[0058] The first corresponding relationship recorded in the directory relationship file represents the hierarchical relationship between nodes, and the hierarchical relation...
Embodiment 3
[0085] The third embodiment of the present invention is based on figure 2 Take the tree structure shown as an example to describe in detail how to use the contents recorded in Table 1 and Table 2 to realize data access.
[0086] Such as image 3 As shown, it is a schematic diagram of the steps of data access in Embodiment 3 of the present invention, and the method includes the following steps:
[0087] Step 301: Receive an access request, the name of the node included in the access path in the access request is: a-b-d.
[0088]Step 302: Read Table 1 in the directory relationship file, search for the Key-Value whose Key value is the root node name a, and extract the content ID1 of the Value value from it as the current identifier.
[0089] Step 303: continue to search the Key-Value whose Key value is the current identifier ID1+$ from the table 1, and extract Value 2 from it as the dir-handle of node a.
[0090] Step 304: continue to search from the table 1 for the Key-Value...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 