WO2014110940A1 - A method, apparatus and system for storing, reading the directory index - Google Patents

A method, apparatus and system for storing, reading the directory index Download PDF

Info

Publication number
WO2014110940A1
WO2014110940A1 PCT/CN2013/087582 CN2013087582W WO2014110940A1 WO 2014110940 A1 WO2014110940 A1 WO 2014110940A1 CN 2013087582 W CN2013087582 W CN 2013087582W WO 2014110940 A1 WO2014110940 A1 WO 2014110940A1
Authority
WO
WIPO (PCT)
Prior art keywords
directory
identifier
item
index
split
Prior art date
Application number
PCT/CN2013/087582
Other languages
French (fr)
Inventor
Jibing LOU
Original Assignee
Tencent Technology (Shenzhen) Company Limited
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Priority to US14/262,684 priority Critical patent/US20140244606A1/en
Publication of WO2014110940A1 publication Critical patent/WO2014110940A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2272Management thereof

Definitions

  • the invention relates to the field of computer technology, in particular to a method, apparatus and system for storing, reading the directory index.
  • the directory index as an important component of file system provides users with visual and understandable view of the file system, so as to solve or reduce the semantic isolation in the data storage between people and computers.
  • the storing manner of the directory index directly determines the way of accessing the directory index and efficiency thereof. In order to quickly and efficiently access the directory index, how to store the directory index has become a key issue.
  • EXT3 hird extended file system, the third extended file system
  • EXT3 the third extended file system
  • it divides logical disk into fixed -size logical disk blocks (simply referred to as block), each disk block in the file system has a globally unique block number; a certain number of blocks are combined into logical disk group (simply referred to as group );
  • a disk group is divided, according to function, into the following sections: data block bitmap corresponding to the block number of the set of data block and being for allocation and recovery of the disk block in the group; index node bitmap corresponding to the block number of the set of index block and being for allocation and recovery of the index node; index table corresponding to the group index node group and being for saving the directory or file index data block group; data block group being used to store the actual directory or file specific data.
  • Each index node is used to record information about a file or directory.
  • the node saves data block number where the directory data is, and the data block record all the files and subdirectories index information of the directory;
  • Another way is directory index storage based on a database, its files and directories index data are stored in the database, parent-child relationship between directories and files is associated through each table items, tree view can be achieved at the user interface layer.
  • Directory index is stored in the database server, while the actual file data is stored in the I / O (Input / Output, input and output ports) server.
  • the present invention provides a method, apparatus and system of storing, reading the directory index.
  • the technical solutions are as follows:
  • a directory index characterized in that the method comprises:
  • all directories in the directory index are configured with identifier respectively; according to each directory identifier, the directory index is split so as to obtain the directory split item corresponding to each directory identifier;
  • each directory split item and its corresponding directory identifier are stored as a record item
  • each directory split item comprises at least corresponding sub-directory identifier and corresponding file storage address.
  • a apparatus for storing directory index characterized in that said apparatus comprises:
  • configuration module for configuring all directories in the directory index with identifier respectively
  • split module for splitting the directory index according to each directory identifier configured by the configuration module so as to obtain the directory split item corresponding to each directory identifier
  • each directory split item obtained by the splitting module and its corresponding directory identifier obtained by the splitting module and its corresponding directory identifier as a record item
  • each directory split item contains at least the corresponding sub-directory identifier and the corresponding file storage address.
  • a directory index characterized in that the method comprises:
  • the directory split item is obtained by the apparatus for storing the directory index, splitting the directory index according to the identifier configured for all directories in the directory index and is stored by the apparatus for storing the directory index;
  • the record item comprises at least the directory split item and its corresponding directory identifier.
  • a apparatus for reading the directory index characterized in that said apparatus comprises:
  • receiving module for receiving directory index reading request carried with the directory identifier to be read
  • find module for finding the record item containing the directory identifier to be read in the apparatus for storing the directory index
  • the directory split item is obtained by the apparatus for storing the directory index, splitting the directory index according to the identifier configured for all directories in the directory index and is stored by the apparatus for storing the directory index;
  • the record item comprises at least the directory split item and its corresponding directory identifier.
  • a system for reading the directory index characterized by comprising a terminal, a apparatus for reading the directory index and a apparatus for storing the directory index;
  • the terminal for sending a directory index reading request carried with the directory identifier to be read to the apparatus for reading the directory index;
  • the apparatus for reading the directory index for receiving the directory index reading request carried with the directory identifier to be read, sent by the terminal;
  • Figure 1 is a first embodiment of the present invention, providing a flowchart of a method for storing directory index
  • Figure 2 is a second embodiment of the present invention, providing a structure diagram of a directory index system
  • Figure 3 is a second embodiment of the present invention, providing a flowchart of a method for storing directory index
  • Figure 4 is a second embodiment of the present invention, providing a diagram of directory index structure that is not split;
  • Figure 5 is a second embodiment of the present invention, providing a diagram of directory index structure that has been split
  • Figure 6 is a second embodiment of the present invention, providing a process schematic of querying directory Index
  • Figure 7 is a second embodiment of the present invention, providing a process schematic to modify the name of the directory index
  • Figure 8 is a third embodiment of the present invention, providing a flowchart of a method of reading the directory index
  • Figure 9 is a fourth embodiment of the present invention, providing a first structure diagram of the apparatus for storing the directory index
  • Figure 10 is a fourth embodiment of the present invention, providing a second structure diagram of the apparatus for storing the directory index
  • Figure 11 is a fourth embodiment of the present invention, providing a third structure diagram of the apparatus for storing the directory index
  • Figure 12 is a fourth embodiment of the present invention providing a fourth structure diagram of the apparatus for storing the directory index
  • Figure 13 is a fourth embodiment of the present invention, providing a fifth structure diagram of the apparatus for storing the directory index
  • Figure 14 is a fourth embodiment of the present invention, providing a sixth structure diagram of the apparatus for storing the directory index
  • Figure 15 is a fifth embodiment of the present invention, providing a structure diagram of the system for reading the directory index
  • FIG 16 is a sixth embodiment of the present invention, providing a structure diagram of the system for reading the directory index.
  • the embodiment provides a method of storing the directory index, see Figure 1, the present embodiment provides a method process includes:
  • Step 101 all directories in directory index are configured with identifier
  • Step 102 according to various directories identifier, directory index is split to obtain directory split item corresponding to each directory identifier; wherein each directory split item contains at least corresponding subdirectories identifier and the corresponding documents memory address;
  • Step 103 each directory split item and its corresponding directory identifier is stored as a record item.
  • the present embodiment provides a method, further comprising:
  • the present embodiment provides a method, further comprising:
  • the directory modification request carries with the directory identifier to be modified and the modified directory information; find record item that contains the identifier to be modified and modify the directory split item in the found record item in accordance with the modified directory information.
  • each directory split item and its corresponding directory identifier is stored as a record item, including but not limited to:
  • each directory split item and its corresponding directory identifier is stored as a record item in the corresponding storage node respectively;
  • the directory modification request carries the identifier to be modified and the modified directory information
  • This embodiment provides a method comprising: all directories in the directory index are configured with identifier and the directory index is split according to each identifier, after getting the directory split item corresponding to each directory identifier, each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index.
  • each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index.
  • each of the recording item in its corresponding storage nodes, it can effectively reduce access consuming-time for directory index and save resources.
  • Embodiment of the invention provides a method for storing directory index, which stores the directory index and the actual file data separately.
  • the users can, by the user terminal, sends to the directory view server the access request for directory index, to perform the relevant Index access operations.
  • the directory view server receives a directory index access request from the user terminal, the server reads directory index corresponding to the directory index access request in the index storage servers and returns the directory index to the user terminal, so that the user terminal accesses to the file storage server the actual file data corresponding to the directory index, according to the directory index.
  • this embodiment provides a method process including:
  • Step 301 all directories in the directory index are configured with identifier
  • the embodiment will abstract each directory as an object, and each object is configured with a globally unique identifier.
  • the manner of configuring the globally unique identifier the present embodiment does not particularly limit it, and every directory corresponding to different identifiers can be.
  • the method provided in this embodiment express, by the form of the Key- Value ( key - value), the information corresponding to the directory, that is, expresses the information of each directory in the directory index in the key - value form, wherein, the value of "Key” indicates the identifier of each directory, "Value" indicates the directory item in the directory.
  • Step 302 According to each directory identifier, the directory index is split to obtain a index split item corresponding to each directory identifier; wherein each directory split item contains at least corresponding subdirectory identifier and corresponding file storage address;
  • the present embodiment take the index structure in which the directory index I is not split as shown in Figure 4 as an example, in which there exits two subdirectories, which are identified as directory 1 and directory 2, then after, by the above step 301, root directory of the directory index I is configured with a identifier named as 10, the directory I is configured with a identifier named as II and the directory 12 is configured as a identifier named as 12, the directory index I is split according to the identifiers 10, II and 12, obtaining the directory split item corresponding respectively to the identifiers 10, II and 12, the index structure of the split directory index I being shown in Figure 5.
  • splitting the directory index I it comprises but not limit to: pull out the index information corresponding to the identifiers 10, II and 12, respectively, and form three directory items corresponding respectively to identifiers 10, II and 12.
  • each directory split item further comprises other information, such as the name of each subdirectory corresponding to each directory split item, creation time and modification time of each sub -directory, the file name of each file corresponding to the each directory split item, creation time and modification time of each file, the size of storage space occupied by each file, etc.
  • the content contained in each directory split item is not particularly limited.
  • other split manner can also be used, the present embodiment does not specifically limit.
  • Step 303 each directory split item and its corresponding directory identifier are stored as a record item
  • each directory split item and its corresponding directory identifier are stored as a record item, including but not limited to:
  • each directory split item and its corresponding directory identifier are stored respectively in the corresponding storage node as a record item;
  • the identifiers 10, II, 12 and their corresponding directory split items are stored in the form of record item, that is, the identifier 10 and the its corresponding directory split item being a record item named as record item TO; the identifier II and its corresponding directory split item being a record item named as record item T2; the identifier 12 and its corresponding directory split item being a record item named as T3; after three record item Tl, T2 and T3 are obtained, the three record items are stored in corresponding storage node S.
  • the present embodiment provides a method further comprising: providing correspondence relationship between the identifiers iO, II and 12 corresponding to the directory split items in the three records terms Tl, T2, and T3 and the storage node S, and storing the correspondence relationship.
  • the storage medium may be read-only registers specifically
  • the type of storage media in addition to the above read-only register, can be other types of storage media such as flash memory or hard disk, etc.
  • the type of storage media in this embodiment is not be specifically limited.
  • each directory split item and its corresponding directory identifier are stored respectively in the corresponding storage node as a record item through the above-mentioned step 301 to step 303
  • the user can, according to the identifier of each directory split item, perform some common access operations, such as query directory operations, detailed process can be found in the following step 304 to step 305; modify directory operations, detailed process can be found in the following step 306 to step 307.
  • Step 304 receiving a directory index query request carried with the directory identifier to be queried, sent from the user terminal;
  • the directory index query request is stored in the storage medium.
  • the storage medium is in particular the read-only registers and, of course, the type of storage media, in addition to the above read-only register, can also be other types of storage media such as flash memory or hard disk, etc., the type of storage media in this embodiment is not specifically defined.
  • the directory index query request may also carry other information, such as the directory creation time to be queried.
  • information carried by the directory index query request is not particularly limited.
  • Step 305 Find the record item containing the directory identifier to be queried and send the directory split item in the found record item to the user terminal as query result.
  • the method provided in this embodiment further comprises: according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, find the storage node corresponding to the directory identifier to be queried and send the directory split item in the record item stored in the found storage node to the user terminal as query result.
  • FIG. 6 Take Figure 6 as an example to make detailed explanation to the above process.
  • a user wants to query the directory split item corresponding to the identifier II in the directory index shown in Figure 5
  • the terminal of the user A generates the directory index query request according to the identifier II, and then sends the directory index query request to the index storage server C through the directory view server B, the index storage server C, after receiving the directory index query request, query the correspondence relationship of the identifier and the storage node stored in the storage medium in advance according to the directory index query request, and obtain the storage node information storing the directory to be query.
  • the directory split item in the record item stored in the found storage node as query result is sent to the terminal of the user A through the directory view server B.
  • the query directory operation ends. Further, the present embodiment provides a method to support the operation of modifying the directory and the specific process is described in the step 306 to step 307.
  • Step 306 receiving a directory modification request sent from the user terminal, the directory modification request is carried with the identifier of the directory to be modified and the modified directory information.
  • the directory index query request is stored in the storage medium.
  • the storage medium is in particular the read-only registers and, of course, the type of storage media, in addition to the above read-only register, can be other types of storage media such as flash memory or hard disk, etc., the type of storage media in this embodiment is not specifically defined.
  • the directory modification request in addition to carrying the identifier of the directory to be modified and the modified directory information, further carry other information, for example, the creation time of the directory to be modified, in the embodiment, the information carried by the directory modification request is not particularly limited.
  • Step 307 Find the record item containing the directory identifier to be modified, and modify the directory split item in the found record item according to the modified directory information.
  • the method provided in this embodiment further comprises:
  • Figure 7 Take Figure 7 as an example to make detailed explanation to the above process.
  • the terminal of the user A generates the directory modification request according to the parent directory identifier 10 of the identifier II, and then sends the directory modification request to the index storage server C through the directory view server B, the index storage server C, after receiving the directory modification request, query the correspondence relationship of the identifier 10 and the storage node stored in the storage medium in advance according to the identifier 10 carried by the directory modification request and obtain the storage node information storing the directory to be query.
  • the directory split item in the record item stored in the found storage node is sent to the directory view server B.
  • Directory view server B receiving the directory split item returned by the index storage server C, split the directory split item for analysis, to get a directory list, and modify the name of the directory 1 in the directory list according to the modified directory information modification directory list carried by the directory modification request. After the modification, new directory list is sent in package to the index storage server C. Finally, the index storage server C sends the modified directory to the terminal of the user A through the directory view server B.
  • This embodiment provides a method comprising: all directories in the directory index are configured with identifier and the directory index is split according to each directory identifier, after getting the directory split item corresponding to each directory identifier, each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index.
  • each recording item in its corresponding storage nodes, it can effectively reduce access consuming-time for directory index and save resources.
  • the embodiment provides a method to reading the directory index, seeing Figure 8, the present embodiment provides a method process including:
  • Step 801 Receiving a directory index reading request carried with the directory identifier to be read;
  • the directory index reading request is stored in the storage medium.
  • the storage medium is in particular the read-only registers and, of course, the type of storage media, in addition to the above read-only register, can also be other types of storage media such as flash memory or hard disk, etc., the type of storage media in this embodiment is not defined.
  • directory index reading request in addition to carrying the identifier of the directory to be read, can also carry additional information such as the creation time of the directory to be read, in this embodiment, the information carried by the directory index reading request is not particularly limited.
  • Step 802 find the record item containing the directory identifier to be read in the apparatus storing the directory index and return the directory split item in the found record item as reading result; wherein the directory split item is obtained by the apparatus storing the directory index, to split the directory index according to the identifier configured for all the directories in the directory index and is stored by the apparatus storing the directory index; the recording item comprises at least the directory split item and its corresponding directory identifier.
  • find the record item containing the directory identifier to be read comprising:
  • the correspondence relationship between the directory identifier corresponding to each directory item and the storage node is set and stored by the apparatus storing the directory index.
  • a user wants to read the directory split item corresponding to a directory identifier of the apparatus storing the directory index
  • the user terminal after generating the directory index reading request according to the directory identifier, sends the directory index reading request to the apparatus reading the directory index, the apparatus for reading the directory index, after receiving the directory index reading request, query the correspondence relationship between the directory identifier and the storage node stored in advance in the storage medium of the apparatus for storing the directory the directory index, according to the directory identifier carried by the directory index reading request, and obtain the storage node information storing the record item containing the directory identifier.
  • the directory split item in the record item stored in the found storage node as reading result is returned to the user terminal and displayed to the user by the user terminal.
  • the manner of the apparatus for storing the directory index storing the directory index see the description for the embodiment two, and is omitted herein.
  • this method since the apparatus for storing the directory index split the directory index and obtain the directory split item, according to the identifier configured for the all the directory in the directory index, and store them, this method receives the directory index reading request carried with the directory identifier to be read, and find the record item containing the directory identifier to be read, in the apparatus for storing the directory index, and return the directory split item in the found record item as reading result without returning all directory index, thus the access performance of the directory index can be improved greatly.
  • Embodiment of the invention provides a apparatus for storing directory index for performing the method provided by the above embodiment 1 and embodiment 2, seeing Figure 9, the apparatus comprising:
  • Configuration module 911 for configuring identifier for all the directory in the directory index
  • Split module 912 for splitting the directory index according to each directory identifier configured by the configuration module 911 to obtain a directory split item corresponding to each directory identifier
  • Storage module 913 for storing each directory split item obtained by the split module and its corresponding directory identifier as a record item
  • each directory split item comprises at least corresponding sub-directory identifier and corresponding file storage address.
  • the apparatus further comprising:
  • a first receiving module 914 for receiving the directory index query request carried with the directory identifier to be queried, sent from the user terminal'
  • a first finding module 915 for finding the recording item containing the directory identifier received by the first receiving module 914;
  • a first sending module 916 for sending the directory split item in the record item found by the first finding module 915 as query result to the user terminal.
  • the apparatus further comprising:
  • a second finding module 918 for finding the record item containing the directory identifier to be modified received by the second receiving module 917;
  • a first modification module 919 for modifying the directory split item in the record item found by the second finding module 918 according to the modified directory information.
  • the storage module 913 comprising:
  • a storage unit 9131 for storing each directory split item and its corresponding directory identifier as a record item in the corresponding storage node respectively; a setting unit 9132 for setting the correspondent relationship between the directory identifier corresponding to the each directory split item and the storage node and storing the correspondence relationship.
  • a third receiving module 920 for receiving the directory index query request carried with the directory identifier to be queried, sent from the user terminal;
  • a third find module 921 for finding the storage node corresponding to the directory identifier to be queried, received by the third receiving module 920 according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node;
  • a second sending module 922 for sending the directory split item in the recording item stored in the storage node found in the third finding module 921 as query result to the user terminal;
  • the apparatus further comprises:
  • a fourth finding module 924 for finding the storage node corresponding to the directory identifier to be queried received by the fourth receiving module 923 according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node;
  • a second modification module 925 for modifying the directory split item in the record items stored in the storage node found by the fourth finding module 924 according to the modified directory information.
  • This embodiment provides a apparatus, comprising: all directories in the directory index are configured with identifier and the directory index is split according to each directory identifier, after getting the directory split item corresponding to each directory identifier, each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index.
  • each recording item in its corresponding storage nodes, it can effectively reduce access consuming-time for directory index and save resources.
  • the embodiment of the invention provides a apparatus for reading the directory index for performing the method provided by the above embodiment three, seeing Figure 15, the apparatus comprising:
  • receiving module 1501 for receiving the directory index reading request carried with the directory identifier to be read
  • finding module 1502 for finding the record item containing the directory identifier to be read, received by the receiving module 1501;
  • returning module 1503 for returning the directory split item in the record item found by the finding module 1502 as reading result
  • the directory split item is obtained by the apparatus for storing the directory index splitting the directory index according the identifier configured for all the directories in the directory index and is stored by the apparatus for storing the directory index;
  • the record index comprises at least the directory split item and its corresponding directory identifier.
  • the finding module 1502 for determining the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finding the record item containing the directory identifier to be read from the determined storage node;
  • the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored by the apparatus for storing the directory index.
  • this apparatus since the apparatus for storing the directory index split the directory index and obtain the directory split item, according to the identifier configured for the all the directory in the directory index, and store them, this apparatus receives the directory index reading request carried with the directory identifier to be read, and find the record item containing the directory identifier to be read, in the apparatus for storing the directory index, and return the directory split item in the found record item as reading result without returning all directory index, thus the access performance of the directory index can be improved greatly.
  • Embodiment of the invention provides a system for reading the directory index, seeing Figure 16, the system comprising: the terminal 1601, the apparatus 1602 for reading the directory index and the apparatus 1603 for storing the directory index;
  • the apparatus 1602 for reading the directory index for receiving the directory index reading request carried with the directory identifier to be read sent from the terminal 1601; finding the record item containing the directory identifier to be read in the apparatus for storing the directory index, and returning the directory split item in the found record item as reading result;
  • the apparatus 1603 for storing the directory index, for configuring all the directory in the directory index; splitting the directory index according to each directory identifier to obtain the directory split item corresponding to each directory identifier; storing each directory split item and its corresponding directory identifier as a record item; wherein each directory split item comprises at least the corresponding sub-directory identifier and corresponding file storage address.
  • the apparatus 1603 for storing the directory index stores each directory split item and its corresponding directory identifier as a record item, it stores each directory split item and its corresponding directory identifier as a record item in the corresponding storage node respectively; setting the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node and storing the correspondence relationship;
  • the apparatus 1602 for reading the directory index finds the record item containing the directory identifier to be read, it determines the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finding the record item containing the directory identifier to be read from the determined storage node;
  • this system since the apparatus for storing the directory index split the directory index and obtain the directory split item, according to the identifier configured for the all the directory in the directory index, and store them, this system receives the directory index reading request carried with the directory identifier to be read, and find the record item containing the directory identifier to be read, in the apparatus for storing the directory index, and return the directory split item in the found record item as reading result without returning all directory index, thus the access performance of the directory index can be improved greatly.
  • the apparatus for storing the directory index stores the directory index
  • the apparatus and the system for reading the directory index reads the directory index
  • the above is explained in the functional module division.
  • the above can be performed by the different functional modules according to the need, that is, dividing the inner structure of the apparatus and the system into different functional modules so as to perform all or part of the above-described functions.
  • the apparatus for storing the directory index and the method for storing the directory index belong to the same idea
  • the apparatus and the system for reading the directory index and the method for reading the directory index belong to the same idea and its specific implementation process see embodiment of the method, not repeat them here.

Abstract

The present invention discloses a method, apparatus and system for storing and reading the directory index and belongs to the field of computer technology. The method for storing the directory index includes: all directories in the directory index are configured with identifier respectively; according to each directory identifier, the directory index is split so as to obtain the directory split item corresponding to each directory identifier; each directory split item and its corresponding directory identifier are stored as a record item; Wherein each directory split item comprises at least corresponding sub-directory identifier and corresponding file storage address. The invention, by that all directories in the directory index are configured with identifier respectively; according to each directory identifier, the directory index is split so as to obtain the directory split item corresponding to each directory identifier; each directory split item and its corresponding directory identifier are stored as a record item, refines the granularity of the directory index, thus improving access performance for the directory index.

Description

A METHOD, APPARATUS AND SYSTEM FOR STORING, READING THE DIRECTORY INDEX FIELD OF THE INVENTION
The invention relates to the field of computer technology, in particular to a method, apparatus and system for storing, reading the directory index.
BACKGROUND
As computer technology continues to develop, the directory index as an important component of file system provides users with visual and understandable view of the file system, so as to solve or reduce the semantic isolation in the data storage between people and computers. The storing manner of the directory index directly determines the way of accessing the directory index and efficiency thereof. In order to quickly and efficiently access the directory index, how to store the directory index has become a key issue.
In the prior art, one way is block-based device index storage, that is, the system directory index is stored on the disk directly. Such as EXT3 (Third extended file system, the third extended file system ), it divides logical disk into fixed -size logical disk blocks (simply referred to as block), each disk block in the file system has a globally unique block number; a certain number of blocks are combined into logical disk group (simply referred to as group ); a disk group is divided, according to function, into the following sections: data block bitmap corresponding to the block number of the set of data block and being for allocation and recovery of the disk block in the group; index node bitmap corresponding to the block number of the set of index block and being for allocation and recovery of the index node; index table corresponding to the group index node group and being for saving the directory or file index data block group; data block group being used to store the actual directory or file specific data. Each index node is used to record information about a file or directory. When indexing directory, the node saves data block number where the directory data is, and the data block record all the files and subdirectories index information of the directory; Another way is directory index storage based on a database, its files and directories index data are stored in the database, parent-child relationship between directories and files is associated through each table items, tree view can be achieved at the user interface layer. Directory index is stored in the database server, while the actual file data is stored in the I / O (Input / Output, input and output ports) server.
In the process of carrying out the invention, the inventor finds that the prior art at least has the following problems:
In the first way, since the directory index and the actual file data are stored in the same medium, when there is massive file data, storage space where the directories index itself occupied is as many as dozens of T (Tera), and these huge numbers of directory index is difficult to be stored on the local disk, the massive demand for distributed storage cannot be meet; in the second way, because the directory index storage is based on the database, in the subsequent batch operation for the directory index, the access number for directory index will be multiplied, resulting in poor access performance.
SUMMARY OF THE INVENTION
In order to solve the problems of prior art, the present invention provides a method, apparatus and system of storing, reading the directory index. The technical solutions are as follows:
according to one aspect, there provided a method of storing a directory index, characterized in that the method comprises:
all directories in the directory index are configured with identifier respectively; according to each directory identifier, the directory index is split so as to obtain the directory split item corresponding to each directory identifier;
each directory split item and its corresponding directory identifier are stored as a record item;
Wherein each directory split item comprises at least corresponding sub-directory identifier and corresponding file storage address.
According to further aspect, there provide a apparatus for storing directory index, characterized in that said apparatus comprises:
configuration module for configuring all directories in the directory index with identifier respectively;
split module for splitting the directory index according to each directory identifier configured by the configuration module so as to obtain the directory split item corresponding to each directory identifier;
storage module for storing each directory split item obtained by the splitting module and its corresponding directory identifier as a record item;
Wherein each directory split item contains at least the corresponding sub-directory identifier and the corresponding file storage address.
According to further aspect, there provides a method for reading a directory index, characterized in that the method comprises:
receiving directory index reading request carried with the directory identifier to be read;
finding the record item containing the directory identifier to be read in the apparatus for storing the directory index, and returning the directory split item in the found record item as read results;
Wherein the directory split item is obtained by the apparatus for storing the directory index, splitting the directory index according to the identifier configured for all directories in the directory index and is stored by the apparatus for storing the directory index; the record item comprises at least the directory split item and its corresponding directory identifier.
According to further aspect, there provides a apparatus for reading the directory index, characterized in that said apparatus comprises:
receiving module for receiving directory index reading request carried with the directory identifier to be read;
find module for finding the record item containing the directory identifier to be read in the apparatus for storing the directory index, and
returning module for returning the directory split item in the found record item as read results;
Wherein the directory split item is obtained by the apparatus for storing the directory index, splitting the directory index according to the identifier configured for all directories in the directory index and is stored by the apparatus for storing the directory index; the record item comprises at least the directory split item and its corresponding directory identifier.
According to further aspect, there provides a system for reading the directory index, characterized by comprising a terminal, a apparatus for reading the directory index and a apparatus for storing the directory index;
the terminal for sending a directory index reading request carried with the directory identifier to be read to the apparatus for reading the directory index;
the apparatus for reading the directory index for receiving the directory index reading request carried with the directory identifier to be read, sent by the terminal; The apparatus for storing the directory index for configuring all directories in the directory index with identifier respectively; splitting the directory index according to each directory identifier so as to obtain the directory split item corresponding to each directory identifier; storing each directory split item and its corresponding directory identifier as a record item; wherein, each directory split item at least comprises the corresponding sub-directory identifier and corresponding file storage address.
Embodiment of the present invention provides technical solutions to bring beneficial effects:
by all directories in the directory index are configured with identifier respectively; according to each directory identifier, the directory index is split so as to obtain the directory split item corresponding to each directory identifier; each directory split item and its corresponding directory identifier are stored as a record item, refines the granularity of the directory index, thus improving access performance for the directory index. DESCRIPTION OF THE DRAWINGS
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the following describes the used Figures in the embodiments simply. Apparently, the drawings described below are merely some embodiments of the present invention, for the skilled person in the art, in the premise without creative efforts, you can also obtain other drawings based on these drawings.
Figure 1 is a first embodiment of the present invention, providing a flowchart of a method for storing directory index; Figure 2 is a second embodiment of the present invention, providing a structure diagram of a directory index system;
Figure 3 is a second embodiment of the present invention, providing a flowchart of a method for storing directory index;
Figure 4 is a second embodiment of the present invention, providing a diagram of directory index structure that is not split;
Figure 5 is a second embodiment of the present invention, providing a diagram of directory index structure that has been split;
Figure 6 is a second embodiment of the present invention, providing a process schematic of querying directory Index;
Figure 7 is a second embodiment of the present invention, providing a process schematic to modify the name of the directory index;
Figure 8 is a third embodiment of the present invention, providing a flowchart of a method of reading the directory index;
Figure 9 is a fourth embodiment of the present invention, providing a first structure diagram of the apparatus for storing the directory index;
Figure 10 is a fourth embodiment of the present invention, providing a second structure diagram of the apparatus for storing the directory index;
Figure 11 is a fourth embodiment of the present invention, providing a third structure diagram of the apparatus for storing the directory index;
Figure 12 is a fourth embodiment of the present invention providing a fourth structure diagram of the apparatus for storing the directory index;
Figure 13 is a fourth embodiment of the present invention, providing a fifth structure diagram of the apparatus for storing the directory index;
Figure 14 is a fourth embodiment of the present invention, providing a sixth structure diagram of the apparatus for storing the directory index;
Figure 15 is a fifth embodiment of the present invention, providing a structure diagram of the system for reading the directory index;
FIG 16 is a sixth embodiment of the present invention, providing a structure diagram of the system for reading the directory index.
DETAILED DESCRIPTION
In order to make the object of the present invention, technical solutions and advantages more clearly, below with reference to the drawings, the embodiments of the invention is described in further details. Example one
The embodiment provides a method of storing the directory index, see Figure 1, the present embodiment provides a method process includes:
Step 101: all directories in directory index are configured with identifier;
Step 102: according to various directories identifier, directory index is split to obtain directory split item corresponding to each directory identifier; wherein each directory split item contains at least corresponding subdirectories identifier and the corresponding documents memory address;
Step 103: each directory split item and its corresponding directory identifier is stored as a record item.
Further, the present embodiment provides a method, further comprising:
receive directory index query request carried with the directory identifier to be queried;
find the record item that contains the directory identifier to be queried and return the directory split item in the found record item as query results.
Further, the present embodiment provides a method, further comprising:
receive directory modification request, the directory modification request carries with the directory identifier to be modified and the modified directory information; find record item that contains the identifier to be modified and modify the directory split item in the found record item in accordance with the modified directory information.
Further, each directory split item and its corresponding directory identifier is stored as a record item, including but not limited to:
each directory split item and its corresponding directory identifier is stored as a record item in the corresponding storage node respectively;
the correspondence relationship between directory identifier corresponding to each directory split item and the storage node is set and stored.
Further, after the correspondence relationship between directory identifier corresponding to each directory split item and the storage node is set and stored, further comprising:
receive directory index query request carried with the directory identifier to be queried;
find storage node corresponding to the directory identifier to be queried, according to the correspondence relationship between directory identifier corresponding to each directory split item and the storage node, and return the directory split item in the record item stored in the found storage node as query results.
Further, after the correspondence relationship between directory identifier corresponding to each directory split item and the storage node is set and stored, further comprising:
receive directory modification request, the directory modification request carries the identifier to be modified and the modified directory information;
find storage node corresponding to the directory identifier to be queried, according to the correspondence relationship between directory identifier corresponding to each directory split item and the storage node, and modify the directory split item in the record item stored in the found storage node according to the modified directory information.
This embodiment provides a method comprising: all directories in the directory index are configured with identifier and the directory index is split according to each identifier, after getting the directory split item corresponding to each directory identifier, each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index. In addition, by storing each of the recording item in its corresponding storage nodes, it can effectively reduce access consuming-time for directory index and save resources.
Example two
Embodiment of the invention provides a method for storing directory index, which stores the directory index and the actual file data separately. As shown in Figure 2, after the index storage server stores directory index, the users can, by the user terminal, sends to the directory view server the access request for directory index, to perform the relevant Index access operations. After the directory view server receives a directory index access request from the user terminal, the server reads directory index corresponding to the directory index access request in the index storage servers and returns the directory index to the user terminal, so that the user terminal accesses to the file storage server the actual file data corresponding to the directory index, according to the directory index. To facilitate understanding, combining with the above content shown in Figure 2 and the content in the first embodiment, the present embodiment makes detailed explanation to the storage directory indexes manner. Referring to Figure 3, this embodiment provides a method process including:
Step 301: all directories in the directory index are configured with identifier;
As for this step, the embodiment will abstract each directory as an object, and each object is configured with a globally unique identifier. As for the manner of configuring the globally unique identifier, the present embodiment does not particularly limit it, and every directory corresponding to different identifiers can be. Furthermore, after all directories in the directory index are configured with identifier, the method provided in this embodiment express, by the form of the Key- Value ( key - value), the information corresponding to the directory, that is, expresses the information of each directory in the directory index in the key - value form, wherein, the value of "Key" indicates the identifier of each directory, "Value" indicates the directory item in the directory.
Step 302: According to each directory identifier, the directory index is split to obtain a index split item corresponding to each directory identifier; wherein each directory split item contains at least corresponding subdirectory identifier and corresponding file storage address;
Specifically, in order for convenience of description, the present embodiment take the index structure in which the directory index I is not split as shown in Figure 4 as an example, in which there exits two subdirectories, which are identified as directory 1 and directory 2, then after, by the above step 301, root directory of the directory index I is configured with a identifier named as 10, the directory I is configured with a identifier named as II and the directory 12 is configured as a identifier named as 12, the directory index I is split according to the identifiers 10, II and 12, obtaining the directory split item corresponding respectively to the identifiers 10, II and 12, the index structure of the split directory index I being shown in Figure 5. As for the concrete implementation of splitting the directory index I, it comprises but not limit to: pull out the index information corresponding to the identifiers 10, II and 12, respectively, and form three directory items corresponding respectively to identifiers 10, II and 12.
Wherein in addition to containing the corresponding sub-directory identifier and the corresponding file storage address, each directory split item further comprises other information, such as the name of each subdirectory corresponding to each directory split item, creation time and modification time of each sub -directory, the file name of each file corresponding to the each directory split item, creation time and modification time of each file, the size of storage space occupied by each file, etc., in this embodiment, the content contained in each directory split item is not particularly limited. Of course, in addition to the above split manner, other split manner can also be used, the present embodiment does not specifically limit.
Step 303: each directory split item and its corresponding directory identifier are stored as a record item;
Specifically, each directory split item and its corresponding directory identifier are stored as a record item, including but not limited to:
each directory split item and its corresponding directory identifier are stored respectively in the corresponding storage node as a record item;
setting the correspondence relationship of the directory identifier corresponding to each directory split item and the storage node, and storing the correspondence relationship.
For example, taking the split directory index I shown in Figure 5 as an example, after the directory split items corresponding respectively to the identifiers 10, II and 12, the identifiers 10, II, 12 and their corresponding directory split items are stored in the form of record item, that is, the identifier 10 and the its corresponding directory split item being a record item named as record item TO; the identifier II and its corresponding directory split item being a record item named as record item T2; the identifier 12 and its corresponding directory split item being a record item named as T3; after three record item Tl, T2 and T3 are obtained, the three record items are stored in corresponding storage node S. After the three record items Tl, T2 and T3 are stored in the corresponding storage node S, in order to facilitate the user to quickly and easily obtains the contents of three record items, the present embodiment provides a method further comprising: providing correspondence relationship between the identifiers iO, II and 12 corresponding to the directory split items in the three records terms Tl, T2, and T3 and the storage node S, and storing the correspondence relationship.
Wherein the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is shown in Table I below:
Table 1
Figure imgf000009_0001
On storing the correspondence relationship, the storage medium may be read-only registers specifically Of course, the type of storage media, in addition to the above read-only register, can be other types of storage media such as flash memory or hard disk, etc. The type of storage media in this embodiment is not be specifically limited.
Further, after the directory index is split and each directory split item and its corresponding directory identifier are stored respectively in the corresponding storage node as a record item through the above-mentioned step 301 to step 303, the user can, according to the identifier of each directory split item, perform some common access operations, such as query directory operations, detailed process can be found in the following step 304 to step 305; modify directory operations, detailed process can be found in the following step 306 to step 307.
Step 304: receiving a directory index query request carried with the directory identifier to be queried, sent from the user terminal;
For this step, after receiving a directory index query request carried with the directory identifier to be queried, sent from the user terminal, the directory index query request is stored in the storage medium. Wherein the storage medium is in particular the read-only registers and, of course, the type of storage media, in addition to the above read-only register, can also be other types of storage media such as flash memory or hard disk, etc., the type of storage media in this embodiment is not specifically defined.
wherein, in addition to the directory identifier to be queried, the directory index query request may also carry other information, such as the directory creation time to be queried. In the embodiment, information carried by the directory index query request is not particularly limited.
Step 305: Find the record item containing the directory identifier to be queried and send the directory split item in the found record item to the user terminal as query result.
For this step, if each directory split item and its corresponding directory identifier as a record item are stored in the corresponding storage node, after receiving a directory index query request carried with the directory identifier to be queried, sent from the user terminal, the method provided in this embodiment further comprises: according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, find the storage node corresponding to the directory identifier to be queried and send the directory split item in the record item stored in the found storage node to the user terminal as query result.
For example, take Figure 6 as an example to make detailed explanation to the above process. Assume that a user wants to query the directory split item corresponding to the identifier II in the directory index shown in Figure 5, the terminal of the user A generates the directory index query request according to the identifier II, and then sends the directory index query request to the index storage server C through the directory view server B, the index storage server C, after receiving the directory index query request, query the correspondence relationship of the identifier and the storage node stored in the storage medium in advance according to the directory index query request, and obtain the storage node information storing the directory to be query. After that, the directory split item in the record item stored in the found storage node as query result is sent to the terminal of the user A through the directory view server B.
It should be noted that the query directory operation ends. Further, the present embodiment provides a method to support the operation of modifying the directory and the specific process is described in the step 306 to step 307.
Step 306: receiving a directory modification request sent from the user terminal, the directory modification request is carried with the identifier of the directory to be modified and the modified directory information.
For this step, after receiving a directory modification request sent from the user terminal, the directory index query request is stored in the storage medium. Wherein, the storage medium is in particular the read-only registers and, of course, the type of storage media, in addition to the above read-only register, can be other types of storage media such as flash memory or hard disk, etc., the type of storage media in this embodiment is not specifically defined.
Among them, the directory modification request, in addition to carrying the identifier of the directory to be modified and the modified directory information, further carry other information, for example, the creation time of the directory to be modified, in the embodiment, the information carried by the directory modification request is not particularly limited.
Step 307: Find the record item containing the directory identifier to be modified, and modify the directory split item in the found record item according to the modified directory information.
For this step, if each directory split item and its corresponding directory identifier as a record item are stored in the corresponding storage node, after receiving a directory modification request sent from the user terminal, the method provided in this embodiment further comprises:
according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, find the storage node corresponding to the directory identifier to be queried and modify the directory split item in the record item stored in the found storage node according to the modified directory information.
For example, take Figure 7 as an example to make detailed explanation to the above process. Assume that a user wants to modify the directory name corresponding to the identifier II in the directory index shown in Figure 5, the terminal of the user A generates the directory modification request according to the parent directory identifier 10 of the identifier II, and then sends the directory modification request to the index storage server C through the directory view server B, the index storage server C, after receiving the directory modification request, query the correspondence relationship of the identifier 10 and the storage node stored in the storage medium in advance according to the identifier 10 carried by the directory modification request and obtain the storage node information storing the directory to be query. After that, the directory split item in the record item stored in the found storage node is sent to the directory view server B. Directory view server B, receiving the directory split item returned by the index storage server C, split the directory split item for analysis, to get a directory list, and modify the name of the directory 1 in the directory list according to the modified directory information modification directory list carried by the directory modification request. After the modification, new directory list is sent in package to the index storage server C. Finally, the index storage server C sends the modified directory to the terminal of the user A through the directory view server B.
This embodiment provides a method comprising: all directories in the directory index are configured with identifier and the directory index is split according to each directory identifier, after getting the directory split item corresponding to each directory identifier, each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index. In addition, by storing each recording item in its corresponding storage nodes, it can effectively reduce access consuming-time for directory index and save resources.
Example three
The embodiment provides a method to reading the directory index, seeing Figure 8, the present embodiment provides a method process including:
Step 801: Receiving a directory index reading request carried with the directory identifier to be read;
For this step, after receiving the directory index reading request carried with the directory identifier to be read, the directory index reading request is stored in the storage medium. Wherein the storage medium is in particular the read-only registers and, of course, the type of storage media, in addition to the above read-only register, can also be other types of storage media such as flash memory or hard disk, etc., the type of storage media in this embodiment is not defined.
Wherein directory index reading request, in addition to carrying the identifier of the directory to be read, can also carry additional information such as the creation time of the directory to be read, in this embodiment, the information carried by the directory index reading request is not particularly limited.
Step 802: find the record item containing the directory identifier to be read in the apparatus storing the directory index and return the directory split item in the found record item as reading result; wherein the directory split item is obtained by the apparatus storing the directory index, to split the directory index according to the identifier configured for all the directories in the directory index and is stored by the apparatus storing the directory index; the recording item comprises at least the directory split item and its corresponding directory identifier.
For this step, find the record item containing the directory identifier to be read, comprising:
Determining the storage node storing the record item containing the directory identifier to be read according to the correspondent relationship between the directory identifier corresponding to each directory split item and the storage node;
Finding the record item containing the directory identifier to be read from the determined storage node;
Wherein, the correspondence relationship between the directory identifier corresponding to each directory item and the storage node is set and stored by the apparatus storing the directory index.
For example, a user wants to read the directory split item corresponding to a directory identifier of the apparatus storing the directory index, the user terminal after generating the directory index reading request according to the directory identifier, sends the directory index reading request to the apparatus reading the directory index, the apparatus for reading the directory index, after receiving the directory index reading request, query the correspondence relationship between the directory identifier and the storage node stored in advance in the storage medium of the apparatus for storing the directory the directory index, according to the directory identifier carried by the directory index reading request, and obtain the storage node information storing the record item containing the directory identifier. After that, the directory split item in the record item stored in the found storage node as reading result is returned to the user terminal and displayed to the user by the user terminal. Wherein, the manner of the apparatus for storing the directory index storing the directory index see the description for the embodiment two, and is omitted herein.
In the method provided by this embodiment, since the apparatus for storing the directory index split the directory index and obtain the directory split item, according to the identifier configured for the all the directory in the directory index, and store them, this method receives the directory index reading request carried with the directory identifier to be read, and find the record item containing the directory identifier to be read, in the apparatus for storing the directory index, and return the directory split item in the found record item as reading result without returning all directory index, thus the access performance of the directory index can be improved greatly.
Example four
Embodiment of the invention provides a apparatus for storing directory index for performing the method provided by the above embodiment 1 and embodiment 2, seeing Figure 9, the apparatus comprising:
Configuration module 911 for configuring identifier for all the directory in the directory index;
Split module 912 for splitting the directory index according to each directory identifier configured by the configuration module 911 to obtain a directory split item corresponding to each directory identifier;
Storage module 913 for storing each directory split item obtained by the split module and its corresponding directory identifier as a record item;
Wherein, each directory split item comprises at least corresponding sub-directory identifier and corresponding file storage address.
Further, seeing Figure 10, the apparatus further comprising:
a first receiving module 914 for receiving the directory index query request carried with the directory identifier to be queried, sent from the user terminal'
a first finding module 915 for finding the recording item containing the directory identifier received by the first receiving module 914;
a first sending module 916 for sending the directory split item in the record item found by the first finding module 915 as query result to the user terminal.
Further, seeing Figure 11, the apparatus further comprising:
a second receiving module 917 for receiving the directory modification request sent by the user terminal, the directory modification request is carried with the directory identifier to be modified and the modified directory information;
a second finding module 918 for finding the record item containing the directory identifier to be modified received by the second receiving module 917;
a first modification module 919 for modifying the directory split item in the record item found by the second finding module 918 according to the modified directory information.
Further, seeing Figure 12, the storage module 913 comprising:
a storage unit 9131 for storing each directory split item and its corresponding directory identifier as a record item in the corresponding storage node respectively; a setting unit 9132 for setting the correspondent relationship between the directory identifier corresponding to the each directory split item and the storage node and storing the correspondence relationship.
Further, seeing Figure 13, the apparatus further comprising
a third receiving module 920 for receiving the directory index query request carried with the directory identifier to be queried, sent from the user terminal;
a third find module 921 for finding the storage node corresponding to the directory identifier to be queried, received by the third receiving module 920 according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node;
a second sending module 922 for sending the directory split item in the recording item stored in the storage node found in the third finding module 921 as query result to the user terminal;
Further, seeing Figure 14, the apparatus further comprises:
a fourth receiving module 923 for receiving the directory modification request sent from the user terminal, the directory modification request is carried with the directory identifier to be modified and the modified directory information;
a fourth finding module 924 for finding the storage node corresponding to the directory identifier to be queried received by the fourth receiving module 923 according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node;
a second modification module 925 for modifying the directory split item in the record items stored in the storage node found by the fourth finding module 924 according to the modified directory information.
This embodiment provides a apparatus, comprising: all directories in the directory index are configured with identifier and the directory index is split according to each directory identifier, after getting the directory split item corresponding to each directory identifier, each directory split item and its corresponding directory identifier are stored as a record item, thereby refining the granularity of the directory index, thus improving access performance for directory index. In addition, by storing each recording item in its corresponding storage nodes, it can effectively reduce access consuming-time for directory index and save resources.
Example five
The embodiment of the invention provides a apparatus for reading the directory index for performing the method provided by the above embodiment three, seeing Figure 15, the apparatus comprising:
receiving module 1501 for receiving the directory index reading request carried with the directory identifier to be read;
finding module 1502 for finding the record item containing the directory identifier to be read, received by the receiving module 1501;
returning module 1503 for returning the directory split item in the record item found by the finding module 1502 as reading result;
Wherein the directory split item is obtained by the apparatus for storing the directory index splitting the directory index according the identifier configured for all the directories in the directory index and is stored by the apparatus for storing the directory index; the record index comprises at least the directory split item and its corresponding directory identifier.
Further, the finding module 1502 for determining the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finding the record item containing the directory identifier to be read from the determined storage node;
Wherein, the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored by the apparatus for storing the directory index.
In the apparatus provided by this embodiment, since the apparatus for storing the directory index split the directory index and obtain the directory split item, according to the identifier configured for the all the directory in the directory index, and store them, this apparatus receives the directory index reading request carried with the directory identifier to be read, and find the record item containing the directory identifier to be read, in the apparatus for storing the directory index, and return the directory split item in the found record item as reading result without returning all directory index, thus the access performance of the directory index can be improved greatly. Example six
Embodiment of the invention provides a system for reading the directory index, seeing Figure 16, the system comprising: the terminal 1601, the apparatus 1602 for reading the directory index and the apparatus 1603 for storing the directory index;
The terminal 1601 for sending the directory index reading request carried with the directory identifier to be read to the apparatus for reading the directory index;
The apparatus 1602 for reading the directory index for receiving the directory index reading request carried with the directory identifier to be read sent from the terminal 1601; finding the record item containing the directory identifier to be read in the apparatus for storing the directory index, and returning the directory split item in the found record item as reading result;
The apparatus 1603 for storing the directory index, for configuring all the directory in the directory index; splitting the directory index according to each directory identifier to obtain the directory split item corresponding to each directory identifier; storing each directory split item and its corresponding directory identifier as a record item; wherein each directory split item comprises at least the corresponding sub-directory identifier and corresponding file storage address.
Further, when the apparatus 1603 for storing the directory index stores each directory split item and its corresponding directory identifier as a record item, it stores each directory split item and its corresponding directory identifier as a record item in the corresponding storage node respectively; setting the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node and storing the correspondence relationship;
When the apparatus 1602 for reading the directory index finds the record item containing the directory identifier to be read, it determines the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finding the record item containing the directory identifier to be read from the determined storage node;
In the system provided by this embodiment, since the apparatus for storing the directory index split the directory index and obtain the directory split item, according to the identifier configured for the all the directory in the directory index, and store them, this system receives the directory index reading request carried with the directory identifier to be read, and find the record item containing the directory identifier to be read, in the apparatus for storing the directory index, and return the directory split item in the found record item as reading result without returning all directory index, thus the access performance of the directory index can be improved greatly.
It should be noted that: when the apparatus for storing the directory index stores the directory index, when the apparatus and the system for reading the directory index reads the directory index, the above is explained in the functional module division. In actual practice, the above can be performed by the different functional modules according to the need, that is, dividing the inner structure of the apparatus and the system into different functional modules so as to perform all or part of the above-described functions. In addition, the apparatus for storing the directory index and the method for storing the directory index belong to the same idea and the apparatus and the system for reading the directory index and the method for reading the directory index belong to the same idea and its specific implementation process see embodiment of the method, not repeat them here.
The embodiment number of the present invention is only for the description and does not represent the good or bad of embodiments.
Ordinary skill in the art can understand all or part of the steps in the above embodiments can be done by hardware, or by a program instructing relevant hardware, the program may be stored in a computer-readable storage medium, the said storage medium may be read-only memory, magnetic or optical disk.
The foregoing is only preferred embodiments of the present invention and is not intended to limit the invention, where the present invention is within the spirit and principle, any modification, equivalent replacement, improvement, etc., should be included in the present invention, the protective range.

Claims

What is claimed is:
1. A method of storing a directory index, characterized in that the method comprises: all directories in the directory index are configured with identifier respectively; according to each directory identifier, the directory index is split so as to obtain the directory split item corresponding to each directory identifier;
each directory split item and its corresponding directory identifier are stored as a record item;
wherein each directory split item comprises at least corresponding sub-directory identifier and corresponding file storage address.
2. The method according to claim 1, characterized in that further comprising:
receiving the directory index query request carried with the directory identifier to be queried;
finding the record item containing the directory identifier to be queried and returning the directory split item in the found record item as query result.
3. The method according to claim 1, characterized in that further comprising:
receiving directory modification request, the directory modification request carries the identifier to be modified and the modified directory information;
finding the recording item containing the identifier to be modified and modifying the directory split item in the found record item in accordance with the modified directory information.
4. The method according to claim 1, characterized in that each directory split item and its corresponding directory identifier are stored as a record item comprising:
each directory split item and its corresponding directory identifier as a record item are stored in the corresponding storage node;
the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored.
5. The method according to claim 4, characterized in that after the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored, further comprising:
receiving the directory index query request carried with the directory identifier to be queried;
according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, finding the storage node corresponding to the directory identifier to be queried, and returning the directory split item in the record item stored in the found storage node as query result.
6. The method according to claim 4, characterized in that after the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored, further comprising:
receiving a directory modification request, the directory modification request carries the identifier to be modified and the modified directory information;
according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, finding the storage node corresponding to the directory identifier to be queried, and modify the directory split item in the record item stored in the found storage node in accordance with the modified directory information.
7. A apparatus for storing directory index, characterized in that said apparatus comprises:
configuration module for configuring all directories in the directory index with identifier respectively;
split module for splitting the directory index according to each directory identifier configured by the configuration module so as to obtain the directory split item corresponding to each directory identifier;
storage module for storing each directory split item obtained by the splitting module and its corresponding directory identifier as a record item;
wherein each directory split item contains at least the corresponding sub-directory identifier and the corresponding file storage address.
8. The apparatus according to claim 7, characterized in that said apparatus further comprises:
a first receiving module for receiving a directory index query request carried with the directory identifier to be queried;
a first finding module for finding the record item containing the directory identifier to be queried, received by the first receiving module;
a first sending module for returning the directory split item in the record item found by the first finding module as query result.
9. The apparatus according to claim 7, characterized in that said apparatus further comprises:
a second receiving module for receiving a directory modification request, the directory modification request carries the directory identifier to be modified and the modified directory information;
a second finding module for finding the record item containing the directory identifier to be modified, received by the second receiving module;
a first modification module for modifying the directory split item in the record item found by the second finding module in accordance with the modified directory information.
10. The apparatus according to claim 7, characterized in that the storage module comprises:
a storage unit for storing each directory split item and its corresponding identifier as a record item in the corresponding storage node respectively;
a setting unit for setting and storing correspondence relationship between the directory identifier corresponding to each directory split item and the storage node.
11. The apparatus according to claim 10, characterized in that said apparatus further comprises:
a third receiving module for receiving a directory index query request carried with the directory identifier to be queried;
a third finding module for according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, finding the storage node corresponding to the directory identifier to be queried, received by the third receiving module;
a second sending module for returning the directory split item in the record item stored in the storage node found by the third finding module as query result.
12. The apparatus according to claim 10, characterized in that said apparatus further comprises:
a fourth receiving module for receiving a directory modification request, the directory modification request carries the directory identifier to be modified and the modified directory information;
a fourth finding module for according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node, finding the storage node corresponding to the directory identifier to be queried, received by the fourth receiving module;
a second modification module for modifying the directory split item in the record item found by the fourth finding module in accordance with the modified directory information..
13. A method for reading a directory index, characterized in that the method comprises:
receiving directory index reading request carried with the directory identifier to be read;
finding the record item containing the directory identifier to be read in the apparatus for storing the directory index, and returning the directory split item in the found record item as read results;
wherein the directory split item is obtained by the apparatus for storing the directory index, splitting the directory index according to the identifier configured for all directories in the directory index and is stored by the apparatus for storing the directory index; the record item comprises at least the directory split item and its corresponding directory identifier.
14. The method according to claim 13, characterized in that, finding the record item containing the directory identifier to be read comprising:
determining the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finding the record item containing the directory identifier to be read from the determined storage node;
wherein the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored by the apparatus for storing the directory index.
15. A apparatus for reading the directory index, characterized in that said apparatus comprises:
receiving module for receiving directory index reading request carried with the directory identifier to be read;
find module for finding the record item containing the directory identifier to be read in the apparatus for storing the directory index, and
returning module for returning the directory split item in the found record item as read results;
wherein the directory split item is obtained by the apparatus for storing the directory index, splitting the directory index according to the identifier configured for all directories in the directory index and is stored by the apparatus for storing the directory index; the record item comprises at least the directory split item and its corresponding directory identifier.
16. The apparatus according to claim 15, characterized in that the finding module further
determining the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finding the record item containing the directory identifier to be read from the determined storage node;
wherein the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node is set and stored by the apparatus for storing the directory index.
17. A system for reading the directory index, characterized by comprising a terminal, a apparatus for reading the directory index and a apparatus for storing the directory index;
the terminal for sending a directory index reading request carried with the directory identifier to be read to the apparatus for reading the directory index;
the apparatus for reading the directory index for receiving the directory index reading request carried with the directory identifier to be read, sent by the terminal; the apparatus for storing the directory index for configuring all directories in the directory index with identifier respectively; splitting the directory index according to each directory identifier so as to obtain the directory split item corresponding to each directory identifier; storing each directory split item and its corresponding directory identifier as a record item; wherein, each directory split item at least comprises the corresponding sub-directory identifier and corresponding file storage address.
18. The system according to claim 17, characterizing in that the apparatus for storing the directory index, when storing each directory split item and its corresponding directory identifier, stores each directory split item and its corresponding directory identifier in corresponding storage node respectively; setting and storing the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node;
the apparatus for reading the directory index, when finding the record item containing the directory identifier to be read, determines the storage node storing the record item containing the directory identifier to be read according to the correspondence relationship between the directory identifier corresponding to each directory split item and the storage node; finds the record item containing the directory identifier to be read from the determined storage node.
PCT/CN2013/087582 2013-01-18 2013-11-21 A method, apparatus and system for storing, reading the directory index WO2014110940A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/262,684 US20140244606A1 (en) 2013-01-18 2014-04-25 Method, apparatus and system for storing, reading the directory index

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310019873.2 2013-01-18
CN201310019873.2A CN103942205B (en) 2013-01-18 2013-01-18 Storage, the method, apparatus and system for reading directory index

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/262,684 Continuation US20140244606A1 (en) 2013-01-18 2014-04-25 Method, apparatus and system for storing, reading the directory index

Publications (1)

Publication Number Publication Date
WO2014110940A1 true WO2014110940A1 (en) 2014-07-24

Family

ID=51189875

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/087582 WO2014110940A1 (en) 2013-01-18 2013-11-21 A method, apparatus and system for storing, reading the directory index

Country Status (4)

Country Link
US (1) US20140244606A1 (en)
CN (1) CN103942205B (en)
HK (1) HK1199527A1 (en)
WO (1) WO2014110940A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825735A (en) * 2019-10-10 2020-02-21 中国平安财产保险股份有限公司 Data table processing method and related equipment

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156191B (en) * 2015-04-21 2019-08-06 北京大学 Academic probation method based on ePub file and the academic probation system based on ePub file
CN105404561B (en) * 2015-11-19 2019-04-12 浙江宇视科技有限公司 A kind of the correcting and eleting codes implementation method and device of distributed storage
CN110709824B (en) 2018-02-05 2022-01-14 华为技术有限公司 Data query method and device
CN109189728B (en) * 2018-07-18 2022-08-12 深圳市网心科技有限公司 Intelligent hardware device, magnetic disk data processing method and storage medium
CN109299037A (en) * 2018-08-16 2019-02-01 北京炎黄盈动科技发展有限责任公司 Document handling method and device
US11226963B2 (en) * 2018-10-11 2022-01-18 Varada Ltd. Method and system for executing queries on indexed views
CN113553274B (en) * 2020-04-24 2023-09-12 江苏华创微系统有限公司 Method for realizing inter-chip consistency by self-adaptive granularity directory table
CN111625357A (en) * 2020-05-22 2020-09-04 柏科数据技术(深圳)股份有限公司 Directory reading method and device based on Feiteng platform, server and storage medium
CN113392066A (en) * 2021-06-11 2021-09-14 上海妙一生物科技有限公司 Universal catalog management method and device and computer equipment
CN113282551B (en) * 2021-07-22 2022-05-31 阿里云计算有限公司 Data processing method, system and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101031907A (en) * 2004-09-30 2007-09-05 Emc公司 Index processing
CN101639851A (en) * 2009-08-03 2010-02-03 北京高森明晨信息科技有限公司 Method for storing and querying data and devices therefor
US20120005528A1 (en) * 2010-07-02 2012-01-05 International Business Machines Corporation Data set index record preservation
US8266136B1 (en) * 2009-04-13 2012-09-11 Netapp, Inc. Mechanism for performing fast directory lookup in a server system

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4633041A (en) * 1984-04-09 1986-12-30 At&T Information Systems Inc. Station set directory assistance arrangement
JPH1188441A (en) * 1997-09-12 1999-03-30 Canon Inc Memory controller, memory control method, transmitter and receiver
US6405292B1 (en) * 2000-01-04 2002-06-11 International Business Machines Corp. Split pending buffer with concurrent access of requests and responses to fully associative and indexed components
JP2001265652A (en) * 2000-03-17 2001-09-28 Hitachi Ltd Cache directory constitution method and information processor
US7805401B2 (en) * 2003-04-14 2010-09-28 Novell, Inc. Method and apparatus for splitting a replicated volume
US7039762B2 (en) * 2003-05-12 2006-05-02 International Business Machines Corporation Parallel cache interleave accesses with address-sliced directories
US9760652B2 (en) * 2004-06-21 2017-09-12 International Business Machines Corporation Hierarchical storage architecture using node ID ranges
US20060004791A1 (en) * 2004-06-21 2006-01-05 Kleewein James C Use of pseudo keys in node ID range based storage architecture
US7849107B2 (en) * 2006-05-26 2010-12-07 Symbol Technologies, Inc. Data format for efficient encoding and access of multiple data items in RFID tags
US7860707B2 (en) * 2006-12-13 2010-12-28 Microsoft Corporation Compound word splitting for directory assistance services
CN100595761C (en) * 2007-12-29 2010-03-24 中国科学院计算技术研究所 Metadata management method for splitting name space
US8321389B2 (en) * 2009-01-08 2012-11-27 International Business Machines Corporation Method, apparatus and computer program product for maintaining file system client directory caches with parallel directory writes
CN101719141B (en) * 2009-12-24 2011-09-07 成都市华为赛门铁克科技有限公司 File processing method and system based on directory object
US8930332B2 (en) * 2010-03-12 2015-01-06 Salesforce.Com, Inc. Method and system for partitioning search indexes
CN102184211B (en) * 2011-05-03 2014-08-06 华为数字技术(成都)有限公司 File system, and method and device for retrieving, writing, modifying or deleting file
US10013444B2 (en) * 2012-03-02 2018-07-03 International Business Machines Corporation Modifying an index node of a hierarchical dispersed storage index
US9317511B2 (en) * 2012-06-19 2016-04-19 Infinidat Ltd. System and method for managing filesystem objects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101031907A (en) * 2004-09-30 2007-09-05 Emc公司 Index processing
US8266136B1 (en) * 2009-04-13 2012-09-11 Netapp, Inc. Mechanism for performing fast directory lookup in a server system
CN101639851A (en) * 2009-08-03 2010-02-03 北京高森明晨信息科技有限公司 Method for storing and querying data and devices therefor
US20120005528A1 (en) * 2010-07-02 2012-01-05 International Business Machines Corporation Data set index record preservation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825735A (en) * 2019-10-10 2020-02-21 中国平安财产保险股份有限公司 Data table processing method and related equipment
CN110825735B (en) * 2019-10-10 2023-08-22 中国平安财产保险股份有限公司 Data table processing method and related equipment

Also Published As

Publication number Publication date
CN103942205A (en) 2014-07-23
HK1199527A1 (en) 2015-07-03
CN103942205B (en) 2018-06-05
US20140244606A1 (en) 2014-08-28

Similar Documents

Publication Publication Date Title
US20140244606A1 (en) Method, apparatus and system for storing, reading the directory index
Vora Hadoop-HBase for large-scale data
US11068441B2 (en) Caseless file lookup in a distributed file system
US10180984B2 (en) Pivot facets for text mining and search
WO2017167171A1 (en) Data operation method, server, and storage system
EP2863310B1 (en) Data processing method and apparatus, and shared storage device
US8924373B2 (en) Query plans with parameter markers in place of object identifiers
WO2015140728A1 (en) Accelerated access to objects in an object store implemented utilizing a file storage system
CN103595797B (en) Caching method for distributed storage system
US8977662B1 (en) Storing data objects from a flat namespace in a hierarchical directory structured file system
CN109033360B (en) Data query method, device, server and storage medium
US9110820B1 (en) Hybrid data storage system in an HPC exascale environment
CN111221791A (en) Method for importing multi-source heterogeneous data into data lake
US20140229429A1 (en) Database management delete efficiency
US20180075159A1 (en) Efficient property graph storage for streaming / multi-versioning graphs
US11216416B2 (en) Managing snapshotting of a dataset using an ordered set of B+ trees
CN110134335A (en) A kind of RDF data management method, device and storage medium based on key-value pair
KR101640733B1 (en) System for Managing data based In-Memory DataBase and method thereof
CN103942301A (en) Distributed file system oriented to access and application of multiple data types
CN111176901B (en) HDFS deleted file recovery method, terminal device and storage medium
CN105184550B (en) Manage method, server and the system of waiting data
WO2023179787A1 (en) Metadata management method and apparatus for distributed file system
CN112417225A (en) Joint query method and system for multi-source heterogeneous data
CN111008198A (en) Service data acquisition method and device, storage medium and electronic equipment
CN109063215B (en) Data retrieval method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13872164

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.12.2015)

122 Ep: pct application non-entry in european phase

Ref document number: 13872164

Country of ref document: EP

Kind code of ref document: A1