WO2011064984A1 - ビット列検索装置、検索方法及びプログラム - Google Patents

ビット列検索装置、検索方法及びプログラム Download PDF

Info

Publication number
WO2011064984A1
WO2011064984A1 PCT/JP2010/006834 JP2010006834W WO2011064984A1 WO 2011064984 A1 WO2011064984 A1 WO 2011064984A1 JP 2010006834 W JP2010006834 W JP 2010006834W WO 2011064984 A1 WO2011064984 A1 WO 2011064984A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
array
array element
branch
index key
Prior art date
Application number
PCT/JP2010/006834
Other languages
English (en)
French (fr)
Inventor
敏男 新庄
光裕 國分
Original Assignee
株式会社エスグランツ
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
Priority claimed from JP2010043644A external-priority patent/JP5220047B2/ja
Priority claimed from JP2010121153A external-priority patent/JP5220057B2/ja
Application filed by 株式会社エスグランツ filed Critical 株式会社エスグランツ
Priority to CN2010800626871A priority Critical patent/CN102741841A/zh
Priority to EP10832837A priority patent/EP2515245A1/en
Publication of WO2011064984A1 publication Critical patent/WO2011064984A1/ja
Priority to US13/483,940 priority patent/US20120239664A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/322Trees

Definitions

  • the present invention relates to a bit string search technique, and more particularly to a bit string search using a coupled node tree.
  • FIG. 1A is a diagram for explaining a configuration example of a conventional coupled node tree arranged in an array.
  • a node 101 is arranged in an array element of array number 10 in the array 100.
  • the node 101 includes a node type 102, a discrimination bit position 103, and a representative node number 104.
  • the node type 102 is 0, indicating that the node 101 is a branch node. 1 is stored in the discrimination bit position 103.
  • the representative node number 104 stores the array element number 20 of the representative node of the link destination node pair.
  • the array element number stored in the representative node number may be referred to as the representative node number.
  • the array element number stored in the representative node number may be represented by a code attached to the node or a code attached to the node pair.
  • the array element with the array element number 20 stores the node [0] 112 that is the representative node of the node pair 111. Then, node [1] 113 paired with the representative node is stored in the next adjacent array element (array number 20 + 1). 0 is stored in the node type 114 of the node [0] 112, 3 is stored in the discrimination bit position 115, and 30 is stored in the representative node number 116. Further, 1 is stored in the node type 117 of the node [1] 113, indicating that the node [1] 113 is a leaf node. The index key 118 stores “0001”.
  • the representative node may be represented by a node [0] and the node paired therewith may be represented by a node [1].
  • a node stored in an array element having a certain array element number may be referred to as a node having the array element number
  • an array element number in which the node is stored may be referred to as a node array number.
  • the contents of the node pair 121 composed of the node 122 and the node 123 stored in the array elements having the array element numbers 30 and 31 are omitted.
  • the 0 or 1 added to the array elements stored in the node [0] 112, the node [1] 113, the node 122, and the node 123 are linked to which node of the node pair when searching with the search key. It shows what to do.
  • the search key bit value 0 or 1 at the discrimination bit position of the preceding branch node is linked to the node having the array element number added to the representative node number. Therefore, by adding the bit value of the discrimination bit position of the search key to the representative node number of the preceding branch node, the array element number of the array element storing the link destination node can be obtained.
  • the representative node number is the smaller of the array element numbers in which the node pairs are arranged, but it is obvious that the larger one can be used.
  • FIG. 1B is a diagram conceptually showing a tree structure of a conventional coupled node tree.
  • Reference numeral 210a indicates the root node of the coupled node tree 200 illustrated in FIG. 1B.
  • the root node 210a is a representative node of the node pair 201a arranged at the array element number 220.
  • a note pair 201b is arranged below the root node 210a, a node pair 201c and a node pair 201f are arranged below it, and a node pair 201h and a node pair 201g are arranged below the node pair 201f.
  • a node pair 201d is disposed below the node pair 201c, and a node pair 201e is disposed below the node pair 201d.
  • the code of 0 or 1 added before each node is the same as the code assigned before the array element described in FIG.
  • the tree is traversed according to the bit value of the discrimination bit position of the search key, and the leaf node to be searched is found.
  • the node type 260a of the root node 210a is 0, indicating that it is a branch node, and the discrimination bit position 230a indicates 0.
  • the representative node number is 220a, which is the array element number of the array element stored in the representative node 210b of the node pair 201b.
  • the node pair 201b is composed of nodes 210b and 211b, and the node types 260b and 261b are both 0, indicating that they are branch nodes. 1 is stored in the discrimination bit position 230b of the node 210b, and the array element number 220b of the array element stored in the representative node 210c of the node pair 201c is stored in the link representative node number.
  • this node is a leaf node and therefore includes an index key. “000111” is stored in the index key 250c.
  • the node type 261c of the node 211c is 0, the discrimination bit position 231c is 2, and the array element number 221c of the array element in which the representative node 210d of the node pair 201d is stored is stored in the representative node number.
  • the node type 260d of the node 210d is 0, the discrimination bit position 230d is 5, and the array number 220d of the array element in which the representative node 210e of the node pair 201e is stored is stored in the representative node number.
  • the node type 261d of the node 211d paired with the node 210d is 1, and “011010” is stored in the index key 251d.
  • the node types 260e and 261e of the nodes 210e and 211e of the node pair 201e are both 1, indicating that both are leaf nodes.
  • “010010” and “010011” are stored as index keys in the index keys 250e and 251e, respectively. Has been.
  • the node types 260f and 261f of the nodes 210f and 211f of the node pair 201f are both 0, and both are branch nodes. 5 and 3 are stored in the discrimination bit positions 230f and 231f, respectively.
  • the representative node number of the node 210f stores the array element number 220f of the array element in which the representative node 210g of the node pair 201g is stored, and the representative node number of the node 211f contains the node [0] 210h that is the representative node of the node pair 201h.
  • the array element number 221f of the stored array element is stored.
  • the node types 260g and 261g of the nodes 210g and 211g of the node pair 201g are both 1, indicating that both are leaf nodes, and “100010” and “1000011” are stored in the respective index keys 250g and 251g. .
  • the node type 260h and 261h of the node [0] 210h which is the representative node of the node pair 201h, and the node [1] 211h that is paired with the node [0] 210h are both 1, indicating that both are leaf nodes.
  • “101011” and “101100” are stored in 250h and 251h.
  • a temporary storage area corresponding to each process is used in order to use various values obtained during the process in a later process.
  • data stored in a certain data storage area is described with the data storage area code added, and the name of the data itself may be used as the name of a temporary storage area for storing the data.
  • FIG. 2 is a diagram illustrating an example of a processing flow of bit string search using a conventional coupled node tree.
  • the array element number of the search start node is acquired.
  • the array corresponding to the acquired array element number stores arbitrary nodes constituting the coupled node tree.
  • the search start node may be specified by an input from an operator or by an application program that uses the processing illustrated in FIG.
  • the obtained array number of the search start node is set in a search start node setting area (not shown).
  • This search start node setting area is used to set various values obtained in the middle of processing as described later. This is one of the “temporary storage areas corresponding to each process for use in the process”.
  • the expression “set in a search start node setting area (not shown) instead of the expression “set in a search start node setting area (not shown)”, “get the search start node array number”, “set as search start node” or simply “start search” It may also be described as “set to node”.
  • step S202 the array element number acquired in the search path stack is stored, and in step S203, the array element corresponding to the array element number is read as a node to be referred to.
  • step S204 the node type is extracted from the read node.
  • step S205 it is determined whether the node type is a branch node. If it is determined in step S205 that the read node is a branch node, the process proceeds to step S206, where information about the discrimination bit position is extracted from the node, and in step S207, a bit value corresponding to the extracted discrimination bit position is obtained. Retrieve from search key.
  • step S208 the representative node number is extracted from the node.
  • step S209 the bit value extracted from the search key and the representative node number are added, and the process returns to step S202 as a new array number.
  • step S210 the index key is extracted from the leaf node as a search result key, and the process ends.
  • a process for searching the index key “100010” from the coupled node tree 200 illustrated in FIG. 1B with the root node as a search start node will be briefly described.
  • the discrimination bit positions are 0, 1, 2,... From the most significant bit position.
  • the search start node is the root node
  • processing is started from the root node 210a using the bit string “100010” as a search key. Since the discrimination bit position 230a of the root node 210a is 0, it is 1 when the bit value of the discrimination bit position of the search key “100010” is 0 is seen. Therefore, the node 211b stored in the array element having the array element number obtained by adding 1 to the array element number 220a storing the representative node number is linked. Since 2 is stored in the discrimination bit position 231b of the node 211b, the discrimination bit position of the search key “100010” is 0 when the bit value of 2 is viewed.
  • the array number 221b in which the representative node number is stored Link to the node 210f stored in the array element. Since 5 is stored in the discrimination bit position 230f of the node 210f, the discrimination bit position of the search key “100010” is 0 when the bit value of 5 is viewed, so that the array element number 220f in which the representative node number is stored is Link to the node 210g stored in the array element. Since the node type 260g of the node 210g is 1, indicating that it is a leaf node, the index key 250g is read out as a search result key. In this way, a search using a coupled node tree is performed. When the search result key is compared with the search key, both are “100010” and match.
  • the search process is completed by taking out the index key from the node as a search result key. If they do not match, the search can be failed.
  • the leaf nodes of the coupled node tree shown in FIGS. 1A and 1B directly include leaf node index keys, and the search process shown in FIG. 2 extracts index keys from the leaf nodes.
  • the configuration of the leaf node and the retrieval of the index key in the search process are the same as those disclosed in Patent Document 1 and Patent Document 2.
  • a leaf node of the coupled node tree disclosed in Patent Document 3 stores a reference pointer, which is a pointer indicating the position of the storage area in which the index key is stored, instead of the index key.
  • the retrieval of the index key in the search process is performed by retrieving the reference pointer from the leaf node and accessing the storage area pointed to by the reference pointer.
  • Patent Document 4 describes that the nodes of a coupled node tree are sequentially evacuated and saved.
  • the coupled node tree has a feature that the storage capacity for storing the tree is smaller than that of the tree previously used for the search process.
  • the problem to be solved by the present invention is to provide a tree structure of a coupled node tree that can be arranged in a storage means having a smaller capacity.
  • each node of the coupled node tree is arranged in an array element of an array corresponding to the position on the tree.
  • the array element number of the array element in which the root node is arranged is 1, and the array element number of the array element in which the representative node of the node pair linked to the branch node is arranged is the array element number of the array element in which the branch node is arranged. It is obtained by doubling. Therefore, the branch node according to the present invention does not need to include the representative node number.
  • the branch node includes the node type and the discrimination bit position, but does not include the representative node number.
  • the leaf node includes a node type and an index key or information for accessing the index key.
  • the information for accessing the index key may be a reference pointer indicating the position of the storage area in which the index key is stored described in Patent Document 3 described above, and is not limited to this, and the index key is stored. It may be an index for obtaining the position of the storage area.
  • a coupled node tree is constructed by inserting a specific bit value “0” or “1” into a specific bit position of an index key to be searched.
  • the search is performed by inserting the same specific bit value “0” or “1” into the same specific bit position as the index key to be searched.
  • the branch node and the leaf node do not include the node type, the branch node includes the discrimination bit position but does not include the representative node number, and the leaf node includes the index key or information for accessing the index key.
  • the maximum number of stages of the coupled node tree is N
  • the leaf node exists only in the Nth stage, and the tree is configured so that only the leaf node exists in the Nth stage. Can be determined. Therefore, the search process is performed by repeating the link operation from the root node to the N-th node as the final stage.
  • a coupled node tree is formed by inserting a specific bit value “0” or “1” into a specific bit position of an index key to be searched.
  • the search is performed by inserting the same specific bit value “0” or “1” into the same specific bit position as the index key to be searched.
  • the branch node and the leaf node do not include the node type, the branch node includes the discrimination bit position but does not include the representative node number, and the leaf node includes the index key or information for accessing the index key.
  • a leaf node is determined only when the maximum number of stages of a coupled node tree is N. The tree is configured so that only a leaf node exists at the Nth stage and only a leaf node exists at the Nth stage.
  • the configuration of the coupled node tree is the same as that of the second embodiment of the present invention.
  • the node position [0] and the node at the link destination in each branch node are determined based on the discrimination bit position of the branch node and the bit value of the search key.
  • Branch destination information indicating where to branch to position [1] is obtained.
  • the search process is performed by repeating a link operation that follows the branch destination information of each stage from the root node to the N-th node that is the final stage.
  • the conventional branch node requires a larger storage capacity than the leaf node. This difference in storage capacity further increases as the number of index keys increases.
  • the storage area for storing the representative node number is not necessary, the size of the array for arranging the coupled node tree can be reduced.
  • the branching operation by determining the node type in the search process is deleted. Therefore, the processing speed can be improved.
  • FIG. 3 is a diagram for explaining a hardware configuration example for carrying out the present invention.
  • the search processing by the search device of the present invention can be performed using the data storage device 308 by the data processing device 301 having at least the central processing unit 302 and the cache memory 303.
  • a data storage device 308 having a search path stack 310 for storing an array 309 in which a coupled node tree is arranged and an array element number in which a node to be traced is stored is a main storage device 305 or an external storage device 306. It is also possible to use a device that can be realized or that is disposed remotely through a communication device 307.
  • the data storage device is provided with a storage area for storing the index key.
  • the main storage device 305, the external storage device 306, and the communication device 307 are connected to the data processing device 301 by a single bus 304, but the connection method is not limited to this.
  • the main storage device 305 can be in the data processing device 301, and the search path stack 310 can be realized as hardware in the central processing unit 302.
  • the array 309 has an external storage device 306, a search path stack 310 in the main storage device 305, etc.
  • the hardware configuration can be appropriately selected according to the usable hardware environment, the size of the index key set, etc. It is. Although not particularly illustrated, it is natural that a temporary storage device corresponding to each process is used in order to use various values obtained during the process in a later process.
  • FIG. 4A is a diagram illustrating a configuration example of a coupled node tree arranged in an array according to the first embodiment of this invention. Compared to the configuration example shown in FIG. 1A, there is no area for storing the representative node number from the branch node. In addition, the sequence numbers from 1 to 15 are listed.
  • the root node 401 is arranged in the array element of array number 1 in the array 400.
  • the root node 401 includes a node type 402 and a discrimination bit position 403.
  • the node type 402 is 0, indicating that the root node 401 is a branch node. 1 is stored in the discrimination bit position 403.
  • the node [0] 412 that is the representative node of the link destination node pair 411 indicated by the dotted-line arrow 410 from the root node 401 whose array element number is 1 is the root node 401 that is the parent node positioned immediately above the tree. It is arranged in the array element of array number 2 having a value twice that of array number 1.
  • a node [1] 413 that is paired with the representative node is arranged in the next adjacent array element (array number 3).
  • the node type of the node [0] 412 stores 1, indicating that the node [0] 412 is a leaf node.
  • the index key 418 stores “0001”.
  • 0 is stored in the node type of the node [1] 413, which indicates that the node [1] 413 is a branch node. 3 is stored in the discrimination bit position of the branch node 413.
  • the node 422 which is the representative node of the link destination node pair 421 indicated by the dotted arrow 420 from the branch node 413 having the array element number 3, has an array number having a value twice that of the array element 3 of the node 413 that is the parent node. 6 array elements.
  • a node 423 that is paired with the representative node is arranged at the next adjacent array element (array number 7).
  • the node type of the node 422 stores 0, indicating that the node 422 is a branch node. 4 is stored in the discrimination bit position of the branch node 422. Also, 0 is stored in the node type of the node 423, indicating that the node 423 is a branch node. 5 is stored in the discrimination bit position of the branch node 422.
  • No nodes are arranged in the array elements of array element numbers 4 and 5.
  • the array element number of the representative node of the link destination node pair is twice the array element number of the parent node.
  • the node 432 that is the representative node of the link destination node pair 431 indicated by the dotted arrow 430 from the branch node 422 whose array number is 6 is arranged in the array element whose array number is 12.
  • a node 433 that is paired with the representative node is arranged in the next adjacent array element (array number 13). Description of the contents of the node 432 and the node 433 is omitted.
  • the node 442 that is the representative node of the link destination node pair 441 indicated by the dotted-line arrow 440 from the branch node 423 having the array element number 7 is arranged in the array element having the array element number 14.
  • a node 443 that is paired with the representative node is arranged at the next adjacent array element (array number 15). Description of the contents of the nodes 442 and 443 is omitted. Also, no nodes are arranged in the array elements of array number 8 to array number 11.
  • FIG. 4B is a diagram conceptually showing a tree structure of a coupled node tree in the first exemplary embodiment of the present invention.
  • the leaf node of the coupled node tree 200a shown in FIG. 4B is the same, and the value of the discrimination bit position of the branch node is also the same as that shown in FIG. 1B. Therefore, the branch pattern of the tree itself is the same.
  • the branch node does not include the representative node number that is the array element number of the representative node of the link destination node pair.
  • the connection to the link destination by the representative node number is represented by a dotted arrow with a symbol of the representative node number.
  • the array element number of the array element in which each node is arranged is displayed in the vicinity of the code indicating each node as [1] with respect to the root node 210a. Except for the representation of the representative node number and the array number, the description is the same as that described in FIG.
  • FIG. 5 is a diagram illustrating a functional block configuration example of the bit string search device according to the first embodiment of the present invention.
  • the bit string search device 500 according to this embodiment illustrated in FIG. 5 includes a search tree storage unit 510, a search start position setting unit 520, a node reading unit 530, a node type determination unit 540, a search key setting unit 550, and a node link unit 560. And a search result output means 570.
  • An array is secured in the storage area of the search tree storage means 510, and a coupled node tree is arranged in the array.
  • the search start position setting means 520 the array element number of the search start node is set.
  • the root node is the search start node
  • 1 is set as the array element number.
  • the search start position can be set by a user who uses the result of the search process.
  • the node reading unit 530 reads the search start node having the array element number set in the search start position setting unit 520 or the link destination node having the array element number set by the node link unit 560.
  • the node type identification unit 540 determines the type of the node read by the node reading unit 530, and if it is a leaf node, passes the leaf node to the search result output unit 570. Pass to means 560.
  • a search key is set in the search key setting means 550.
  • the search key can be set by a user who uses the result of the search process.
  • the node link means 560 has the bit value of the search key set in the search key setting means 550 at the branch bit discrimination bit position passed from the node type determination means 540 and the array element where the branch node is arranged.
  • a value obtained by adding the value obtained by doubling the array number is set as the array number of the array element in which the node to be read next is arranged.
  • the search result output means 570 takes out the index key or information for accessing the index key from the leaf node passed from the node type determination means 540.
  • the index key is output as a search result key.
  • the information extracted from the leaf node is information for accessing the index key
  • the index key is read out and output as a search result key based on the information for accessing the extracted index key. It is also possible to compare the search result key with the search key, and output a search result indicating that the search is successful if they match, and that the search fails if they do not match.
  • the functional block configuration described with reference to FIG. 5 is merely an example, and it is obvious that various modifications are possible.
  • FIG. 6 is a diagram illustrating an example of a processing flow of bit string search in the first embodiment of the present invention.
  • step S601 1 is set to the link destination array number.
  • the link destination array number here is an example of the temporary storage area (not shown) described above.
  • an array number of the search start node and an array number of the representative node of the link destination node pair are set.
  • the search start node is the root node. Even when the search start node is other than the root node, the following processing flow is the same.
  • step S603 the array element having the array element number set as the link destination array element number is read from the array as a node to be referred to.
  • step S604 the node type is extracted from the read node.
  • step S605 it is determined whether the node type is a branch node.
  • step S605 If it is determined in step S605 that the read node is a branch node, the process proceeds to step S606, where information about the discrimination bit position is extracted from the node, and in step S607, a bit value corresponding to the extracted discrimination bit position is searched. Take out from the key.
  • step S608 the array element number set in the link destination array number is doubled and set in the link destination array number.
  • step S609 the bit value extracted from the search key in step S607 is added to the array number set in the link destination array number in step S608, set as the link destination array number as a new array number, and the process returns to step S603. .
  • step S610 the index key is extracted from the leaf node, and the process ends.
  • the index key is directly included in the leaf node.
  • the leaf node includes information for accessing the index key
  • the index from the leaf node is determined in step S610.
  • Information for accessing the key is extracted, and in an additional step, the index key is extracted using the information for accessing the extracted index key.
  • the index key can be used as a search result key in another application, or a match with the search key is determined to determine success or failure of the search.
  • FIG. 7 shows only the part necessary for the description in the coupled node tree illustrated in FIG. 4B, and the part below the node 211b is omitted.
  • a bit string “011010” (hereinafter referred to as search key 270) is set as a search key in the search key setting area 270, and the search start node is the root node 210a.
  • search key 270 a bit string “011010”
  • the search start node is the root node 210a.
  • the array number of the link destination is obtained by the sum of the representative node number obtained by doubling the array number of the link source branch node and the bit value of the discrimination bit position of the search key.
  • the search start node is the root node
  • 1 is set in the link destination array number at the start of the search, so the node 210a is read.
  • the node type 220a of the node 210a is 0, indicating that it is a branch node, the value 0 is extracted from the discrimination bit position 230a.
  • the link destination array number is 2, which is obtained by adding 0 to the representative node number 220a obtained by doubling the array number 1, and is arranged in the array element of the array number 2. Node 210b is then read.
  • the link destination array number is 5 which is obtained by adding 1 to the representative node number 220b obtained by doubling the array number 2, and is arranged in the array element of the array number 5. Node 211c is then read out.
  • the link destination array number is 11, which is obtained by adding 1 to the representative node number 221c obtained by doubling the array number 5, and is arranged in the array element of the array number 11 Node 211d is then read out.
  • the index key “011010” is extracted from the index key 251d, and the search process ends.
  • FIG. 8A is a diagram illustrating a configuration example of a coupled node tree arranged in an array according to the second embodiment of the present invention.
  • the node type is deleted from the leaf node and the branch node, and the leaf node is arranged only at the lowest level of the tree.
  • the index key and the search key are assumed to have 0 inserted in the most significant bit that is a specific bit position with respect to the original index key and search key.
  • the method for obtaining the linked sequence number is the same as in the first embodiment.
  • the bit value added as the most significant bit can be 1 instead of 0. In short, the same bit value may be added as the most significant bit.
  • a specific bit position into which a specific bit value is inserted is not limited to the most significant bit position, and can be an arbitrary bit position.
  • the bit position into which the same bit value is inserted does not appear in the discrimination bit position of the original branch node of the coupled node tree. Therefore, the leaf node can be arranged only at the lowest stage of the tree by using a dummy branch node inserted as a discrimination bit position of a dummy branch node described later.
  • a root node 801 is arranged in the array element of array element 1 in array 800.
  • the root node 801 is configured with a discrimination bit position 803. 2 is stored in the discrimination bit position 803.
  • the node [0] 812 which is the representative node of the link destination node pair 811 indicated by the dotted-line arrow 810 from the root node 801 having the array element number 1, is the root node 801 that is the parent node positioned immediately above in the tree. It is arranged in the array element of array number 2 having a value twice that of array number 1.
  • a node [1] 813 that is paired with the representative node is arranged in the next adjacent array element (array number 3).
  • 0 is stored in the discrimination bit position of the node [0] 812, and the link destination is an array of the array number 4 that is twice the array number 2 of the node [0] 812, as indicated by a dotted arrow 840.
  • 0 is stored in the discrimination bit position of the node 842, and the link destination is stored in the array element of array number 8 that is twice the array number 4 of node 842, as indicated by the dotted arrow 850.
  • the node 852 Since the node 852 is located at the bottom of the coupled node tree illustrated in FIG. 8A, the node 852 is a leaf node, and the index key “00001” in which 0 is inserted in the most significant bit is stored in the index key 818. .
  • the index key “00001” is distinguished from the index key already stored in another array element by the bit value 0 in the bit position 2 of the discrimination bit position 803 of the root node 801. Therefore, as in the first embodiment shown in FIG. 4A, the node stored in the array element of array element 2 immediately below the root node is the position of the original leaf node.
  • dummy branch nodes 812 and 842 whose discrimination bit position is 0 of the most significant bit position are inserted and positioned at the lowest level.
  • the node paired with the dummy branch node 842 in the second stage is an empty node that does not substantially exist so that the array element with the array element number 5 shown in FIG. 8A is empty.
  • the node 822 that is the representative node of the link destination node pair 821 indicated by the dotted-line arrow 820 from the branch node 813 whose array number is 3 has an array number that has a value twice that of the array number 3 of the node 813 that is the parent node. 6 array elements.
  • a node 823 that is paired with the representative node is arranged at the next adjacent array element (array number 7). In the discrimination bit position of the node 822, 5 is stored. Further, 6 is stored in the discrimination bit position of the node 823.
  • a node 832 that is a representative node of the link destination node pair 831 indicated by the dotted arrow 830 from the branch node 822 having the array element number 6 is arranged in the array element having the array element number 12.
  • a node 833 that is paired with the representative node is arranged at the next adjacent array element (array number 13). Description of the contents of the node 832 and the node 833 is omitted. Further, the description of the link destination of the branch node 823 is also omitted.
  • FIG. 8B is a diagram conceptually showing a tree structure of a coupled node tree in the second exemplary embodiment of the present invention.
  • 0 is added to the most significant bit position of each index key stored in the tree structure shown in FIG. 4B, and the bit length is changed from 6 bits to 7 bits. Accordingly, the discrimination bit position of the branch node denoted by the same symbol as that of the branch node shown in FIG. 4B is shifted by one, and the value is increased by one.
  • the leaf node is located only in the fifth stage in the tree structure shown in FIG. 8B.
  • the leaf node located in the hierarchy higher than the fifth level is a dummy branch node whose discrimination bit position is 0.
  • the dummy branch nodes are inserted until the node immediately below the dummy branch node becomes the fifth stage node.
  • the method for calculating the representative node number which is the array element number of the array element in which the representative node of the nearest lower node pair is arranged, is the same as that of the first embodiment.
  • FIG. 9 is a diagram illustrating a functional block configuration example of the bit string search device according to the second embodiment of the present invention.
  • the bit string search apparatus 900 according to this embodiment illustrated in FIG. 9 includes a search tree storage unit 910, a search start position setting unit 920, node reading units 9301 to 930n, a search key setting unit 950, and node link units 9601 to 960n-1. And search result output means 970.
  • n is the number of stages in the coupled node tree.
  • an array is secured in the storage area of the search tree storage unit 910, and the coupled node tree according to the second embodiment of the present invention is arranged in the array.
  • the search start position setting unit 920 1 that is the array element number of the root node is set as the array element number of the search start node.
  • Node reading means 9301 reads the root node of array number 1 set in the search start position setting means.
  • a search key is set in the search key setting means 950.
  • the search key can be set by a user who uses the result of the search process.
  • the node link means 9601 is a value obtained by doubling the value of the search key bit set in the search key setting means 950 at the branch bit discrimination bit position read by the node reading means 9601 and the array number 1 of the root node. Is set as the array element number of the array element in which the node to be read next is arranged.
  • the node link means 9602 to 960n-1 are the values of the search key bits set in the search key setting means 950 at the discrimination bit positions of the branch nodes read by the node reading means 9302 to 930n-1. Then, a value obtained by adding a value obtained by doubling the array element number set by the preceding node link means 9601 to 960n-2 is set as the array element number of the array element where the node to be read next is arranged.
  • the node reading means 9302 to 930n-1 read the branch node having the array number set by the preceding node link means 9601 to 960n-2, and the node reading means 930n has the array number leaf set by the node link means 960n-1.
  • the node is read and passed to the search result output means 970.
  • the search result output unit 970 takes out the index key or information for accessing the index key from the leaf node passed from the node reading unit 930n, as in the first embodiment.
  • the index key is output as a search result key.
  • the information extracted from the leaf node is information for accessing the index key
  • the index key is read out and output as a search result key based on the information for accessing the extracted index key.
  • the search result key and the search key are compared, and if they match, it is possible to output a search result indicating that the search is successful, and if they do not match, it is possible to output a search result indicating that the search is unsuccessful. is there.
  • FIG. 10 is a diagram illustrating an example of a processing flow of bit string search in the second embodiment of the present invention.
  • the number of stages of the coupled node tree is n.
  • step S1001 1 is set to the link destination array number.
  • step S1002 the array number of the second node is obtained from the discrimination bit position and the search key stored in the array pointed to by the link destination array number (root node array number).
  • step S1003 the array number of the third-stage node is obtained from the discrimination bit position and the search key stored in the array indicated by the array number of the second-stage node.
  • steps S1004 to S100n the fourth to nth nodes are respectively determined by the discrimination bit position and the search key stored in the array indicated by the array number of the third to n ⁇ 1th node. Determine the sequence number of. Details of steps S1002 to S100n will be described later with reference to FIG.
  • the bit string stored in the array pointed to by the array element number of the n-th node is taken out as an index key, and the process ends.
  • the processing flow example illustrated in FIG. 10 uses the coupled node tree of the present embodiment having a specific number of stages n.
  • any assembler macro using the number of stages n as a parameter can be used for any of the embodiments. It is possible to generate a processing flow for realizing a search process using a coupled node tree having a number of stages.
  • FIG. 11 is a diagram for explaining an example of a processing flow for obtaining an array number of a link destination in the second embodiment of the present invention, and shows details of the processing in steps S1002 to S100n shown in FIG.
  • step S1101 the contents stored in the array element indicated by the link destination array number are read from the array as a discrimination bit position, and in step S1102, the bit value indicated by the read discrimination bit position is extracted from the search key.
  • step S1103 the array element number set as the link destination array number is doubled and set as the link destination array number. Further, in step S1104, the bit number extracted in step S1102 is added to the array number set in step S1103 as the link destination array number to set the link destination array number, and the process ends.
  • FIG. 12 shows only the part necessary for the description in the coupled node tree illustrated in FIG. 8B, and the part below the node 211b is omitted.
  • a bit string “0011010” (hereinafter referred to as the search key 280) is set as a search key in the search key setting area 280.
  • the search key 280 is obtained by adding 0 as the most significant bit to the search key 270 in the search example using the coupled node tree according to the first embodiment of the present invention shown in FIG. 4B.
  • the search start node is the root node 210a.
  • the link destination array number is obtained as the sum of the representative node number obtained by doubling the array number of the link source branch node and the bit value of the search bit discrimination bit position. Has been.
  • the search start node is the root node
  • 1 is set in the link destination array number at the start of the search, so the node 210a is read.
  • the value 1 is extracted from the discrimination bit position 230a of the node 210a.
  • the link destination array number is 2, which is obtained by adding 0 to the representative node number 220a that is twice the array number 1, and is arranged in the array element of the array number 2. Node 210b is then read.
  • the value 2 is extracted from the discrimination bit position 230b of the node 210b. Since the value of bit position 2 of the search key 280 is 1, the link destination array number is 5 which is obtained by adding 1 to the representative node number 220b obtained by doubling array number 2, and is arranged in the array element of array number 5. Node 211c is then read out.
  • the value 3 is extracted from the discrimination bit position 231c of the node 211c. Since the value of the bit position 3 of the search key 280 is 1, the link destination array number is 11, which is obtained by adding 1 to the representative node number 221c obtained by doubling the array number 5, and is arranged in the array element of the array number 11 Node 211d is then read out.
  • the value 0 is extracted from the discrimination bit position 231d of the node 211d. Since the value of the bit position 0 of the search key 280 is 0, the link destination array number is 22 obtained by adding 0 to the representative node number 221i that is twice the array number 11, and is arranged in the array element of the array number 22 Node 210l is then read.
  • the index key “0011010” as a search result is extracted from the index key 250l, and the search process is completed.
  • FIG. 13 is a diagram illustrating a configuration example of the coupled node tree stored in the array according to the modification of the first embodiment of the present invention.
  • a base number 600 and an offset number 610 are added.
  • values 1 to 15 of the node reference number 620 are described instead of the array numbers 1 to 15 in FIG. 4A.
  • 100, 111, 122, 123, 134 to 137, and 148 to 155 are described as the value of the number.
  • FIG. 13 illustrates 100 as the value of the base number 600 and 10, 20, 30, and 40 as the values of the offset number 610.
  • the corresponding codes shown in FIG. 4A with “a” added are used.
  • the base number is a number that determines the position of the root node of the tree in combination with the first-stage offset number described later. By using the base number, the array element number of the root node need not be restricted to 1 as illustrated in FIGS. 4A and 4B.
  • the offset number is a number that determines the starting position where the node of each stage of the tree is stored. By using the offset number, a tree node can be arranged for each number of stages on the tree where the node is located. The offset number is set in the offset number table for each stage number.
  • the node reference number is a number that determines the order of the nodes, and corresponds to the array element number illustrated in FIG. The array number can be obtained from the sum of the base number, the offset number, and the node reference number.
  • base number 600 is 100 (hereinafter referred to as base number 100), offset number 610 (first stage) is 10 (hereinafter referred to as offset number 10), and node reference is made.
  • the number 620 is 1 (hereinafter referred to as node reference number 1)
  • the root node 401a is an array element whose array number 630 of the array 400a is 111 (hereinafter referred to as array number 111). Is arranged.
  • the root node 401a includes a node type 402a and a discrimination bit position 403a.
  • the node type 402a is 0, indicating that the root node 401a is a branch node. 1 is stored in the discrimination bit position 403a.
  • the node [0] 412a which is the representative node of the link destination node pair 411a indicated by the dotted arrow 410a from the root node 401a with the node reference number 1, is the node of the root node 401a that is the parent node positioned immediately above the tree. It is arranged in an array element of array number 122, which is obtained by adding the sum of base number 100 and offset number 20 to node reference number 2 having a value twice that of reference number 1.
  • a node [1] 413a that is paired with the representative node is arranged in the next adjacent array element (node reference number 3, array number 123).
  • the node 422a which is the representative node of the link destination node pair 421a indicated by the dotted arrow 420a from the branch node 413a whose node reference number is 3, has a value twice the node reference number 3 of the parent node 413a. It is arranged in the array element of array element number 136 obtained by adding the sum of base number 100 and offset number 30 to node reference number 6. A node 423a that is paired with the representative node is arranged in the next adjacent array element (node reference number 7, array number 137). 0 is stored in the node type of the node 422a, indicating that the node 422a is a branch node. 4 is stored in the discrimination bit position of the branch node 422a. Also, 0 is stored in the node type of the node 423a, indicating that the node 423a is a branch node. 5 is stored in the discrimination bit position of the branch node 422a.
  • no node is arranged in the array elements of array element number 134 and array element number 135.
  • the node reference number of the representative node of the link destination node pair is twice the node reference number of the parent node.
  • the node 432a which is the representative node of the link destination node pair 431a indicated by the dotted arrow 430a from the branch node 422a having the node reference number 6, adds the sum of the base number 100 and the offset number 40 to the node reference number 12. It is arranged in the array element of the added array element number 152. Then, a node 433a that is paired with the representative node is arranged in the next adjacent array element (node reference number 13, array number 153). Description of the contents of the node 432a and the node 433a is omitted.
  • the node 442a which is the representative node of the link destination node pair 441a indicated by the dotted arrow 440a from the branch node 423a whose node reference number is 7, is the sum of the base number 100 and the offset number 40 in the node reference number 14.
  • a node 443a that is paired with the representative node is arranged at the next adjacent array element (node reference number 15, array number 155). Description of the contents of the node 442a and the node 443a is omitted. Further, no nodes are arranged in the array elements of array element numbers 148 to 151.
  • the tree structure itself of the coupled node tree is the same as that shown in FIG. 4B. 4A and 4B are different from each other in that the position of the node on the tree is defined by the array number associated with the array.
  • the node reference independent of the array is used. It is a point specified by a number. The node can be accessed by combining the node reference number, the base number, and the offset number.
  • the offset number for example, it is possible to arrange the upper n stages of the tree in the main storage device and arrange the nodes lower than the n stage in the external storage device.
  • FIG. 14 is a diagram for explaining an example of a processing flow of bit string search in the modification of the first embodiment of the present invention. Compared to the processing flow example shown in FIG. 6, the handling of the node reference number, the base number, and the offset number is added, and the array number is obtained based on these numbers.
  • a base number is set in step S1401a, and an offset number table is set in step S1401b. Further, in step S1401c, a value 1 is set in the stage number counter, and in step S1401d, a value 1 is set in the node reference number.
  • the search start node is the root node. However, even when a number other than 1 is specified for the stage counter and the node reference number and the search start node is other than the root node, The processing flow is the same.
  • step S1402a the offset number pointed to by the stage number counter is extracted from the offset number table.
  • step S1402b a value obtained by adding the base number and the offset number to the node reference number is set in the link destination array number.
  • step S1403 the array element having the array element number set as the link destination array element number is read from the array as a node to be referred to.
  • step S1404 the node type is extracted from the read node.
  • step S1405 it is determined whether the node type is a branch node.
  • step S1405 If it is determined in step S1405 that the read node is a branch node, the process proceeds to step S1406, where information on the discrimination bit position is extracted from the node, and in step S1407, a bit value corresponding to the extracted discrimination bit position is searched. Take out from the key.
  • step S1408 the value obtained in step S1407 is set to the node reference number to a value obtained by doubling the node reference number.
  • step S1409 1 is added to the stage number counter, and the process returns to step S1403.
  • step S1410 the index key is extracted from the leaf node, and the process ends.
  • the index key is directly included in the leaf node.
  • the leaf node includes information for accessing the index key
  • Information for accessing the key is retrieved, and in an additional step, the index key is retrieved using the information for accessing the retrieved index key.
  • the index key can be used as a search result key in another application, or a match with the search key is determined to determine success or failure of the search.
  • FIG. 15 is a diagram illustrating a configuration example of a coupled node tree stored in the array according to the modification of the second embodiment of the present invention. Compared with the configuration example shown in FIG. 8A, a base number 700 and an offset number 710 are added. Also, instead of the array element numbers 1 to 15 in FIG. 8A, the values 1 to 15 of the node reference numbers 720 are described. In FIG.
  • FIG. 15 illustrates 100 as the value of the base number 700 and 10, 20, 30, and 40 as the values of the offset number 710.
  • the corresponding codes shown in FIG. 8A with “a” added are used.
  • the node reference number matches the array number illustrated in FIGS. 8A and 8B.
  • the coupled node tree of the present modification matches the coupled node tree of the second embodiment illustrated in FIGS. 8A and 8B.
  • the root node 801a is arranged in the array element of array element 111 in the array 800a.
  • the root node 801a includes a discrimination bit position 803a. 2 is stored in the discrimination bit position 803a.
  • a node [0] 812a which is a representative node of the link destination node pair 811a indicated by the dotted arrow 810a from the root node 801a having the node reference number 1, is a root node 801a that is a parent node positioned immediately above the tree.
  • the node reference number 2 having a value twice that of the node reference number 1 is added to the array element of the array number 122 obtained by adding the sum of the base number 100 and the offset number 20.
  • a node [1] 813a that is paired with the representative node is arranged in the next adjacent array element (node reference number 3, array number 123).
  • 0 is stored in the discrimination bit position of the node [0] 812a, and the link destination is a node having a value twice the node reference number 2 of the node [0] 812a, as indicated by the dotted arrow 840a.
  • the node 842a is stored in the array element of the array element number 134 obtained by adding the sum of the base number 100 and the offset number 30 to the reference number 4.
  • 0 is stored in the discrimination bit position of the node 842, and the link destination is the node reference number 8 having a value twice the node reference number 4 of the node 842a, as indicated by a dotted arrow 850a.
  • Node 852a stored in the array element of array number 148 obtained by adding the sum of base number 100 and offset number 40.
  • the node 852a Since the node 852a is positioned at the bottom of the coupled node tree illustrated in FIG. 15, it is a leaf node, and the index key “00001” with 0 inserted in the most significant bit is stored in the index key 818a. .
  • the node 822a that is the representative node of the link destination node pair 821a indicated by the dotted arrow 820a from the branch node 813a that has the node reference number 3 has a value that is twice the node reference number 3 of the node 813a that is the parent node. It is arranged in the array element of array element number 136 obtained by adding the sum of base number 100 and offset number 30 to node reference number 6. A node 823a that is paired with the representative node is arranged in the next adjacent array element (node reference number 7, array number 137). 5 is stored in the discrimination bit position of the node 822a. Further, 6 is stored in the discrimination bit position of the node 823a.
  • the node 832a which is the representative node of the link destination node pair 831a indicated by the dotted arrow 830a from the branch node 822a whose node reference number is 6, is based on the node reference number 12 having a value twice that of the node reference number 6.
  • a node 833a that is paired with the representative node is arranged in the next adjacent array element (node reference number 13, array number 153). Description of the contents of the node 832 and the node 833 is omitted. Further, the description of the link destination of the branch node 823a is also omitted.
  • the tree structure itself of the coupled node tree is the same as that shown in FIG. 8B.
  • 8A and 8B is different in that the position of the node on the tree is defined by the array element number associated with the array. Also in the modification, it is a point specified by a node reference number independent of the array. The node can be accessed by combining the node reference number, the base number, and the offset number.
  • the offset number for example, it is possible to arrange the upper n stages of the tree in the main storage device and arrange the nodes lower than the n stage in the external storage device.
  • FIG. 16 is a diagram for explaining an example of a processing flow of bit string search in a modification of the second embodiment of the present invention. Compared with the processing flow example shown in FIG. 10, the handling of the node reference number, base number, and offset number is added, and the array number is obtained based on these numbers.
  • a base number is set in step S1601a, and an offset number table is set in step S1601b.
  • step S1601c a value 1 is set as the node reference number.
  • step S1601d a value obtained by adding the base number and the offset number to the node reference number is set to the link destination array number.
  • the array element number of the root node is set as the link destination array element number.
  • step S1602 the array number of the second node is obtained from the discrimination bit position and the search key stored in the array pointed to by the array number (link destination array number) of the root node.
  • step S1603 the array number of the third-stage node is obtained from the discrimination bit position and the search key stored in the array indicated by the array number of the second-stage node.
  • steps S1604 to S160n the fourth to nth nodes are respectively determined by the discrimination bit position and the search key stored in the array indicated by the array number of the third to n ⁇ 1th node. Determine the sequence number of. Details of the processing in steps S1602 to S160n will be described later with reference to FIG.
  • the bit string stored in the array pointed to by the array element number of the n-th node is taken out as an index key, and the process ends.
  • the process flow example illustrated in FIG. 16 uses the coupled node tree of the present embodiment having a specific number of stages n. By using the assembler macro described above, it is possible to generate a processing flow for realizing search processing using an arbitrary number of coupled node trees of this embodiment.
  • FIG. 17 is a diagram for explaining an example of a processing flow for obtaining the array number of the link destination in the modification of the second embodiment of the present invention, and shows details of the processing in steps S1602 to S160n shown in FIG. is there.
  • step S1701 the content stored in the array element pointed to by the link destination array number is read from the array as a discrimination bit position.
  • step S1702 the bit value pointed to by the read discrimination bit position is extracted from the search key.
  • step S1703a the next-stage offset number is extracted from the offset number table, and in step S1703b, a value obtained by adding the value obtained in step S1702 to the value obtained by doubling the node reference number is set. .
  • step S1704 a value obtained by adding the base number and the offset number to the node reference number is set in the link destination array number, and the process is terminated.
  • the trees of the first and second embodiments of the present invention may be referred to as pointerless trees, and the conventional coupled node tree may be simply referred to as a tree or a tree before conversion.
  • the generation of the pointerless tree of the present invention can be realized as follows, for example. That is, when generating the pointerless tree, it is assumed that the tree of the form illustrated in FIGS. 1A and 1B is generated by the index key stored in the pointerless tree.
  • the generation of the pointerless tree is realized by sequentially circulating the nodes of the tree from the root node and converting them into the nodes of the first embodiment or the second embodiment of the present invention.
  • FIG. 18A is a diagram showing an example of a processing flow before the processing for generating a pointerless tree in the first and second embodiments of the present invention.
  • step S1801 an array for generating a pointerless tree is acquired, and in step S1802, array elements are initialized.
  • the processing in step S1802 is necessary in the processing example in the second embodiment using a dummy branch node, and can be omitted in the first embodiment.
  • step S1802a the maximum number of stages of the tree before conversion is obtained, and in step S1802b, the maximum number of stages is set as the upper limit value of the stage number counter.
  • the upper limit value of the stage number counter is used for arranging the leaf node in the lowest stage of the pointerless tree in the second embodiment. Therefore, similar to the processing in step S1802, it can be omitted in the first embodiment. Details of the processing in step S1802a will be described later with reference to FIGS.
  • step S1803 a base number is set.
  • step S1804 an offset number table is set.
  • step S1805, 1 is set in the stage number counter
  • step S1806, 1 is set in the node reference number
  • step S1807 the array number of the root node of the tree is set in the array number of the cyclic start node. Proceed to step S1812 shown in FIG. 18B.
  • FIG. 18A and the following drawings corresponds to the modification shown in FIG. 13 or FIG.
  • the base number is 0, the offset number in each stage is 0, and the node reference number is the array number
  • the tree generation processing in the form shown in FIG. 4A or 8A is shown. Therefore, the flow illustrated in FIG. 18A and the following drawings describes the pointerless tree generation processing of the first embodiment and the second embodiment including a modification.
  • FIG. 18B is a diagram illustrating a processing flow example at the latter stage of the processing for generating the pointerless tree in the first and second embodiments of the present invention.
  • step S1812 the tree is circulated from the circulation start node, and the circulation destination node is converted and stored in the pointerless tree. Details of the processing in step S1812 will be described later with reference to FIG.
  • step S1813 it is determined whether the stack pointer of the search path stack points to the array element number of the root node of the tree.
  • the storage of the array element number in the search path stack is performed in the process of step S1812. If the stack pointer of the search path stack points to the array element number of the root node of the tree, the processing ends because all the nodes of the tree have been processed. Otherwise, the process proceeds to step S1814.
  • step S1814 the array element number is extracted from the search path stack, and the stack pointer of the search path stack is decremented by one.
  • step S1815 the node position is obtained from the array element number extracted in step S1814, and it is determined in step S1816 whether the node position is node [0]. If the node position is not the node [0], the value 1 is subtracted from the stage number counter in step S1817, and the process returns to step S1813. If the node position is node [0], the process advances to step S1818.
  • step S1818 the value 1 is added to the array element number extracted in step S1814 to obtain the array element number of the node [1].
  • step S1819 the array element number of node [1] obtained in step S1818 is set as the array element number of the tour start node.
  • step S1820 1 is added to the node reference number, and the process returns to step S1812. By repeating the loop processing from step S1812 to step S1820 described above until it is determined in step S1813 that the stack pointer of the search path stack points to the array element number of the root node of the tree, the circulation of all nodes on the tree is performed. Each node is converted into a node of a pointerless tree, and a pointerless tree is generated.
  • FIG. 19 is a diagram for explaining an example of a processing flow for traversing a tree from a patrol start node and storing the node in a pointerless tree, and is a diagram for explaining the details of the processing in step S1812 in FIG. 18B.
  • step S1901 the array element number of the tour start node is set to the array element number.
  • the array element number of the tour start node is set in step S1807 of FIG. 18A in the initial processing of the loop processing from step S1812 to step S1820 shown in FIG. 18B, and in the subsequent processing, the step shown in FIG. 18B. It is set in S1819.
  • step S1902 the array element number is stored in the search path stack. This array number is set in step S1901 or step S1910 described later.
  • step S1903 the array element indicated by the array element number is read out as a node from the array in which the tree before conversion is stored.
  • step S1904 the array element acquired in step S1801 in FIG. 18A based on the node reference number is read.
  • a node of a pointerless tree is generated by writing a node to an array element. Details of the processing in step S1904 will be described later with reference to FIGS. 20A and 20B.
  • FIG. 20A is for the first embodiment
  • FIG. 20B is for the second embodiment.
  • step S1905 the node type is extracted from the node read in step S1903.
  • step S1906 it is determined whether the extracted node type indicates a branch node. If it is determined in step S1906 that the node type does not indicate a branch node but indicates a leaf node, the process ends. If the node type indicates a branch node, the process proceeds to step S1907.
  • step S1907 a value of 1 is added to the stage number counter, and the flow advances to step S1908 to double the node reference number.
  • step S1909 the representative node number is extracted from the node read in step S1903.
  • step S1910 a value obtained by adding 0 to the extracted representative node number is set as the array number, and the process returns to step S1902.
  • step S1910 The loop processing from step S1902 to step S1910 described above is repeated until the node type indicates a leaf node in step S1906. That is, as a group of processes, the node is visited from the tour start node to the first leaf node, the node is read, the node is converted, and the node of the pointerless tree is written.
  • the node [0] side is preferentially circulated. It will be apparent to those skilled in the art from the above description that the node can be visited with priority on the [1] side.
  • FIG. 20A is a diagram for explaining a processing flow example of processing for generating a node in the first embodiment of the present invention, and is a diagram for explaining details of processing in the first embodiment in step S1904 shown in FIG. is there.
  • step S2001 the offset number indicated by the stage number counter is extracted from the offset number table, and in step S2002, a value obtained by adding the base number and the offset number to the node reference number is set as the array number.
  • the array number here is a temporary storage area for setting the array element number of the array element for storing the pointerless tree.
  • step S2003 the node type is extracted from the node read in step S1903 of FIG. 19, and in step S2004, it is determined whether the extracted node type is a branch node. If the determination result is positive, the process proceeds to step S2005. If the determination result is negative, the process proceeds to step S2007.
  • step S2005 the discrimination bit position is extracted from the node.
  • step S2006 the node type and the discrimination bit position are written in the array element indicated by the array element number set in step S2002, a branch node is generated, and the process ends.
  • step S2007 the index key is extracted from the node.
  • step S2008 the node type and the index key are written in the array element indicated by the array number set in step S2002, a branch node is generated, and the process ends.
  • FIG. 20B is a diagram for explaining a processing flow example of processing for generating a node in the second embodiment of the present invention, and is a diagram for explaining details of processing in the second embodiment in step S1904 shown in FIG. is there.
  • step S2021 the offset number indicated by the stage number counter is extracted from the offset number table.
  • step S2023 the node type is extracted from the node read in step S1903 in FIG. 19, and the process proceeds to step S2024. .
  • step S2024 it is determined whether the node type extracted in step S2023 is a branch node. If the determination result is affirmative, the process proceeds to step S2025. If the determination result is negative, the process proceeds to step S2029.
  • step S2025 the array number is set to a value obtained by adding the base number and the offset number to the node reference number.
  • step S2026 the discrimination bit position is extracted from the node.
  • step S2027 the value 1 is added to the discrimination bit position.
  • step S2028 the discrimination bit position is written in the array element indicated by the array element number set in step S2025. Generate a node and finish the process.
  • step S2024 determines whether the node type extracted in step S2023 is a leaf node. If the determination in step S2024 is negative and the node type extracted in step S2023 is a leaf node, the process proceeds to step S2029, where the node reference number and the stage number counter are saved, and the process proceeds to step S2030. move on.
  • step S2030 it is determined whether the stage number counter is the upper limit value. If not, the node reference number is doubled in step S2031, the value 1 is added to the stage number counter in step S2032, and the offset number table is used in step S2033. The offset number pointed to by the stage number counter is taken out and the process returns to step S2030.
  • the loop processing of steps S2030 to S2033 described above is for placing the leaf node in the second embodiment at the lowest level of the pointerless tree.
  • the leaf node 210c at the third level in the tree before conversion in FIG. 1B is converted to the node 210j at the fifth level in FIG. 8B.
  • the position information of the node 210c in FIG. 8B is saved by the process of step S2029 in FIG. 20B.
  • the upper limit value of the stage number counter is set in step S1802b shown in FIG. 18A. Instead, when generating a tree before conversion, the number of stages of the leaf node is set each time a leaf node is inserted. The maximum value is counted and stored as a tree attribute, and when the pointerless tree of the second embodiment is generated, the maximum value can be used as the upper limit value of the stage number counter.
  • step S2030 If it is determined in step S2030 that the stage number counter is the upper limit value, the process advances to step S2034 to set a value obtained by adding the base number and the offset number to the node reference number.
  • step S2035 the index key is extracted from the node.
  • step S2036 the bit value “0” is inserted into the most significant bit position of the index key.
  • step S2037 the array element pointed to by the array number set in step S2034.
  • the index key is written in to generate a leaf node, and the process proceeds to step S2038.
  • step S2038 the node reference number and stage number counter saved in step S2029 are set in the node reference number and stage number counter, respectively, and the process ends.
  • FIG. 21 is a diagram illustrating an example of a processing flow for obtaining the maximum number of levels of a tree before conversion, and details of the processing in step S1802a in FIG. 18A.
  • step S2101 the value 1 is set in the stage number counter, and in step S2102, the value set in the stage number counter is set in the maximum stage number counter. That is, a value 1 is set as an initial value in the stage number counter and the maximum stage number counter.
  • step S2112 the tree is circulated from the circulation start node, and the number of stages of the circulation destination node is counted to obtain the maximum number of circulated nodes. Details of the processing in step S2112 will be described later with reference to FIG.
  • step S2113 it is determined whether the stack pointer of the search path stack points to the array element number of the root node of the tree.
  • the storage of the array element number in the search path stack is performed in the process of step S2112. If the stack pointer of the search path stack points to the array element number of the root node of the tree, the circulation is completed for all the nodes of the tree, and the processing is terminated. Otherwise, the process proceeds to step S2114.
  • step S2114 the array element number is extracted from the search path stack, and the stack pointer of the search path stack is decremented by one.
  • step S2115 the node position is obtained from the array element number extracted in step S2114, and it is determined in step S2116 whether the node position is node [0]. If the node position is not the node [0], the value 1 is subtracted from the stage number counter in step S2117, and the process returns to step S2113. If the node position is node [0], the process proceeds to step S2118.
  • step S2118 value 1 is added to the array element number extracted in step S2114 to obtain the array element number of node [1].
  • step S2119 the array element number of node [1] obtained in step S2118 is set in the array element number of the tour start node, and the process returns to step S2112.
  • the circulation of all nodes on the tree is performed.
  • the maximum number of stages of the visited nodes that is, the maximum number of stages of the tree before conversion is obtained.
  • FIG. 22 is a diagram illustrating an example of a processing flow in which a tree is traversed from a tour start node, and the number of stages of nodes is counted to obtain the maximum number of visited nodes, and the details of the process in step S2112 of FIG. 21 are illustrated. It is. As shown in the figure, first, in step S2201, the array element number of the tour start node is set to the array element number. The array element number of the tour start node is set in step S2107 of FIG. 21 in the initial processing of the loop processing from step S2112 to step S2119 shown in FIG. 21, and in the subsequent processing, the step shown in FIG. It is set in S2119.
  • step S2202 the array element number is stored in the search path stack. This array number is set in step S2201 or step S2210 described later.
  • step S2203 the array element indicated by the array element number is read as a node from the array in which the tree before conversion is stored, and in step S2205, the node type is extracted from the read node.
  • step S2206 it is determined whether the extracted node type indicates a branch node. If it is determined in step S2206 that the node type indicates a branch node, the process proceeds to step S2207, and if it is determined that the node type indicates a leaf node instead of a branch node, The process proceeds to S2210.
  • step S2207 the value 1 is added to the stage number counter.
  • step S2209 the representative node number is extracted from the node read in step S2203.
  • step S2210 the value obtained by adding the value 0 to the extracted representative node number is set to the array number. And return to step S2202.
  • step S2202 The loop processing from step S2202 to step S2210 described above is repeated until the node type indicates a leaf node in step S2206.
  • the node [0] is preferentially circulated. It is obvious to those skilled in the art that, similarly to the processing of FIG. 19 described above, it is also possible to circulate the node with priority given to the node [1] side.
  • step S2206 If it is determined in step S2206 that the node type indicates a leaf node, the process advances to step S2210 to determine whether the value of the stage number counter is greater than the value set in the maximum stage number counter. If YES in step S2211, the value of the stage number counter is set in the maximum stage number counter in step S2211, and the process ends.
  • FIG. 23 is a diagram illustrating the concept of search processing according to the third embodiment of the present invention.
  • the array 309 for storing the coupled node tree shown in FIG. 3 is separated into a branch node array 309a for storing branch nodes and a leaf node array 309b for storing leaf nodes shown in FIG.
  • Each array stores branch nodes and leaf nodes of the coupled node tree 200b shown in FIG. 8B.
  • the node reference numbers 720a and 720b are assigned to the array elements of the branch node array 309a and the leaf node array 309b, respectively.
  • Base numbers 700a and 700b are further assigned to the branch node array 309a and the leaf node array 309b, respectively.
  • the node reference numbers are so-called virtual or logical array numbers, and are sequential numbers starting from 1.
  • the base number is for starting the node reference number of the array element of the array from the first.
  • the sum of the base number and the node reference number is the array number.
  • the value of the node reference number 720a starts from 1 by setting the value of the base number 700a to 10. Since the top value of the array element number 730b of the leaf node array 309b is 51, by setting the value of the base number 700b to 50, the value of the node reference number 720b starts from 1 like the node reference number 720a. It becomes.
  • FIG. 8A illustrates a configuration example of a coupled node tree stored in an array in which the base number is 0 without separating the branch node array and the leaf node array.
  • FIG. 8B is a diagram conceptually showing the tree structure of the coupled node tree stored in the base number 0 array without separating the branch node array and the leaf node array.
  • FIG. 23 further shows a search key 280 and a branch destination array 311.
  • the search key 280 stores a bit string “0011010”.
  • the array element having the value 1 of the node reference number 720a in the branch node array 309a (hereinafter referred to as the array element having the node reference number 1) includes the value 1 (hereinafter referred to as the discrimination bit position) of the root node 210a. 1) is stored, and the bit value at bit position 1 of the bit string stored in the search key 280 is 0, so 0 is stored in the array element of array number 1 in the branch target array.
  • the branch destination information 0 stored in the array element of the array element number 1 of the branch destination array is obtained by searching the coupled node tree shown in FIG. 2B with the search key 280 in the node pair 210b immediately below the root node 210a. It shows that the search path branches to the node 210b whose position is 0.
  • the discrimination bit position 2 of the node 210b is stored in the array element of the node reference number 2 of the branch node array 309a, and the bit value of the bit position 2 of the bit string stored in the search key 280 is 1. 1 is stored in the array element of array element number 2 in the branch target array.
  • the discrimination bit position 3 of the node 211b is stored in the array element of the node reference number 3 of the branch node array 309a, and the bit value of the bit position 3 of the bit string stored in the search key 280 is 1. 1 is stored in the array element of array element number 3 in the branch target array.
  • the discrimination bit position 3 of the node 211c is stored, and the bit value of the bit position 3 of the bit string stored in the search key 280 is 1, so that the branch destination array 1 is stored in the array element of array number 5 in FIG.
  • the discrimination bit position 6 is stored in the array element of the node reference number 6 of the branch node array 309a, and the bit value of the bit position 6 of the bit string stored in the search key 280 is 0. Therefore, the array number of the branch destination array 0 is stored in the array element 6.
  • the array number of the branch destination array 0 is stored in the array element 4.
  • the discrimination bit position 6 is stored in the array element of the node reference number 10 of the branch node array 309a, and the bit value of the bit position 6 of the bit string stored in the search key 280 is 0. Therefore, the array number of the branch destination array 0 is stored in 10 array elements.
  • the branch destination array 0 is stored in the array element of the array element number 11.
  • 0 is stored in the array element of the branch destination array 311 indicated by the array element number having the same value as the node reference number of the array element in which the discrimination bit position 0 is stored in the other branch node array 309a.
  • a branch node array 309a and a leaf node array 309b are generated from a set of bit strings to be subjected to bit string search, and when the search key 280 is designated, the search key 280 and the branch A branch destination array 311 is generated by the node array. Then, the array element number of the leaf node array storing the index key as the search result is obtained from the branch destination array.
  • the branch destination information stored in the array element indicated by the thick frame of the array number 1 of the branch destination array 311 (hereinafter referred to as the branch destination information of the array number 1) is read, and the array number is doubled.
  • branch destination information to be read next is stored, and the array element array number is obtained.
  • SEQ ID NO: 1 is doubled and 0 is added to obtain SEQ ID NO: 2.
  • the value 1 of the branch destination information stored in the array element indicated by the thick frame of the array number 2 is read and added to the value obtained by doubling the array number 2 to the array number 5 Ask for.
  • the value 1 of the branch destination information stored in the array element indicated by the thick frame of the array number 5 is read, and the array number 11 is added to the value obtained by doubling the array number 5 Ask.
  • the next branch destination is the lowest level of the coupled node tree.
  • a value obtained by reading the value 0 of the branch destination information stored in the array element indicated by the thick frame of the array number 11 and adding it to the value obtained by doubling the array number 11 as indicated by the dotted arrow 221i Is subtracted from the maximum node reference number 15 of the branch node array 309a to obtain the node reference number 7 of the leaf node array 309b.
  • the index key “0011010” is extracted from the leaf node 210i stored in the array element with the node reference number 7 of the leaf node array 309b indicated by the thick frame, and the search process is terminated.
  • the branch node array 309a and the leaf node array 309b are separated.
  • the branch destination information 0 is assigned to the partition destination array.
  • the maximum node reference number 15 of the branch node array 309a is subtracted from the value obtained by adding twice the array number 11 of Since the reference numbers are a series of numbers, it is not necessary to subtract the node reference number of the last array element storing the branch node when obtaining the node reference number of the array element storing the leaf node.
  • FIG. 24 is a diagram illustrating an example of a processing flow of search processing according to the third embodiment of the present invention.
  • step S2401 a search key is set.
  • This search key setting corresponds to setting the bit string “0011010” in the search key 280 in the example shown in FIG.
  • step S2402 a branch destination array is obtained from the branch node array based on the search key.
  • this process corresponds to the process of generating the branch destination array 311 from the search key 280 and the branch node array 309a described above.
  • the detailed processing flow of step S2402 will be described later with reference to FIGS. 25A and 25B.
  • step S2403 the node reference number of the leaf node array is obtained based on the branch destination array.
  • this process sequentially reads the branch destination information stored in the array elements from the branch destination information stored in array element No. 1 of the branch destination array described above to the array elements up to array number 11 This corresponds to the process of obtaining the node reference number of the leaf node array based on the branch destination information stored in the array element of the array element number 11 and the maximum value of the node reference number of the branch node array.
  • the detailed processing flow of step S2403 will be described later with reference to FIGS. 26A and 26B.
  • step S2404 the content of the array element of the leaf node array pointed to by the node reference number obtained in step S2403 is extracted as an index key, and the process ends.
  • the index key extracted in step S2404 can be used as a search result key, or the index key is compared with the search key. If they match, the search can be successful, and if they do not match, the search can be failed.
  • FIG. 25A is a diagram illustrating an example of a processing flow for obtaining a branch destination array from a branch node array using a search key, and is a diagram illustrating a detailed processing flow of step S2402 illustrated in FIG.
  • the number of branch nodes arranged in the branch node array is m.
  • step S2500 1 is set to the array element number and the node reference number.
  • step S2501 a bit value indicating branch destination information is assigned to the array element of the branch destination array pointed to by array number 1 using the discrimination bit position and the search key stored in the array element of the branch node array pointed to by node reference number 1.
  • step S2502 a bit value indicating branch destination information is assigned to the array element of the branch destination array pointed to by array number 2 based on the discrimination bit position and the search key stored in the array element of the branch node array pointed to by node reference number 2.
  • step S2503 to step S250m the array element of the branch destination array indicated by array number 3 to m is determined by the discrimination bit position and the search key stored in the array element of the branch node array indicated by node reference number 3 to m. Is set to a bit value indicating branch destination information.
  • a branch destination array is generated by a branch node array in which m branch nodes, which are a specific number, are arranged, but an assembler macro using the number m as a parameter is used. It is possible to generate a processing flow for realizing a process of generating a branch destination array from a branch node array in which an arbitrary number of branch nodes are arranged.
  • a branch node array corresponding to each discrimination bit position arranged in the branch node array is replaced with a processing flow that sequentially executes processing using the discrimination bit positions.
  • a determination process for determining whether all the processes corresponding to the discrimination bit positions arranged in is completed, and if the process is not completed, the same processing flow including a loop process that repeats the process using the next discrimination bit position is performed. It is clear that a processing result is obtained. Details of the processing in steps S2501 to S250m will be described next with reference to FIG. 25B.
  • FIG. 25B is a diagram illustrating an example of a processing flow in which a bit value indicating branch destination information is set in the array element of the branch destination array based on the discrimination bit position and the search key stored in the array element of the branch node array.
  • step S2510 the contents of the array element indicated by the node reference number are read from the branch node array as the discrimination bit position.
  • 1 is set as the node reference number in the process of step S2500 of FIG. 25A.
  • step S2511 the bit value indicated by the discrimination bit position read in step S2510 is extracted from the search key.
  • step S2512 the extracted bit value is stored in the array element of the branch destination array indicated by the array element number. Set as. In the first process of step S2512, 1 is set as the array element number in the process of step S2500 of FIG. 25A.
  • step S2513 1 is added to the array element number.
  • step S2514 1 is added to the node reference number, and the process is terminated.
  • the processing in steps S2510 to S2514 described above is sequentially executed for each array element in the branch node array, so that branch destination information can be sequentially set in the array elements in the branch destination array.
  • FIG. 26A is a diagram illustrating an example of a processing flow for obtaining a node reference number of a leaf node array based on a branch destination array, and is a diagram illustrating a detailed processing flow of step S2403 illustrated in FIG.
  • the number of stages of the coupled node tree is n.
  • step S2600 1 is set as the array element number.
  • step S2601 the array number corresponding to the first-stage node (root node) (hereinafter referred to as the array number of the first-stage node), that is, the branch destination array indicated by array number 1 is stored.
  • the array element number of the second stage node is obtained from the branch destination information.
  • step S2602 the array number of the third stage node is obtained from the branch destination information stored in the branch destination array indicated by the array number of the second stage node.
  • steps S2603 to S260n-2 the fourth to n-1th stages are respectively determined according to the branch destination information stored in the branch destination array indicated by the array element numbers of the third to n-2th nodes. Find the array number of the eye node. Details of the processing in steps S2601 to S260n-2 will be described later with reference to FIG. 26B.
  • step S260n-1 the node reference number of the leaf node array is obtained from the branch destination information stored in the branch destination array pointed to by the array element number of the (n-1) th node, and the process ends. Details of the processing of step S260n-1 will be described later with reference to FIG. 26C. Note that the processing flow example illustrated in FIG. 26A uses the coupled node tree of the present embodiment having a specific number of stages n. However, any assembler macro using the number of stages n as a parameter can be used for any of the embodiments. It is possible to generate a processing flow for realizing a search process using a coupled node tree having a number of stages.
  • processing using the branch destination information is sequentially executed in series corresponding to the branch destination information of the nodes of each stage of the coupled node tree arranged in the branch destination array.
  • a determination process is provided for determining whether the processing corresponding to the branch destination information of the node at the uppermost level of the lowest level has been completed. If not, the branch destination information of the node at the next level It is clear that the same processing result can be obtained by the processing flow including the loop processing that repeats the processing using.
  • FIG. 26B is a diagram for explaining an example of a processing flow for obtaining the array number of the next-stage node from the branch destination information, and is a diagram for explaining a detailed processing flow of the processing in steps S2602 to S260n-2 shown in FIG. 26A. is there.
  • step S2611 the branch destination information indicated by the array element number is read from the branch destination array.
  • step S2611 1 is set as the array element number in the process of step S2600 of FIG. 26A.
  • step S2612 the array element number is doubled.
  • step S2613 the branch destination information obtained in step S2611 is added to the array element number, and the process ends.
  • the process of FIG. 26B described above is a process indicated by dotted arrows 220a, 220b, and 221c in the example shown in FIG.
  • the value 1 of the branch destination information stored in the array element indicated by the thick frame of the array number 2 is read, and the array number 5 is obtained by adding the value obtained by doubling the array number 2 It is processing.
  • FIG. 26C is a diagram illustrating an example of a processing flow for obtaining a node reference number of a leaf node array based on branch destination information, and is a diagram illustrating a detailed processing flow of step S260n-1 illustrated in FIG. 26A.
  • step S2621 the branch destination information indicated by the array element number of the (n ⁇ 1) -th node is read from the branch destination array.
  • the array element number of the (n ⁇ 1) -th node is set by the process in step S260n-2 of FIG. 26A.
  • step S2622 the array element number is doubled, and in step S2623, the value obtained by adding the branch destination information obtained in step S2611 to the array element number is set as the node reference number of the leaf node array.
  • step S2624 a value obtained by subtracting the maximum value of the node reference number of the branch node array from the node reference number of the leaf node array set in step S2623 is set as the node reference number of the leaf node array, and the process is terminated.
  • the process in FIG. 26C described above is a process indicated by a dotted arrow 221i in the example shown in FIG.
  • the node reference number is a series of numbers. Therefore, when obtaining the node reference number of the array element in which the leaf node is stored, There is no need to decrement the node reference number of the last array element that stores the branch node. Therefore, in that case, the process of step S2624 shown in FIG. 26C is deleted from the process flow.
  • FIG. 27 is a diagram illustrating a functional block configuration example of the bit string search device according to the third embodiment of the present invention.
  • 27 includes a search tree storage unit 1010, a search start position setting unit 1020, a search key setting unit 1050, a branch destination information setting execution unit 1030, a branch destination information storage unit 1070, First stage node branch destination information storage position setting means 1080, next stage node branch destination information storage position calculation execution unit 1040, and leaf node output execution unit 1060 are provided.
  • the coupled node tree is arranged in the array.
  • the coupled node tree can be separately arranged into a branch node array for storing branch nodes and a leaf node array for storing leaf nodes.
  • the search start position setting unit 1020 sets 1 as the node reference number of the root node as the node reference number of the search start node, and sets 1 as the array element number of the branch destination array that stores the branch destination information.
  • the function of the search start position setting unit 1020 corresponds to the process of step S2500 illustrated in FIG. 25A.
  • the search key setting means 1050 is set with a search key.
  • the branch destination information setting execution unit 1030 includes branch node reading means 1031 to 103m and branch destination information extraction means 1051 to 105m.
  • the branch node reading means 1031 to 103m read the contents of the array element indicated by the node reference number from the branch node array arranged in the search tree storage means 1010 as the discrimination bit position, and extract branch destination information together with the array number of the branch destination array Output to the means. Then, 1 is added to the array element number of the branch destination array and the node reference number of the branch node array, and the result is output to the next branch node reading means.
  • the branch destination information extracting means 1051 to 105m take out the bit value indicated by the discrimination bit position output from the branch node reading means 1031 to 103m from the search key set in the search key setting means 1050, and use the bit value as the branch node.
  • the branch destination information is set in the array element of the branch destination array indicated by the array element number output by the reading means 1031 to 103m.
  • the functions of the branch node reading unit 1031 and the branch destination information extracting unit 1051 correspond to the processing in step S2501 shown in FIG. 25A.
  • the functions of the branch node reading means and the branch destination information extracting means up to the branch node reading means 103m and the branch destination information extracting means 105m correspond to the respective processes up to step S250m shown in FIG. 25A.
  • the branch destination array is secured in the storage area of the branch destination information storage unit 1070.
  • First stage node branch destination information storage position setting means 1080 sets 1 to the array element number of the branch destination array.
  • the function of the first stage node branch destination information storage position setting means 1080 corresponds to the processing in step S2600 shown in FIG. 26A.
  • the next-stage node branch destination information storage position calculation execution unit 1040 includes next-stage node branch destination information storage position calculation calculation means 1041 to 104n-2. n is the number of stages in the coupled node tree.
  • Next-stage node branch destination information storage position calculation means 1041 to 104n-2 reads the branch destination information indicated by the array number from the branch destination array, doubles the array number, and adds the branch destination information to the array number doubled. Is obtained as the array element number of the array element of the branch destination array in which the branch destination information corresponding to the next node is stored.
  • the functions of the next-stage node branch destination information storage position calculation means 1041 to 104n-2 correspond to the processes of steps S2601 to S260n-2 shown in FIG. 26A, respectively.
  • the array element number for the next stage node branch destination information storage position calculation unit 1041 to read the branch destination information is set by the first stage node branch destination information storage position setting unit 1080.
  • the array element numbers for the next stage node branch destination information storage position calculation means 1042 to 104n-2 to read the branch destination information are the array element numbers obtained by the next stage node branch destination information storage position calculation means of the previous stage.
  • the array element number obtained by the next-stage node branch destination information storage position calculation unit 104n-2 is input to a leaf node output execution unit 1060 described below and used for reading the leaf node.
  • the leaf node output execution unit 1060 includes a leaf node storage position calculation unit 1061 and a search result output unit 1062.
  • the leaf node storage position calculation unit 1061 reads the branch destination information indicated by the array number obtained by the next-stage node branch destination information storage position calculation unit 104n-2, doubles the array number, and branches to the array number obtained by doubling the array number. A value obtained by adding information is obtained as a temporary node reference number of the array element of the leaf node array. Then, a value obtained by subtracting the maximum value of the node reference number of the branch node array from the temporary node reference number, that is, the number m of the branch nodes stored in the search tree storage unit 1010 is used as the node reference number of the array element of the leaf node array. Ask.
  • the function of the leaf node storage position calculation means 1061 corresponds to step S260n-1 in FIG. 26A, that is, the processing shown in FIG. 26C.
  • the search result output means 1062 reads the leaf node from the search tree storage means 1010 according to the node reference number of the array element of the leaf node array obtained by the leaf node storage position calculation means 1061, and accesses the index key or the index key. retrieve information. When what is extracted from the leaf node is an index key, the index key is output as a search result key. When the information extracted from the leaf node is information for accessing the index key, the index key is read out and output as a search result key based on the information for accessing the extracted index key. It is also possible to compare the search result key and the search key, and output a search result indicating that the search is successful if they match, and that the search fails if they do not match.
  • the configuration of the coupled node tree according to the third embodiment of the present invention is the same as the configuration of the coupled node tree according to the second embodiment.
  • the coupled node tree generation process according to the third embodiment described below can be said to be a modified example of the coupled node tree generation process according to the second embodiment described above.
  • the coupled node tree according to the third embodiment of the present invention is referred to as a pointerless tree, and the conventional coupled node tree is simply a tree, or Sometimes called a tree before conversion.
  • the generation of the pointerless tree according to the third embodiment of the present invention can be realized as follows, for example, similarly to the generation of the pointerless tree according to the second embodiment. That is, when generating the pointerless tree, it is assumed that the tree of the form illustrated in FIGS. 1A and 1B is generated by the index key stored in the pointerless tree.
  • the generation of the pointerless tree is realized by sequentially traversing the nodes of the tree from the root node and converting them into the nodes of the third embodiment of the present invention.
  • FIG. 28A is a diagram for explaining an example of the processing flow before the processing for generating a pointerless tree in the third embodiment of the present invention.
  • step S2801 an array (branch node array and leaf node array) for generating a pointerless tree is acquired, and in step S2802, array elements are initialized.
  • the processing in step S2802 is necessary to use a dummy branch node.
  • step S2802a the maximum number of stages of the tree before conversion is obtained, and in step S2802b, the maximum number of stages is set as the upper limit value of the stage number counter. Details of the processing in step S2802a will be described later with reference to FIGS. 31A and 31B.
  • step S2803 the base numbers of the branch node array and the leaf node array are set.
  • step S2805, 1 is set in the stage number counter.
  • step S2806, 1 is set as the node reference number, and in step S2807, the array element number of the root node of the tree is set as the array element number.
  • step S2808, the array element number and the count value of the stage number counter are stored in the search path stack, and the flow advances to step S2813 shown in FIG. 28B.
  • FIG. 28B is a diagram illustrating a processing flow example at the latter stage of the processing for generating the pointerless tree according to the third embodiment of the present invention.
  • step S2813 the array element indicated by the array element number is read out as a node from the array in which the tree before conversion is stored.
  • the array element number of the root node is set to the array element number in step S2807.
  • step S2828 it is set in step S2828 described later.
  • the node read in step S2813 may be referred to as a tour start node.
  • step S2815 the node type is extracted from the node read in step S2813.
  • step S2816 it is determined whether the extracted node type indicates a branch node. If it is determined in step S2816 that the node type does not indicate a branch node but indicates a leaf node, the process proceeds to step S2822. If the node type indicates a branch node, the process proceeds to step S2816a.
  • step S2816a the node is written in the array element of the branch node array based on the node reference number. Details of the processing in step S2816a will be described later with reference to FIG.
  • step S2817 a value of 1 is added to the stage number counter, and the flow advances to step S2818 to double the node reference number.
  • step S2819 the representative node number is extracted from the node read in step S2813.
  • step S2820 a value obtained by adding the value 0 to the extracted representative node number is set as the array number.
  • step S2821 the array element number and the count value of the stage number counter are stored in the search path stack, and the process returns to step S2813.
  • the array element number stored in the search path stack is the value obtained by adding the value 0 to the representative node number in step S2820, it is the array element number of the node [0].
  • step S2813 The loop processing from step S2813 to step S2821 described above is repeated until the node type indicates a leaf node in step S2816. That is, as a group of processes, the node is visited from the tour start node to the first leaf node, the node is read, the node is converted, and the node of the pointerless tree is written.
  • the node [0] side is preferentially visited. It will be apparent to those skilled in the art from the above description that the node can be visited with priority on the [1] side.
  • step S2816 it is determined that the node type does not indicate a branch node but indicates a leaf node, and in step S2822, the node is written in the array element of the leaf node array based on the node reference number. Details of the processing in step S2822 will be described later with reference to FIG.
  • step S2823 it is determined whether the stack pointer of the search path stack points to the array element number of the root node of the tree. If the stack pointer of the search path stack points to the array element number of the root node of the tree, the processing ends because all the nodes of the tree have been processed. Otherwise, the process proceeds to step S2824.
  • step S2824 the array element number and the count value of the stage number counter are extracted from the search path stack, and the stack pointer of the search path stack is decremented by one.
  • step S2828 the value 1 is added to the array element number extracted in step S2824 to obtain the array element number of the node [1] as the array element number of the tour start node.
  • step S2830 1 is added to the node reference number, and the process returns to step S2813.
  • step S2823 The loop processing from step S2813 to step S2830 described above is repeated until it is determined in step S2823 that the stack pointer of the search path stack points to the array element number of the root node of the tree.
  • Each node is converted into a node of a pointerless tree, and a pointerless tree is generated.
  • FIG. 29 is a diagram illustrating a processing flow example of processing for generating a branch node according to the third embodiment of the present invention, and is a diagram illustrating details of processing in step S2816a illustrated in FIG. 28B.
  • step S1025 a value obtained by adding the base number of the branch node array to the node reference number is set to the array element number.
  • step S1026 the discrimination bit position is extracted from the node.
  • step S1027 a value of 1 is added to the discrimination bit position.
  • step S1028 the discrimination bit position is added to the array element of the branch node array pointed to by the array element number set in step S1025. Is generated, a branch node is generated, and the process is terminated.
  • FIG. 30 is a diagram for explaining a processing flow example of processing for generating leaf nodes in the third embodiment of the present invention, and is a diagram for explaining details of processing in step S2822 shown in FIG. 28B.
  • step S3029 the node reference number and the stage number counter are saved, and the process proceeds to step S3030.
  • step S3030 it is determined whether the stage number counter is the upper limit value. If not, the node reference number is doubled in step S3031, value 1 is added to the stage number counter in step S3032, and the process returns to step S3030.
  • steps S3030 to S3032 described above is for placing leaf nodes at the lowest level of the pointerless tree.
  • the leaf node 210c at the third level in the tree before conversion in FIG. 1B is converted to the node 210j at the fifth level in FIG. 2B.
  • the position information of the node 210c in FIG. 2B is saved by the process of step S3029 in FIG.
  • the upper limit value of the stage number counter is set in step S2802b shown in FIG. 28A. Instead, when generating a tree before conversion, the number of stages of the leaf node is set each time a leaf node is inserted. The maximum value is counted and stored as a tree attribute, and when the pointerless tree of the third embodiment of the present invention is generated, the maximum value can be used as the upper limit value of the stage number counter.
  • step S3034 a numerical value of power of 2 is obtained by subtracting 1 from the upper limit value of the stage number counter, and the value obtained by subtracting the value obtained by subtracting 1 from the numerical value from the node reference number, the base number of the leaf node array, Is set to the array element number of the leaf node array.
  • the upper limit value of the stage number counter is 5, and the power of 2 by the value obtained by subtracting 1 from the upper limit value is 16.
  • a value 15 obtained by subtracting 1 from this value is the number of branch nodes arranged in the branch node array.
  • the node reference number is the node reference number of the branch node array
  • the value obtained by subtracting 15 from this node reference number is the node reference number of the leaf node array as described in the example of FIG. Then, the array element number is obtained from the sum of the node reference number and the base number.
  • step S3035 the index key is extracted from the node read in step S2813 shown in FIG. 28B.
  • step S3036 the bit value “0” is inserted into the most significant bit position of the index key.
  • the index key is written in the array element of the leaf node array pointed to by the array element number set in step S3034, a leaf node is generated, and the process proceeds to step S3038.
  • step S3038 the node reference number and stage number counter saved in step S3029 are set in the node reference number and stage number counter, respectively, and the process ends.
  • FIG. 31A is a diagram for explaining an example of the processing flow of the previous stage of the process of obtaining the maximum number of stages of the tree before conversion.
  • step S3101 a value 1 is set in the stage number counter, and in step S3102, the value set in the stage number counter is set in the maximum stage number counter. That is, a value 1 is set as an initial value in the stage number counter and the maximum stage number counter.
  • step S3107 the array element number of the root node of the tree is set in the array element number, and the flow advances to step S3113 shown in FIG. 31B.
  • FIG. 31B is a diagram for explaining an example of the processing flow at the latter stage of the process for obtaining the maximum number of trees before conversion.
  • step S3113 the array element indicated by the array element number is read out as a node from the array in which the tree before conversion is stored.
  • the array element number of the root node is set in step S3107.
  • step S3128 the node read in step S3113 may be referred to as a tour start node.
  • step S3115 a node type is extracted from the node read in step S3113.
  • step S3116 it is determined whether the extracted node type indicates a branch node. If it is determined in step S3116 that the node type indicates a leaf node instead of a branch node, the process proceeds to step S3121. If the node type indicates a branch node, the process proceeds to step S3117.
  • step S3117 a value of 1 is added to the stage number counter, the process proceeds to step S3119, a representative node number is extracted from the node read in step S3113, and a value obtained by adding a value of 0 to the extracted representative node number is arranged in step S3120. Set to a number.
  • step S3120a the array element number and the count value of the stage number counter are stored in the search path stack, and the process returns to step S3113.
  • the array element number stored in the search path stack is the value obtained by adding the value 0 to the representative node number in step S3120, it is the array element number of the node [0].
  • step S3113 The loop processing from step S3113 to step S3120a described above is repeated until the node type indicates a leaf node in step S3116. That is, as a group of processes, the number of leaf nodes is obtained by circulating the nodes from the tour start node to the first leaf node.
  • the node [0] is preferentially circulated. It will be apparent to those skilled in the art from the above description that the node can be visited with priority on the [1] side.
  • step S3116 determines whether the count value of the stage number counter is larger than the value set in the maximum stage number counter. . If the determination result in step S3116 is that the count value of the stage number counter is larger than the value set in the maximum stage number counter, in step S3122, the count value of the stage number counter is set in the maximum stage number counter, and the process proceeds to step S3123. If the determination result indicates that the count value of the stage number counter is not larger than the value set in the maximum stage number counter, the process proceeds to step S3123.
  • step S3123 it is determined whether the stack pointer of the search path stack points to the array element number of the root node of the tree. If the stack pointer of the search path stack points to the array element number of the root node of the tree, the processing is completed because the processing of the number of stages for all the leaf nodes of the tree has been completed. Otherwise, the process proceeds to step S3124.
  • step S3124 the array element number and the count value of the stage number counter are extracted from the search path stack, and the stack pointer of the search path stack is decremented by one.
  • step S3128 the value 1 is added to the array element number extracted in step S3124 to obtain the array element number of the node [1] as the array element number of the cyclic start node, and the process returns to step S3113.
  • step S3123 By repeating the loop processing from step S3113 to step S3128 described above until it is determined in step S3123 that the stack pointer of the search path stack points to the array element number of the root node of the tree, the circulation of all nodes on the tree is performed. And the maximum number of levels of the tree is obtained.
  • bit string search device according to the first embodiment, the second embodiment, and the third embodiment of the present invention is shown in FIG. 6, FIG. 10, FIG. 11, FIG. 14, FIG. It is obvious that the processing illustrated in FIGS. 24 to 26C can be constructed on the computer by a program that causes the computer to execute the processing. Therefore, the program and a computer-readable storage medium storing the program are included in the embodiment of the present invention. Furthermore, the data structure of the coupled node tree of the present invention is also included in the embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

ブランチノードは弁別ビット位置を含み、そのリンク先のノード対の代表ノードは、ブランチノードの配置された配列のノード参照番号の2倍のノード参照番号の配列要素に配置する。リーフノードはインデックスキーを含みツリーの最下段にのみ配置する。検索キーの弁別ビット位置のビット値を分岐先情報として全てのブランチノードについて求めておき、リンク先のノードの配置された配列要素のノード参照番号は、リンク元のブランチノードのノード参照番号を2倍し、分岐先情報と加算して求める。

Description

ビット列検索装置、検索方法及びプログラム
本発明は、ビット列検索の技術に関し、特にカップルドノードツリーを用いたビット列検索に関する。
近年、社会の情報化が進展し、大規模なデータベースが各所で利用されるようになってきている。このような大規模なデータベースからレコードを検索するには、各レコードの記憶されたアドレスと対応づけられたレコード内の項目をインデックスキーとして検索をし、所望のレコードを探し出すことが通例である。また、全文検索における文字列も、文書のインデックスキーと見なすことができる。
そして、それらのインデックスキーはビット列で表現されることから、データベースの検索はビット列データの検索に帰着されるということができる。
ビット列データを検索するビット列検索に関するものとして、下記特許文献1、特許文献2及び特許文献3等に開示されたカップルドノードツリーを用いた検索技術がある。
図1Aに示すのは、従来の、配列に配置されたカップルドノードツリーの構成例を説明する図である。
図1Aを参照すると、ノード101が配列100の配列番号10の配列要素に配置されている。ノード101はノード種別102、弁別ビット位置103及び代表ノード番号104で構成されている。ノード種別102は0であり、ノード101がブランチノードであることを示している。弁別ビット位置103には1が格納されている。代表ノード番号104にはリンク先のノード対の代表ノードの配列番号20が格納されている。なお、以下では表記の簡略化のため、代表ノード番号に格納された配列番号を代表ノード番号ということもある。また、代表ノード番号に格納された配列番号をそのノードに付した符号あるいはノード対に付した符号で表すこともある。
配列番号20の配列要素には、ノード対111の代表ノードであるノード[0]112が格納されている。そして隣接する次の配列要素(配列番号20+1)に代表ノードと対になるノード[1]113が格納されている。ノード[0]112のノード種別114には0が、弁別ビット位置115には3が、代表ノード番号116には30が格納されている。またノード[1]113のノード種別117には1が格納されており、ノード[1]113がリーフノードであることを示している。インデックスキー118には、“0001”が格納されている。
なお、代表ノードをノード[0]で表し、それと対になるノードをノード[1]で表すことがある。また、ある配列番号の配列要素に格納されたノードを、その配列番号のノードということがあり、ノードの格納された配列要素の配列番号を、ノードの配列番号ということもある。
配列番号30及び31の配列要素に格納されたノード122とノード123からなるノード対121の内容は省略されている。
ノード[0]112、ノード[1]113、ノード122、及びノード123の格納された配列要素にそれぞれ付された0あるいは1は、検索キーで検索を行う場合にノード対のどちらのノードにリンクするかを示すものである。前段のブランチノードの弁別ビット位置にある検索キーのビット値である0か1を代表ノード番号に加えた配列番号のノードにリンクする。
したがって、前段のブランチノードの代表ノード番号に、検索キーの弁別ビット位置のビット値を加えることにより、リンク先のノードが格納された配列要素の配列番号を求めることができる。
なお、上記の例では代表ノード番号をノード対の配置された配列番号のうち小さい方を採用しているが、大きいほうを採用することも可能であることは明らかである。
図1Bは、従来のカップルドノードツリーのツリー構造を概念的に示す図である。
符号210aで示すのが図1Bに例示するカップルドノードツリー200のルートノードである。図示の例では、ルートノード210aは配列番号220に配置されたノード対201aの代表ノードとしている。
ツリー構造としては、ルートノード210aの下にノート対201bが、その下層にノード対201cとノード対201fが配置され、ノード対201fの下層にはノード対201hとノード対201gが配置されている。ノード対201cの下にはノード対201dが、さらにその下にはノード対201eが配置されている。
各ノードの前に付された0あるいは1の符号は、図1において説明した配列要素の前に付された符号と同じである。検索キーの弁別ビット位置のビット値に応じてツリーをたどり、検索対象のリーフノードを見つけることになる。
図示された例では、ルートノード210aのノード種別260aは0でブランチノードであることを示し、弁別ビット位置230aは0を示している。代表ノード番号は220aであり、それはノード対201bの代表ノード210bの格納された配列要素の配列番号である。
ノード対201bはノード210bと211bで構成され、それらのノード種別260b、261bはともに0であり、ブランチノードであることを示している。ノード210bの弁別ビット位置230bには1が格納され、リンク先の代表ノード番号にはノード対201cの代表ノード210cの格納された配列要素の配列番号220bが格納されている。
ノード210cのノード種別260cには1が格納されているので、このノードはリーフノードであり、したがって、インデックスキーを含んでいる。インデックスキー250cには“000111”が格納されている。一方ノード211cのノード種別261cは0、弁別ビット位置231cは2であり、代表ノード番号にはノード対201dの代表ノード210dの格納された配列要素の配列番号221cが格納されている。
ノード210dのノード種別260dは0、弁別ビット位置230dは5であり、代表ノード番号にはノード対201eの代表ノード210eの格納された配列要素の配列番号220dが格納されている。ノード210dと対になるノード211dのノード種別261dは1であり、インデックスキー251dには“011010”が格納されている。
ノード対201eのノード210e、211eのノード種別260e、261eはともに1であり双方ともリーフノードであることを示し、それぞれのインデックスキー250e、251eにはインデックスキーとして“010010”と“010011”が格納されている。
ノード対201bのもう一方のノードであるノード211bの弁別ビット位置231bには2が格納され、リンク先の代表ノード番号にはノード対201fの代表ノード210fの格納された配列要素の配列番号221bが格納されている。
ノード対201fのノード210f、211fのノード種別260f、261fはともに0であり双方ともブランチノードである。それぞれの弁別ビット位置230f、231fには5、3が格納されている。ノード210fの代表ノード番号にはノード対201gの代表ノード210gの格納された配列要素の配列番号220fが格納され、ノード211fの代表ノード番号にはノード対201hの代表ノードであるノード[0]210hの格納された配列要素の配列番号221fが格納されている。
ノード対201gのノード210g、211gのノード種別260g、261gはともに1であり双方ともリーフノードであることを示し、それぞれのインデックスキー250g、251gには“100010”と“100011”が格納されている。
また同じくノード対201hの代表ノードであるノード[0]210hとそれと対をなすノード[1]211hのノード種別260h、261hはともに1であり双方ともリーフノードであることを示し、それぞれのインデックスキー250h、251hには“101011”と“101100“が格納されている。
次に、上述のカップルドノードツリーを用いた基本的な検索処理について説明する。以下の説明においては、特に図示されてはいないが、処理の途中で得られた各種の値を後の処理で用いるためにそれぞれの処理に応じた一時記憶領域が用いられる。また、あるデータ格納領域に格納されるデータ自体にデータ格納領域の符号を付して説明する場合があるし、データ自体の名前をそのデータを格納する一時記憶領域の名前として用いることもある。
図2は、従来のカップルドノードツリーを用いたビット列検索の処理フロー例を説明する図である。
まず、ステップS201で、検索開始ノードの配列番号を取得する。取得された配列番号に対応する配列は、カップルドノードツリーを構成する任意のノードを格納したものである。検索開始ノードの指定は、オペレータからの入力によってもよいし、図2に例示する処理を利用するアプリケーションプログラムによるものでもよい。
取得された検索開始ノードの配列番号は、図示しない検索開始ノード設定エリアに設定されるが、この検索開始ノード設定エリアは、先に述べた「処理の途中で得られた各種の値を後の処理で用いるためにそれぞれの処理に応じた一時記憶領域」の一つである。以下の説明では、「図示しない検索開始ノード設定エリアに設定する」のような表現に変えて、「検索開始ノードの配列番号を得る。」、「検索開始ノードとして設定する」あるいは単に「検索開始ノードに設定する」のように記述することもある。
次に、ステップS202で、探索経路スタックに取得された配列番号を格納し、ステップS203で、その配列番号に対応する配列要素を参照すべきノードとして読み出す。そして、ステップS204で、読み出したノードから、ノード種別を取り出し、ステップS205で、ノード種別がブランチノードであるか否かを判定する。
ステップS205の判定において、読み出したノードがブランチノードである場合は、ステップS206に進み、ノードから弁別ビット位置についての情報を取り出し、更に、ステップS207で、取り出した弁別ビット位置に対応するビット値を検索キーから取り出す。そして、ステップS208で、ノードから代表ノード番号を取り出して、ステップS209で、検索キーから取り出したビット値と代表ノード番号とを加算し、新たな配列番号として、ステップS202に戻る。
以降、ステップS205の判定においてリーフノードと判定されてステップS210に進むまで、ステップS202からステップS209までの処理を繰り返す。ステップS210で、リーフノードからインデックスキーを検索結果キーとして取り出して、処理を終了する。
ルートノードを検索開始ノードとして図1Bに例示するカップルドノードツリー200からインデックスキー“100010”を検索する処理を簡単に説明する。弁別ビット位置は、最上位ビットの位置から0、1、2、・・・とする。
検索開始ノードがルートノードであるので、ビット列“100010”を検索キーとしてルートノード210aから処理をスタートする。ルートノード210aの弁別ビット位置230aは0であるので、検索キー“100010”の弁別ビット位置が0のビット値をみると1である。そこで代表ノード番号の格納された配列番号220aに1を加えた配列番号の配列要素に格納されたノード211bにリンクする。ノード211bの弁別ビット位置231bには2が格納されているので、検索キー“100010”の弁別ビット位置が2のビット値をみると0であるから、代表ノード番号の格納された配列番号221bの配列要素に格納されたノード210fにリンクする。
ノード210fの弁別ビット位置230fには5が格納されているので、検索キー“100010”の弁別ビット位置が5のビット値をみると0であるから、代表ノード番号の格納された配列番号220fの配列要素に格納されたノード210gにリンクする。
ノード210gのノード種別260gは1でありリーフノードであることを示しているので、インデックスキー250gを検索結果キーとして読み出す。このようにしてカップルドノードツリーを用いた検索が行われる。なお、検索結果キーを検索キーと比較すると両方とも“100010”であって一致している。
上述の図2に示すフローチャート例では、検索処理をノードからインデックスキーを検索結果キーとして取り出すことで終了しているが、さらに検索結果キーと検索キーの一致判定を行い、一致すれば検索成功とし、一致しなければ検索失敗とすることもできる。
図1A及び図1Bに示すカップルドノードツリーのリーフノードは、リーフノードインデックスキーを直接含むものであり、図2に示す検索処理は、リーフノードからインデックスキーを取り出すものである。このリーフノードの構成と検索処理におけるインデックスキーの取り出しは、特許文献1及び特許文献2に開示されたものと同様である。
一方、特許文献3に開示されたカップルドノードツリーのリーフノードには、インデックスキーに替えて、インデックスキーの記憶された記憶領域の位置を示すポインタである参照ポインタが格納されている。そして、検索処理におけるインデックスキーの取り出しは、リーフノードから参照ポインタを取り出し、参照ポインタの指す記憶領域にアクセスすることにより行われる。
また、特許文献4には、カップルドノードツリーのノードを順次巡回して退避することが記載されている。
特開2008-015872号公報 特開2008-112240号公報 特開2008-269503号公報 特開2008-269197号公報
カップルドノードツリーは、それ以前に検索処理に用いられていたツリーと比べてツリーを記憶する記憶容量が少ないという特徴を有する。しかしながら、検索対象のデータサイズが非常に大きくなると、より小さい容量の記憶手段に配置可能なツリー構造であることが望ましい。
そこで、本発明が解決しようとする課題は、より小さい容量の記憶手段に配置可能なカップルドノードツリーのツリー構造を提供することである。
本発明によれば、カップルドノードツリーの各ノードは、ツリー上の位置に応じた配列の配列要素に配置される。ルートノードの配置される配列要素の配列番号は1とされ、ブランチノードのリンク先のノード対の代表ノードの配置された配列要素の配列番号は、ブランチノードが配置された配列要素の配列番号を2倍することにより求められる。したがって、本発明によるブランチノードは、代表ノード番号を含む必要がない。
本発明の第1の態様によれば、ブランチノードはノード種別と弁別ビット位置を含むが、代表ノード番号は含まない。また、リーフノードは、ノード種別とインデックスキーあるいはインデックスキーにアクセスするための情報を含む。インデックスキーにアクセスするための情報は、上述の特許文献3に記載されたインデックスキーの記憶された記憶領域の位置を示す参照ポインタであってもよいし、それに限らず、インデックスキーの記憶された記憶領域の位置を求める索引のインデックスであってもよい。
また、本発明の第2の態様によれば、検索対象のインデックスキーのある特定のビット位置に特定のビット値“0”あるいは“1”を挿入したものによりカップルドノードツリーを構成し、同様に検索キーの、検索対象のインデックスキーと同一の特定のビット位置に同一の特定のビット値“0”あるいは“1”を挿入したものにより検索を行う。そして、ブランチノードとリーフノードはノード種別を含まず、ブランチノードは弁別ビット位置を含むが代表ノード番号は含まず、リーフノードはインデックスキーあるいはインデックスキーにアクセスするための情報を含む。
そして、リーフノードは、カップルドノードツリーの最大段数をNとしたとき、N段目にのみ存在し、かつN段目にはリーフノードしか存在しないようにツリーを構成することにより、ノードの種別の判別を可能としている。したがって、検索処理は、ルートノードから最終段であるN段目のノードまでのリンク動作を繰り返すことで行われる。
また、本発明の第3の態様によれば、検索対象のインデックスキーのある特定のビット位置に特定のビット値“0”あるいは“1”を挿入したものによりカップルドノードツリーを構成し、同様に検索キーの、検索対象のインデックスキーと同一の特定のビット位置に同一の特定のビット値“0”あるいは“1”を挿入したものにより検索を行う。そして、ブランチノードとリーフノードはノード種別を含まず、ブランチノードは弁別ビット位置を含むが代表ノード番号は含まず、リーフノードはインデックスキーあるいはインデックスキーにアクセスするための情報を含む。
リーフノードは、カップルドノードツリーの最大段数をNとしたとき、N段目にのみ存在し、かつN段目にはリーフノードしか存在しないようにツリーを構成することにより、ノードの種別の判別を可能としている。
 すなわち、本発明の第3の態様によれば、カップルドノードツリーの構成は、本発明の第2の実施形態のものと同様である。
しかし、本発明の第3の実施形態においては、検索キーによる検索処理の始めに、ブランチノードの弁別ビット位置と検索キーのビット値により、各ブランチノードにおけるリンク先においてノード位置[0]とノード位置[1]のどちらに分岐するかを示す分岐先情報を求める。そして、検索処理は、ルートノードから最終段であるN段目のノードまでの各段の分岐先情報をたどるリンク動作を繰り返すことにより行われる。
本発明によれば、ブランチノードは少なくともリンク先を識別する代表ノード番号を含まないので、ノードのサイズを小さくすることができる。例えばインデックキーの数が16とすると、リーフノードのサイズを規定するインデックスキーを表現するためのビット数は4である。一方、従来のブランチノードのサイズを規定する弁別ビット位置に必要なビット数は2、代表ノード番号に必要なビット数は、ルートノードを含めたリンク先となるノード対の数が1+1+2+4+8=16であることから4であるので、必要なビット数は合計で6となる。
したがって、従来のブランチノードは、リーフノードと比べて大きな記憶容量を必要としていた。この記憶容量の差は、インデックスキーの数が大きくなるとさらに拡大する。しかし、本発明によれば、代表ノード番号を格納する記憶領域が必要なくなることから、カップルドノードツリーを配置する配列のサイズを小さくすることができる。
また、本発明の第2の実施形態及び第3の実施形態によれば、カップルドノードツリーを配置する配列のサイズを小さくすることに加えて、検索処理におけるノード種別の判定による分岐動作が削除されるので、処理速度を向上させることができる。
従来の、配列に配置されたカップルドノードツリーの構成例を説明する図である。 従来のカップルドノードツリーのツリー構造を概念的に示す図である。 従来のカップルドノードツリーを用いたビット列検索の処理フロー例を説明する図である。 本発明を実施するためのハードウェア構成例を説明する図である。 本発明の第1の実施形態における配列に配置されたカップルドノードツリーの構成例を説明する図である。 本発明の第1の実施形態に係るカップルドノードツリーのツリー構造を概念的に示す図である。 本発明の第1の実施形態におけるビット列検索装置の機能ブロック構成例を説明する図である。 本発明の第1の実施形態におけるビット列検索の処理フロー例を説明する図である。 本発明の第1の実施形態におけるカップルドノードツリーを用いた検索例を示す図である。 本発明の第2の実施形態における配列に配置されたカップルドノードツリーの構成例を説明する図である。 本発明の第2の実施形態に係るカップルドノードツリーのツリー構造を概念的に示す図である。 本発明の第2の実施形態におけるビット列検索装置の機能ブロック構成例を説明する図である。 本発明の第2の実施形態におけるビット列検索の処理フロー例を説明する図である。 本発明の第2の実施形態におけるリンク先の配列番号を求める処理フロー例を説明する図である。 本発明の第2の実施形態におけるカップルドノードツリーを用いた検索例を示す図である。 本発明の第1の実施形態の変形例における配列に配置されたカップルドノードツリーの構成例を説明する図である。 本発明の第1の実施形態の変形例におけるビット列検索の処理フロー例を説明する図である。 本発明の第2の実施形態の変形例における配列に配置されたカップルドノードツリーの構成例を説明する図である。 本発明の第2の実施形態の変形例におけるビット列検索の処理フロー例を説明する図である。 リンク先の配列番号を求める処理フロー例を説明する図である。 本発明の第1及び第2の実施形態におけるポインタレスツリーを生成する処理の前段の処理フロー例を説明する図である。 本発明の第1及び第2の実施形態におけるポインタレスツリーを生成する処理の後段の処理フロー例を説明する図である。 巡回開始ノードよりツリーを巡回し、ノードをポインタレスツリーに格納する処理フロー例を説明する図である。 本発明の第1の実施形態におけるノードを生成する処理の処理フロー例を説明する図である。 本発明の第2の実施形態におけるノードを生成する処理の処理フロー例を説明する図である。 変換前のツリーの最大段数を求める処理フロー例を説明する図である。 巡回開始ノードよりツリーを巡回し、ノードの段数をカウントして巡回済みノードの最大段数を求める処理フロー例を示す図である。 本発明の第3の実施形態における検索処理の概念を説明する図である。 本発明の第3の実施形態における検索処理の処理フロー例を説明する図である。 検索キーによりブランチノード配列から分岐先配列を求める処理フロー例を説明する図である。 弁別ビット位置と検索キーにより、分岐先配列に分岐先情報を設定する処理フロー例を説明する図である。 分岐先配列をもとにリーフノード配列のノード参照番号を求める処理フロー例を説明する図である。 分岐先情報により次段のノードの配列番号を求める処理フロー例を説明する図である。 分岐先情報によりリーフノード配列のノード参照番号を求める処理フロー例を説明する図である。 本発明の第3の実施形態におけるビット列検索装置の機能ブロック構成例を説明する図である。 本発明の第3の実施形態におけるポインタレスツリーを生成する処理の前段の処理フロー例を説明する図である。 本発明の第3の実施形態におけるポインタレスツリーを生成する処理の後段の処理フロー例を説明する図である。 本発明の第3の実施形態におけるブランチノードを生成する処理の処理フロー例を説明する図である。 本発明の第3の実施形態におけるリーフノードを生成する処理の処理フロー例を説明する図である。 変換前のツリーの最大段数を求める処理の前段の処理フロー例を説明する図である。 変換前のツリーの最大段数を求める処理の後段の処理フロー例を説明する図である。
図3は、本発明を実施するためのハードウェア構成例を説明する図である。本発明の検索装置による検索処理は中央処理装置302及びキャッシュメモリ303を少なくとも備えたデータ処理装置301によりデータ格納装置308を用いて実施することができる。カップルドノードツリーが配置される配列309と検索中にたどるノードが格納された配列要素の配列番号を記憶する探索経路スタック310を有するデータ格納装置308は、主記憶装置305または外部記憶装置306で実現することができ、あるいは通信装置307を介して接続された遠方に配置された装置を用いることも可能である。
なお、リーフノードにインデックスキーではなくインデックスキーにアクセスするための情報を格納する場合には、データ格納装置には、インデックスキーを記憶する記憶領域が設けられる。
図3の例示では、主記憶装置305、外部記憶装置306及び通信装置307が一本のバス304によりデータ処理装置301に接続されているが、接続方法はこれに限るものではない。また、主記憶装置305をデータ処理装置301内のものとすることもできるし、探索経路スタック310を中央処理装置302内のハードウェアとして実現することも可能である。あるいは、配列309は外部記憶装置306に、探索経路スタック310を主記憶装置305に持つなど、使用可能なハードウェア環境、インデックスキー集合の大きさ等に応じて適宜ハードウェア構成を選択できることは明らかである。
また、特に図示されてはいないが、処理の途中で得られた各種の値を後の処理で用いるためにそれぞれの処理に応じた一時記憶装置が用いられることは当然である。
次に図4A~図7を参照して、本発明の第1の実施形態について説明する。
図4Aは、本発明の第1の実施形態における配列に配置されたカップルドノードツリーの構成例を説明する図である。図1Aに示す構成例と比べると、ブランチノードから代表ノード番号を格納する領域がなくなっている。また、配列番号は、1から15への連続した番号のものが記載されている。
図4Aを参照すると、ルートノード401が配列400の配列番号1の配列要素に配置されている。ルートノード401はノード種別402及び弁別ビット位置403で構成されている。ノード種別402は0であり、ルートノード401がブランチノードであることを示している。弁別ビット位置403には1が格納されている。
配列番号が1であるルートノード401からの点線の矢印410で示すリンク先ノード対411の代表ノードであるノード[0]412は、ツリー上で直近上位に位置する親ノードであるルートノード401の配列番号1の2倍の値を持つ配列番号2の配列要素に配置されている。そして隣接する次の配列要素(配列番号3)に代表ノードと対になるノード[1]413が配置されている。ノード[0]412のノード種別には1が格納されており、ノード[0]412がリーフノードであることを示している。インデックスキー418には、“0001”が格納されている。一方、ノード[1]413のノード種別には0が格納されており、ノード[1]413がブランチノードであることを示している。ブランチノード413の弁別ビット位置には3が格納されている。
配列番号が3であるブランチノード413からの点線の矢印420で示すリンク先ノード対421の代表ノードであるノード422は、親ノードであるノード413の配列番号3の2倍の値を持つ配列番号6の配列要素に配置されている。そして隣接する次の配列要素(配列番号7)に代表ノードと対になるノード423が配置されている。ノード422のノード種別には0が格納されており、ノード422がブランチノードであることを示している。ブランチノード422の弁別ビット位置には4が格納されている。また、ノード423のノード種別にも0が格納されており、ノード423がブランチノードであることを示している。ブランチノード422の弁別ビット位置には5が格納されている。
そして、配列番号4及び配列番号5の配列要素には、ノードは配置されていない。
上述の例示から明らかなとおり、リンク先のノード対の代表ノードの配列番号は、親ノードの配列番号の2倍となる。
そこで、配列番号が6であるブランチノード422からの点線の矢印430で示すリンク先ノード対431の代表ノードであるノード432は、配列番号12の配列要素に配置されている。そして隣接する次の配列要素(配列番号13)に代表ノードと対になるノード433が配置されている。ノード432及びノード433の内容の記載は省略されている。
同様に、配列番号が7であるブランチノード423からの点線の矢印440で示すリンク先ノード対441の代表ノードであるノード442は、配列番号14の配列要素に配置されている。そして隣接する次の配列要素(配列番号15)に代表ノードと対になるノード443が配置されている。ノード442及びノード443の内容の記載は省略されている。
また、配列番号8から配列番号11の配列要素には、ノードは配置されていない。
図4Bは、本発明の第1の実施形態におけるカップルドノードツリーのツリー構造を概念的に示す図である。図1Bに示すカップルドノードツリー200のツリー構造と比べると、図4Bに示すカップルドノードツリー200aのリーフノードについては同一であり、ブランチノードの弁別ビット位置の値も図1Bに示すものと同一なので、ツリー自体の分岐パターンも同一である。しかし、ブランチノードは、リンク先のノード対の代表ノードの配列番号である代表ノード番号を含まない。代表ノード番号はブランチノードの配列番号を2倍することにより得られるので、代表ノード番号によるリンク先への結合を、代表ノード番号の符号を付した点線の矢印により表している。また、各ノードを示す符号の近傍に、各ノードが配置される配列要素の配列番号を、ルートノード210aに対して[1]のように表示している。代表ノード番号と配列番号の表記以外は図1Bに記載したものと同じなので、これ以上の説明は省略する。
図5は、本発明の第1の実施形態におけるビット列検索装置の機能ブロック構成例を説明する図である。
図5に例示する本実施態様に係るビット列検索装置500は、検索ツリー記憶手段510、検索開始位置設定手段520、ノード読出手段530、ノード種別判定手段540、検索キー設定手段550、ノードリンク手段560及び検索結果出力手段570を備えている。
検索ツリー記憶手段510の記憶領域には配列が確保され、その配列にカップルドノードツリーが配置される。検索開始位置設定手段520には、検索開始ノードの配列番号が設定される。ルートノードを検索開始ノードとする場合は、配列番号として1が設定される。検索開始位置の設定は、検索処理の結果を利用するユーザにより設定することができる。
ノード読出手段530は、検索開始位置設定手段520に設定された配列番号の検索開始ノード、あるいはノードリンク手段560により設定された配列番号のリンク先のノードを読み出す。ノード種別識別手段540は、ノード読出手段530が読みだしたノードの種別を判定し、リーフノードであればそのリーフノードを検索結果出力手段570に渡し、ブランチノードであればそのブランチノードをノードリンク手段560に渡す。
検索キー設定手段550には、検索キーが設定される。検索キーの設定は、検索処理の結果を利用するユーザにより設定することができる。ノードリンク手段560は、ノード種別判定手段540から渡されたブランチノードの弁別ビット位置にある、検索キー設定手段550に設定された検索キーのビットの値とブランチノードの配置されている配列要素の配列番号を2倍した値を加算した値を、次に読み出すノードの配置された配列要素の配列番号として設定する。
検索結果出力手段570は、ノード種別判定手段540から渡されたリーフノードからインデックスキーあるいはインデックスキーにアクセスするための情報を取り出す。リーフノードから取り出すものがインデックスキーであるときは、そのインデックスキーを検索結果キーとして出力する。リーフノードから取り出すものがインデックスキーにアクセスするための情報であるときは、取り出したインデックスキーにアクセスするための情報に基づき、インデックスキーを読み出して検索結果キーとして出力する。
なお、検索結果キーと検索キーを比較し、一致すれば検索成功とし、一致しなければ検索失敗とする検索結果を出力することも可能である。
上記図5を参照して説明した機能ブロック構成はあくまで1つの例であり、種々の変形が可能であることは明らかである。
以下、本発明の第1の実施形態における検索処理について、図6を参照して説明する。図6は、本発明の第1の実施形態におけるビット列検索の処理フロー例を説明する図である。
まず、ステップS601で、リンク先配列番号に1を設定する。ここでいうリンク先配列番号は、先に述べた図示しない一時的記憶領域の1つの例である。リンク先配列番号には、検索開始ノードの配列番号と、リンク先のノード対の代表ノードの配列番号が設定される。図6に示す例では、検索開始ノードをルートノードとしたものである。検索開始ノードをルートノード以外のものとした場合でも、以下の処理フローは同様である。
次にステップS603で、配列からリンク先配列番号に設定された配列番号の配列要素を参照すべきノードとして読み出す。そして、ステップS604で、読み出したノードから、ノード種別を取り出し、ステップS605で、ノード種別がブランチノードであるか否かを判定する。
ステップS605の判定において、読み出したノードがブランチノードである場合はステップS606に進み、ノードから弁別ビット位置についての情報を取り出し、更に、ステップS607で、取り出した弁別ビット位置に対応するビット値を検索キーから取り出す。そして、ステップS608で、リンク先配列番号に設定された配列番号を2倍にしてリンク先配列番号に設定する。さらにステップS609で、ステップS607で検索キーから取り出したビット値をステップS608でリンク先配列番号に設定した配列番号に加算し、新たな配列番号としてリンク先配列番号に設定して、ステップS603に戻る。
以降、ステップS605の判定においてリーフノードと判定されてステップS610に進むまで、ステップS603からステップS609までの処理を繰り返す。ステップS610では、リーフノードからインデックスキーを取り出して、処理を終了する。
なお、上述の例では、リーフノードにインデックスキーが直接含まれているものとしたが、リーフノードにインデックスキーにアクセスするための情報が含まれている場合には、ステップS610においてリーフノードからインデックスキーにアクセスするための情報を取り出し、さらに追加ステップにおいて、取り出されたインデックスキーにアクセスするための情報を用いてインデックスキーを取り出す。
また、インデックスキーを取り出したのち、そのインデックスキーを検索結果キーとして他のアプリケーションで用いることもできるし、検索キーとの一致判定を行い、検索成功あるいは検索失敗とすることもできる。
次に、図7を参照して、本発明の第1の実施形態に係るカップルドノードツリーを用いた検索例を説明する。図7には、図4Bに例示したカップルドノードツリーのうち、説明に必要な部分のみ記載しており、ノード211bより下位の部分は省略されている。
図7に示す例では、検索キー設定エリア270には検索キーとしてビット列“011010”(以下、検索キー270と表記する。)が設定され、検索開始ノードはルートノード210aとされている。また、リンク先の配列番号が、リンク元のブランチノードの配列番号を2倍した代表ノード番号と検索キーの弁別ビット位置のビット値の和で求められることも記載されている。
以下、図7の記載に沿って、検索処理の流れを説明する。
検索開始ノードがルートノードであることから、検索の開始時には、リンク先配列番号には1が設定されるので、ノード210aが読み出される。そして、ノード210aのノード種別220aは0であり、ブランチノードであることを示しているので弁別ビット位置230aからその値0が取り出される。検索キー270のビット位置0の値は0であるので、リンク先配列番号は、配列番号1を2倍した代表ノード番号220aに0を加えた2となり、配列番号2の配列要素に配置されたノード210bが次に読み出される。
ノード210bのノード種別220bは0であり、ブランチノードであることを示しているので弁別ビット位置230bからその値1が取り出される。検索キー270のビット位置1の値は1であるので、リンク先配列番号は、配列番号2を2倍した代表ノード番号220bに1を加えた5となり、配列番号5の配列要素に配置されたノード211cが次に読み出される。
ノード211cのノード種別221cは0であり、ブランチノードであることを示しているので弁別ビット位置231cからその値2が取り出される。検索キー270のビット位置2の値は1であるので、リンク先配列番号は、配列番号5を2倍した代表ノード番号221cに1を加えた11となり、配列番号11の配列要素に配置されたノード211dが次に読み出される。
ノード211dのノード種別221dは1であり、リーフノードであることを示しているのでインデックスキー251dからインデックスキー“011010”が取り出され、検索処理が終了する。
次に図8A~図12を参照して、本発明の第2の実施形態について説明する。
図8Aは、本発明の第2の実施形態における配列に配置されたカップルドノードツリーの構成例を説明する図である。本実施形態は、リーフノード、ブランチノードからノード種別を削除し、リーフノードをツリーの最下段にのみに配置している。さらに、インデックスキー、検索キーは、本来のインデックスキー、検索キーに対して、ある特定のビット位置である最上位ビットに0を挿入したものとしている。リンク先の配列番号の求め方は、第1の実施形態と同様である。なお、最上位ビットとして付加するビット値は、0ではなく1とすることもできる。要するに、同一のビット値を最上位ビットとして付加すればよい。また、特定のビット値を挿入するある特定のビット位置も、最上位のビット位置に限ることなく、任意のビット位置とすることができる。同一のビット値を挿入したビット位置は、カップルドノードツリーの本来のブランチノードの弁別ビット位置に現れることはない。そこで、後に説明するダミーのブランチノードの弁別ビット位置として用い、ダミーのブランチノードを挿入することにより、リーフノードをツリーの最下段にのみに配置することを可能としている。
図8Aを参照すると、ルートノード801が配列800の配列番号1の配列要素に配置されている。ルートノード801は弁別ビット位置803で構成されている。弁別ビット位置803には2が格納されている。
配列番号が1であるルートノード801からの点線の矢印810で示すリンク先ノード対811の代表ノードであるノード[0]812は、ツリー上で直近上位に位置する親ノードであるルートノード801の配列番号1の2倍の値を持つ配列番号2の配列要素に配置されている。そして隣接する次の配列要素(配列番号3)に代表ノードと対になるノード[1]813が配置されている。
ノード[0]812の弁別ビット位置には0が格納されており、そのリンク先は、点線の矢印840で示すように、ノード[0]812の配列番号2の2倍の配列番号4の配列要素に格納されたノード842である。また、ノード842の弁別ビット位置には0が格納されており、そのリンク先は、点線の矢印850で示すように、ノード842の配列番号4の2倍の配列番号8の配列要素に格納されたノード852である。
ノード852は、図8Aに例示するカップルドノードツリーの最下段に位置するので、リーフノードであり、インデックスキー818には最上位ビットに0が挿入されたインデックスキー“00001”が格納されている。
図8Aに示す例では、インデックスキー“00001”は、ルートノード801の弁別ビット位置803のビット位置2におけるビット値0によりすでに他の配列要素に格納されたインデックスキーとは弁別されている。したがって、図4Aに示す第1の実施形態のように、ルートノードの直近下位の配列番号2の配列要素に格納されたノードが本来のリーフノードの位置であるが、本実施形態においてはリーフノードであることを識別するノード種別を用いないので、弁別ビット位置が最上位ビット位置の0であるダミーのブランチノード812、842を挿入して最下段に位置するようにしている。なお、図8Aに示す配列番号5の配列要素が空きとなっているように、2段目のダミーのブランチノード842と対をなすノードは実質的に存在しない空きノードとなる。
一方、ノード[1]813の弁別ビット位置には4が格納されている。配列番号が3であるブランチノード813からの点線の矢印820で示すリンク先ノード対821の代表ノードであるノード822は、親ノードであるノード813の配列番号3の2倍の値を持つ配列番号6の配列要素に配置されている。そして隣接する次の配列要素(配列番号7)に代表ノードと対になるノード823が配置されている。ノード822の弁別ビット位置には5が格納されている。また、ノード823の弁別ビット位置には6が格納されている。
配列番号が6であるブランチノード822からの点線の矢印830で示すリンク先ノード対831の代表ノードであるノード832は、配列番号12の配列要素に配置されている。そして隣接する次の配列要素(配列番号13)に代表ノードと対になるノード833が配置されている。ノード832及びノード833の内容の記載は省略されている。また、ブランチノード823のリンク先の記載も省略されている。
図8Bは、本発明の第2の実施形態におけるカップルドノードツリーのツリー構造を概念的に示す図である。図8Bに示すツリー構造においては、図4Bに示すツリー構造に格納されている各インデックスキーの最上位のビット位置に0が追加され、ビット長が6ビットから7ビットになっている。それに伴い、図4Bに示すブランチノードと同一の符号を付したブランチノードの弁別ビット位置は1つシフトされ、値が1つ大きくなっている。
また、図4Bに示すツリー構造における段数は5段であるので、図8Bに示すツリー構造においては、5段目にのみリーフノードが位置している。そして、図4Aに示すツリー構造において5段目より上位の階層に位置するリーフノードは、弁別ビット位置が0のダミーのブランチノードとなっている。そして、ダミーのブランチノードの直近下位のノードが5段目のノードとなるまで、ダミーのブランチノードが挿入されている。
直近下位のノード対の代表ノードが配置された配列要素の配列番号である代表ノード番号の算出方法は、第1の実施形態のものと同じである。
図4Bに示す例示では、最上位ビットとして0を付加しているため、例えば本来的なインデックスキー“000111”はリーフノード210jに格納されているが、最上位ビットとして1を付加した場合はリーフノード211jに格納することは明らかである。
図9は、本発明の第2の実施形態におけるビット列検索装置の機能ブロック構成例を説明する図である。
図9に例示する本実施態様に係るビット列検索装置900は、検索ツリー記憶手段910、検索開始位置設定手段920、ノード読出手段9301~930n、検索キー設定手段950、ノードリンク手段9601~960n-1及び検索結果出力手段970を備えている。ただし、nはカップルドノードツリーの段数である。
先に説明した第1の実施形態と同様に、検索ツリー記憶手段910の記憶領域には配列が確保され、その配列に本発明の第2の実施形態に係るカップルドノードツリーが配置される。また、検索開始位置設定手段920には、検索開始ノードの配列番号として、ルートノードの配列番号である1が設定される。
ノード読出手段9301は、検索開始位置設定手段に設定された配列番号1のルートノードを読み出す。
検索キー設定手段950には、検索キーが設定される。検索キーの設定は、検索処理の結果を利用するユーザにより設定することができる。ノードリンク手段9601は、ノード読出手段9601が読み出したブランチノードの弁別ビット位置にある、検索キー設定手段950に設定された検索キーのビットの値とルートノードの配列番号1を2倍した値とを加算した値を、次に読み出すノードの配置された配列要素の配列番号として設定する。
以下同様に、ノードリンク手段9602~960n-1は、ノード読出手段9302~930n-1が読み出したブランチノードの弁別ビット位置にある、検索キー設定手段950に設定された検索キーのビットの値と、前段のノードリンク手段9601~960n-2により設定された配列番号を2倍した値とを加算した値を、それぞれ次に読み出すノードの配置された配列要素の配列番号として設定する。
ノード読出手段9302~930n-1は、前段のノードリンク手段9601~960n-2が設定した配列番号のブランチノードを読み出し、ノード読出手段930nは、ノードリンク手段960n-1が設定した配列番号のリーフノードを読み出して、検索結果出力手段970に渡す。
検索結果出力手段970は、ノード読出手段930nから渡されたリーフノードから、第1の実施形態の場合と同様に、インデックスキーあるいはインデックスキーにアクセスするための情報を取り出す。リーフノードから取り出すものがインデックスキーであるときは、そのインデックスキーを検索結果キーとして出力する。リーフノードから取り出すものがインデックスキーにアクセスするための情報であるときは、取り出したインデックスキーにアクセスするための情報に基づき、インデックスキーを読み出して検索結果キーとして出力する。
また、検索結果キーと検索キーを比較し、一致すれば検索成功とし、一致しなければ検索失敗とする検索結果を出力することが可能であることも、第1の実施形態の場合と同様である。
次に、本発明の第2の実施形態における検索処理について、図10及び図11を参照して説明する。
図10は、本発明の第2の実施形態におけるビット列検索の処理フロー例を説明する図である。図10に示す例では、カップルドノードツリーの段数はnとする。
まず、ステップS1001で、リンク先配列番号に1を設定する。
次にステップS1002において、リンク先配列番号(ルートノードの配列番号)の指す配列に格納された弁別ビット位置と検索キーにより、2段目のノードの配列番号を求める。
続いてステップS1003において、2段目のノードの配列番号の指す配列に格納された弁別ビット位置と検索キーにより、3段目のノードの配列番号を求める。
以下同様に、ステップS1004~ステップS100nにおいて、3段目~n-1段目のノードの配列番号の指す配列に格納された弁別ビット位置と検索キーにより、それぞれ4段目~n段目のノードの配列番号を求める。ステップS1002~ステップS100nの処理の詳細は、後に図11を参照して説明する。
最後に、n段目のノードの配列番号の指す配列に格納されたビット列をインデックスキーとして取り出し、処理を終了する。
なお、図10に例示する処理フロー例は、特定の段数nを有する本実施形態のカップルドノードツリーを用いたものであるが、段数nをパラメータとしたアセンブラマクロにより、本実施形態の任意の段数のカップルドノードツリーを用いた検索処理を実現するための処理フローを生成することが可能である。
図11は、本発明の第2の実施形態におけるリンク先の配列番号を求める処理フロー例を説明する図であり、図10に示すステップS1002~ステップS100nの処理の詳細を示すものである。
まず、ステップS1101において、配列から、リンク先配列番号の指す配列要素に格納された内容を弁別ビット位置として読み出し、ステップS1102において、検索キーから、該読み出した弁別ビット位置の指すビット値を取り出す。
次にステップS1103において、リンク先配列番号に設定された配列番号を2倍にしてリンク先配列番号に設定する。さらにステップS1104で、ステップS1103でリンク先配列番号に設定された配列番号に、ステップS1102で取り出したビット値を加算してリンク先配列番号に設定して処理を終了する。
次に、図12を参照して、本発明の第2の実施形態に係るカップルドノードツリーを用いた検索例を説明する。図12には、図8Bに例示したカップルドノードツリーのうち、説明に必要な部分のみ記載しており、ノード211bより下位の部分は省略されている。
図12に示す例では、検索キー設定エリア280には検索キーとしてビット列“0011010”(以下、検索キー280と表記する。)が設定されている。検索キー280は、図4Bに示す本発明の第1の実施形態に係るカップルドノードツリーを用いた検索例における検索キー270に最上位ビットとして0を付加したものである。検索開始ノードはルートノード210aである。図4Bに示す検索例と同様に、リンク先の配列番号が、リンク元のブランチノードの配列番号を2倍した代表ノード番号と検索キーの弁別ビット位置のビット値の和で求められることも記載されている。
以下、図12の記載に沿って、検索処理の流れを説明する。
検索開始ノードがルートノードであることから、検索の開始時には、リンク先配列番号には1が設定されるので、ノード210aが読み出される。そして、ノード210aの弁別ビット位置230aからその値1が取り出される。検索キー280のビット位置1の値は0であるので、リンク先配列番号は、配列番号1を2倍した代表ノード番号220aに0を加えた2となり、配列番号2の配列要素に配置されたノード210bが次に読み出される。
そして、ノード210bの弁別ビット位置230bからその値2が取り出される。検索キー280のビット位置2の値は1であるので、リンク先配列番号は、配列番号2を2倍した代表ノード番号220bに1を加えた5となり、配列番号5の配列要素に配置されたノード211cが次に読み出される。
そして、ノード211cの弁別ビット位置231cからその値3が取り出される。検索キー280のビット位置3の値は1であるので、リンク先配列番号は、配列番号5を2倍した代表ノード番号221cに1を加えた11となり、配列番号11の配列要素に配置されたノード211dが次に読み出される。
そして、ノード211dの弁別ビット位置231dからその値0が取り出される。検索キー280のビット位置0の値は0であるので、リンク先配列番号は、配列番号11を2倍した代表ノード番号221iに0を加えた22となり、配列番号22の配列要素に配置されたノード210lが次に読み出される。
ノード210lはカップルドノードツリーの最下位段に位置するので、インデックスキー250lから検索結果のインデックスキー“0011010”が取り出され、検索処理が終了する。
次に、上述の第1の実施形態及び第2の実施形態の変形例について説明する。これらの変形例は、ツリーを格納する配列を記憶装置の領域に柔軟に配置可能とする、あるいは記憶装置の任意の領域に存在する配列にツリーを配置可能とするためのものである。
図13は、本発明の第1の実施形態の変形例における配列に格納されたカップルドノードツリーの構成例を説明する図である。図4Aに示す構成例と比較すると、ベース番号600とオフセット番号610が追加されている。また、図4Aの配列番号1~15に替えて、ノード参照番号620の値1~15が記載されている。図13においては、配列番号630については、その番号の値として、100、111、122、123、134~137、148~155が記載されている。
また、図13には、ベース番号600の値として100が、オフセット番号610の値として10、20、30、40が例示されている。
その他の符号については、図4Aに示された対応する符号にaを付加したものが使用されている。
ベース番号は、後述の1段目のオフセット番号と組み合わせてツリーのルートノードの位置を定める番号である。ベース番号を用いることにより、ルートノードの配列番号が、図4A及び図4Bの例示のように1に制約される必要をなくすことができる。
オフセット番号は、ツリーの各段のノードの格納される開始位置を定める番号である。オフセット番号を用いることにより、ツリーのノードを、そのノードが位置するツリー上の段数毎に配置することができる。オフセット番号は、段数毎にオフセット番号表に設定しておく。
ノード参照番号は、ノードの順番を定める番号であり、図4に例示する配列番号に相当する。
配列番号は、ベース番号、オフセット番号及びノード参照番号の和により求めることができる。
本変形例において、ベース番号を0、各段のオフセット番号を0とすると、ノード参照番号は図4A及び図4Bに例示する配列番号と一致し、本変形例のカップルドノードツリーは、図4A及び図4Bに例示する第1の実施形態のカップルドノードツリーと一致する。
図13を参照すると、ベース番号600が100(以下、ベース番号100という。)、オフセット番号610(1段目)が10(以下、オフセット番号10、のようにいう。)であって、ノード参照番号620は1(以下、ノード参照番号1、のようにいう。)であるから、ルートノード401aは配列400aの配列番号630が111(以下、配列番号111、のようにいう。)の配列要素に配置されている。ルートノード401aはノード種別402a及び弁別ビット位置403aで構成されている。ノード種別402aは0であり、ルートノード401aがブランチノードであることを示している。弁別ビット位置403aには1が格納されている。
ノード参照番号1のルートノード401aからの点線の矢印410aで示すリンク先ノード対411aの代表ノードであるノード[0]412aは、ツリー上で直近上位に位置する親ノードであるルートノード401aのノード参照番号1の2倍の値を持つノード参照番号2に、ベース番号100とオフセット番号20の和を加えた配列番号122の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号3、配列番号123)に代表ノードと対になるノード[1]413aが配置されている。ノード[0]412aのノード種別には1が格納されており、ノード[0]412aがリーフノードであることを示している。インデックスキー418aには、“0001”が格納されている。一方、ノード[1]413aのノード種別には0が格納されており、ノード[1]413aがブランチノードであることを示している。ブランチノード413aの弁別ビット位置には3が格納されている。
ノード参照番号が3であるブランチノード413aからの点線の矢印420aで示すリンク先ノード対421aの代表ノードであるノード422aは、親ノードであるノード413aのノード参照番号3の2倍の値を持つノード参照番号6に、ベース番号100とオフセット番号30の和を加えた配列番号136の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号7、配列番号137)に代表ノードと対になるノード423aが配置されている。ノード422aのノード種別には0が格納されており、ノード422aがブランチノードであることを示している。ブランチノード422aの弁別ビット位置には4が格納されている。また、ノード423aのノード種別にも0が格納されており、ノード423aがブランチノードであることを示している。ブランチノード422aの弁別ビット位置には5が格納されている。
そして、配列番号134及び配列番号135の配列要素には、ノードは配置されていない。
上述の例示から明らかなとおり、リンク先のノード対の代表ノードのノード参照番号は、親ノードのノード参照番号の2倍となる。
そこで、ノード参照番号が6であるブランチノード422aからの点線の矢印430aで示すリンク先ノード対431aの代表ノードであるノード432aは、ノード参照番号12に、ベース番号100とオフセット番号40の和を加えた配列番号152の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号13、配列番号153)に代表ノードと対になるノード433aが配置されている。ノード432a及びノード433aの内容の記載は省略されている。
同様に、ノード参照番号が7であるブランチノード423aからの点線の矢印440aで示すリンク先ノード対441aの代表ノードであるノード442aは、ノード参照番号14に、ベース番号100とオフセット番号40の和を加えた配列番号154の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号15、配列番号155)に代表ノードと対になるノード443aが配置されている。ノード442a及びノード443aの内容の記載は省略されている。
また、配列番号148から配列番号151の配列要素には、ノードは配置されていない。
本変形例においても、カップルドノードツリーのツリー構造自体は、図4Bに示すものと同じである。違う点は、図4A及び図4Bに示すものにおいては、ノードのツリー上の位置が配列に結びついた配列番号で規定されるのに対して、本変形例においては、配列とは独立のノード参照番号で規定される点である。
そして、ノード参照番号とベース番号及びオフセット番号を組み合わせることにより、ノードにアクセスすることが可能である。
したがって、オフセット番号を適宜選択することにより、例えばツリーのうち上位n段を主記憶装置に配置し、n段目より下位のノードを外部記憶装置に配置するようなことが可能である。
次に、本発明の第1の実施形態の変形例における検索処理について、図14を参照して説明する。図14は、本発明の第1の実施形態の変形例におけるビット列検索の処理フロー例を説明する図である。図6に示す処理フロー例と比較すると、ノード参照番号、ベース番号及びオフセット番号の取り扱いが加わったことと、これらの番号により配列番号を求めることが異なる。
まず、ステップS1401aで、ベース番号を設定し、ステップS1401bで、オフセット番号表を設定する。さらに、ステップS1401cで、段数カウンタに値1を設定し、ステップS1401dで、ノード参照番号に値1を設定する。図14に示す例では、検索開始ノードをルートノードとするものであるが、段数カウンタとノード参照番号に1以外の番号が指定され、検索開始ノードをルートノード以外のものとした場合でも、以下の処理フローは同様である。
次にステップS1402aで、オフセット番号表より、段数カウンタの指すオフセット番号を取り出し、ステップS1402bで、リンク先配列番号に、ノード参照番号にベース番号とオフセット番号を加えた値を設定する。
次にステップS1403で、配列からリンク先配列番号に設定された配列番号の配列要素を参照すべきノードとして読み出す。そして、ステップS1404で、読み出したノードから、ノード種別を取り出し、ステップS1405で、ノード種別がブランチノードであるか否かを判定する。
ステップS1405の判定において、読み出したノードがブランチノードである場合はステップS1406に進み、ノードから弁別ビット位置についての情報を取り出し、更に、ステップS1407で、取り出した弁別ビット位置に対応するビット値を検索キーから取り出す。そして、ステップS1408で、ノード参照番号に、ノード参照番号を2倍した値にステップS1407で得た値を設定する。さらにステップS1409で、段数カウンタに1を加えて、ステップS1403に戻る。
以降、ステップS1405の判定においてリーフノードと判定されてステップS1410に進むまで、ステップS1402aからステップS1409までの処理を繰り返す。
ステップS1410では、リーフノードからインデックスキーを取り出して、処理を終了する。
なお、上述の例では、リーフノードにインデックスキーが直接含まれているものとしたが、リーフノードにインデックスキーにアクセスするための情報が含まれている場合には、ステップS1410においてリーフノードからインデックスキーにアクセスするための情報を取り出し、さらに追加ステップにおいて、取り出されたインデックスキーにアクセスするための情報を用いてインデックスキーを取り出す。
また、インデックスキーを取り出したのち、そのインデックスキーを検索結果キーとして他のアプリケーションで用いることもできるし、検索キーとの一致判定を行い、検索成功あるいは検索失敗とすることもできる。
次に、本発明の第2の実施形態の変形例について説明する。ベース番号、オフセット番号及びノード参照番号の技術的意義、及び配列番号との関係は、第1の実施態様の変形例と同じである。
図15は、本発明の第2の実施形態の変形例における配列に格納されたカップルドノードツリーの構成例を説明する図である。図8Aに示す構成例と比較すると、ベース番号700とオフセット番号710が追加されている。また、図8Aの配列番号1~15に替えて、ノード参照番号720の値1~15が記載されている。図15においては、配列番号730については、その番号の値として、100、111、122、123、134~137、148~155が記載されている。
また、図15には、ベース番号700の値として100が、オフセット番号710の値として10、20、30、40が例示されている。
その他の符号については、図8Aに示された対応する符号にaを付加したものが使用されている。
本変形例において、第1の実施形態の変形例と同様に、ベース番号を0、各段のオフセット番号を0とすると、ノード参照番号は図8A及び図8Bに例示する配列番号と一致し、本変形例のカップルドノードツリーは、図8A及び図8Bに例示する第2の実施形態のカップルドノードツリーと一致する。
図15を参照すると、ベース番号が100、オフセット番号が10であって、ノード参照番号は1であるから、ルートノード801aは配列800aの配列番号111の配列要素に配置されている。ルートノード801aは弁別ビット位置803aで構成されている。弁別ビット位置803aには2が格納されている。
ノード参照番号が1であるルートノード801aからの点線の矢印810aで示すリンク先ノード対811aの代表ノードであるノード[0]812aは、ツリー上で直近上位に位置する親ノードであるルートノード801aのノード参照番号1の2倍の値を持つノード参照番号2に、ベース番号100とオフセット番号20の和を加えた配列番号122の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号3、配列番号123)に代表ノードと対になるノード[1]813aが配置されている。
ノード[0]812aの弁別ビット位置には0が格納されており、そのリンク先は、点線の矢印840aで示すように、ノード[0]812aのノード参照番号2の2倍の値を持つノード参照番号4に、ベース番号100とオフセット番号30の和を加えた配列番号134の配列要素に格納されたノード842aである。また、ノード842の弁別ビット位置には0が格納されており、そのリンク先は、点線の矢印850aで示すように、ノード842aのノード参照番号4の2倍の値を持つノード参照番号8に、ベース番号100とオフセット番号40の和を加えた配列番号148の配列要素に格納されたノード852aである。
ノード852aは、図15に例示するカップルドノードツリーの最下段に位置するので、リーフノードであり、インデックスキー818aには最上位ビットに0が挿入されたインデックスキー“00001”が格納されている。
一方、ノード[1]813aの弁別ビット位置には4が格納されている。ノード参照番号が3であるブランチノード813aからの点線の矢印820aで示すリンク先ノード対821aの代表ノードであるノード822aは、親ノードであるノード813aのノード参照番号3の2倍の値を持つノード参照番号6に、ベース番号100とオフセット番号30の和を加えた配列番号136の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号7、配列番号137)に代表ノードと対になるノード823aが配置されている。ノード822aの弁別ビット位置には5が格納されている。また、ノード823aの弁別ビット位置には6が格納されている。
ノード参照番号が6であるブランチノード822aからの点線の矢印830aで示すリンク先ノード対831aの代表ノードであるノード832aは、ノード参照番号6の2倍の値を持つノード参照番号12に、ベース番号100とオフセット番号40の和を加えた配列番号152の配列要素に配置されている。そして隣接する次の配列要素(ノード参照番号13、配列番号153)に代表ノードと対になるノード833aが配置されている。ノード832及びノード833の内容の記載は省略されている。また、ブランチノード823aのリンク先の記載も省略されている。
本変形例においても、カップルドノードツリーのツリー構造自体は、図8Bに示すものと同じである。違う点は、図8A及び図8Bに示すものにおいては、ノードのツリー上の位置が配列に結びついた配列番号で規定されるのに対して、第1の実施形態の変形例と同様に、本変形例においても、配列とは独立のノード参照番号で規定される点である。
そして、ノード参照番号とベース番号及びオフセット番号を組み合わせることにより、ノードにアクセスすることが可能である。
したがって、オフセット番号を適宜選択することにより、例えばツリーのうち上位n段を主記憶装置に配置し、n段目より下位のノードを外部記憶装置に配置するようなことが可能である。
次に、本発明の第2の実施形態の変形例における検索処理について、図16を参照して説明する。図16は、本発明の第2の実施形態の変形例におけるビット列検索の処理フロー例を説明する図である。図10に示す処理フロー例と比較すると、ノード参照番号、ベース番号及びオフセット番号の取り扱いが加わったことと、これらの番号により配列番号を求めることが異なる。
まず、ステップS1601aで、ベース番号を設定し、ステップS1601bで、オフセット番号表を設定する。さらに、ステップS1601cで、ノード参照番号に値1を設定する。さらにステップS1601dにおいて、リンク先配列番号に、ノード参照番号にベース番号とオフセット番号を加えた値を設定する。ステップS1601dの処理により、リンク先配列番号には、ルートノードの配列番号が設定される。
次にステップS1602において、ルートノードの配列番号(リンク先配列番号)の指す配列に格納された弁別ビット位置と検索キーにより、2段目のノードの配列番号を求める。
続いてステップS1603において、2段目のノードの配列番号の指す配列に格納された弁別ビット位置と検索キーにより、3段目のノードの配列番号を求める。
以下同様に、ステップS1604~ステップS160nにおいて、3段目~n-1段目のノードの配列番号の指す配列に格納された弁別ビット位置と検索キーにより、それぞれ4段目~n段目のノードの配列番号を求める。ステップS1602~ステップS160nの処理の詳細は、後に図17を参照して説明する。
最後に、n段目のノードの配列番号の指す配列に格納されたビット列をインデックスキーとして取り出し、処理を終了する。
なお、図10に例示する処理フロー例と同様に、図16に例示する処理フロー例は、特定の段数nを有する本実施形態のカップルドノードツリーを用いたものであるが、段数nをパラメータとしたアセンブラマクロにより、本実施形態の任意の段数のカップルドノードツリーを用いた検索処理を実現するための処理フローを生成することが可能である。
図17は、本発明の第2の実施形態の変形例におけるリンク先の配列番号を求める処理フロー例を説明する図であり、図16に示すステップS1602~ステップS160nの処理の詳細を示すものである。
まず、ステップS1701において、配列から、リンク先配列番号の指す配列要素に格納された内容を弁別ビット位置として読み出し、ステップS1702において、検索キーから、該読み出した弁別ビット位置の指すビット値を取り出す。
次にステップS1703aにおいて、オフセット番号表より、次段のオフセット番号を取り出し、ステップS1703bにおいて、ノード参照番号に、ノード参照番号を2倍した値にステップS1702で得た値を加えた値を設定する。さらにステップS1704で、リンク先配列番号に、ノード参照番号にベース番号とオフセット番号を加えた値を設定して処理を終了する。
次に、本発明の第1の実施形態及び第2の実施形態のカップルドノードツリーの生成について説明する。なお、以下の説明において、本発明の第1の実施形態及び第2の実施形態のツリーをポインタレスツリーといい、従来のカップルドノードツリーを単にツリー、あるいは変換前のツリーということがある。
本発明のポインタレスツリーの生成は、例えば次のようにして実現することができる。すなわち、ポインタレスツリーを生成する際には、ポインタレスツリーに格納されるインデックスキーにより、図1A及び図1Bに例示する形態のツリーが生成されているものとする。そして、ポインタレスツリーの生成は、ツリーのノードをルートノードから順次巡回し、本発明の第1の実施形態あるいは第2の実施形態のノードに変換することにより、実現される。このノードの巡回は、以下において詳細に説明するが、前記特許文献4として引用した特開2008-269197号公報の図10A~図12及びそれに関連した明細書の記載に開示されたノードの退避処理で用いられるものと類似するものである。
ツリーの生成は、前記特許文献1として引用した特開2008-15872号公報の図5~図8及びそれに関連した明細書の記載に開示され、詳細に説明されているので、ここでの説明は省略する。
図18Aは、本発明の第1及び第2の実施形態におけるポインタレスツリーを生成する処理の前段の処理フロー例を示す図である。図18Aに示すように、まずステップS1801において、ポインタレスツリーを生成するための配列を取得し、ステップS1802おいて、配列要素を初期化する。このステップS1802の処理は、ダミーのブランチノードを用いる第2の実施形態における処理例において必要となるものであり、第1の実施形態では省略可能である。
次にステップS1802aにおいて変換前のツリーの最大段数を求め、ステップS1802bにおいて該最大段数を段数カウンタの上限値に設定する。段数カウンタの上限値は、第2の実施形態においてリーフノードをポインタレスツリーの最下段に配置するために用いられるものである。したがって、ステップS1802の処理と同様に、第1の実施形態では省略可能である。
ステップS1802aの処理の詳細については、後に図21及び図22を参照して説明する。
次にステップS1803において、ベース番号を設定し、ステップS1804において、オフセット番号表を設定する。
さらに、ステップS1805において、段数カウンタに1を設定し、ステップS1806において、ノード参照番号に1を設定し、ステップS1807において、巡回開始ノードの配列番号に、ツリーのルートノードの配列番号を設定して図18Bに示すステップS1812に進む。
なお、上述の図18A及び以下の図面に例示するフローは、図13あるいは図15に示す変形例に対応するものである。しかし、変形例においてベース番号を0、各段におけるオフセット番号を0、ノード参照番号を配列番号とすれば、図4Aあるいは図8Aに示す形態のツリーの生成処理を示すものである。したがって、図18A及び以下の図面に例示するフローは、変形例を含む第1の実施形態及び第2の実施形態のポインタレスツリーの生成処理を説明するものである。
図18Bは、本発明の第1及び第2の実施形態におけるポインタレスツリーを生成する処理の後段の処理フロー例を示す図である。図18Bに示すように、ステップS1812において、巡回開始ノードよりツリーを巡回し、巡回先のノードを変換してポインタレスツリーに格納する。ステップS1812の処理の詳細は、後に図19を参照して説明する。
次にステップS1813において、探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指しているか判定する。配列番号の探索経路スタックへの格納は、ステップS1812の処理で行われる。
探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指していれば、ツリーの全てのノードの処理は完了しているので処理を終了する。そうでなければ、ステップS1814に進む。
ステップS1814では、探索経路スタックから配列番号を取り出し、探索経路スタックのスタックポインタを1つ減らす。次にステップS1815において、ステップS1814で取り出した配列番号からノード位置を求め、そのノード位置がノード[0]であるかを、ステップS1816において判定する。ノード位置がノード[0]でなければ、ステップS1817で段数カウンタから値1を減じてステップS1813に戻る。ノード位置がノード[0]であれば、ステップS1818に進む。
ステップS1818では、ステップS1814で取り出した配列番号に値1を加えて、ノード[1]の配列番号を得る。そして、ステップS1819で巡回開始ノードの配列番号に、ステップS1818で得たノード[1]の配列番号を設定し、ステップS1820で、ノード参照番号に1を加えてステップS1812に戻る。
上述のステップS1812~ステップS1820のループ処理を、ステップS1813において探索経路スタックのスタックポインタがツリーのルートノードの配列番号を指していると判定されるまで繰り返すことにより、ツリー上のすべてのノードの巡回が行われ、各ノードがポインタレスツリーのノードに変換されてポインタレスツリーが生成される。
図19は、巡回開始ノードよりツリーを巡回し、ノードをポインタレスツリーに格納する処理フロー例を説明する図であり、図18BのステップS1812の処理の詳細を説明する図である。
図に示すように、まずステップS1901において、巡回開始ノードの配列番号を配列番号に設定する。巡回開始ノードの配列番号は、図18Bに示すステップS1812~ステップS1820のループ処理の初回の処理においては、図18AのステップS1807で設定されており、それ以降の処理においては、図18Bに示すステップS1819で設定される。
次にステップS1902において、探索経路スタックに配列番号を格納する。この配列番号は、ステップS1901あるいは後記ステップS1910で設定されているものである。
次にステップS1903において、変換前のツリーが格納された配列から、配列番号の指す配列要素をノードとして読み出し、ステップS1904において、ノード参照番号をもとに、図18AのステップS1801で取得した配列の配列要素にノードを書き込むことでポインタレスツリーのノードを生成する。ステップS1904の処理の詳細は、後に図20A及び図20Bを参照して説明する。図20Aは第1の実施形態のためのもの、図20Bは第2の実施形態のためのものである。
次にステップS1905において、ステップS1903で読み出したノードからノード種別を取り出し、ステップS1906で、該取り出したノード種別はブランチノードを示すものか判定する。ステップS1906の判定が、ノード種別はブランチノードを示すものではなくリーフノードを示すものであれば処理を終了し、ブランチノードを示すものであれば、ステップS1907に進む。
ステップS1907では、段数カウンタに値1を加え、ステップS1908に進み、ノード参照番号を2倍にする。さらにステップS1909において、ステップS1903で読み出したノードから、代表ノード番号を取り出し、ステップS1910で、該取り出した代表ノード番号に値0を加えた値を配列番号に設定し、ステップS1902に戻る。
上述のステップS1902~ステップS1910のループ処理を、ステップS1906においてノード種別がリーフノードを示すまで繰り返す。つまり、ひとまとまりの処理として、巡回開始ノードから最初のリーフノードまでノードを巡回してノードを読み出し、それを変換してポインタレスツリーのノードを書き込む。図19に示す処理フロー例では、ステップS1910において、代表ノード番号に値0を加えて配列番号に設定していることから、ノード[0]側を優先してノードを巡回しているが、ノード[1]側を優先してノードを巡回することも可能であることは、以上の説明から当業者に明らかである。
図20Aは、本発明の第1の実施形態におけるノードを生成する処理の処理フロー例を説明する図であり、図19に示すステップS1904の第1の実施形態における処理の詳細を説明する図である。
図に示すように、まずステップS2001において、オフセット番号表より、段数カウンタの指すオフセット番号を取り出し、ステップS2002において、配列番号に、ノード参照番号にベース番号とオフセット番号を加えた値を設定する。ここでの配列番号は、ポインタレスツリーを格納する配列の配列要素の配列番号を設定する一時記憶領域であり、図19AのステップS1901やステップS1910で設定される変換前のツリーを格納する配列の配列要素の配列番号を設定する一時記憶領域とは異なる。
次にステップS2003において、図19のステップS1903で読み出しているノードから、ノード種別を取り出し、ステップS2004において、該取り出したノード種別はブランチノードのものか判定する。判定結果が肯定的なものであれば、ステップS2005に進み、否定的なものであれば、ステップS2007に進む。
ステップS2005では、ノードから弁別ビット位置を取り出し、ステップS2006において、ステップS2002で設定した配列番号の指す配列要素にノード種別と弁別ビット位置を書き込み、ブランチノードを生成して処理を終了する。
ステップS2007では、ノードからインデックスキーを取り出し、ステップS2008において、ステップS2002で設定した配列番号の指す配列要素にノード種別とインデックスキーを書き込み、ブランチノードを生成して処理を終了する。
図20Bは、本発明の第2の実施形態におけるノードを生成する処理の処理フロー例を説明する図であり、図19に示すステップS1904の第2の実施形態における処理の詳細を説明する図である。
図に示すように、まずステップS2021において、オフセット番号表より、段数カウンタの指すオフセット番号を取り出し、ステップS2023において、図19のステップS1903で読み出しているノードから、ノード種別を取り出し、ステップS2024に進む。
ステップS2024では、ステップS2023で取り出したノード種別はブランチノードのものか判定する。判定結果が肯定的なものであれば、ステップS2025に進み、否定的なものであれば、ステップS2029に進む。
ステップS2025では、配列番号に、ノード参照番号にベース番号とオフセット番号を加えた値を設定する。そしてステップS2026で、ノードから弁別ビット位置を取り出し、ステップS2027で、該弁別ビット位置に値1を加え、ステップS2028において、ステップS2025で設定した配列番号の指す配列要素に弁別ビット位置を書き込み、ブランチノードを生成して処理を終了する。
一方、ステップS2024の判定が否定的なものであって、ステップS2023で取り出したノード種別がリーフノードのものであるときは、ステップS2029に進み、ノード参照番号と段数カウンタを退避し、ステップS2030に進む。
ステップS2030では、段数カウンタは上限値か判定し、上限値でなければ、ステップS2031でノード参照番号を2倍し、ステップS2032で段数カウンタに値1を加え、ステップS2033で、オフセット番号表より、段数カウンタの指すオフセット番号を取り出してステップS2030に戻る。
上述のステップS2030~S2033のループ処理は、第2の実施形態におけるリーフノードをポインタレスツリーの最下段のレベルに配置するためのものである。図1B、図8Bの例示では、例えば図1Bの変換前のツリーでは3段目にあるリーフノード210cは、図8Bでは5段目のノード210jに変換されている。そして、図8Bにおけるノード210cの位置情報は、図20BのステップS2029の処理により、退避される。
なお、段数カウンタの上限値については、図18Aに示すステップS1802bで設定されているが、それに替えて、変換前のツリーを生成するときに、リーフノードを挿入するごとにそのリーフノードの段数をカウントし、その最大値をツリーの属性として記憶しておき、第2の実施形態のポインタレスツリーを生成するときに、その最大値を段数カウンタの上限値とすることができる。
上述のステップS2030で、段数カウンタは上限値であると判定されると、ステップS2034に進み、配列番号に、ノード参照番号にベース番号とオフセット番号を加えた値を設定する。そしてステップS2035で、ノードからインデックスキーを取り出し、ステップS2036で、該インデックスキーの最上位のビット位置にビット値“0”を挿入し、ステップS2037において、ステップS2034で設定した配列番号の指す配列要素にインデックスキーを書き込み、リーフノードを生成してステップS2038に進む。
ステップS2038では、ノード参照番号と段数カウンタに、ステップS2029で退避したノード参照番号と段数カウンタをそれぞれ設定して処理を終了する。
次に、変換前のツリーの最大段数を求める処理について説明する。
図21は、変換前のツリーの最大段数を求める処理フロー例を説明する図であり、図18AのステップS1802aの処理の詳細を説明するものである。
図21に示すように、まずステップS2101において、段数カウンタに値1を設定し、ステップS2102において、最大段数カウンタに、段数カウンタに設定された値を設定する。すなわち、段数カウンタ及び最大段数カウンタには、初期値として値1が設定される。
次にステップS2112において、巡回開始ノードよりツリーを巡回し、巡回先のノードの段数をカウントして巡回済みノードの最大段数を求める。ステップS2112の処理の詳細は、後に図22を参照して説明する。
次にステップS2113において、探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指しているか判定する。配列番号の探索経路スタックへの格納は、ステップS2112の処理で行われる。
探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指していれば、ツリーの全てのノードの巡回は完了しているので処理を終了する。そうでなければ、ステップS2114に進む。
ステップS2114では、探索経路スタックから配列番号を取り出し、探索経路スタックのスタックポインタを1つ減らす。次にステップS2115において、ステップS2114で取り出した配列番号からノード位置を求め、そのノード位置がノード[0]であるかを、ステップS2116において判定する。ノード位置がノード[0]でなければ、ステップS2117で段数カウンタから値1を減じてステップS2113に戻る。ノード位置がノード[0]であれば、ステップS2118に進む。
ステップS2118では、ステップS2114で取り出した配列番号に値1を加えて、ノード[1]の配列番号を得る。そして、ステップS2119で巡回開始ノードの配列番号に、ステップS2118で得たノード[1]の配列番号を設定してステップS2112に戻る。
上述のステップS2112~ステップS2119のループ処理を、ステップS2113において探索経路スタックのスタックポインタがツリーのルートノードの配列番号を指していると判定されるまで繰り返すことにより、ツリー上のすべてのノードの巡回が行われ、巡回済みノードの最大段数、すなわち、変換前ツリーの最大段数が求められる。
図22は、巡回開始ノードよりツリーを巡回し、ノードの段数をカウントして巡回済みノードの最大段数を求める処理フロー例を示す図であり、図21のステップS2112の処理の詳細を説明する図である。
図に示すように、まずステップS2201において、巡回開始ノードの配列番号を配列番号に設定する。巡回開始ノードの配列番号は、図21に示すステップS2112~ステップS2119のループ処理の初回の処理においては、図21のステップS2107で設定されており、それ以降の処理においては、図21に示すステップS2119で設定される。
次にステップS2202において、探索経路スタックに配列番号を格納する。この配列番号は、ステップS2201あるいは後記ステップS2210で設定されているものである。
次にステップS2203において、変換前のツリーが格納された配列から、配列番号の指す配列要素をノードとして読み出し、次にステップS2205において、該読み出したノードからノード種別を取り出す。
次にステップS2206で、該取り出したノード種別はブランチノードを示すものか判定する。ステップS2206において、ノード種別はブランチノードを示すものであると判定されれば、ステップS2207に進み、ノード種別はブランチノードを示すものではなくリーフノードを示すものとであると判定されると、ステップS2210に進む。
ステップS2207では、段数カウンタに値1を加え、ステップS2209において、ステップS2203で読み出したノードから、代表ノード番号を取り出し、ステップS2210で、該取り出した代表ノード番号に値0を加えた値を配列番号に設定し、ステップS2202に戻る。
上述のステップS2202~ステップS2210のループ処理を、ステップS2206においてノード種別がリーフノードを示すまで繰り返す。なお、図22に示す処理フロー例では、ステップS2210において、代表ノード番号に値0を加えて配列番号に設定していることから、ノード[0]側を優先してノードを巡回しているが、先に説明した図19の処理と同様に、ノード[1]側を優先してノードを巡回することも可能であることは、当業者に明らかである。
上述のステップS2206において、ノード種別がリーフノードを示すものと判定されると、ステップS2210に進み、段数カウンタの値は最大段数カウンタに設定された値より大きいか判定し、大きくなければそのまま処理を終了し、大きければ、ステップS2211で、最大段数カウンタに段数カウンタの値を設定して処理を終了する。
 次に図23~図31Aを参照して、本発明の第3の実施形態について説明する。なお、先に述べたとおり、本発明の第3の実施形態に係るカップルドノードツリーの構成は、第2の実施形態のものと同様である。したがって、以下の本発明の第3の実施形態の説明において、図8A及び図8Bの記載を参照する。
図23は、本発明の第3の実施形態による検索処理の概念を説明する図である。
図3に示すカップルドノードツリーを格納する配列309は、図23に示すブランチノードを格納するブランチノード配列309aとリーフノードを格納するリーフノード配列309bに分離されている。それぞれの配列には、図8Bに示すカップルドノードツリー200bのブランチノードとリーフノードが格納されている。
ブランチノード配列309aとリーフノード配列309bの配列要素には、それぞれの配列番号730a、730bに加えて、それぞれノード参照番号720a、720bが付されている。そして、ブランチノード配列309aとリーフノード配列309bには、さらにベース番号700a、700bがそれぞれ付されている。ノード参照番号は、いわば仮想的なあるいは論理的な配列番号であり、1から始まる連続番号である。
ベース番号は配列の配列要素のノード参照番号を1番から開始するためのものである。ベース番号とノード参照番号の和が配列番号となる。図23の例では、ブランチノード配列309aの配列番号730aの先頭の値は11であるから、ベース番号700aの値を10とすることにより、ノード参照番号720aの値は1から始まるものとなる。リーフノード配列309bの配列番号730bの先頭の値は51であるから、ベース番号700bの値を50とすることにより、ノード参照番号720bの値は、ノード参照番号720aと同様に、1から始まるものとなる。
ベース番号とノード参照番号を導入することにより、ブランチノード配列309aとリーフノード配列309bの配列内での配置の自由度を高めることができる。また、ブランチノード配列309aとリーフノード配列309bを格納する記憶手段の選択度も高めることができる。
なお、ベース番号を0とするとノード参照番号と配列番号は等しくなる。ブランチノード配列とリーフノード配列を分離せず、ベース番号を0とした配列に格納されたカップルドノードツリーの構成例が、図8Aに例示するものである。また、ブランチノード配列とリーフノード配列を分離せず、ベース番号を0とした配列に格納されたカップルドノードツリーのツリー構造を概念的に示す図が、図8Bである。
図23には、さらに、検索キー280と分岐先配列311が記載されている。検索キー280にはビット列“0011010”が格納されている。
ブランチノード配列309aのノード参照番号720aの値1の配列要素(以下、ノード参照番号1の配列要素のようにいう。)には、ルートノード210aの弁別ビット位置の値1(以下、弁別ビット位置1のようにいう。)が格納され、検索キー280に格納されたビット列のビット位置1のビット値が0であるので、分岐先配列の配列番号1の配列要素には0が格納される。
この分岐先配列の配列番号1の配列要素に格納された分岐先情報0は、検索キー280で図2Bに示すカップルドノードツリーを検索すると、ルートノード210aの直近下位のノード対210bにおいて、ノード位置が0であるノード210bにサーチパスが分岐することを示している。
次に、ブランチノード配列309aのノード参照番号2の配列要素には、ノード210bの弁別ビット位置2が格納され、検索キー280に格納されたビット列のビット位置2のビット値が1であるので、分岐先配列の配列番号2の配列要素には1が格納される。
以下同様に、ブランチノード配列309aのノード参照番号3の配列要素には、ノード211bの弁別ビット位置3が格納され、検索キー280に格納されたビット列のビット位置3のビット値が1であるので、分岐先配列の配列番号3の配列要素には1が格納される。
ブランチノード配列309aのノード参照番号5の配列要素には、ノード211cの弁別ビット位置3が格納され、検索キー280に格納されたビット列のビット位置3のビット値が1であるので、分岐先配列の配列番号5の配列要素には1が格納される。
ブランチノード配列309aのノード参照番号6の配列要素には、弁別ビット位置6が格納され、検索キー280に格納されたビット列のビット位置6のビット値が0であるので、分岐先配列の配列番号6の配列要素には0が格納される。
ブランチノード配列309aのノード参照番号7の配列要素には、弁別ビット位置4が格納され、検索キー280に格納されたビット列のビット位置4のビット値が0であるので、分岐先配列の配列番号4の配列要素には0が格納される。
ブランチノード配列309aのノード参照番号10の配列要素には、弁別ビット位置6が格納され、検索キー280に格納されたビット列のビット位置6のビット値が0であるので、分岐先配列の配列番号10の配列要素には0が格納される。
ブランチノード配列309aのノード参照番号11の配列要素には、ノード211dの弁別ビット位置0が格納され、検索キー280に格納されたビット列のビット位置0のビット値が0であるので、分岐先配列の配列番号11の配列要素には0が格納される。同様に、その他のブランチノード配列309aの、弁別ビット位置0が格納された配列要素のノード参照番号と同一の値の配列番号が指す分岐先配列311の配列要素には0が格納される。
本発明の第3の実施形態においては、ビット列検索の対象となるビット列の集合からブランチノード配列309aとリーフノード配列309bが生成されており、検索キー280が指定されると、検索キー280とブランチノード配列により分岐先配列311が生成される。
そして、分岐先配列により、検索結果であるインデックスキーが格納されたリーフノード配列の配列番号を求める。
まず、分岐先配列311の配列番号1の太枠で示した配列要素に格納された分岐先情報(以下、配列番号1の分岐先情報のようにいう。)を読み出し、配列番号を2倍した値に加えて、次に読み出す分岐先情報が格納されて配列要素の配列番号を求める。図23の例示では、図8Bにおける表記と同様に符号を付した点線の矢印220aで示すように、配列番号1を2倍して0を加えて配列番号2を求める。太枠で示した配列要素に格納された分岐先情報の値1を読み出す。
次に、点線の矢印220bで示すように、配列番号2の太枠で示した配列要素に格納された分岐先情報の値1を読み出し、配列番号2を2倍した値に加えて配列番号5を求める。
さらに、点線の矢印221cで示すように、配列番号5の太枠で示した配列要素に格納された分岐先情報の値1を読み出し、配列番号5を2倍した値に加えて配列番号11を求める。
次の分岐先は、カップルドノードツリーの最下段である。点線の矢印221iで示すように、配列番号11の太枠で示した配列要素に格納された分岐先情報の値0を読み出し、それを、配列番号11を2倍した値に加えて求められる値からブランチノード配列309aの最大のノード参照番号である15を減じてリーフノード配列309bのノード参照番号7を得る。太枠で示したリーフノード配列309bのノード参照番号7の配列要素に格納されたリーフノード210iからインデックスキー“0011010”を取り出して、検索処理を終了する。
なお、上述の図23の例示では、ブランチノード配列309aとリーフノード配列309bが分離されたものとして説明し、リーフノード配列309bのノード参照番号7を求めるために、分岐先情報0を分区先配列の配列番号11を2倍した値に加えて求められる値からブランチノード配列309aの最大のノード参照番号である15を減じたが、ブランチノードとリーフノードを1つの配列に格納する場合は、ノード参照番号は一連の番号となるので、リーフノードの格納された配列要素のノード参照番号を求めるときに、ブランチノードを格納する最後の配列要素のノード参照番号を減じる必要はない。
次に、図24~図26を参照して、本発明の第3の実施形態における検索処理について詳細に説明する。
図24は、本発明の第3の実施形態における検索処理の処理フロー例を示す図である。
図24に示すように、まずステップS2401において、検索キーを設定する。この検索キーの設定は、図23に示す例では、検索キー280にビット列“0011010”を設定することに相当する。
次にステップS2402において、検索キーをもとに、ブランチノード配列から分岐先配列を求める。この処理は、図23に示す例では、先に説明した検索キー280とブランチノード配列309aから分岐先配列311を生成する処理に相当する。ステップS2402の詳細な処理フローは、後に図25A及び図25Bを参照して説明する。
次にステップS2403において、分岐先配列をもとに、リーフノード配列のノード参照番号を求める。この処理は、図23に示す例では、先に説明した分岐先配列の配列番号1の配列要素に格納された分岐先情報から配列番号11までの配列要素に格納された分岐先情報を順次読み出し、配列番号11の配列要素に格納された分岐先情報とブランチノード配列のノード参照番号の最大値にもとづいてリーフノード配列のノード参照番号を求める処理に相当する。ステップS2403の詳細な処理フローは、後に図26A及び図26Bを参照して説明する。
最後に、ステップS2404において、ステップS2403で求めたノード参照番号の指すリーフノード配列の配列要素の内容をインデックスキーとして取り出し、処理を終了する。ここで、ステップS2404で取り出したインデックスキーを検索結果キーとすることもできるし、該インデックスキーを検索キーと比較し、一致すれば検索成功とし、一致しなければ検索失敗とすることもできる。
図25Aは、検索キーによりブランチノード配列から分岐先配列を求める処理フロー例を説明する図であり、図24に示すステップS2402の詳細な処理フローを説明する図である。図25Aに示す例では、ブランチノード配列に配置されたブランチノードの数はmとする。
まず、ステップS2500において、配列番号及びノード参照番号に1を設定する。
次にステップS2501において、ノード参照番号1の指すブランチノード配列の配列要素に格納された弁別ビット位置と検索キーにより、配列番号1の指す分岐先配列の配列要素に分岐先情報を示すビット値を設定する。
続いてステップS2502において、ノード参照番号2の指すブランチノード配列の配列要素に格納された弁別ビット位置と検索キーにより、配列番号2の指す分岐先配列の配列要素に分岐先情報を示すビット値を設定する。
以下同様に、ステップS2503~ステップS250mにおいて、ノード参照番号3~mの指すブランチノード配列の配列要素に格納された弁別ビット位置と検索キーにより、配列番号3~mの指す分岐先配列の配列要素に分岐先情報を示すビット値をそれぞれ設定する。
なお、図25Aに例示する処理フロー例は、特定の数であるm個のブランチノードが配置されたブランチノード配列により分岐先配列を生成するものであるが、個数mをパラメータとしたアセンブラマクロにより、任意の個数のブランチノードが配置されたブランチノード配列により分岐先配列を生成する処理を実現するための処理フローを生成することが可能である。
また、図25Aに例示するように、ブランチノード配列に配置された各弁別ビット位置に対応して、該弁別ビット位置を用いた処理を順次直列的に実行する処理フローに替えて、ブランチノード配列に配置された弁別ビット位置に対応する処理が全て終了したかを判定する判定処理を設け、終了していなければ次の弁別ビット位置を用いた処理を繰り返すループ処理を含む処理フローにより、同一の処理結果が得られることは明らかである。ステップS2501~ステップS250mの処理の詳細は、次に図25Bを参照して説明する。
図25Bは、ブランチノード配列の配列要素に格納された弁別ビット位置と検索キーにより、分岐先配列の配列要素に分岐先情報を示すビット値を設定する処理フロー例を説明する図である。
まずステップS2510において、ブランチノード配列から、ノード参照番号の指す配列要素の内容を弁別ビット位置として読み出す。ステップS2510の最初の処理では、図25AのステップS2500における処理で、ノード参照番号に1が設定されている。
次にステップS2511において、検索キーから、ステップS2510で読み出した弁別ビット位置の指すビット値を取り出し、ステップS2512において、該取り出したビット値を、配列番号の指す分岐先配列の配列要素に分岐先情報として設定する。ステップS2512の最初の処理では、図25AのステップS2500における処理で、配列番号に1が設定されている。
次にステップS2513において、配列番号に1を加え、ステップS2514において、ノード参照番号に1を加えて処理を終了する。以上説明したステップS2510~ステップS2514の処理がブランチノード配列の配列要素毎に順次実行されることにより、分岐先配列の配列要素に分岐先情報を順次設定することができる。
図26Aは、分岐先配列をもとにリーフノード配列のノード参照番号を求める処理フロー例を説明する図であり、図24に示すステップS2403の詳細な処理フローを説明する図である。図26Aに示す例では、カップルドノードツリーの段数はnとする。
まず、ステップS2600で、配列番号に1を設定する。次にステップS2601において、1段目のノード(ルートノード)に対応する配列番号(以下、1段目のノードの配列番号のようにいう。)、すなわち配列番号1の指す分岐先配列に格納された分岐先情報により、2段目のノードの配列番号を求める。
続いてステップS2602において、2段目のノードの配列番号の指す分岐先配列に格納された分岐先情報により、3段目のノードの配列番号を求める。
以下同様に、ステップS2603~ステップS260n-2において、3段目~n-2段目のノードの配列番号の指す分岐先配列に格納された分岐先情報により、それぞれ4段目~n-1段目のノードの配列番号を求める。ステップS2601~ステップS260n-2の処理の詳細は、後に図26Bを参照して説明する。
最後にステップS260n-1において、n-1段目のノードの配列番号の指す分岐先配列に格納された分岐先情報により、リーフノード配列のノード参照番号を求めて処理を終了する。ステップS260n-1の処理の詳細は、後に図26Cを参照して説明する。
なお、図26Aに例示する処理フロー例は、特定の段数nを有する本実施形態のカップルドノードツリーを用いたものであるが、段数nをパラメータとしたアセンブラマクロにより、本実施形態の任意の段数のカップルドノードツリーを用いた検索処理を実現するための処理フローを生成することが可能である。
また、図26Aに例示するように、分岐先配列に配置されたカップルドノードツリーの各段のノードの分岐先情報に対応して、該分岐先情報を用いた処理を順次直列的に実行する処理フローに替えて、最下段の1つ上位の段のノードの分岐先情報に対応する処理が終了したかを判定する判定処理を設け、終了していなければ次の段のノードの分岐先情報を用いた処理を繰り返すループ処理を含む処理フローにより、同一の処理結果が得られることは明らかである。
図26Bは、分岐先情報により次段のノードの配列号を求める処理フロー例を説明する図であり、図26Aに示すステップS2602~ステップS260n-2の処理の詳細な処理フローを説明する図である。
図に示すように、まずステップS2611において、分岐先配列から、配列番号の指す分岐先情報を読み出す。ステップS2611の最初の処理では、図26AのステップS2600における処理で、配列番号に1が設定されている。
次にステップS2612において、配列番号を2倍し、ステップS2613において、配列番号にステップS2611で得た分岐先情報を加えて処理を終了する。
上述の図26Bの処理は、図23に示す例示では、点線の矢印220a、220b、221cで示す処理である。例えば点線の矢印220bで示すように、配列番号2の太枠で示した配列要素に格納された分岐先情報の値1を読み出し、配列番号2を2倍した値に加えて配列番号5を求める処理である。
図26Cは、分岐先情報によりリーフノード配列のノード参照番号を求める処理フロー例を説明する図であり、図26Aに示すステップS260n-1の詳細な処理フローを説明する図である。
図に示すように、まずステップS2621において、分岐先配列から、(n-1)段目のノードの配列番号の指す分岐先情報を読み出す。(n-1)段目のノードの配列番号は、図26AのステップS260n-2における処理で、設定されている。
次にステップS2622において、配列番号を2倍し、ステップS2623において、配列番号にステップS2611で得た分岐先情報を加えた値をリーフノード配列のノード参照番号に設定する。
そしてさらにステップS2624において、ステップS2623で設定したリーフノード配列のノード参照番号からブランチノード配列のノード参照番号の最大値を減じた値をリーフノード配列のノード参照番号に設定して処理を終了する。
上述の図26Cの処理は、図23に示す例示では、点線の矢印221iで示す処理である。
先に述べたように、ブランチノードとリーフノードを1つの配列に格納する場合は、ノード参照番号は一連の番号となるので、リーフノードの格納された配列要素のノード参照番号を求めるときに、ブランチノードを格納する最後の配列要素のノード参照番号を減じる必要はない。したがって、その場合には、図26Cに示すステップS2624の処理は処理フローから削除される。
図27は、本発明の第3の実施形態におけるビット列検索装置の機能ブロック構成例を説明する図である。
図27に例示する本実施態様に係るビット列検索装置1000は、検索ツリー記憶手段1010、検索開始位置設定手段1020、検索キー設定手段1050、分岐先情報設定実行部1030、分岐先情報記憶手段1070、初段ノード分岐先情報格納位置設定手段1080、次段ノード分岐先情報格納位置計算実行部1040、及びリーフノード出力実行部1060を備えている。
検索ツリー記憶手段1010の記憶領域には配列が確保され、その配列に本発明の第3の実施形態に係るカップルドノードツリーが配置される。カップルドノードツリーは、図23に例示するように、ブランチノードを格納するブランチノード配列とリーフノードを格納するリーフノード配列に分離して配置することもできる。
検索開始位置設定手段1020は、検索開始ノードのノード参照番号に、ルートノードのノード参照番号である1を設定するとともに、分岐先情報を格納する分岐先配列の配列番号に1を設定する。検索開始位置設定手段1020の機能は、図25Aに示すステップS2500の処理に対応する。また、検索キー設定手段1050には、検索キーが設定される。
分岐先情報設定実行部1030は、ブランチノード読出手段1031~103m及び分岐先情報抽出手段1051~105mを含む。mは検索ツリー記憶手段1010に格納されたブランチノードの数である。図23に示す例では、m=15である。
ブランチノード読出手段1031~103mは、検索ツリー記憶手段1010に配置されたブランチノード配列から、ノード参照番号の指す配列要素の内容を弁別ビット位置として読み出し、分岐先配列の配列番号とともに分岐先情報抽出手段に出力する。そして、分岐先配列の配列番号とブランチノード配列のノード参照番号にそれぞれ1を加えて次のブランチノード読出手段に出力する。
分岐先情報抽出手段1051~105mは、検索キー設定手段1050に設定された検索キーから、ブランチノード読出手段1031~103mが出力した弁別ビット位置の指すビット値を取り出し、該ビット値を、ブランチノード読出手段1031~103mが出力した配列番号が指す分岐先配列の配列要素に、分岐先情報として設定する。ブランチノード読出手段1031と分岐先情報抽出手段1051の機能は、図25Aに示すステップS2501の処理に対応する。同様に、ブランチノード読出手段103mと分岐先情報抽出手段105mまでの各ブランチノード読出手段と分岐先情報抽出手段の機能は、図25Aに示すステップS250mまでの各処理に対応する。
分岐先配列は、分岐先情報記憶手段1070の記憶領域に確保される。
初段ノード分岐先情報格納位置設定手段1080は、分岐先配列の配列番号に1を設定する。初段ノード分岐先情報格納位置設定手段1080の機能は、図26Aに示すステップS2600の処理に対応する。
次段ノード分岐先情報格納位置計算実行部1040は、次段ノード分岐先情報格納位置計算算手段1041~104n-2を含む。nは、カップルドノードツリーの段数である。
次段ノード分岐先情報格納位置計算手段1041~104n-2は、分岐先配列から、配列番号の指す分岐先情報を読み出し、配列番号を2倍し、2倍した配列番号に分岐先情報を加えた値を次段のノードに対応する分岐先情報の格納された分岐先配列の配列要素の配列番号として求める。次段ノード分岐先情報格納位置計算手段1041~104n-2の機能は、図26Aに示すステップS2601~S260n-2の処理にそれぞれ対応する。
次段ノード分岐先情報格納位置計算手段1041が分岐先情報を読み出すための配列番号は、初段ノード分岐先情報格納位置設定手段1080が設定したものである。次段ノード分岐先情報格納位置計算手段1042~104n-2が分岐先情報を読み出すための配列番号は、それぞれ前の段の次段ノード分岐先情報格納位置計算手段が求めた配列番号である。
次段ノード分岐先情報格納位置計算手段104n-2が求めた配列番号は、次に説明するリーフノード出力実行部1060に入力され、リーフノードの読み出しに用いられる。
リーフノード出力実行部1060は、リーフノード格納位置計算手段1061及び検索結果出力手段1062を含む。
リーフノード格納位置計算手段1061は、次段ノード分岐先情報格納位置計算手段104n-2が求めた配列番号の指す分岐先情報を読み出し、配列番号を2倍し、2倍した配列番号に分岐先情報を加えた値をリーフノード配列の配列要素の仮のノード参照番号として求める。そして、仮のノード参照番号からブランチノード配列のノード参照番号の最大値、すなわち検索ツリー記憶手段1010に格納されたブランチノードの数mを減じた値をリーフノード配列の配列要素のノード参照番号として求める。リーフノード格納位置計算手段1061の機能は、図26AのステップS260n-1、すなわち図26Cに示す処理に対応する。
検索結果出力手段1062は、リーフノード格納位置計算手段1061が求めたリーフノード配列の配列要素のノード参照番号により、検索ツリー記憶手段1010からリーフノードを読み出し、インデックスキーあるいはインデックスキーにアクセスするための情報を取り出す。リーフノードから取り出すものがインデックスキーであるときは、そのインデックスキーを検索結果キーとして出力する。リーフノードから取り出すものがインデックスキーにアクセスするための情報であるときは、取り出したインデックスキーにアクセスするための情報に基づき、インデックスキーを読み出して検索結果キーとして出力する。
また、検索結果キーと検索キーを比較し、一致すれば検索成功とし、一致しなければ検索失敗とする検索結果を出力することも可能である。
次に、本発明の第3の実施形態に係るカップルドノードツリーの生成について、図28A~図31Bを参照して説明する。先に述べたように、本発明の第3の実施形態に係るカップルドノードツリーの構成は、第2の実施形態に係るカップルドノードツリーの構成と同様であるから、図18A及び図18Bに記載した処理フロー例により、第3の実施形態に係るカップルドノードツリーを生成することは可能である。したがって、以下に説明する第3の実施形態に係るカップルドノードツリーの生成処理は、先に説明した第2の実施形態に係るカップルドノードツリーの生成処理の変形例ということができる。
なお、以下の説明において、第2の実施形態の説明と同様に、本発明の第3の実施形態に係るカップルドノードツリーをポインタレスツリーといい、従来のカップルドノードツリーを単にツリー、あるいは変換前のツリーということがある。
本発明の第3の実施形態のポインタレスツリーの生成は、第2の実施形態のポインタレスツリーの生成と同様に、例えば次のようにして実現することができる。すなわち、ポインタレスツリーを生成する際には、ポインタレスツリーに格納されるインデックスキーにより、図1A及び図1Bに例示する形態のツリーが生成されているものとする。そして、ポインタレスツリーの生成は、ツリーのノードをルートノードから順次巡回し、本発明の第3の実施形態のノードに変換することにより、実現される。
図28Aは、本発明の第3の実施形態におけるポインタレスツリーを生成する処理の前段の処理フロー例を説明する図である。図28Aに示すように、まずステップS2801において、ポインタレスツリーを生成するための配列(ブランチノード配列とリーフノード配列)を取得し、ステップS2802おいて、配列要素を初期化する。このステップS2802の処理は、ダミーのブランチノードを用いるために必要となるものである。
次にステップS2802aにおいて変換前のツリーの最大段数を求め、ステップS2802bにおいて該最大段数を段数カウンタの上限値に設定する。
ステップS2802aの処理の詳細については、後に図31A及び図31Bを参照して説明する。
次にステップS2803において、ブランチノード配列とリーフノード配列のベース番号を設定し、ステップS2805において、段数カウンタに1を設定する。次にステップS2806において、ノード参照番号に1を設定し、ステップS2807において、配列番号に、ツリーのルートノードの配列番号を設定する。さらにステップS2808において、探索経路スタックに配列番号と段数カウンタのカウント値を格納して図28Bに示すステップS2813に進む。
図28Bは、本発明の第3の実施形態におけるポインタレスツリーを生成する処理の後段の処理フロー例を示す図である。図28Bに示すように、ステップS2813において、変換前のツリーが格納された配列から、配列番号の指す配列要素をノードとして読み出す。ステップS2813の最初の処理においては、配列番号にはステップS2807でルートノードの配列番号が設定されている。2回目以降の処理においては、後に説明するステップS2828で設定される。以下の説明において、ステップS2813で読み出されたノードを巡回開始ノードということがある。
次にステップS2815において、ステップS2813で読み出したノードからノード種別を取り出し、ステップS2816で、該取り出したノード種別はブランチノードを示すものか判定する。ステップS2816の判定が、ノード種別はブランチノードを示すものではなくリーフノードを示すものであればステップS2822に進み、ブランチノードを示すものであれば、ステップS2816aに進む。
ステップS2816aでは、ノード参照番号をもとに、ブランチノード配列の配列要素にノードを書き込む。ステップS2816aの処理の詳細は、後に図29を参照して説明する。
次にステップS2817において、段数カウンタに値1を加え、ステップS2818に進み、ノード参照番号を2倍にする。さらにステップS2819において、ステップS2813で読み出したノードから、代表ノード番号を取り出し、ステップS2820で、該取り出した代表ノード番号に値0を加えた値を配列番号に設定する。
そして、ステップS2821において、探索経路スタックに、配列番号と段数カウンタのカウント値を格納してステップS2813に戻る。ここで探索経路スタックに格納される配列番号は、ステップS2820で代表ノード番号に値0を加えた値のものであるから、ノード[0]の配列番号である。
上述のステップS2813~ステップS2821のループ処理を、ステップS2816においてノード種別がリーフノードを示すまで繰り返す。つまり、ひとまとまりの処理として、巡回開始ノードから最初のリーフノードまでノードを巡回してノードを読み出し、それを変換してポインタレスツリーのノードを書き込む。図28Bに示す処理フロー例では、ステップS2820において、代表ノード番号に値0を加えて配列番号に設定していることから、ノード[0]側を優先してノードを巡回しているが、ノード[1]側を優先してノードを巡回することも可能であることは、以上の説明から当業者に明らかである。
一方ステップS2816において、ノード種別はブランチノードを示すものではなくリーフノードを示すものと判定され、ステップS2822に進むと、ノード参照番号をもとに、リーフノード配列の配列要素にノードを書き込む。ステップS2822の処理の詳細は、後に図30を参照して説明する。
次にステップS2823において、探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指しているか判定する。
探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指していれば、ツリーの全てのノードの処理は完了しているので処理を終了する。そうでなければ、ステップS2824に進む。
ステップS2824では、探索経路スタックから配列番号と段数カウンタのカウント値を取り出し、探索経路スタックのスタックポインタを1つ減らす。次にステップS2828において、ステップS2824で取り出した配列番号に値1を加えて、巡回開始ノードの配列番号としてノード[1]の配列番号を得る。そして、ステップS2830で、ノード参照番号に1を加えてステップS2813に戻る。
上述のステップS2813~ステップS2830のループ処理を、ステップS2823において探索経路スタックのスタックポインタがツリーのルートノードの配列番号を指していると判定されるまで繰り返すことにより、ツリー上のすべてのノードの巡回が行われ、各ノードがポインタレスツリーのノードに変換されてポインタレスツリーが生成される。
図29は、本発明の第3の実施形態におけるブランチノードを生成する処理の処理フロー例を説明する図であり、図28Bに示すステップS2816aの処理の詳細を説明する図である。
図に示すように、まずステップS1025において、配列番号に、ノード参照番号にブランチノード配列のベース番号を加えた値を設定する。そしてステップS1026で、ノードから弁別ビット位置を取り出し、ステップS1027で、該弁別ビット位置に値1を加え、ステップS1028において、ステップS1025で設定した配列番号の指すブランチノード配列の配列要素に弁別ビット位置を書き込み、ブランチノードを生成して処理を終了する。
図30は、本発明の第3の実施形態におけるリーフノードを生成する処理の処理フロー例を説明する図であり、図28Bに示すステップS2822の処理の詳細を説明する図である。
図に示すように、まずステップS3029において、ノード参照番号と段数カウンタを退避し、ステップS3030に進む。
ステップS3030では、段数カウンタは上限値か判定し、上限値でなければ、ステップS3031でノード参照番号を2倍し、ステップS3032で段数カウンタに値1を加えてステップS3030に戻る。
上述のステップS3030~S3032のループ処理は、リーフノードをポインタレスツリーの最下段のレベルに配置するためのものである。図1B、図2Bの例示では、例えば図1Bの変換前のツリーでは3段目にあるリーフノード210cは、図2Bでは5段目のノード210jに変換されている。そして、図2Bにおけるノード210cの位置情報は、図30のステップS3029の処理により、退避される。
なお、段数カウンタの上限値については、図28Aに示すステップS2802bで設定されているが、それに替えて、変換前のツリーを生成するときに、リーフノードを挿入するごとにそのリーフノードの段数をカウントし、その最大値をツリーの属性として記憶しておき、本発明の第3の実施形態のポインタレスツリーを生成するときに、その最大値を段数カウンタの上限値とすることができる。
上述のステップS3030で、段数カウンタは上限値であると判定されると、ステップS3034に進む。ステップS3034では、段数カウンタの上限値から1を減じた値による2のべき乗の数値を求め、該数値から1を減じた値をノード参照番号から減じて得た値とリーフノード配列のベース番号との和を、リーフノード配列の配列番号に設定する。図8Bの例示では、段数カウンタの上限値は5であり、該上限値から1を減じた値による2のべき乗は16となる。この値から1を減じた値15は、ブランチノード配列に配置されたブランチノードの数になる。ここでノード参照番号はブランチノード配列のノード参照番号であるから、このノード参照番号から15を減じて得た値は図23の例示で説明したように、リーフノード配列のノード参照番号である。そして、ノード参照番号とベース番号の和により、配列番号が求められる。
そしてステップS3035で、図28Bに示すステップS2813で読み出されているノードからインデックスキーを取り出し、ステップS3036で、該インデックスキーの最上位のビット位置にビット値“0”を挿入し、ステップS3037において、ステップS3034で設定した配列番号の指すリーフノード配列の配列要素にインデックスキーを書き込み、リーフノードを生成してステップS3038に進む。
ステップS3038では、ノード参照番号と段数カウンタに、ステップS3029で退避したノード参照番号と段数カウンタをそれぞれ設定して処理を終了する。
次に、変換前のツリーの最大段数を求める処理について図31A及び図31Bを参照して説明する。図31A及び図31Bに示す処理フロー例は、図28Aに示すステップS2802aの処理の詳細を説明するものである。
図31Aは、変換前のツリーの最大段数を求める処理の前段の処理フロー例を説明する図である。
図31Aに示すように、まずステップS3101において、段数カウンタに値1を設定し、ステップS3102において、最大段数カウンタに、段数カウンタに設定された値を設定する。すなわち、段数カウンタ及び最大段数カウンタには、初期値として値1が設定される。
次にステップS3107において、配列番号に、ツリーのルートノードの配列番号を設定して図31Bに示すステップS3113に進む。
図31Bは、変換前のツリーの最大段数を求める処理の後段の処理フロー例を説明する図である。図31Bに示すように、ステップS3113において、変換前のツリーが格納された配列から、配列番号の指す配列要素をノードとして読み出す。ステップS3113の最初の処理においては、配列番号にはステップS3107でルートノードの配列番号が設定されている。2回目以降の処理においては、後に説明するステップS3128で設定される。図28Bにおける説明と同様に、以下の説明において、ステップS3113で読み出されたノードを巡回開始ノードということがある。
次にステップS3115において、ステップS3113で読み出したノードからノード種別を取り出し、ステップS3116で、該取り出したノード種別はブランチノードを示すものか判定する。ステップS3116の判定が、ノード種別はブランチノードを示すものではなくリーフノードを示すものであればステップS3121に進み、ブランチノードを示すものであれば、ステップS3117に進む。
ステップS3117では、段数カウンタに値1を加え、ステップS3119に進み、ステップS3113で読み出したノードから、代表ノード番号を取り出し、ステップS3120で、該取り出した代表ノード番号に値0を加えた値を配列番号に設定する。
そして、ステップS3120aにおいて、探索経路スタックに、配列番号と段数カウンタのカウント値を格納してステップS3113に戻る。ここで探索経路スタックに格納される配列番号は、ステップS3120で代表ノード番号に値0を加えた値のものであるから、ノード[0]の配列番号である。
上述のステップS3113~ステップS3120aのループ処理を、ステップS3116においてノード種別がリーフノードを示すまで繰り返す。つまり、ひとまとまりの処理として、巡回開始ノードから最初のリーフノードまでノードを巡回してリーフノードの段数を求める。図31Bに示す処理フロー例では、ステップS3120において、代表ノード番号に値0を加えて配列番号に設定していることから、ノード[0]側を優先してノードを巡回しているが、ノード[1]側を優先してノードを巡回することも可能であることは、以上の説明から当業者に明らかである。
一方ステップS3116において、ノード種別はブランチノードを示すものではなくリーフノードを示すものと判定されると、ステップS3121に進み、段数カウンタのカウント値は最大段数カウンタに設定された値より大きいか判定する。ステップS3116の判定結果が、段数カウンタのカウント値は最大段数カウンタに設定された値より大きい、であれば、ステップS3122で、最大段数カウンタに、段数カウンタのカウント値を設定してステップS3123に進み、前記判定結果が、段数カウンタのカウント値は最大段数カウンタに設定された値より大きくない、であれば、ステップS3123に進む。
ステップS3123では、探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指しているか判定する。
探索経路スタックのスタックポインタはツリーのルートノードの配列番号を指していれば、ツリーの全てのリーフノードについての段数の処理は完了しているので処理を終了する。そうでなければ、ステップS3124に進む。
ステップS3124では、探索経路スタックから配列番号と段数カウンタのカウント値を取り出し、探索経路スタックのスタックポインタを1つ減らす。次にステップS3128において、ステップS3124で取り出した配列番号に値1を加えて、巡回開始ノードの配列番号としてノード[1]の配列番号を得てステップS3113に戻る。
上述のステップS3113~ステップS3128のループ処理を、ステップS3123において探索経路スタックのスタックポインタがツリーのルートノードの配列番号を指していると判定されるまで繰り返すことにより、ツリー上のすべてのノードの巡回が行われ、ツリーの最大段数が求められる。
以上本発明を実施するための形態について詳細に説明したが、本発明の実施の形態はそれに限ることなく種々の変形が可能であることは当業者に明らかである。
また、本発明の第1の実施形態、第2の実施形態、並びに第3の実施形態に係るビット列検索装置が、図6、図10及び図11、図14、図16及び図17、あるいは図24~図26Cに例示した処理をコンピュータに実行させるプログラムによりコンピュータ上に構築可能なことは明らかである。
したがって、上記プログラム、及びプログラムを記憶したコンピュータ読み取り可能な記憶媒体は、本発明の実施の形態に含まれる。さらに、本発明のカップルドノードツリーのデータ構造も、本発明の実施の形態に含まれる。

Claims (30)

  1. ビット列からなる検索キーにより、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造に基づいて、前記インデックスキーを検索するビット列検索装置において、
    前記ツリーは配列に記憶されたものであり、該ツリーの始点であって、前記配列の配列番号1の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ノードは該ノードがブランチノードであるかリーフノードであるかを示すノード種別を格納する領域を有し、前記ブランチノードは、前記ノード種別に加えて、前記検索キーの弁別ビット位置を格納する領域を含むが、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域及び前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記ノード種別に加えて、前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードの配置された配列要素の配列番号の2倍の値の配列番号の配列要素に配置される、カップルドノードツリーと、
    検索を開始するノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定手段と、
    前記検索開始位置設定手段あるいは後記リンク手段によりリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたノードを読み出すノード読出手段と、
    前記ノード読出手段により読み出されたノードのノード種別を格納する領域から当該ノード種別を読み出し、該ノード種別が前記リーフノードを示すものであるかブランチノードを示すものであるかを判定するノード種別判定手段と、
    前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すインデックスキー読出手段と、
    前記ノード種別判定手段で判定されたノード種別がブランチノードを示すものであるとき、該ブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定するリンク手段と、
    を備え、
    前記ノード読出手段で読み出したノードのノード種別を前記ノード種別判定手段で判定し、該ノード種別がリーフノードを示すものであれば、前記インデックスキー読出手段によりインデックスキーを読み出し、該ノード種別がブランチノードを示すものであれば、前記リンク手段により前記リンク先ノードの配列番号を設定し、該設定されたリンク先ノードの配列番号の配列要素に配置されたノードを前記ノード読出手段で読み出し、該読み出したノードのノード種別を前記ノード種別判定手段で判定することを該ノード種別がリーフノードを示すものとなるまで繰り返し、該ノード種別がリーフノードを示すときに前記インデックスキー読出手段によりインデックスキーを読み出すことを特徴とするビット列検索装置。
  2. 請求項1記載のビット列検索装置が実行するビット列検索方法において、
    検索を開始するノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    前記検索開始位置設定ステップあるいは後記リンクステップにおいてリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたノードを読み出すノード読出ステップと、
    前記ノード読出ステップで読み出されたノードのノード種別を格納する領域から当該ノード種別を読み出し、該ノード種別が前記リーフノードを示すものであるかブランチノードを示すものであるかを判定するノード種別判定ステップと、
    前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すインデックスキー読出ステップと、
    前記ノード種別判定ステップで判定されたノード種別がブランチノードを示すものであるとき、該ブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定するリンクステップと、
    を備え、
    前記ノード読出ステップで読み出したノードのノード種別を前記ノード種別判定ステップで判定し、該ノード種別がリーフノードを示すものであれば、前記インデックスキー読出ステップにおいてインデックスキーを読み出し、該ノード種別がブランチノードを示すものであれば、前記リンクステップにおいて前記リンク先ノードの配列番号を設定し、該設定されたリンク先ノードの配列番号の配列要素に配置されたノードを前記ノード読出ステップで読み出し、該読み出したノードのノード種別を前記ノード種別判定ステップで判定することを該ノード種別がリーフノードを示すものとなるまで繰り返し、該ノード種別がリーフノードを示すときに前記インデックスキー読出ステップにおいてインデックスキーを読み出すことを特徴とするビット列検索方法。
  3. 請求項2記載のビット列検索方法をコンピュータに実行させることを特徴とするプログラム。
  4. 請求項2記載のビット列検索方法をコンピュータに実行させるプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  5. ビット列からなる検索キーによるビット列検索に用いられる、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造において、
    前記ツリーは配列に記憶されたものであり、該ツリーの始点であって、前記配列の配列番号1の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ノードは該ノードがブランチノードであるかリーフノードであるかを示すノード種別を格納する領域を有し、前記ブランチノードは、前記ノード種別に加えて、前記検索キーの弁別ビット位置を格納する領域を含むが、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域及び前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記ノード種別に加えて、前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードの配置された配列要素の配列番号の2倍の値の配列番号の配列要素に配置されるものであり、
    前記ツリーの記憶手段を備えたビット列検索装置により、
    検索を開始するノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    前記検索開始位置設定ステップあるいは後記リンクステップにおいてリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたノードを読み出すノード読出ステップと、
    前記ノード読出ステップで読み出されたノードのノード種別を格納する領域から当該ノード種別を読み出し、該ノード種別が前記リーフノードを示すものであるかブランチノードを示すものであるかを判定するノード種別判定ステップと、
    前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すインデックスキー読出ステップと、
    前記ノード種別判定ステップで判定されたノード種別がブランチノードを示すものであるとき、該ブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定するリンクステップと、
    を備え、
    前記ノード読出ステップで読み出したノードのノード種別を前記ノード種別判定ステップで判定し、該ノード種別がリーフノードを示すものであれば、前記インデックスキー読出ステップにおいてインデックスキーを読み出し、該ノード種別がブランチノードを示すものであれば、前記リンクステップにおいて前記リンク先ノードの配列番号を設定し、該設定されたリンク先ノードの配列番号の配列要素に配置されたノードを前記ノード読出ステップで読み出し、該読み出したノードのノード種別を前記ノード種別判定ステップで判定することを該ノード種別がリーフノードを示すものとなるまで繰り返し、該ノード種別がリーフノードを示すときに前記インデックスキー読出ステップにおいてインデックスキーを読み出す検索方法の実行を可能とすることを特徴とするデータ構造。
  6. 請求項5記載のデータ構造を記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  7. ビット列からなる検索キーにより、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造に基づいて、前記インデックスキーを検索するビット列検索装置において、
    前記ツリーは配列に記憶されたものであり、該ツリーの始点であるルートノードであって、ノード参照番号1に、該ルートノードの位置を定める配列番号であるベース番号と前記ツリーの各段のノードの開始位置を定める番号であるオフセット番号を加えた値の配列番号の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ノードは該ノードがブランチノードであるかリーフノードであるかを示すノード種別を格納する領域を有し、前記ブランチノードは、前記ノード種別に加えて、前記検索キーの弁別ビット位置を格納する領域を含むが、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域及び前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記ノード種別に加えて、前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードのノード参照番号の2倍の値のノード参照番号に、前記ベース番号と該直近上位のブランチノードの次の段のオフセット番号を加えた値の配列番号の配列要素に配置される、カップルドノードツリーと、
    検索を開始するノードのノード参照番号と該ノードについての前記オフセット番号と前記ベース番号に基づいて該ノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定手段と、
    前記検索開始位置設定手段あるいは後記リンク手段によりリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたノードを読み出すノード読出手段と、
    前記ノード読出手段により読み出されたノードのノード種別を格納する領域から当該ノード種別を読み出し、該ノード種別が前記リーフノードを示すものであるかブランチノードを示すものであるかを判定するノード種別判定手段と、
    前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すインデックスキー読出手段と、
    前記ノード種別判定手段で判定されたノード種別がブランチノードを示すものであるとき、該ブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードのノード参照番号の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ブランチノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定するリンク手段と、
    を備え、
    前記ノード読出手段で読み出したノードのノード種別を前記ノード種別判定手段で判定し、該ノード種別がリーフノードを示すものであれば、前記インデックスキー読出手段によりインデックスキーを読み出し、該ノード種別がブランチノードを示すものであれば、前記リンク手段により前記リンク先ノードの配列番号を設定し、該設定されたリンク先ノードの配列番号の配列要素に配置されたノードを前記ノード読出手段で読み出し、該読み出したノードのノード種別を前記ノード種別判定手段で判定することを該ノード種別がリーフノードを示すものとなるまで繰り返し、該ノード種別がリーフノードを示すときに前記インデックスキー読出手段によりインデックスキーを読み出すことを特徴とするビット列検索装置。
  8. 請求項1記載のビット列検索装置が実行するビット列検索方法において、
    検索を開始するノードのノード参照番号と該ノードについての前記オフセット番号と前記ベース番号に基づいて該ノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    前記検索開始位置設定ステップあるいは後記リンクステップにおいてリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたノードを読み出すノード読出ステップと、
    前記ノード読出ステップで読み出されたノードのノード種別を格納する領域から当該ノード種別を読み出し、該ノード種別が前記リーフノードを示すものであるかブランチノードを示すものであるかを判定するノード種別判定ステップと、
    前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すインデックスキー読出ステップと、
    前記ノード種別判定ステップで判定されたノード種別がブランチノードを示すものであるとき、該ブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードのノード参照番号の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ブランチノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定するリンクステップと、
    を備え、
    前記ノード読出ステップで読み出したノードのノード種別を前記ノード種別判定ステップで判定し、該ノード種別がリーフノードを示すものであれば、前記インデックスキー読出ステップにおいてインデックスキーを読み出し、該ノード種別がブランチノードを示すものであれば、前記リンクステップにおいて前記リンク先ノードの配列番号を設定し、該設定されたリンク先ノードの配列番号の配列要素に配置されたノードを前記ノード読出ステップで読み出し、該読み出したノードのノード種別を前記ノード種別判定ステップで判定することを該ノード種別がリーフノードを示すものとなるまで繰り返し、該ノード種別がリーフノードを示すときに前記インデックスキー読出ステップにおいてインデックスキーを読み出すことを特徴とするビット列検索方法。
  9. 請求項8記載のビット列検索方法をコンピュータに実行させることを特徴とするプログラム。
  10. 請求項8記載のビット列検索方法をコンピュータに実行させることを特徴とするプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  11. ビット列からなる検索キーによるビット列検索に用いられる、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造において、
    前記ツリーは配列に記憶されたものであり、該ツリーの始点であるルートノードであって、ノード参照番号1に、該ルートノードの位置を定める配列番号であるベース番号と前記ツリーの各段のノードの開始位置を定める番号であるオフセット番号を加えた値の配列番号の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ノードは該ノードがブランチノードであるかリーフノードであるかを示すノード種別を格納する領域を有し、前記ブランチノードは、前記ノード種別に加えて、前記検索キーの弁別ビット位置を格納する領域を含むが、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域及び前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記ノード種別に加えて、前記検索対象のビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードのノード参照番号の2倍の値のノード参照番号に、前記ベース番号と該直近上位のブランチノードの次の段のオフセット番号を加えた値の配列番号の配列要素に配置されるものであり、
    前記ツリーの記憶手段を備えたビット列検索装置により、
    検索を開始するノードのノード参照番号と該ノードについての前記オフセット番号と前記ベース番号に基づいて該ノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    前記検索開始位置設定ステップあるいは後記リンクステップにおいてリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたノードを読み出すノード読出ステップと、
    前記ノード読出ステップで読み出されたノードのノード種別を格納する領域から当該ノード種別を読み出し、該ノード種別が前記リーフノードを示すものであるかブランチノードを示すものであるかを判定するノード種別判定ステップと、
    前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すインデックスキー読出ステップと、
    前記ノード種別判定ステップで判定されたノード種別がブランチノードを示すものであるとき、該ブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードのノード参照番号の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ブランチノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定するリンクステップと、
    を備え、
    前記ノード読出ステップで読み出したノードのノード種別を前記ノード種別判定ステップで判定し、該ノード種別がリーフノードを示すものであれば、前記インデックスキー読出ステップにおいてインデックスキーを読み出し、該ノード種別がブランチノードを示すものであれば、前記リンクステップにおいて前記リンク先ノードの配列番号を設定し、該設定されたリンク先ノードの配列番号の配列要素に配置されたノードを前記ノード読出ステップで読み出し、該読み出したノードのノード種別を前記ノード種別判定ステップで判定することを該ノード種別がリーフノードを示すものとなるまで繰り返し、該ノード種別がリーフノードを示すときに前記インデックスキー読出ステップにおいてインデックスキーを読み出す検索方法の実行を可能とすることを特徴とするデータ構造。
  12. 請求項11記載のデータ構造を記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  13. ビット列からなる検索キーにより、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造に基づいて、前記インデックスキーを検索するビット列検索装置において、
    前記インデックスキーは、本来のインデックスキーのある特定のビット位置に特定のビット値を挿入したものであり、
    前記検索キーは、本来の検索キーの、前記本来のインデックスキーと同一の特定のビット位置に前記特定のビット値を挿入したものであり、
    前記ツリーは配列に記憶され、n段目(nは正整数)までのツリーの構成要素を有するものであり、該ツリーの始点であって、前記配列の配列番号1の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ブランチノードは、前記検索キーの弁別ビット位置を格納する領域を含むが、ブランチノードとリーフノードを識別するノード種別を格納する領域、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域、及び前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記ノード種別を格納する領域、及び前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードの配置された配列要素の配列番号の2倍の値の配列番号の配列要素に配置され、前記リーフノードはn段目にのみ位置する、カップルドノードツリーと、
    検索を開始するルートノードの配置された配列要素の配列番号1をリンク先ノードの配列番号として設定する検索開始位置設定手段と、
    第1~第nのノード読出手段と、
    第1~第n-1のリンク手段と、
    インデックスキー読出手段と、
    を備え、
    前記第1のノード読出手段は、前記検索開始位置設定手段によりリンク先ノードの配列番号として設定された配列番号1の配列要素から該配列要素に配置されたルートノードを読み出し、
    前記第1のリンク手段は、前記第1のノード読出手段により読み出されたルートノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ルートノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定し、
    前記第2~第n-1のノード読出手段は、それぞれ前記第1~第n-2のリンク手段が設定したリンク先ノードの配列番号が指す配列要素をブランチノードとして読み出し、
    前記第2~第n-1のリンク手段は、それぞれ前記第2~第n-1のノード読出手段により読み出されたブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定するものであり、
    前記第nのノード読出手段は、前記第n-1リンク手段が設定したリンク先ノードの配列番号が指す配列要素をリーフノードとして読み出し、
    インデックスキー読出手段は、前記第nのノード読出手段が読みだした前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出す、
    ことを特徴とするビット列検索装置。
  14. 請求項13記載のビット列検索装置が実行するビット列検索方法において、
    検索を開始するルートノードの配置された配列要素の配列番号1をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    第1~第nのノード読出ステップと、
    第1~第n-1のリンクステップと、
    インデックスキー読出ステップと、
    を備え、
    前記第1のノード読出ステップにおいて、前記検索開始位置設定ステップでリンク先ノードの配列番号として設定された配列番号1の配列要素から該配列要素に配置されたルートノードを読み出し、
    前記第1のリンクステップにおいて、前記第1のノード読出ステップで読み出されたルートノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ルートノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定し、
    前記第2~第n-1のノード読出ステップにおいて、それぞれ前記第1~第n-2のリンクステップで設定したリンク先ノードの配列番号が指す配列要素をブランチノードとして読み出し、
    前記第2~第n-1のリンクステップは、それぞれ前記第2~第n-1のノード読出ステップで読み出されたブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定するものであり、
    前記第nのノード読出ステップにおいて、前記第n-1リンクステップで設定したリンク先ノードの配列番号が指す配列要素をリーフノードとして読み出し、
    前記インデックスキー読出ステップにおいて、前記第nのノード読出ステップで読みだした前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出す、
    ことを特徴とするビット列検索方法。
  15. 請求項14記載のビット列検索方法をコンピュータに実行させることを特徴とするプログラム。
  16. 請求項14記載のビット列検索方法をコンピュータに実行させるプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  17. ビット列からなる検索キーによるビット列検索に用いられる、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造において、
    前記インデックスキーは、本来のインデックスキーのある特定のビット位置に特定のビット値を挿入したものであり、
    前記検索キーは、本来の検索キーの、前記本来のインデックスキーと同一の特定のビット位置に前記特定のビット値を挿入したものであり、
    前記ツリーは配列に記憶され、n段目(nは正整数)までのツリーの構成要素を有するものであり、該ツリーの始点であって、前記配列の配列番号1の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ブランチノードは、前記検索キーの弁別ビット位置を格納する領域を含むが、ブランチノードとリーフノードを識別するノード種別を格納する領域、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域、及び前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記ノード種別を格納する領域、及び前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードの配置された配列要素の配列番号の2倍の値の配列番号の配列要素に配置され、前記リーフノードはn段目にのみ位置するものであり、
    前記ツリーの記憶手段を備えたビット列検索装置により、
    検索を開始するルートノードの配置された配列要素の配列番号1をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    第1~第nのノード読出ステップと、
    第1~第n-1のリンクステップと、
    インデックスキー読出ステップと、
    を備え、
    前記第1のノード読出ステップにおいて、前記検索開始位置設定ステップでリンク先ノードの配列番号として設定された配列番号1の配列要素から該配列要素に配置されたルートノードを読み出し、
    前記第1のリンクステップにおいて、前記第1のノード読出ステップで読み出されたルートノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ルートノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定し、
    前記第2~第n-1のノード読出ステップにおいて、それぞれ前記第1~第n-2のリンクステップで設定したリンク先ノードの配列番号が指す配列要素をブランチノードとして読み出し、
    前記第2~第n-1のリンクステップは、それぞれ前記第2~第n-1のノード読出ステップで読み出されたブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードの配置された配列要素の配列番号の2倍の値との和を前記リンク先ノードの配列番号として設定するものであり、
    前記第nのノード読出ステップにおいて、前記第n-1リンクステップで設定したリンク先ノードの配列番号が指す配列要素をリーフノードとして読み出し、
    前記インデックスキー読出ステップにおいて、前記第nのノード読出ステップで読みだした前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出す検索方法の実行を可能とすることを特徴とするデータ構造。
  18. 請求項17記載のデータ構造を記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  19. ビット列からなる検索キーにより、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造に基づいて、前記インデックスキーを検索するビット列検索装置において、
    前記インデックスキーは、本来のインデックスキーのある特定のビット位置に特定のビット値を挿入したものであり、
    前記検索キーは、本来の検索キーの、前記本来のインデックスキーと同一の特定のビット位置に前記特定のビット値を挿入したものであり、
    前記ツリーは配列に記憶され、n段目(nは正整数)までのツリーの構成要素を有するものであり、該ツリーの始点であるルートノードであって、ノード参照番号1に、該ルートノードの位置を定める配列番号であるベース番号と前記ツリーの各段のノードの開始位置を定める番号であるオフセット番号を加えた値の配列番号の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ブランチノードは、前記検索キーの弁別ビット位置を格納する領域を含むが、ブランチノードとリーフノードを識別するノード種別を格納する領域、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域、及び前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記ノード種別を格納する領域、及び前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードのノード参照番号の2倍の値のノード参照番号に、前記ベース番号と該直近上位のブランチノードの次の段のオフセット番号を加えた値の配列番号の配列要素に配置され、前記リーフノードはn段目にのみ位置する、カップルドノードツリーと、
    検索を開始するルートノードのノード参照番号1と該ノードについての前記オフセット番号と前記ベース番号に基づいて該ルートノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定手段と、
    第1~第nのノード読出手段と、
    第1~第n-1のリンク手段と、
    インデックスキー読出手段と、
    を備え、
    前記第1のノード読出手段は、前記検索開始位置設定手段によりリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたルートノードを読み出し、
    前記第1のリンク手段は、前記第1のノード読出手段により読み出されたルートノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ルートノードのノード参照番号1の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ルートノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定し、
    前記第2~第n-1のノード読出手段は、それぞれ前記第1~第n-2のリンク手段が設定したリンク先ノードの配列番号が指す配列要素をブランチノードとして読み出し、
    前記第2~第n-1のリンク手段は、それぞれ前記第2~第n-1のノード読出手段により読み出されたブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードのノード参照番号の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ブランチノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定するものであり、
    前記第nのノード読出手段は、前記第n-1リンク手段が設定したリンク先ノードの配列番号が指す配列要素をリーフノードとして読み出し、
    インデックスキー読出手段は、前記第nのノード読出手段が読みだした前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出す、
    ことを特徴とするビット列検索装置。
  20. 請求項19記載のビット列検索装置が実行するビット列検索方法において、
    検索を開始するルートノードのノード参照番号1と該ルートノードについての前記オフセット番号と前記ベース番号に基づいて該ルートノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    第1~第nのノード読出ステップと、
    第1~第n-1のリンクステップと、
    インデックスキー読出ステップと、
    を備え、
    前記第1のノード読出ステップにおいて、前記検索開始位置設定ステップでリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたルートノードを読み出し、
    前記第1のリンクステップにおいて、前記第1のノード読出ステップで読み出されたルートノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ルートノードのノード参照番号1の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ルートノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定し、
    前記第2~第n-1のノード読出ステップにおいて、それぞれ前記第1~第n-2のリンクステップで設定したリンク先ノードの配列番号が指す配列要素をブランチノードとして読み出し、
    前記第2~第n-1のリンクステップは、それぞれ前記第2~第n-1のノード読出ステップで読み出されたブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードのノード参照番号の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ブランチノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定するものであり、
    前記第nのノード読出ステップにおいて、前記第n-1リンクステップで設定したリンク先ノードの配列番号が指す配列要素をリーフノードとして読み出し、
    前記インデックスキー読出ステップにおいて、前記第nのノード読出ステップで読みだした前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出す、
    ことを特徴とするビット列検索方法。
  21. 請求項20記載のビット列検索方法をコンピュータに実行させることを特徴とするプログラム。
  22. 請求項20記載のビット列検索方法をコンピュータに実行させるプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  23. ビット列からなる検索キーによるビット列検索に用いられる、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造において、
    前記インデックスキーは、本来のインデックスキーのある特定のビット位置に特定のビット値を挿入したものであり、
    前記検索キーは、本来の検索キーの、前記本来のインデックスキーと同一の特定のビット位置に前記特定のビット値を挿入したものであり、
    前記ツリーは配列に記憶され、n段目(nは正整数)までのツリーの構成要素を有するものであり、該ツリーの始点であるルートノードであって、ノード参照番号1に、該ルートノードの位置を定める配列番号であるベース番号と前記ツリーの各段のノードの開始位置を定める番号であるオフセット番号を加えた値の配列番号の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ブランチノードは、前記検索キーの弁別ビット位置を格納する領域を含むが、ブランチノードとリーフノードを識別するノード種別を格納する領域、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域、及び前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記ノード種別を格納する領域、及び前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードのノード参照番号の2倍の値のノード参照番号に、前記ベース番号と該直近上位のブランチノードの次の段のオフセット番号を加えた値の配列番号の配列要素に配置され、前記リーフノードはn段目にのみ位置するものであり、
    前記ツリーの記憶手段を備えたビット列検索装置により、
    検索を開始するルートノードのノード参照番号1と該ルートノードについての前記オフセット番号と前記ベース番号に基づいて該ルートノードの配置された配列要素の配列番号を取得し、該取得した配列番号をリンク先ノードの配列番号として設定する検索開始位置設定ステップと、
    第1~第nのノード読出ステップと、
    第1~第n-1のリンクステップと、
    インデックスキー読出ステップと、
    を備え、
    前記第1のノード読出ステップにおいて、前記検索開始位置設定ステップでリンク先ノードの配列番号として設定された配列番号の配列要素から該配列要素に配置されたルートノードを読み出し、
    前記第1のリンクステップにおいて、前記第1のノード読出ステップで読み出されたルートノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ルートノードのノード参照番号1の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ルートノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定し、
    前記第2~第n-1のノード読出ステップにおいて、それぞれ前記第1~第n-2のリンクステップで設定したリンク先ノードの配列番号が指す配列要素をブランチノードとして読み出し、
    前記第2~第n-1のリンクステップは、それぞれ前記第2~第n-1のノード読出ステップで読み出されたブランチノードの弁別ビット位置を格納する領域から当該弁別ビット位置を読み出し、該読み出した弁別ビット位置の前記検索キーのビット値と前記ブランチノードのノード参照番号の2倍の値との和を前記リンク先ノードのノード参照番号とし、該ノード参照番号と前記ベース番号と前記ブランチノードの次の段のオフセット番号の和をリンク先ノードの配列番号として設定するものであり、
    前記第nのノード読出ステップにおいて、前記第n-1リンクステップで設定したリンク先ノードの配列番号が指す配列要素をリーフノードとして読み出し、
    前記インデックスキー読出ステップにおいて、前記第nのノード読出ステップで読みだした前記リーフノードのインデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域から直接当該インデックスキーを読み出す、あるいは該インデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出す検索方法の実行を可能とすることを特徴とするデータ構造。
  24. 請求項23記載のデータ構造を記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
  25. ビット列からなる検索キーにより、検索対象であるビット列からなるインデックスキーあるいは該インデックスキーにアクセスするための情報が格納されたツリーのデータ構造に基づいて、前記インデックスキーを検索するビット列検索装置において、
    前記インデックスキーは、本来のインデックスキーのある特定のビット位置に特定のビット値を挿入したものであり、
    前記検索キーは、本来の検索キーの、前記本来のインデックスキーと同一の特定のビット位置に前記特定のビット値を挿入したものであり、
    前記ツリーは配列に記憶され、n段目(nは正整数)までのツリーの構成要素を有するものであり、
    該ツリーの始点であるルートノードであって、ノード参照番号1に、前記配列の先頭の配列要素の位置を定める番号であるベース番号を加えた値の配列番号の配列要素に配置されるルートノードと、前記配列の隣接した配列要素に配置される代表ノードと非代表ノードである2つのノードを有する、ツリーの構成要素としてのノード対を有し、前記ブランチノードは、前記検索キーの弁別ビット位置を格納する領域を含むが、ブランチノードとリーフノードを識別するノード種別を格納する領域、リンク先である直近下位のノード対の代表ノードの配置された配列要素の配列番号を格納する領域、及び前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含まないものであり、前記リーフノードは、前記インデックスキーあるいは該インデックスキーにアクセスするための情報を格納する領域を含むが、前記ノード種別を格納する領域、及び前記検索キーの弁別ビット位置を格納する領域を含まないものであって、前記代表ノードは該代表ノードの直近上位のブランチノードのノード参照番号の2倍の値のノード参照番号に、前記ベース番号を加えた値の配列番号の配列要素に配置され、前記リーフノードはn段目にのみ位置する、カップルドノードツリーを記憶する検索ツリー記憶手段と、
    前記検索キーの、各ブランチノードの前記弁別ビット位置と一致するビット位置のビット値を分岐先情報として前記ブランチノードに対応して格納する分岐先配列を記憶する分岐先情報記憶手段と、
    前記検索ツリー記憶手段に記憶されたカップルドノードツリーからブランチノードをノード参照番号順に読み出し、該ブランチノードの弁別ビット位置と前記検索キーにより前記分岐先情報を抽出して前記分岐先配列の配列番号1の配列要素から順次各配列要素に設定する分岐先情報設定実行部と、
    前記分岐先配列に設定された配列番号1の配列要素に格納された分岐先情報を前記カップルドノードツリーの第1段のノードの分岐先情報として読み出し、該読み出した分岐先情報に前記配列番号1を2倍した値を加えて得られる値を、前記カップルドノードツリーの第2段のノードの分岐先情報が格納された前記分岐先配列の配列要素の配列番号とし、以下、第2段のノードの分岐先情報に該第2段のノードの分岐先情報が格納された前記配列要素の配列番号を2倍した値を加えて得られる値を、前記カップルドノードツリーの第3段のノードの分岐先情報が格納された前記分岐先配列の配列要素の配列番号とするように、自段のノードの分岐先情報に該自段のノードの分岐先情報が格納された前記配列要素の配列番号を2倍した値を加えて得られる値を、前記カップルドノードツリーの次段のノードの分岐先情報が格納された前記分岐先配列の配列要素の配列番号とすることを前記カップルドノードツリーの第n-2段のノードまで繰り返して前記カップルドノードツリーの第n-1段のノードの分岐先情報の格納された前記分岐先配列の配列要素の配列番号を求める次段ノード分岐先情報格納位置計算実行部と、
    前記次段ノード分岐先情報格納位置計算実行部が求めた配列番号により、前記分岐先配列から前記カップルドノードツリーの第n-1段のノードの分岐先情報を読み出し、該読み出した分岐先情報と該配列番号に基づいてリーフノードの格納位置を求め、前記検索ツリー記憶手段に記憶されたカップルドノードツリーから該格納位置に格納されたリーフノードを読み出すリーフノード出力実行部と、
    を備えることを特徴とするビット列検索装置
  26. 請求項25記載のビット列検索装置において、
    前記カップルドノードツリーを記憶する配列は、ブランチノードを記憶するブランチノード配列とリーフノードを記憶するリーフノード配列から構成され、該ブランチノード配列は、前記カップルドノードツリーを記憶する配列のうち、前記カップルドノードツリーのn-1段目までのツリーの構成要素を記憶する部分と一致するものであり、
    前記リーフノード出力実行部は、前記次段ノード分岐先情報格納位置計算実行部が求めた配列番号により、前記分岐先配列から前記カップルドノードツリーの第n-1段のノードの分岐先情報を読み出し、該読み出した分岐先情報と該配列番号を2倍した値の和から前記ブランチノード配列のノード参照番号の最大値を減じたリーフノード配列のノード参照番号を求め、該リーフノード配列のノード参照番号に該リーフノード配列の先頭の配列要素の位置を定める番号であるベース番号を加えた値の配列番号を前記リーフノードの格納位置として求め、前記検索ツリー記憶手段に記憶されたカップルドノードツリーから該格納位置に格納されたリーフノードを読み出し、該リーフノードからインデックスキーを読み出す、あるいはインデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すことを特徴とするビット列検索装置。
  27. 請求項25記載のビット列検索装置が実行するビット列検索方法において、
    前記検索ツリー記憶手段に記憶されたカップルドノードツリーからブランチノードをノード参照番号順に読み出し、該ブランチノードの弁別ビット位置と前記検索キーにより前記分岐先情報を抽出して前記分岐先配列の配列番号1の配列要素から順次各配列要素に設定する分岐先情報設定ステップと、
    前記分岐先配列に設定された配列番号1の配列要素に格納された分岐先情報を前記カップルドノードツリーの第1段のノードの分岐先情報として読み出し、該読み出した分岐先情報に前記配列番号1を2倍した値を加えて得られる値を、前記カップルドノードツリーの第2段のノードの分岐先情報が格納された前記分岐先配列の配列要素の配列番号とし、以下、第2段のノードの分岐先情報に該第2段のノードの分岐先情報が格納された前記配列要素の配列番号を2倍した値を加えて得られる値を、前記カップルドノードツリーの第3段のノードの分岐先情報が格納された前記分岐先配列の配列要素の配列番号とするように、自段のノードの分岐先情報に該自段のノードの分岐先情報が格納された前記配列要素の配列番号を2倍した値を加えて得られる値を、前記カップルドノードツリーの次段のノードの分岐先情報が格納された前記分岐先配列の配列要素の配列番号とすることを前記カップルドノードツリーの第n-2段のノードまで繰り返して前記カップルドノードツリーの第n-1段のノードの分岐先情報の格納された前記分岐先配列の配列要素の配列番号を求める次段ノード分岐先情報格納位置計算ステップと、
    前記次段ノード分岐先情報格納位置計算ステップで求めた配列番号により、前記分岐先配列から前記カップルドノードツリーの第n-1段のノードの分岐先情報を読み出し、該読み出した分岐先情報と該配列番号に基づいてリーフノードの格納位置を求め、前記検索ツリー記憶手段に記憶されたカップルドノードツリーから該格納位置に格納されたリーフノードを読み出すリーフノード出力ステップと、
    を備えることを特徴とするビット列検索方法。
  28. 請求項27記載のビット列検索方法において、
    前記カップルドノードツリーを記憶する配列は、ブランチノードを記憶するブランチノード配列とリーフノードを記憶するリーフノード配列から構成され、該ブランチノード配列は、前記カップルドノードツリーを記憶する配列のうち、前記カップルドノードツリーのn-1段目までのツリーの構成要素を記憶する部分と一致するものであり、
    前記リーフノード出力ステップは、前記次段ノード分岐先情報格納位置計算ステップで求めた配列番号により、前記分岐先配列から前記カップルドノードツリーの第n-1段のノードの分岐先情報を読み出し、該読み出した分岐先情報と該配列番号を2倍した値の和から前記ブランチノード配列のノード参照番号の最大値を減じたリーフノード配列のノード参照番号を求め、該リーフノード配列のノード参照番号に該リーフノード配列の先頭の配列要素の位置を定める番号であるベース番号を加えた値の配列番号を前記リーフノードの格納位置として求め、前記前記検索ツリー記憶手段に記憶されたカップルドノードツリーから該格納位置に格納されたリーフノードを読み出し、該リーフノードからインデックスキーを読み出す、あるいはインデックスキーにアクセスするための情報に基づき当該インデックスキーを読み出すことを特徴とするビット列検索方法。
  29. 請求項27又は請求項28記載のビット列検索方法をコンピュータに実行させることを特徴とするプログラム。
  30. 請求項27又は請求項28記載のビット列検索方法をコンピュータに実行させるプログラムを記憶したことを特徴とするコンピュータ読み取り可能な記憶媒体。
PCT/JP2010/006834 2009-11-30 2010-11-23 ビット列検索装置、検索方法及びプログラム WO2011064984A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN2010800626871A CN102741841A (zh) 2009-11-30 2010-11-23 比特序列检索装置、检索方法以及程序
EP10832837A EP2515245A1 (en) 2009-11-30 2010-11-23 Bit stream retrieval device, retrieval method, and program
US13/483,940 US20120239664A1 (en) 2009-11-30 2012-05-30 Bit string search apparatus, search method, and program

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
JP2009272514 2009-11-30
JP2009-272514 2009-11-30
JP2010043644A JP5220047B2 (ja) 2009-11-30 2010-02-28 ビット列検索装置、検索方法及びプログラム
JP2010-043644 2010-02-28
JP2010121153A JP5220057B2 (ja) 2010-05-27 2010-05-27 ビット列検索装置、検索方法及びプログラム
JP2010-121153 2010-05-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/483,940 Continuation US20120239664A1 (en) 2009-11-30 2012-05-30 Bit string search apparatus, search method, and program

Publications (1)

Publication Number Publication Date
WO2011064984A1 true WO2011064984A1 (ja) 2011-06-03

Family

ID=46829310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/006834 WO2011064984A1 (ja) 2009-11-30 2010-11-23 ビット列検索装置、検索方法及びプログラム

Country Status (4)

Country Link
US (1) US20120239664A1 (ja)
EP (1) EP2515245A1 (ja)
CN (1) CN102741841A (ja)
WO (1) WO2011064984A1 (ja)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9971821B1 (en) * 2015-02-17 2018-05-15 Cohesity, Inc. Search and analytics for a storage systems
JP5960863B1 (ja) * 2015-03-11 2016-08-02 エヌ・ティ・ティ・コミュニケーションズ株式会社 検索装置、検索方法、プログラム、及び記録媒体
US10776426B1 (en) * 2017-04-28 2020-09-15 EMC IP Holding Company LLC Capacity management for trees under multi-version concurrency control
CN107451486B (zh) * 2017-06-30 2021-05-18 华为技术有限公司 一种文件系统的权限设置方法及装置
CN109614411B (zh) * 2018-11-19 2022-03-04 杭州复杂美科技有限公司 数据存储方法、设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999046696A1 (en) * 1998-03-12 1999-09-16 Telefonaktiebolaget Lm Ericsson (Publ) Method and access means for determining the storage address of a data value in a memory device
JP2008015872A (ja) 2006-07-07 2008-01-24 S Grants Co Ltd ビット列検索装置、検索方法及びプログラム
JP2008112240A (ja) 2006-10-30 2008-05-15 S Grants Co Ltd ビット列検索方法及びプログラム
JP2008269197A (ja) 2007-04-19 2008-11-06 S Grants Co Ltd カップルドノードツリーの退避/復元方法及びプログラム
JP2008269503A (ja) 2007-04-25 2008-11-06 S Grants Co Ltd ビット列検索方法及び検索プログラム
JP2009251840A (ja) * 2008-04-04 2009-10-29 S Grants Co Ltd ビット列検索装置、検索方法及びプログラム

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963868B2 (en) * 2002-06-03 2005-11-08 International Business Machines Corporation Multi-bit Patricia trees
JP4402120B2 (ja) * 2007-01-24 2010-01-20 株式会社エスグランツ ビット列検索装置、検索方法及びプログラム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999046696A1 (en) * 1998-03-12 1999-09-16 Telefonaktiebolaget Lm Ericsson (Publ) Method and access means for determining the storage address of a data value in a memory device
JP2008015872A (ja) 2006-07-07 2008-01-24 S Grants Co Ltd ビット列検索装置、検索方法及びプログラム
JP2008112240A (ja) 2006-10-30 2008-05-15 S Grants Co Ltd ビット列検索方法及びプログラム
JP2008269197A (ja) 2007-04-19 2008-11-06 S Grants Co Ltd カップルドノードツリーの退避/復元方法及びプログラム
JP2008269503A (ja) 2007-04-25 2008-11-06 S Grants Co Ltd ビット列検索方法及び検索プログラム
JP2009251840A (ja) * 2008-04-04 2009-10-29 S Grants Co Ltd ビット列検索装置、検索方法及びプログラム

Also Published As

Publication number Publication date
US20120239664A1 (en) 2012-09-20
EP2515245A1 (en) 2012-10-24
CN102741841A (zh) 2012-10-17

Similar Documents

Publication Publication Date Title
EP2048584B1 (en) Bit sequence search device, search method, and program
Zeimpekis et al. TMG: A MATLAB toolbox for generating term-document matrices from text collections
CN1552032B (zh) 数据库
TWI480746B (zh) 使用經結構化之資料儲存器達到較快速全文檢索
JP4502223B2 (ja) ビット列のマージソート装置、方法及びプログラム
US20090094262A1 (en) Automatic Generation Of Ontologies Using Word Affinities
JP4514771B2 (ja) カップルドノードツリーの最長一致/最短一致検索装置、検索方法及びプログラム
WO2011064984A1 (ja) ビット列検索装置、検索方法及びプログラム
JPWO2009063925A1 (ja) 文書管理・検索システムおよび文書の管理・検索方法
EP1342177A1 (en) Method for structuring and searching information
JP2008112240A (ja) ビット列検索方法及びプログラム
CN110795526B (zh) 一种用于检索系统的数学公式索引创建方法与系统
CN111506621A (zh) 一种数据统计方法及装置
CN101763415A (zh) 一种数据库的b树索引的生成方法及装置
Luna et al. Efficient mining of top-k high utility itemsets through genetic algorithms
Barsky et al. Suffix trees for very large genomic sequences
KR20130013510A (ko) 의미론적 특허 유사성을 이용한 특허 네트워크 분석 시스템 및 이를 이용한 특허 네트워크 분석 방법
JP5220047B2 (ja) ビット列検索装置、検索方法及びプログラム
CN111581162B (zh) 一种基于本体的海量文献数据的聚类方法
JP3639480B2 (ja) 類似データ検索方法,類似データ検索装置,および類似データ検索用プログラム記録媒体
JP2011018296A (ja) カップルドノードツリーのインデックスキー挿入/削除方法
CN117725087B (zh) 一种基于重排序的代码搜索去偏差方法及系统
Arab et al. MDMP: a new algorithm to create inverted index files in BigData, using MapReduce
CN108363696A (zh) 一种文本信息的处理方法及装置
He Succinct indexes

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080062687.1

Country of ref document: CN

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

Ref document number: 10832837

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2010832837

Country of ref document: EP