WO2010073471A1 - Système, procédé et programme de tri de données de chaîne de bits - Google Patents

Système, procédé et programme de tri de données de chaîne de bits Download PDF

Info

Publication number
WO2010073471A1
WO2010073471A1 PCT/JP2009/006001 JP2009006001W WO2010073471A1 WO 2010073471 A1 WO2010073471 A1 WO 2010073471A1 JP 2009006001 W JP2009006001 W JP 2009006001W WO 2010073471 A1 WO2010073471 A1 WO 2010073471A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
bit position
difference bit
difference
link
Prior art date
Application number
PCT/JP2009/006001
Other languages
English (en)
Japanese (ja)
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
Application filed by 株式会社エスグランツ filed Critical 株式会社エスグランツ
Publication of WO2010073471A1 publication Critical patent/WO2010073471A1/fr
Priority to US13/067,722 priority Critical patent/US8515976B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/22Arrangements for sorting or merging computer data on continuous record carriers, e.g. tape, drum, disc
    • G06F7/24Sorting, i.e. extracting data from one or more carriers, rearranging the data in numerical or other ordered sequence, and rerecording the sorted data on the original carrier or on a different carrier or set of carriers sorting methods in general

Definitions

  • the present invention relates to a sorting apparatus, a method, and a program for key data represented by a bit string.
  • Patent Document 1 introduces quick sort, radic sort (radix sort), and the like.
  • Patent Document 2 also describes radix sort.
  • FIG. 1A is a diagram for explaining the concept of conventional radix sorting.
  • the key that is the 4-bit bit string to be sorted illustrated in FIG. 1A is sorted by repeating the classification by the bit value at each bit position from the 0th bit to the 3rd bit.
  • the hereinafter, the concept of the radix sort will be described with reference to FIG. 1A.
  • FIG. 1A shows a key column 100 including keys to be sorted.
  • the key “1111” is stored in the storage area in which the key position 101, which is the position of the key included in the key string 100, is 100a (hereinafter referred to as the key position 100a).
  • the key position 100a the key position of the key included in the key string 100
  • keys “0011”, “1010”, “0001”, and “1110” exist at the key positions 100b, 100c100d, and 100e, respectively.
  • classification by the 0th bit of the key included in the key string 100 is performed by the classification (0th bit) 110a for each bit position.
  • a 0-bit value 0 set 120a composed of the key “0001” and the key “0011” and a value 1 set 121a composed of the key “1111”, the key “1010”, and the key “1110” are obtained.
  • the set 0a of the value 0 is classified by the value of the first bit by the classification (first bit) 110b for each bit position
  • the set 121a of the value 1 is classified by the value of the first bit by the classification (first bit) 110e for each bit position. Done.
  • the classification (first bit) 110b for each bit position since the first bits of the key “0001” and the key “0011” are both 0, only the set 120b of the value 0 of the first bit is obtained, and 0 bit The same key as the set 120a of the eye value 0 becomes the target of classification by the second bit, and classification by the second bit is performed by the classification (second bit) 110c for each bit position.
  • the classification (second bit) 110c for each bit position one key “0001” is obtained as a set 120d of the value 0 of the second bit, so the key of the sorted key string 130 that stores the key that is the minimum value Is stored in a storage area 130a (hereinafter referred to as key position 130a).
  • each bit position (first bit) 110e one key “1010” is obtained as the set 120e of the value 0 of the first bit, which is the next storage position of the sorted key string 130. Stored in key position 130c. Also, a set of the key “1111” and the key “1110” is obtained as the value 1 set 121e of the first bit, and the classification of each bit position (second bit) 110f is based on the value of the second bit. Classification is performed.
  • the classification (second bit) 110f for each bit position since the second bits of the key “1111” and the key “1110” are both 1, only the set 121f of the value 1 of the first bit can be obtained.
  • the same key as the eye value 1 set 121e is the target of classification by the third bit, and classification by the value of the third bit is performed by the classification (third bit) 110g for each bit position.
  • one key “1110” is obtained as a set 120g of the third bit value 0, so that the key position 130d, which is the next storage position of the sorted key string 130, is obtained. Stored.
  • one key “1111” is obtained as a set 121g of the value 1 of the third bit, it is stored in the key position 130e that is the next storage position of the sorted key string 130.
  • the keys of the key string 100 are sorted and stored in the key positions 130a to 130e of the sorted key string 130.
  • sorting is performed by the above-described radix sort method, as shown in the classification for each bit position (first bit) 110b and the classification for each bit position (second bit) 110f shown in FIG. Invalid processing that does not occur occurs.
  • the problem to be solved by the present invention is to provide an efficient sorting method in which invalid processing does not occur in the sort processing of bit string data.
  • a bit string comparison between a key that is a reference and a bit string that is a sort target is performed, a difference bit position that is a bit position that is a different bit value is first obtained, and sorting by the difference bit position is performed.
  • the target key is classified, and the sorted key string is obtained by further repeating the classification based on the difference bit position for the reference key among the plurality of keys classified into the same difference bit position.
  • the keys are sorted by the difference bit position, invalid processing that does not perform classification does not occur. Therefore, efficient sort processing can be realized.
  • FIG. 1B is a diagram for explaining the concept of the sorting process based on the difference bit position according to the embodiment of the present invention.
  • the sort target key string 100 and the sorted key string 130 are the same as those shown in FIG. 1A.
  • Each key constituting the key string 100 has a difference bit position of 0 for the minimum value key 148a, the key group 142a whose difference bit position is 2 with respect to the minimum value key, and the minimum value key 148a in the classification 149a based on the difference bit position.
  • the key group 140a is classified as follows. In the illustrated example, the minimum value key 142a is “0001”. Only the key “0011” is included in the key group 142a, and the keys “1010”, “1111”, and “1110” are included in the key group 140a.
  • the minimum value key 148a can be obtained when the key is read from the key string 100 into the input buffer for sorting processing based on the difference bit position.
  • the minimum value key 148a is stored in the key position 130a of the sorted key row 130 as indicated by the dotted arrow 158a in the figure. Further, since there is only one key in the key group 142a, the key group 142a is stored in the key position 130b of the sorted key row 130 as indicated by the dotted arrow 152a in the figure.
  • the key group 140a whose difference bit position with respect to the minimum value key 148a is 0 includes a plurality of keys, as shown in the dotted arrow set 150a in FIG.
  • the minimum value key 148b in 140a and the key group 141b in which the difference bit position between the minimum value key 148b is 1 are classified.
  • the minimum value key 148b is “1010”.
  • the key group 141b includes a key “1111” and a key “1110”.
  • the minimum value key 148b is stored in the key position 130c of the sorted key row 130 as indicated by the dotted arrow 158b in the figure.
  • the key group 141b whose difference bit position is 1 with respect to the minimum value key 148a includes a plurality of keys, as indicated by a dotted arrow set 151b in the figure, in the classification 149c based on the difference bit position,
  • the minimum value key 148c in the key group 141b and the key group 143c in which the difference bit position between the minimum value key 148c is 3 are classified.
  • the minimum value key 148c is “1110”.
  • the key group 143c includes only the key “1111”.
  • the minimum value key 148c is stored in the key position 130d of the sorted key row 130 as indicated by the dotted arrow 158c in the figure. Further, since there is only one key in the key group 143c, the key group 143c is stored in the key position 130e of the sorted key row 130 as indicated by a dotted arrow 153c in the figure.
  • the keys of the key column 100 are stored in ascending order at the key positions 130a to 130e of the sorted key column 130, and the sorting process is completed. Since the sorting process according to the present embodiment repeats the classification based on the difference bit position, the key classification is always executed for each classification process.
  • the minimum value key is used as a reference key for calculating the difference bit position.
  • the maximum value key may be used as a reference key for calculating the difference bit position.
  • the maximum value key is the key “1111”, and the maximum value key and the key “3” as the result of the classification process based on the first difference bit position.
  • a key “1010” having a difference bit position of 1 and a key “0011” and “0001” having a difference bit position of 1110 is obtained.
  • FIG. 2A explains an example of the data structure used in the sort processing based on the difference bit position in the embodiment of the present invention.
  • a key table 309 As shown in FIG. 2A, a key table 309, a difference bit position table 310, a link table 311 and a sorted key table 313 are used.
  • the key table 309 is set by reading the sort target key 602 when a sort request is made.
  • the five keys 602 to be sorted those included in the key column 100 shown in FIGS. 1A and 1B are read.
  • the head of the reading position 601 in the key table 309 is P0, and is followed by P1, P2, P3, and P4.
  • the minimum value key “0001” is set at the reading position P0, it may be set in another area.
  • the minimum value key is stored at a predetermined position in the sorted key table 313.
  • the difference bit position table 310 stores the read position 601 of the smallest key among the keys having the same difference bit position with respect to the minimum value key as the parent link 612 for each difference bit position 611.
  • the read position P3 is stored at a position where the difference bit position 611 of the difference bit position table 310 is 0.
  • the key “0011” is the only key whose difference bit position is 2 with respect to the minimum value key “0001”.
  • Read position P2 is stored at a position where the difference bit position 611 of the difference bit position table 310 is 2.
  • the link table 311 is for accessing a key having the same differential bit position with respect to the minimum value key. As shown in the figure, a link 622 indicating a key reading position having the same differential bit position is stored with respect to the key reading position 621.
  • the read position P3 is referred to as the read position 621 with respect to the read position P3 of the minimum value key of the key having the same difference bit position 0.
  • the same as the minimum value key “1010” of the key having the difference bit position 0 with respect to the minimum value key “0001” at the read position of the link table 311 (hereinafter referred to as the read position P3 of the link table 311).
  • the read position P4 of the key table 309 of the key “1110” having the difference bit position 0 is stored.
  • the reading position P1 of the key table 309 of the key “1111” having the same differential bit position 0 is stored at the reading position P4 of the link table 311. Also, as indicated by the dotted arrow 671c in the figure, the reading position P1 of the key table 309 having the same value is stored in the reading position P1 of the link table 311. This indicates that there is no key having the same differential bit position 0 any more.
  • the read position P2 of the link table 311 is compared with the read position P2 of the minimum value key of the key having the same difference bit position 2.
  • the states of the difference bit position table 310 and the link table 311 shown in FIG. 2A described above are obtained by executing the classification 149a based on the difference bit positions shown in FIG. 1B.
  • the key table 309 described above is an example of the sort target key storage means of the invention according to claim 1.
  • the difference bit position table 310 and the link table 311 constitute one embodiment of the classification target key difference bit position storage means, and the reading position 601 of the key table 309 corresponds to key identification information.
  • FIG. 2B is a diagram for explaining a functional block configuration example of the bit string data sorting device according to the embodiment of the present invention.
  • the bit string data sorting device 200 includes a difference bit position calculation means 210, a difference bit position classification means 220, a sorted key output means 230, and a control means 240.
  • the difference bit position calculation means 210 calculates the difference bit position of the key to be subjected to the classification processing based on the difference bit position from the keys 602 stored in the key table 309.
  • the control unit 240 sets all the keys stored in the key table 309 as the target of the first classification process.
  • the key serving as a reference for calculating the difference bit position is the minimum value key “0001” stored at the reading position P0.
  • the sorted key output unit 230 outputs the minimum value key “0001” to the sorted key table 313.
  • the difference bit position classification means 220 writes the difference bit position table 310 and the link table 311 based on the calculation result of the difference bit position calculation means 210. As a result, the key identification information is classified into a set (P3, P4, P1) with a difference bit position of 0 and a set (P2) with a difference bit position of 2 with the reading position 601 of the key table 309 as a reading position.
  • the control unit 240 performs control so that the difference bit position calculation by the difference bit position calculation unit 210 and the classification process by the difference bit position classification unit 220 are repeated for a set including a plurality of keys after classification.
  • FIG. 3 is a diagram for explaining a hardware configuration example for carrying out the present invention.
  • Sort processing according to the present invention is performed by a data processing device 301 including at least a central processing unit 302 and a cache memory 303 using a data storage device 308.
  • the data storage device 308 having the key table 309, the difference bit position table 310, the link table 311, and the sorted key table 313 can be realized by the main storage device 305 or the external storage device 306, or via the communication device 307. It is also possible to use a remotely located device connected.
  • 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
  • the key table 309 is in the external storage device 306, and other tables are in the main storage device 305. It is obvious that the hardware configuration can be appropriately selected according to the size of the set of sorting target keys.
  • the temporary storage area of the main storage device 305 corresponding to each process is used in order to use various values obtained during the process in the subsequent process.
  • a value stored or set in the primary storage area may be referred to as a temporary storage area name.
  • FIGS. 4A and 4B the sorting process according to the embodiment of the present invention will be described in detail with reference to FIGS. 4A and 4B. Moreover, in the description, it demonstrates using the illustration of FIG. 1B or FIG. 2A suitably.
  • FIG. 4A is a diagram for explaining an example of the processing flow of the sorting processing at the first stage of the sorting processing and the output processing of the sorted keys in one embodiment of the present invention. It is assumed that a key to be sorted is stored in the key table, and a minimum value key is stored at the top reading position of the key table. That is, the keys included in the key string 100 shown in FIG. 1B are stored in the key table 309 as shown in FIG. 2A.
  • the head position of the key table is set to a key table reading position (hereinafter, simply referred to as a reading position).
  • the “reading position of the key table” here is one of the “temporary storage areas corresponding to each processing in order to use various values obtained during the processing in the subsequent processing” described above.
  • the key table read position is a primary storage area (not shown), such as “the head position of the key table is set as the key table read position”.
  • P0 is set at the reading position of the key table.
  • step S402 the key pointed to by the head position is extracted from the key table as the minimum value key.
  • “take out as a minimum value key” means to set to a minimum value key which is a primary storage area (not shown). In the following, similar notation may be used.
  • step S403 the next reading position is set as the reading position.
  • step S404 it is determined whether all the keys have been processed, that is, whether the classification process at the first stage for all the keys has been completed.
  • step S405 the key pointed to by the reading position is extracted from the key table as a sort key, and the reading position is set as the reading position of the sort key.
  • step S406 the difference bit position between the sort key and the minimum value key is obtained, the sort key is classified by the difference bit position, and the process returns to step S403.
  • the difference bit position table and the link table are set as the classification process in the first stage. Details of the processing will be described later with reference to FIGS. 5A and 5B.
  • step S404 determines whether all the keys have been processed. If it is determined in step S404 that all the keys have been processed, the process branches to step S407, where the minimum value key obtained in step S402 is set in the sorted key table, and the steps after step S408 shown in FIG. 4B are performed. Proceed to the process. With the above processing, the values of the entries in the difference bit position table 310 and the link table 311 are set as illustrated in FIG. 2A. Further, the minimum value key “0001” is stored in the sorted key table 313.
  • FIG. 4B is a diagram illustrating an example of a processing flow of classification processing after the first stage of sorting processing and output processing of sorted keys according to an embodiment of the present invention.
  • step S408 the difference bit position in the difference bit position table, that is, the maximum value of the difference bit position that the sort target key may have, is set as an initial value in the difference bit position that is a primary storage area (not shown). In the example of FIG. 2A, 3 is set as the maximum value of the difference bit position.
  • step S409 it is determined whether or not all the differential bit position entries in the differential bit position table have been processed. If processed, the sort process is terminated, and if not processed, the process proceeds to step S410.
  • step S410 the parent link is read from the entry indicated by the difference bit position from the difference bit position table. If the parent link is stored in the entry indicated by the difference bit position, the read parent link is set as the parent link which is the primary storage area. That is, a notation such as “read parent link” in the description of this embodiment may mean that the parent link is read and set to a parent link which is a primary storage area (not shown). The same applies to items other than the parent link.
  • step S411 it is determined whether the parent link has been set. If it has not been set, the value is decremented by 1 from the difference bit position in step S416 and the process returns to step S409. If it has been set, the process proceeds to step S412.
  • step S412 the key pointed to by the parent link (key table read position) set in step S410 is extracted from the key table as a sorted key, and the extracted sorted key is set in the sorted key table.
  • the sorted key table in step S412. Set to.
  • step S413 the link pointed to by the parent link set in step S410 is read from the link table as the next link.
  • step S414 the parent link pointed to by the difference bit position in the difference bit position table is deleted, and the flow returns to step S415. move on.
  • the parent link pointed to by the difference bit position in the difference bit position table is deleted because the minimum value key classification process in which the reading position of the key table is the parent link has been completed in step S412, and the difference bit position table no longer exists. This is because the above parent link is not necessary and the influence on the subsequent processing due to this parent link remaining in the difference bit position table is avoided.
  • step S415 it is determined whether the next link read in step S413 is the same as the parent link set in step S410. If it is determined in step S415 that the next link and the parent link are the same, the process returns to step S409 via step S416 described above.
  • the sorted key is extracted and stored in the sorted key table in descending order of the difference bit position. Since the value of the key with the larger difference bit position is closer to the value of the minimum value key, the sorted key can be stored in the sorted key table in ascending order by extracting the sorted key in descending order of the difference bit position. it can.
  • step S415 It is determined in step S415 that the next link and the parent link are the same when the key having the difference bit position in which the parent link is stored has only the key having the parent link as the reading position of the key table.
  • the read position 621 of the link table 311 is P2
  • the link 622 is P2.
  • the value 1 is reduced from the difference bit position, and step S409 for the next difference bit position is performed.
  • the process proceeds to S415.
  • processing is performed for the key group 140a at the difference bit position 0.
  • step S415 determines whether the next link and the parent link are not the same. If it is determined in step S415 that the next link and the parent link are not the same, the process proceeds to step S417, and a plurality of keys having the same differential bit position (set in step S408 or step S416) are subordinated. Is further classified according to the difference bit position. Details of the processing in step S417 will be described later with reference to FIG. 5C.
  • the read position 621 of the link table 311 is P3 and the link 622 is P4.
  • classification 149b and 149c based on difference bit positions is executed for a plurality of keys of the key group 140a.
  • the difference bit position table and the link table are reset, and the process returns to step S408. Then, the processing for the set difference bit position of the parent link in the reset difference bit position table is repeated.
  • step S409 The above-described processing is repeated until it is determined in step S409 that all the differential bit position entries in the differential bit position table have been processed, and when the determination is obtained, sorting of the sorting target keys is completed.
  • the process is terminated.
  • the process illustrated in FIG. 4B is a process in which the key used as a reference for calculating the difference bit position is the minimum key, the process is performed in the descending order of the difference bit positions, and the sorted keys are extracted in the ascending order.
  • the key used as a reference for calculating the difference bit position is the maximum key, it is possible to extract the sorted keys in descending order by performing processing in ascending order of the difference bit positions. It will be apparent to those skilled in the art from the description of the specification and the drawings.
  • FIG. 5A and 5B are detailed processing flow examples of the process in step S406 shown in FIG. 4A and the process in step S524 shown in FIG. 5C described later.
  • FIG. 5A is a diagram for explaining an example of the processing flow of the previous stage of the processing for classifying keys in one embodiment of the present invention.
  • step S501 the key set as the sort key and the key set as the minimum value key are compared as a bit string, and the bit position of the first non-matching bit viewed from the upper 0 bit is represented as a difference bit.
  • the sort key is set in step S405 shown in FIG. 4A or step S522 shown in FIG. 5C described later, and is a target key for the classification process shown in FIGS. 5A and 5B.
  • step S502 the parent link indicated by the difference bit position set in step S501 is read from the difference bit position table, and in step S503, it is determined whether the parent link has been set. If the parent link has not been set, the process proceeds to step S504, where the sort key read position is set to the parent link pointed to by the difference bit position in the difference bit position table. In step S505, the sort key read position is pointed to. The sorting key reading position is set for the link, and the process is terminated.
  • the read position of the smallest key among the keys having the same difference bit position as described above is stored as the parent link.
  • the first sort key is stored.
  • the read position of the sort key is set to the parent link pointed to by the difference bit position in the difference bit position table.
  • step S504 the sort key reading position in the processing of step S504 is set in step S405 shown in FIG. 4A or in step S523 shown in FIG. 5C described later.
  • FIG. 5B is a diagram for explaining the processing flow of the latter stage of the processing for classifying the keys in one embodiment of the present invention.
  • step S506 the key pointed to by the parent link is read from the key table as the parent sort key, and in step S507, it is determined whether the sort key is smaller than the parent sort key.
  • step S507 If it is determined in step S507 that the sort key is smaller than the parent sort key, the process advances to step S508 to set the sort key read position to the parent link pointed to by the difference bit position in the difference bit position table, and in step S509, the sort key of the link table.
  • step S508 the sort key read position to the parent link pointed to by the difference bit position in the difference bit position table
  • step S509 the sort key of the link table.
  • the parent link obtained in step S502 is set to the link pointed to by the read position, and the process ends.
  • step S508 The processing in step S508 described above is performed in order to set the read position of the smaller key among the keys having the same difference bit position in the parent link pointed to by the difference bit position in the difference bit position table. To update the parent link. Then, the process of step S509 sets the parent link set in the difference bit position table to the link of the link table pointed to by the read position of the sort key newly set in the difference bit position table. The information for tracing the reading position in the key table of the key having the same differential bit position is held.
  • step S507 if it is determined in step S507 that the sort key is not smaller than the parent sort key, the process proceeds to step S510, and the link pointed to by the parent link is read from the link table as the next link.
  • step S511 the next link and the parent link are the same. judge.
  • step S512 the read position of the sort key is set to the link indicated by the parent link in the link table.
  • step S513 the sorting key reading position is set in the link indicated by the sorting key reading position in the link table, and the process ends.
  • step S511 determines whether the next link and the parent link are not the same. If it is determined in step S511 that the next link and the parent link are not the same, the process proceeds to step S514, and the read position of the sort key is set to the link indicated by the parent link in the link table. In step S515, the next link obtained in step S510 is set to the link pointed to by the read position of the sort key in the link table, and the process ends.
  • step S511 The determination in step S511 described above is the same as the determination as to whether there is only one classified key among keys having the same differential bit position. If there is only one classified key, the read position is stored in the link of the link table indicated by the read position of this key. Therefore, it is updated at the read position of the sort key, and the read position of the sort key is set in the link of the link table pointed to by the read position of the sort key to indicate that the sort key is the last classified key at that time. When there are two or more classified keys, the sort key read position is inserted between the link relationship between the parent link and the next link expressed in the link table by the processing of step S514 and step S515.
  • FIG. 5C is a diagram illustrating a detailed processing flow example of processing for further classifying a plurality of keys having the same differential bit position in the embodiment of the present invention.
  • step S521 the sorted key is set as the minimum value key.
  • the sorted key is obtained in step S412 shown in FIG. 4B, and serves as a reference key for calculating the difference bit position of the sort key in step S524 described later.
  • step S522 the key pointed to by the next link is extracted from the key table as the sort key, and the next link is set as the read position of the sort key.
  • step S523 the link pointed to by the next link is read from the key table and saved in the save area.
  • the next link in step S522 is a link indicated by the parent link read from the link table in step S413 shown in FIG. 4B.
  • the parent link is P3
  • the next link is P4
  • the link pointed to by the next link and saved in the save area is P1.
  • step S523 the link pointed to by the next link is saved in the next step S524, in which the sorting key set in step S522 is classified based on the difference bit position with respect to the minimum value key set in step S521. This is because the value of the link pointed to by the next link in the link table is rewritten, so that it is saved in advance and the processing using the link pointed to by the next link after step S524 is normally performed.
  • step S524 the process of obtaining the difference bit position between the sort key and the minimum value key and classifying the sort key based on the difference bit position, which has been described in detail with reference to FIGS. 5A and 5B, is executed.
  • step S525 it is determined whether the next link and the save link match. If the evacuation link matches the next link, the process ends because there are no remaining keys to be classified having the same differential bit position.
  • step S525 if it is determined in step S525 that the save link does not match the next link, the save link is set as the next link in step S526, and the process returns to step S522, and the newly set next link is set as the key table read position.
  • the classification process is continued using the key to be sorted as the sort key to be classified.
  • FIG. 6A is a diagram for explaining the data flow of the first-stage processing for extracting keys in ascending order according to an embodiment of the present invention.
  • FIG. 6A shows a data flow for setting the keys included in the key column 100 in the key table 309.
  • the key “1111” at the key position 100a is set to the reading position P1 of the key table 309 as indicated by the dotted arrow 651a.
  • the key “0011” at the key position 100b is set to the read position P2 of the key table 309 as indicated by the dotted arrow 651b
  • the key “1010” at the key position 100c is indicated by the dotted arrow 651c.
  • the key “1110” at the key position 100e is set at the reading position P3 in the key table 309 as indicated by the dotted arrow 651e.
  • the key “0001” at the key position 100d is set at the reading position P0 in the key table 309 as the minimum value key as indicated by the dotted arrow 651d.
  • FIG. 6A (b) shows a state in which the minimum value key is extracted as the sorted key in the first-stage classification process, and the sorting target key is classified by the difference bit position using the minimum value key as a reference key. . It is similar to that shown previously in FIG. 2A.
  • the minimum value key “0001” set at the head reading position P0 of the key table 309 is set at the head writing position 640a of the sorted key table 313 as indicated by an arrow 689c.
  • the read position P3 of “1010”, which is the smallest key among the three keys whose difference bit position is 0, is the parent of the difference bit position 0 of the difference bit position table 310.
  • the read position P2 of “0011”, which is one key having a difference bit position of 2 and the smallest key, is stored as a link in the difference bit position 2 of the difference bit position table 310 as a parent link.
  • the read position of the key having the same difference bit position is stored in the read position 621 of the parent link set in the difference bit position table 310. . That is, P4 is stored as the link 622 at the reading position 621 pointed to by the parent link P3, and P2 is stored as the link 622 at the reading position 621 pointed to by the parent link P2.
  • P1 is stored as the link 622 at the reading position 621 pointed to by the link P4, and the same reading position P1 is stored as the link 622 at the reading position 621 pointed to by the link P1.
  • FIG. 6C shows a key group including the key “0011” having the parent link P2 whose difference bit position 611 is 2 as a reading position among the key groups classified in the first-stage classification processing (actual Is a diagram for explaining the flow of storing the minimum value key “0011” in the sorted key table 313 as a sorted key.
  • the parent link 612 is taken out in descending order of the difference bit position 611 of the difference bit position table 310.
  • the parent link P2 of the entry whose difference bit position 611 indicated by the arrow 682 is 2 is extracted, and as shown by the arrow 682b in the figure, the key is read from the reading position 601 indicated by the parent link P2 in the key table 309. “0011” is read and written to the write position 640b of the sorted key table 313 as indicated by an arrow 682c.
  • FIG. 6B is a diagram for explaining the data flow of the middle stage processing for extracting the keys in ascending order according to the embodiment of the present invention.
  • FIG. 6B (d) shows a case where the classification process for the difference bit position 0 is started as shown by the arrow 680a in the figure following the process for the difference bit position 2 shown in (c) of FIG. 6A.
  • This is the state of the difference bit position table 310 and the link table 311.
  • This state is the same as that shown in (b) of FIG. 6A except that the parent link P2 is deleted from the entry of the difference bit position 2 in the difference bit position table.
  • the value of the entry at the reading position P2 in the link table 311 is unnecessary and is omitted.
  • FIG. 6B (e) shows the flow of the classification process of the key whose difference bit position is 0 when the minimum value key “0001” shown in FIG. 6A (b) is used as a reference key. is there. In the illustration of FIG. 1B, it corresponds to the classification 149b by the difference bit position.
  • the parent link P3 at the difference bit position 0 of the difference bit table 310 indicated by the arrow 680a is extracted, and the key table 309 is indicated by the dotted arrow 683d from the key table 309 with P3 indicated by the dotted arrow 683b as the reading position.
  • the key “1010” stored at the read position P3, that is, the key pointed to by the parent link P3 is extracted as the sorted key in step S412 shown in FIG. 4B and set to the sorted key 650 which is the primary storage area, and further sorted.
  • the data is written to the write position 640c of the completed key table 313.
  • the key “1010” which is the minimum value key among the keys having the same differential bit position 0 with respect to the key “0001” which is the minimum value key among the previous classification target keys set in the sorted key 650.
  • the difference bit position 1 between the keys “1111” and “1110” having the same difference bit position 0 is calculated, and P4 which is the reading position of the smaller key as indicated by the dotted arrow 661a in the figure. Is stored as the parent link 612 in the entry whose difference bit position 621 is 1 in the difference bit position table 310.
  • the read position P1 is stored in the link 622 of the link table 311 pointed to by the parent link P4, and the link of the link table 311 pointed to by the read position P1 has the same P1 as shown by the arrow 671c. Is stored.
  • FIG. 6B (f) shows the flow of the classification process for keys having a difference bit position of 3 when the minimum value key “1010” shown in FIG. 6B (e) is used as a reference key. is there. In the illustration of FIG. 1B, it corresponds to the classification 149c by the difference bit position.
  • the parent link P4 at the difference bit position 1 of the difference bit table 310 indicated by the arrow 681a is taken out, and the key table 309 is indicated by the dotted arrow 684d from the key table 309 with P4 indicated by the dotted arrow 684b as the reading position.
  • the key “1110” stored at the read position P4, that is, the key pointed to by the parent link P4 is extracted as the sorted key in step S412 shown in FIG. 4B and set to the sorted key 650 which is the primary storage area. It is written at the write position 640d of the completed key table 313.
  • the key “1110” that is the minimum value key among the keys having the same difference bit position 1 is set.
  • the difference bit position 621 in the difference bit position table 310 is stored as an parent link 612 in an entry whose number is 3. Further, as indicated by an arrow 671b, the link 622 in the link table 311 indicated by the parent link P1 stores P1 having the same value as the parent link.
  • FIG. 6C is a diagram for explaining the data flow of the final stage processing for extracting the keys in ascending order according to the embodiment of the present invention. That is, only the parent link P1 of the entry of the difference bit position 3 is stored in the difference bit position table 310 by the process shown in FIG. 6B (f).
  • the parent link 612 is extracted in descending order of the difference bit position 611 of the difference bit position table 310, in the example shown in the figure, the parent link P1 of the entry whose difference bit position 611 indicated by the arrow 683a is 3 is extracted, As shown by the arrow 681b, the key “1111” is read from the reading position 601 indicated by the parent link P1 of the key table 309 and written to the writing position 640e of the sorted key table 313 as shown by the arrow 681c.
  • FIG. 7 is a diagram for explaining the data flow of the classification processing in the first stage, that is, the setting of the difference bit position table 310 and the link table 311 shown in FIG. 6A (b).
  • FIG. 7A shows an initial state in which the key 602 is set in the key table 309 and nothing is set in the difference bit position table 310 and the link table 311.
  • the key “0011” stored at the reading position P2 is omitted.
  • the key “0011” the key whose difference bit position is 2 with respect to the minimum value key “0001” is the only one. Therefore, since the setting regarding the read position P2 of the difference bit position table and the link table 311 is completed at one time in steps S504 and S505 shown in FIG. 5A, it is omitted because it is easy to understand the setting.
  • FIG. 7B shows a data flow of processing relating to the key “1111” stored at the reading position P1 of the key table 309.
  • the difference bit position 0 is calculated by bit string comparison with the minimum value key “0001” stored at the reading position P0, and as indicated by the dotted arrow 660a, The reading position P1 is set at the difference bit position 0. Further, as indicated by a dotted arrow 671b, P1 is set at the reading position P1 of the link table 311.
  • FIG. 7 shows a data flow of processing relating to the key “1010” stored at the reading position P3 of the key table 309.
  • the difference bit position 0 is calculated by bit string comparison with the minimum value key “0001” stored at the read position P0. Then, the comparison with the key “1111” having the parent link P1 set to the difference bit position 0 in the difference bit position table 310 as the reading position is performed in step S507 shown in FIG. 5B. Since the key at the reading position P3 is smaller, the entry at the difference bit position 0 in the difference bit position table 310 is updated to the reading position P3 as indicated by the dotted arrow 660a.
  • P1 is set at the reading position P3 of the link table 311.
  • P1c is set at the reading position P3 of the link table 311.
  • FIG. 7D shows a data flow of processing relating to the key “1110” stored at the reading position P4 of the key table 309.
  • the difference bit position 0 is calculated by bit string comparison with the minimum value key “0001” stored at the read position P0. Then, the comparison with the key “1010” having the parent link P3 set to the difference bit position 0 in the difference bit position table 310 as the reading position is performed in step S507 shown in FIG. 5B. Since the key of the reading position P4 is larger, the reading position P3 of the difference bit position 0 in the difference bit position table 310 is not updated as indicated by the dotted arrow 660a.
  • the entry at the reading position P3 in the link table 311 is updated to P4.
  • P1 is set at the reading position P4 of the link table 311.
  • a link relationship is maintained in which the difference bit positions of the key at the reading position P3, the key at the reading position P4, and the key at the reading position P1 are the same.
  • the difference bit position table 310 and the link table 311 are set by the first-stage classification process according to the above data flow (the reading position P2 is omitted).
  • bit string data sorting apparatus of the present invention can be constructed on a computer by a storage unit having the data structure illustrated in FIG. 2A and a program that causes the computer to execute the processes illustrated in FIGS. 4A and 4B. Therefore, the program and a computer-readable recording medium on which the program is recorded are included in the embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

L'invention porte sur un procédé de tri de données de chaîne de bits efficace qui est exempt d'un traitement invalide dans le tri de données de chaîne de bit. Le procédé compare la chaîne de bits d'une clé de référence à la chaîne de bits d'une clé devant être triée, obtient une position de bit différentielle définie comme étant la position de bit où la valeur de bit est en premier différente, puis classe la clé devant être triée selon sa position de bit différentielle. Le procédé répète en outre une classification à base de position de bit différentielle concernant une clé de référence parmi une pluralité de clés classées avec la même position de bit différentielle, et acquiert ainsi une chaîne de clés triées.
PCT/JP2009/006001 2008-12-22 2009-11-11 Système, procédé et programme de tri de données de chaîne de bits WO2010073471A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/067,722 US8515976B2 (en) 2008-12-22 2011-06-22 Bit string data sorting apparatus, sorting method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008325692A JP4921453B2 (ja) 2008-12-22 2008-12-22 ビット列データソート装置、方法及びプログラム
JP2008-325692 2008-12-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/004595 Continuation WO2011021347A1 (fr) 2008-12-22 2010-07-15 Dispositif de tri de données de chaîne de bits, procédé de tri et programme

Publications (1)

Publication Number Publication Date
WO2010073471A1 true WO2010073471A1 (fr) 2010-07-01

Family

ID=42287131

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/006001 WO2010073471A1 (fr) 2008-12-22 2009-11-11 Système, procédé et programme de tri de données de chaîne de bits

Country Status (2)

Country Link
JP (1) JP4921453B2 (fr)
WO (1) WO2010073471A1 (fr)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011040009A (ja) * 2009-08-18 2011-02-24 S Grants Co Ltd ビット列データソート装置、ソート方法及びプログラム
WO2011024376A1 (fr) * 2009-08-30 2011-03-03 株式会社エスグランツ Dispositif, procédé et programme de tri de données de chaîne de bits
US8515976B2 (en) 2008-12-22 2013-08-20 KOUSOKUYA, Inc. Bit string data sorting apparatus, sorting method, and program
JP2014099166A (ja) * 2012-10-19 2014-05-29 Kousokuya Inc ビット判定回路、ビット列データ選択回路及びビット列データ順次選択回路

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0432924A (ja) * 1990-05-23 1992-02-04 Matsushita Electric Ind Co Ltd 最大値検出装置と最小値検出装置
US5396622A (en) * 1991-12-23 1995-03-07 International Business Machines Corporation Efficient radix sorting system employing a dynamic branch table
US5440734A (en) * 1993-09-14 1995-08-08 International Business Machines Corporation System for MSD radix sort bin storage management
WO2009072233A1 (fr) * 2007-12-05 2009-06-11 S.Grants Co., Ltd. Dispositif, procédé et programme de tri par fusion de chaîne de bits

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4581962B2 (ja) * 2005-10-27 2010-11-17 株式会社日立製作所 情報検索システムとインデクス管理方法およびプログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0432924A (ja) * 1990-05-23 1992-02-04 Matsushita Electric Ind Co Ltd 最大値検出装置と最小値検出装置
US5396622A (en) * 1991-12-23 1995-03-07 International Business Machines Corporation Efficient radix sorting system employing a dynamic branch table
US5440734A (en) * 1993-09-14 1995-08-08 International Business Machines Corporation System for MSD radix sort bin storage management
WO2009072233A1 (fr) * 2007-12-05 2009-06-11 S.Grants Co., Ltd. Dispositif, procédé et programme de tri par fusion de chaîne de bits

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8515976B2 (en) 2008-12-22 2013-08-20 KOUSOKUYA, Inc. Bit string data sorting apparatus, sorting method, and program
JP2011040009A (ja) * 2009-08-18 2011-02-24 S Grants Co Ltd ビット列データソート装置、ソート方法及びプログラム
WO2011021347A1 (fr) * 2009-08-18 2011-02-24 株式会社エスグランツ Dispositif de tri de données de chaîne de bits, procédé de tri et programme
WO2011024376A1 (fr) * 2009-08-30 2011-03-03 株式会社エスグランツ Dispositif, procédé et programme de tri de données de chaîne de bits
JP2011048801A (ja) * 2009-08-30 2011-03-10 S Grants Co Ltd ビット列データソート装置、方法及びプログラム
JP2014099166A (ja) * 2012-10-19 2014-05-29 Kousokuya Inc ビット判定回路、ビット列データ選択回路及びビット列データ順次選択回路

Also Published As

Publication number Publication date
JP4921453B2 (ja) 2012-04-25
JP2010146472A (ja) 2010-07-01

Similar Documents

Publication Publication Date Title
CN103902698B (zh) 一种数据存储系统和存储方法
CN106959920A (zh) 对包含多个测试用例的测试套件进行优化的方法和系统
US20120209855A1 (en) Bit-string key classification/distribution apparatus, classification/distribution method, and program
JP4921453B2 (ja) ビット列データソート装置、方法及びプログラム
US11715030B2 (en) Automatic object optimization to accelerate machine learning training
CN111027703A (zh) 一种量子线路查询的方法、装置、存储介质及电子装置
CN103582880B (zh) 压缩匹配枚举
CN105447021A (zh) 用于数据库查询的方法和系统
US8515976B2 (en) Bit string data sorting apparatus, sorting method, and program
JP2010061176A (ja) テキストマイニング装置、テキストマイニング方法、および、テキストマイニングプログラム
JP5718166B2 (ja) 設計検証方法及びプログラム
WO2011073680A1 (fr) Améliorations relatives à des tables de hachage
JP5143797B2 (ja) ビット列データソート装置、ソート方法及びプログラム
US20230071102A1 (en) Machine Learned Chart Recommendation System
US4989162A (en) Method of using an accuracy valve in a conflict resolution of a forward inference
CN115203053A (zh) 基于频繁序列挖掘的代码克隆检测方法
JP2020077236A (ja) 探索プログラム、探索方法及び探索装置
JP2010146472A5 (fr)
US20140280385A1 (en) Hierarchical intersections
JP2016071712A (ja) 評価結果の出力プログラム、評価結果の出力方法および情報処理装置
CN109740249B (zh) 一种mux树逻辑结构优化方法、模块及存储介质
JP5165654B2 (ja) ビット列データソート装置、方法及びプログラム
US8195667B2 (en) Bit string search apparatus, search method, and program
KR20220099745A (ko) 지리공간 블록체인 데이터 검색을 위한 공간 분할 기반의 트리 인덱싱 및 질의어 처리 방법 및 장치
JP2010020643A (ja) データファイル操作システム、そのプログラム

Legal Events

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

Ref document number: 09834287

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09834287

Country of ref document: EP

Kind code of ref document: A1