Advanced Database Decompression

The string dictionary is compressed through the block re-pairing front-end encoding method, which solves the problems of long compression time and large storage consumption in the existing methods, and achieves efficient string dictionary compression.

CN112115684BActive Publication Date: 2024-08-30SAP SE
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010576927.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-22
Publication Date
2024-08-30
Estimated Expiration
2040-06-22

AI Technical Summary

Technical Problem

Existing string dictionary compression methods suffer from excessive compression times and high storage consumption when performing large string dictionary compression, especially becoming impractical when the uncompressed string dictionary size exceeds several hundred megabytes.

Method used

The block re-pairing front-end coding (BRPFC) method is used to split the dictionary into a fixed number of front-end coding bucket blocks and insert terminators between each block. The re-pairing algorithm is used to compress the cascaded buckets to generate Compress a collection of blocks to reduce the size of the compressed text T.

Benefits of technology

Without significantly reducing the compression rate, the compression time is significantly improved. The compression time is 24 times faster than some existing methods, and the storage consumption is reduced. It is suitable for the compression of large-scale string dictionaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112115684B_ABST
    Figure CN112115684B_ABST
Patent Text Reader

Abstract

Methods, systems, and computer program products for decompressing data. In response to a request to access data in a set of stored compressed blocks, one or more compressed blocks in the set are identified. A front-end encoding method is used to decompress string prefixes within the identified compressed blocks. Re-pairing decompression is used to decompress string suffixes within the identified compressed blocks. Uncompressed data is generated.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to U.S. Provisional Patent Application No. 62 / 864,782, filed by Lasch et al. on June 21, 2019, entitled “Advanced Database Compression On Modern Hardware,” the entire disclosure of which is incorporated herein by reference. Technical Field

[0003] The present disclosure relates generally to data processing and, more particularly, to database compression and decompression. Background Art

[0004] In databases, domain encoding is a technique widely used for column storage for compression and query acceleration. It replaces the values ​​in the column with unique integer value identifiers. The mapping from the identifier back to the actual value is stored in an additional data structure (dictionary). This means that two data structures are required to represent a column using domain encoding: a dictionary and an array of value identifiers. The dictionary stores the different values ​​in the column and provides a mapping from unique identifiers to values. The array of value identifiers acts as an index into the dictionary. This is also called an index vector.

[0005] Values ​​that occur multiple times in a column are stored only once in the dictionary. This means that columns that contain only a few distinct values ​​that occur multiple times in the column are significantly compressed by this approach. This is because the value identifiers used to replace values ​​are often significantly smaller than the actual values. By replacing values ​​with value identifiers, domain encoding can also improve performance because certain operations that can be performed on the values ​​themselves without domain encoding can also be performed directly on the value identifiers.

[0006] For columns storing strings, the dictionary used for domain encoding is a string dictionary. A string dictionary is a data structure that implements a bijective mapping of strings from a set X of strings to unique integer identifiers. For a string dictionary, one of the simplest ways to implement compression is to sort the strings in the dictionary lexicographically and then apply a leading-end encoding, comparing each string to its predecessor (i.e., the first string (of a block) is stored in full. Subsequent strings store the length of the prefix they share with the predecessor and the compressed suffix). Leading-end encoding is typically applied to fixed-size string buckets. Summary of the invention

[0007] In some implementations, the present subject matter relates to a computer-implemented method for performing data decompression. The method may include: in response to a request to access data in a set of stored compressed blocks, identifying one or more compressed blocks in the set of stored compressed blocks; decompressing a string prefix within the identified compressed blocks using front-end encoding; decompressing a string suffix within the identified compressed blocks using re-pairing decompression; and generating uncompressed data.

[0008] In some implementations, the current subject matter may include one or more of the following optional features. In some implementations, the re-pairing decompression may include iteratively expanding each symbol in the symbol tree corresponding to the data stored in the identified compressed block. The symbol tree may include multiple nodes. The compressed block may be generated from one or more front-end encoding buckets of a string in a dictionary. The front-end encoding bucket is configured to be sampled to form one or more super blocks. Each of the super blocks may be configured to be compressed to generate a shared syntax for compressing the compressed block. The multiple nodes may include at least one of the following: a terminal character, a non-terminal character, and any combination thereof. In some implementations, the method may also include performing multiple re-pairing decompressions in parallel. The number of terminal characters may be limited to a predetermined number. In addition, the number of iterative expansions for each symbol may be determined based on a predetermined number.

[0009] In some implementations, re-pairing decompression may include: initializing a stack location in a memory corresponding to each symbol in a symbol tree; loading each symbol in the symbol tree simultaneously from a storage device into the memory using a vectorized re-pairing extension; merging the loaded symbols into the uncompressed data by evaluating one or more predicates associated with the symbols; and repeating the simultaneous loading and merging using a predetermined number of times.

[0010] In some implementations, each block in the set of compressed blocks may include a bucket header and a sequence of compressed buckets. The block size may be at least one of: a fixed size and a variable size. In addition, the compressed blocks may be compressed using re-pair compression.

[0011] In some implementations, the current subject matter relates to a computer-implemented method for performing database compression. The method may include: generating a compressed string dictionary having a block size and a front-end encoding bucket size from a data set; applying the front-end encoding to one or more buckets of strings in the dictionary having the front-end encoding bucket size to generate one or more front-end encoding buckets of strings; concatenating one or more portions of the generated front-end encoding buckets of strings to form one or more blocks having the block size; compressing each of the one or more blocks; and storing one or more compressed block sets, wherein the compressed block sets store all strings in the data set.

[0012] In some implementations, the current subject matter can include one or more of the following optional features. In some implementations, each block in the set of compressed blocks can include a bucket header and a sequence of compressed buckets.

[0013] In some implementations, the method may further include inserting a terminator between storage buckets of the string in the plurality of front-end encoding storage buckets of the string. The terminator may be uncompressed.

[0014] In some implementations, each string may include a string terminator, wherein each string terminator is compressed.

[0015] In some optional implementations, the length of each string may be stored and compressed with the string.

[0016] In some implementations, the block size may be at least one of: a fixed size and a variable size.

[0017] In some implementations, compressing can include independently performing compression of each front-end encoding bucket in the plurality of buckets in parallel.

[0018] In some implementations, one or more front-end encoding buckets may be configured to be sampled to form one or more super blocks. Each super block may be configured to be subsequently compressed to generate a shared syntax for compressing the block. For example, the shared syntax may be used to perform accelerated compression of the block.

[0019] In some implementations, compression of the blocks can include re-pairing compression.

[0020] In some implementations, the method may further include: receiving a request to access data in the set of stored compressed blocks; in response to the received request, identifying one or more compressed blocks in the set of stored compressed blocks; and at least partially decompressing the identified compressed blocks to generate uncompressed data. The decompression may include: decompressing string prefixes and suffixes within the identified compressed blocks using front-end encoding; and decompressing the string suffixes within the identified compressed blocks using re-pairing decompression. In addition, the re-pairing decompression may include iteratively expanding each symbol in the symbol tree corresponding to the data stored in the identified compressed block.

[0021] A non-transitory computer program product (i.e., a physically embodied computer program product) storing instructions is also described, which, when executed by one or more data processors of one or more computing systems, causes at least one data processor to perform the operations described herein. Similarly, a computer system is also described, which may include one or more data processors and a memory coupled to the one or more data processors. The memory may temporarily or permanently store instructions that cause at least one processor to perform one or more operations described herein. In addition, the method may be implemented by one or more data processors within a single computing system or one or more data processors distributed between two or more computing systems. Such computing systems may be connected and may exchange data and / or commands or other instructions, etc., via one or more connections, including but not limited to through a network (e.g., the Internet, a wireless wide area network, a local area network, a wide area network, a wired network, etc.), through a direct connection between one or more of a plurality of computing systems, etc.

[0022] The details of one or more variations of the subject matter described herein are set forth in the accompanying drawings and the description below.Other features and advantages of the subject matter described herein will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate certain aspects of the subject matter disclosed herein and, together with the description, help explain some principles associated with the disclosed implementations. In the drawings:

[0024] Figure 1 An exemplary common front-end encoding compression method is shown;

[0025] Figure 2a An exemplary system for performing dictionary compression according to some implementations of the current subject matter is shown;

[0026] Figure 2b Some implementations of the current subject matter are shown for performing Figure 2a More details of an exemplary system for dictionary compression are shown;

[0027] Figure 3 illustrates an exemplary experimental data set according to some implementations of the current subject matter;

[0028] Figure 4 shows exemplary experimental measurements of compression times according to some implementations of the current subject matter;

[0029] Figure 5 illustrates an exemplary process for performing dictionary data compression according to some implementations of the current subject matter;

[0030] Figure 6 shows an alternative implementation of dictionary / string compression processing according to some implementations of the current subject matter;

[0031] Figure 7a An exemplary extract function is shown;

[0032] Figure 7b An exemplary implementation of the locate function is shown;

[0033] Figure 8 An exemplary process for recursively expanding non-terminals is shown, which is an operation performed on each symbol to decompress text compressed with re-pairing.

[0034] Fig. 9 An exemplary system for performing decompression and / or access of data according to some implementations of the current subject matter is shown;

[0035] Fig.10 An exemplary ExpandSymbol function is shown;

[0036] Fig.11a illustrates an exemplary iterative version of the ExpandSymbol algorithm according to some implementations of the current subject matter;

[0037] Fig.11b Some implementations of the current subject matter can be used to perform Fig.11a Example code for the algorithm shown in ;

[0038] Fig.12 is a diagram illustrating an exemplary system including a data storage application according to some implementations of the current subject matter;

[0039] Fig.13 It is shown Fig.12 A diagram of details of a system;

[0040] Fig.14 are exemplary systems according to some implementations of the current subject matter;

[0041] Fig.15 are exemplary methods according to some implementations of the current subject matter; and

[0042] Fig.16 are exemplary methods according to some implementations of the current subject matter. DETAILED DESCRIPTION

[0043] To address these and potential other deficiencies of currently available solutions (e.g., low compression ratios for front-end encoding, high compression times and extraction times for other compression schemes, etc.), one or more implementations of the present subject matter involve methods, systems, articles of manufacture, etc., which can provide the ability to perform database compression as well as decompress and access compressed data.

[0044] Data Compression

[0045] In some implementations, the current subject matter relates to database compression. Database compression can be achieved by generating a compressed string dictionary with a block size and a front-end encoding bucket size in a data set. Front-end encoding can be applied to each string in the dictionary with a combination of the block size and the front-end encoding bucket size to generate multiple front-end encoding buckets for the string. The front-end encoding buckets for multiple strings can be cascaded. Terminators can be inserted between the buckets of the strings in the multiple front-end encoding buckets of the string. The front-end encoding buckets for multiple strings can be compressed. Based on the compressed front-end encoding buckets, a compressed block set corresponding to each string in the dictionary can be generated and stored. In some implementations, each block in the compressed block set may include a sequence of a bucket header and a compressed bucket. The terminator may be uncompressed. In some implementations, each string may include a string terminator, wherein each string terminator is compressed.

[0046] In-memory database management systems (IMDBMS) have been used in many fields and are still being used more and more widely. IMDBMSs typically rely on data compression to facilitate keeping their entire working set in main memory. However, such systems typically have a multi-terabyte memory footprint. In particular, but not exclusively, in cloud scenarios, the cost of main memory is one of the largest factors in the total cost of ownership (TCO). Therefore, as a means of reducing TCO, it is highly desirable to reduce the memory footprint of IMDBMSs.

[0047] A survey of real-world IMDBMS systems revealed that string dictionaries are the single largest memory consumer. Hence, their compression significantly impacts the overall memory footprint of the system. A large number of techniques exist for heavily compressing string dictionaries, but in practice, IMDBMSs still rely on lightweight approaches as they offer faster compression and, more importantly, access operations that are several times faster than heavyweight approaches. While related work has focused on bridging this gap through algorithmic improvements and novel approaches, leveraging advances in modern hardware to improve existing approaches remains largely unexplored.

[0048] In some implementations, the current subject matter relates to a computer-implemented method for performing database compression by optimizing a string dictionary compression process. The current subject matter method may include a block-based re-pairing compression algorithm that achieves actual compression times that are 24 times faster than some existing processes without significantly reducing the compression ratio.

[0049] Dictionary compression is a popular method in databases to reduce their memory requirements. A dictionary maps the values ​​of a column (or multiple) (set of) domains to value identifiers (IDs). In the record, these values ​​are replaced by the corresponding value IDs, which can result in space savings (especially for strings) and enable efficient processing of dictionary-encoded values. The string dictionary then provides two access operations: 1) given a value ID id, extract(id) returns the corresponding string in the dictionary, 2) given a string str, locate(str) returns the unique value ID of str if str is in the dictionary, otherwise returns the value ID of the smallest string greater than str.

[0050] There are several methods for performing string dictionary compression. These include front-end coding, Huffman-Tucker coding, N-Gram compression, and Re-Pair compression. Plain front-end coding (PFC) is a lightweight method for compressing sorted string dictionaries. Strings are represented by the length of a common prefix and its predecessor in the dictionary, as well as the remaining suffix, such as Figure 1 As shown in the second row of FIG. 1 , an exemplary PFC compression method 100 is shown. Figure 1 As shown, each box represents a string in the dictionary. Using the front-end encoding representation, the last two strings are compressed. The first one does not, because it has no predecessor. PFC operates on fixed-size buckets. In some exemplary implementations, the bucket size can be 16 strings. The first string of each bucket (bucket header) is stored uncompressed. This facilitates random access to the string dictionary. In the absence of buckets, each access requires decoding all previous strings in the dictionary. In the case of buckets, it is only necessary to start decoding the string from the beginning of the bucket containing the desired string.

[0051] The re-pairing compression method is a grammar-based compression method. It iteratively obtains a grammar from an input text T and converts the text into a compressed sequence of symbols. In each iteration, it first finds the most frequent pair of symbols ab in T. If there are multiple symbol pairs with the same frequency, a candidate is randomly selected. Then, it adds the rule R→ab to the grammar, where R is a non-terminal symbol that has not appeared previously in T or the grammar, and a and b can be any symbols (terminal or non-terminal). Then, each occurrence of ab in T is replaced with R. This iteration terminates when there are no symbol pairs left that appear more than once in T.

[0052] The re-pairing (Re-paired Front-end Coding (RPFC)) method on top of PFC provides another option for compression. Back to reference Figure 1 , the third line shows how re-pairing is applied on PFC. RPFC applies re-pairing on top of all front-end coded buckets in the dictionary, but the bucket headers are left uncompressed. A grammar is created for the entire dictionary. Figure 1 As shown, the grammar can be visualized as a set of binary trees, where internal nodes are non-terminals and leaf nodes are terminals.

[0053] However, existing compression methods, including the Re-Pair compression algorithm for RPFC compression, have various disadvantages when performing compression of large string dictionaries. In particular, for RPFC, the required compression time is very high compared to lightweight compression methods. Moreover, the compression time grows superlinearly with the input data size, which can be observed when compressing datasets of different sizes. This makes the compression time required for RPFC quickly become impractical once the size of the uncompressed string dictionary exceeds a few hundred megabytes. Secondly, the storage consumption of the algorithm is equal to multiple times the size of the input text.

[0054] To address these issues, in some implementations, the current subject matter provides a block re-pairing front-end coding (BRPFC) method that can be performed by reducing the size of a text T to be compressed using the re-pairing method. In particular, to reduce the size of T, the dictionary can be split into blocks containing a fixed number of front-end coding buckets before re-pairing compression is applied to each block separately.

[0055] A BRPFC compressed string dictionary with block size B and front encoding bucket size b may be constructed as follows: For each B b string in the dictionary sorted lexicographically, front encoding may first be applied. This will result in front encoding buckets for B strings. The buckets may then be concatenated, omitting the bucket header. A terminator t may be inserted between each bucket. A different terminator u may be used to terminate the front encoding string in a bucket. The concatenated buckets may now be compressed using re-pairing. The re-pairing algorithm may ignore the terminator t, but may compress the terminator u used to terminate the string. Thus, after re-pairing compression, bucket boundaries may be at integer symbols, but string boundaries are not required. After re-pairing compression, the compressed sequence may be split into subsequences, which may correspond to each front encoding bucket. These may be reassembled with their corresponding bucket headers and ultimately concatenated in a continuous sequence. The offsets to the beginning of each bucket may be stored in a separate array, and the grammar generated by re-pairing may also be stored as part of each block. This process results in a set of compressed blocks, each storing B·b strings, except for the last block, which may contain fewer strings if the number of strings in the dictionary is not a multiple of B·b. Each block may include a bucket header and a sequence of compressed buckets and an array of offsets relative to the bucket header.

[0056] Figure 2a-2b An exemplary system 200 for performing dictionary compression according to some implementations of the current subject matter is shown. The system 200 may include a data storage application 204 communicatively coupled to a persistence layer 206. The data storage application 204 may be configured to include computing components 214-220 for performing dictionary compression, as discussed herein (e.g., Figure 2a In particular, once the data storage application 204 receives the uncompressed dictionary 202 data ( Figure 2b 230), the computing component 214 can be configured to generate one or more logic blocks. Using the generated logic blocks, the computing component 216 can be configured to apply the front-end encoding to generate a fixed number of front-end encoding storage buckets 232 (such as Figure 2b ). The computing component 218 may use the front-end encoding buckets to prepare blocks for re-pairing compression. In particular, as described above, the front-end encoding buckets may be concatenated, where the bucket header may be omitted. A terminator t may be inserted between buckets. A different terminator u may be used to terminate the front-end encoding string in the bucket. The component 220 may then use the concatenated prepared blocks to apply block-by-block compression using a re-pairing algorithm to generate one or more compressed blocks 236 (e.g., Figure 2b As shown, in compressed state 240).

[0057] As described above, the re-pairing algorithm can ignore the terminator t and can compress the terminator u. After re-pairing compression, the compressed sequence can be split into subsequences corresponding to each front-end encoding bucket, which can be reassembled with their corresponding bucket headers and ultimately concatenated in a continuous sequence. The offsets at the beginning of each bucket can be stored in a separate array, and the grammar generated by re-pairing can also be stored as part of each block. This process results in a set of compressed blocks 236, each storing B·b strings, except for the last block, which may contain fewer strings if the number of strings in the dictionary is not a multiple of B·b. The compressed dictionary can then be sent to the persistence layer 206 for storage.

[0058] Figure 3-4 Various experimental measurements of compression time on a dictionary dataset are shown. In particular, Figure 3 An exemplary experimental data set 300 is shown. For example, Figure 3 As shown, Strings can refer to the number of different strings in the dataset, Size can refer to the total size of all strings in bytes, including the terminator, and Aver.Size can refer to the average size of a single string in the dataset. These datasets can be selected to cover common use cases for string columns, such as natural language (ENWIKI), names (GEONAMES), and machine-readable data (INDOCHINA, UK). They also range from short average string size (GEONAMES, ENWIKI) to long average string size (INDOCHINA, UK).

[0059] Figure 4 An exemplary experimental measurement compression time 400 is shown. Figure 4 As shown, each column shows four evaluation data sets (such as Figure 3 Each row corresponds to a different compression method. For the BRPFC8 16bps method, different block sizes B per block have been evaluated, ranging from 128 to 128K front-end encoding buckets. Combined with the compression time results, the block size with the best trade-off between compression time and compression ratio was determined.

[0060] like Figure 4As shown, method RPFC8 16bps compression time is faster than RPFC. This is because the number of symbols is limited by the 16-bit representation in RPFC8 16bps, which reduces the number of iterations performed by the algorithm. In addition, the BRPFC8 16bps compression method is significantly faster than RPFC at smaller block sizes, and remains fast even at larger block sizes, except for the Geonames dataset (BRPFC becomes slower than RPFC at B=32K). The BRPFC8 16bps compression time increases slowly with increasing block size. However, for UK, ENWIKI, and GEONAMES, the compression time increases sharply between B=4K and B=8K, and for INDOCHINA, the compression time increases between B=8K and B=16K. This is because at these block sizes, the working dataset of the re-pairing algorithm exceeds the CPU cache, significantly increasing the running time.

[0061] Figure 5 An example process 500 for performing dictionary data compression according to some implementations of the current subject matter is shown. The process 500 can be performed by the dictionary data compression system 200 shown in FIG. 2. At 502, the data storage application 204 (as shown in FIG. 2) can be configured to generate a compressed string dictionary having a block size and a front-end encoding bucket size. At 504, the application 204 can be configured to apply the front-end encoding to each string in the dictionary, wherein the string has the front-end encoding bucket size. As a result, the application can be configured to generate a front-end encoding bucket for multiple strings. Subsequently, at 506, one or more portions of the front-end encoding bucket of the string can be cascaded to form a block with a predetermined block size. In some exemplary implementations, a terminator can be inserted between the buckets of the string. The application 204 can then compress each block at 508, thereby generating a set of compressed blocks corresponding to each string in the dictionary at 510. The application 204 can then also store the compressed blocks in the persistence layer 206.

[0062] Figure 6 An alternative implementation of a dictionary / string compression process 600 according to some implementations of the current subject matter is shown. Process 600 may be similar to Figure 2a-2b The processing shown in . Figure 6 The compression process 600 shown in FIG. 6 may be referred to as sample block based re-pairing compression. The process 600 may be configured to change the grammatical rules of the blocks by eliminating overlap. Figure 2a This can improve compression quality by performing the same process as shown in -b. This can speed up compression because a full re-pair compression does not have to be performed on the entire dictionary, but only on smaller portions of the dictionary.

[0063] like Figure 6As shown, process 600 may be performed with Figure 2a-2b The process shown begins in a similar manner (in an uncompressed state 230) by applying the front-end encoding 216 to a logical block created from an uncompressed dictionary string to create a front-end encoding bucket 232. The process 600 can then be configured to generate a single re-pairing grammar 610 after the front-end encoding stage. The grammar can then be used for all blocks of the compression dictionary. The grammar can be generated by sampling a selected number of front-end encoding buckets 232 at 602 to form a super block 604. The super block 604 can include one or more front-end encoding buckets to reach a predetermined target size. The target size can be determined to optimize the generated grammar. For the purpose of including the front-end encoding buckets 232 in the super block 604, they are selected and / or sampled (e.g., sampling without replacement, obtaining a uniformly distributed van de Corput sequence of the sampled string, and / or any other sampling method) and terminated when the target size is reached. The super block can then be compressed using a re-pairing algorithm 608, and the resulting grammar 610 can be used as a shared grammar (as shown by the dashed arrow).

[0064] Recompression 606 can then be applied to block 234 of the dictionary. Its input can be the shared grammar and the uncompressed block. Recompression 606 can generate one or more compressed blocks 612. For recompression, a tree containing all expansion rules from the shared grammar can be generated, where the tree nodes corresponding to the expansion rules can be marked with the non-terminal symbols of the rules. Each block can then be compressed using a representation of this shared grammar. At each position of the block text, the tree can be traversed using the symbols in the text. As a result, several rule expansions may be found to match the string at the current position in the text. The longest one can be selected and the segment in the text replaced with the non-terminal of the rule. This process can be repeated at the next position after the replaced segment in the text and continued until the entire text is compressed. If no match is found in the expansion rules, the recompression algorithm can continue to the next position in the text.

[0065] Decompressing and accessing compressed data

[0066] In some implementations, the present subject matter can be configured to perform decompression and / or access compressed data. In particular, the present subject matter can be configured to speed up compressed data access time, particularly extract and locate function times, for RPFC, BRPFC, and sampled BRPFC compressed string dictionaries. In order to improve access time, different parts of the extract and locate operations can be implemented.

[0067] Figure 7aAn exemplary extract function 700 is shown, which can be configured to: if the requested string exists in the dictionary, extract the string with the value identifier id into the pre-allocated output buffer outputBuffer, and return the length of the extracted string. Otherwise, return -1 to signal that the requested value identifier is invalid. Valid identifiers are in the range [1; E], where E is the number of strings in the dictionary. If the requested identifier is valid, first determine the bucket in which the requested string resides, and then determine the position of the string in the bucket.

[0068] Once the bucket in which the requested string resides has been determined, the header of that bucket can be copied to the output buffer using the GetBucketHeader function. This function copies the zero-terminated bucket header of the bucket referenced by bucketId to the output buffer outputBuffer and reports the length of the copied string through its third parameter length. Finally, the function returns a pointer to the compression bucket that immediately follows the bucket header in the compression dictionary. If the requested string in extract is the bucket header, that is, the position is equal to 0, the length of the bucket header can be returned directly, because the output buffer already contains the requested string.

[0069] Otherwise, the remainder of the bucket is partially decompressed until the location of the requested string is reached. This decompression involves re-pairing decompression, and decoding of the front-end encoded string after the re-pairing decompression. This process is performed in an interleaved manner. One or two re-pairing symbols are expanded at a time, and the algorithm then continues to decode as many of the front-end encoded strings as possible using the output of the expanded re-pairing symbols. The string is decoded directly into a pre-allocated output buffer. Once the location of the requested string in the bucket is reached and the string is decoded, the length of the decoded string can be returned. In this way, only the portion of the bucket necessary to extract the requested string is decompressed and decoded, while the rest of the bucket remains unchanged, thus avoiding the need to decompress the entire bucket unnecessarily. Of course, if the requested string is the last string in the bucket, the entire bucket must be decompressed to extract the string.

[0070] like Figure 7aAs shown, the buffer containing the compressed bucket without the header is indicated by the variable bucket, and the decompression of a single string is implemented in the function DecodeString, which is repeatedly called by the extract function in line 10 until the requested string is decoded. The DecodeString function is called with the output buffer already containing the previously decoded string and the bucket buffer containing the compressed bucket after the header. The length parameter is assigned to the length of the decoded string by the DecodeString function, and the offset parameter is used to keep track of how many bits of the compressed bucket have been decoded.

[0071] Figure 7b An exemplary implementation of the locate function 710 is shown. The function takes the string string as its input and returns 0 if string is not contained in the dictionary, or returns a valid value identifier if string is contained in the dictionary. The function is executed by first performing a binary search on the headers of the buckets in the compression dictionary. The binary search is implemented in the LocateBucke function. If the binary search determines a potential bucket where the searched string may be located, this bucket is scanned. If the scan finds the desired string in the bucket, its value identifier can be returned, otherwise the result of the operation is that the string is not in the dictionary. The same is true if the binary search does not find a potential bucket. In these cases, an invalid value identifier 0 is returned to signal that the searched string does not exist in the dictionary.

[0072] The LocateBucket function also sets the header Boolean flag to true if the searched string is identified as the header of a bucket returned by the binary search. In this case, no additional scan of the bucket is required. Similar to the extract operation discussed above, the bucket identified by the binary search is scanned. The strings in the bucket are sequentially decompressed into the buffer outputBuffer using the DecodeString function. The decompressed string is then compared with the searched string until a match is found or the end of the block is reached.

[0073] Figure 8An exemplary process 800 for recursively expanding nonterminals is shown, which is an operation performed on each symbol to decompress text compressed using re-pairing. Process 800 includes the ExpandNonTerminal function used in the RPFC extract and locate implementations, which is intended to decompress re-pairing compression applied on top of the front-end encoding. Its parameters are the non-terminal to be expanded nonTerminal, the bit-packed grammar array grammar, and the pre-allocated output buffer outputBuffer, in which the expanded characters are stored. The function returns the number of characters it expanded.

[0074] To extend a non-terminal, first the two symbols to which it is mapped are extracted from the syntax array using the GetField function. After this step, the left symbol to which the non-terminal is mapped is first recursively extended, and then the same operation is performed on the right symbol. However, for both the left and right symbols, it is first checked whether the symbol is already a terminal, in which case no additional extension needs to be performed and the symbol can be written to the output buffer. This is the recursive tail case. If the symbol is less than the number of terminals n, then the symbol is a terminal. This is because terminals are encoded as integer symbols in the range [0; n) and non-terminals are encoded as integer symbols in the range [n; n+N], where N is the number of non-terminals. Since the integer values ​​of non-terminal symbols start at n, but the indices of the syntax array start at 0, n must be subtracted from the non-terminal symbol before it is used for lookup in the syntax array. As Figure 8 As shown in Figure 1, this happens when ExpandNonTerminal is called recursively on lines 8 and 14. The total number of characters that have been expanded is tracked in the expansion variable and is ultimately returned as the function result.

[0075] In some cases, the extract function can be implemented for a re-pairing compression dictionary by first determining the bucket in which the requested string resides in the dictionary. The implementation can then receive the head of that bucket and then decode the string in the bucket until the location of the requested string has been reached. Similarly, the locate function implementation can determine a candidate bucket in which the searched string can reside and then scan that bucket until the string is found or the end of the bucket is reached. However, for both functions, decompressing the string in the bucket will take up most of the CPU time of the entire operation. More precisely, decoding a string in a dictionary bucket first requires extending the re-pairing symbol into a non-terminal sequence and then decoding the full string from the leading encoded representation in the compressed sequence.

[0076] Fig. 9An exemplary system 900 for performing decompression and / or access of data according to some implementations of the current subject matter is shown. The system 900 may include Figure 2a In particular, the system 900 may include a data storage application 204 communicatively coupled to the persistence layer 206. The system 900 may be configured to receive a query (call, request, etc.) 902 to extract specific data (e.g., Extract(vid)). The data storage application 204 may include a logic block determination component 914, which may be configured to determine a specific logic block that may correspond to the received request 902.

[0077] For decompression, which may be performed by component 916, data in response to the received request is obtained from persistence layer 206 at 932. Decompression may be performed by decompressing the prefix using the front-end encoding at 922. The suffix is ​​then decompressed at 924 using a re-pairing algorithm.

[0078] In some implementations, to perform re-pairing decompression, the current subject matter can be configured to utilize an ExpandSymbol function in place of the ExpandNonTerminal function described above for performing re-pairing symbol extension in extract and locate operations. The ExpandSymbol function can be configured to accept a symbol instead of a non-terminal index. The exemplary ExpandSymbol function 1000 is shown in FIG. Fig.10 , where N and n may represent the number of non-terminals and terminals, respectively. Algorithm 1000 may be further configured to allow vectorization of re-pairing searches. The necessary prerequisite for doing so is to remove the recursive nature of the ExpandNonTerminal function.

[0079] In some implementations, ExpandSymbol can be configured to perform a depth-first traversal of the symbol tree, outputting leaves (i.e., terminals). This can be performed iteratively by processing one tree node in each iteration until the symbol expansion is complete. The current node is stored in current, which is initialized to the input symbol of ExpandSymbol, i.e., the root of the symbol tree. Each node encountered can be either a terminal (a leaf node) or a non-terminal (an internal node). If it is an internal node (branch 1, lines 7-10, as in Fig.10 ), then GetField is used to fetch the left and right children of the node, which can be configured to decode symbols in the bit-packed syntax array. The right child can be put on the stack for later use, and the left child can become the current for the next iteration. In this way, the left path in the tree is always traversed until a leaf is encountered. When this happens (branch 2, lines 12-13, as shown Fig.10 As shown), a leaf node (which is the end) can be output, and the node can be removed from the stack to be processed in the next iteration. Once the last leaf node is removed from the stack and output, the tree has been completely traversed.

[0080] In some implementations, vectorization of re-pairing lookup may be configured with one or more of the following prerequisites. In particular, Fig. 9 Component 922 of application 204 shown in can be configured to perform multiple ExpandSymbol operations in parallel using vector instructions. As described above, ExpandSymbol can include a depth-first search on a symbol tree, and since the latter can have an arbitrary depth, the traversals performed together must have a similar number of iterations to make vectorization effective. Therefore, the current subject can be configured to limit the number of terminals that the non-terminal can be configured to expand to, which can be equivalent to limiting the number of leaves in the symbol tree, thereby allowing the vectorized code to perform a fixed number of iterations. This restriction can be enforced during compression. In some exemplary implementations, the current subject can be configured to have 8 terminals that the non-terminal can expand to, which can allow the vectorized code to perform 15 iterations. In addition, in order to reduce the calculations in each vectorized loop iteration, the number of bits of each symbol in the re-pairing syntax can also be fixed (e.g., 16 bits), which can be configured to avoid decoding the bit-packed syntax array. This can allow symbols to be loaded directly from the syntax array into the CPU register without bit offset calculation and bit shifting. This can also be applied to loading symbols from compressed storage buckets in a compression dictionary.

[0081] Fig.11a An exemplary vectorized re-pairing expansion algorithm 1100 according to some implementations of the current subject matter is shown. The vectorized algorithm 1100 may be performed using the following five phases: initialization 1102, branch 1 and branch 2 1104, condition / predicate evaluation 1106, and result output 1108. For ease of illustration and discussion, the vectorized algorithm 1100 is described in detail below. Fig.11b Example code that may be used to perform algorithm 1100 is shown in . Code for an example Expand16Symbols function (eg, executable by a processor capable of executing Intel Advanced Vector Extensions 512 instructions) is shown in .

[0082] like Fig.11aAs shown, during initialization 1102, a stack 16 times the stack height of the scalar version may be zero initialized. This is done because each of the 16 symbols to be expanded may require its own stack area. The stack height may be fixed to 10 for each traversal. Since the symbol extension for this example function is limited to 8 characters (i.e., Expand16Symbols), the stack height may be 8, but two additional elements may be added to the bottom of the stack to allow reading from and writing to the stack without having to check for symbols that may have been fully expanded. For all elements, the stack position may be initialized to two. In this way, stack position 1 may indicate that the symbol has been fully expanded. Once this occurs, the stack position for this symbol does not change in subsequent iterations.

[0083] After initialization, the exemplary vectorized re-pairing extension process 1100 can be configured to execute branch 1 1104a and branch 2 1104b, respectively, for the purpose of loading symbols. In particular, branch 1 1104a can be responsible for loading sub-symbols of the current symbol from the syntax array and storing the correct symbol in the stack. Branch 2 1104b can be responsible for loading the new current symbol from the stack. The load can be performed on all symbols (e.g., 16 symbols) at the same time.

[0084] Once the load is complete, the exemplary vectorized re-pairing expansion algorithm 1100 can be configured to perform predicate / condition evaluation at 1106. At 1106, the results of the symbol loads as performed at 1104 can be combined based on the evaluation of the predicates.

[0085] Once the predicate evaluation is complete, the vectorization algorithm 1100 may be configured to output the results at 1108. In particular, the resulting single extended string may be processed to form a single contiguous string corresponding to the extension of all 16 symbols.

[0086] In some implementations, the vectorized process 1100 can be configured to improve access time to compressed data. Specifically, the extract and locate operations described above implementing the process 1100 can be performed 2-2.7 times faster than systems using existing decompression processes.

[0087] In some implementations, the current subject matter (including the compression and decompression / access processes discussed above) can be implemented in various in-memory database systems, such as the High Performance Analytical Appliance ("HANA") system developed by SAP SE, Walldorf, Germany. Various systems, such as enterprise resource planning ("ERP") systems, supply chain management ("SCM") systems, supplier relationship management ("SRM") systems, customer relationship management ("CRM") systems, etc. can interact with the in-memory system to access data. Other systems and / or combinations of systems can be used for implementation of the current subject matter. The following is a discussion of an exemplary in-memory system.

[0088] Fig.12 An exemplary system 1200 is shown according to some implementations of the current subject matter, where a computing system 1202 may include one or more programmable processors, which may be collocated, linked via one or more networks, etc., executing one or more modules, software components, etc. of a data storage application 1204. The data storage application 1204 may include one or more of a database, an enterprise resource program, a distributed storage system (e.g., a NetApp Filer available from NetApp, Inc. of Sunnyvale, CA), etc.

[0089] One or more modules, software components, and the like may be accessed by local users of the computing system 1202 and by remote users accessing the computing system 1202 from one or more client machines 1206 via a network connection 1210. User interface screens generated by the one or more first modules may be displayed to the user via a local display or via a display associated with one of the client machines 1206. Data units of the data storage application 1204 may be transiently stored in a persistence layer 1212 (e.g., a page buffer or other type of temporary persistence layer), and data in the form of storage pages may be written to one or more storage devices 1214, for example, via an input / output component 1216. The one or more storage devices 1214 may include one or more physical storage media or devices (e.g., hard drives, persistent flash memory, random access memory, optical media, magnetic media, etc.) configured to write data for long-term storage. It should be noted that although the storage devices 1214 and the input / output components 1216 are not necessarily coupled to one or more storage devices 1214, the storage devices 1214 and the input / output components 1216 may be coupled to one or more storage devices 1214. Fig.12 1202 , but they may be included in the computing system 1202 .

[0090] The data stored in long-term storage 1214 may be organized into pages, with each page being allocated a defined amount of storage space. In some implementations, the amount of storage space allocated to each page may be constant and fixed. However, other implementations in which the amount of storage space allocated to each page may vary are also within the scope of the current subject matter.

[0091] Fig.13 An exemplary software architecture 1300 is shown in accordance with some implementations of the current subject matter. A data storage application 1204, which may be implemented in one or more of hardware and software, may include one or more of a database application, a network-attached storage system, and the like. In accordance with at least some implementations of the current subject matter, such a data storage application 1204 may include or interface with a persistence layer 1212 or other type of memory buffer, for example, via a persistence interface 1302. A page buffer 1304 within the persistence layer 1212 may store one or more logical pages 1306, and may optionally include shadow pages, active pages, and the like. The logical pages 1306 retained in the persistence layer 1212 may be written to a storage device (e.g., long-term storage device, etc.) 1214 via an input / output component 1216, which may be a software module, a subsystem implemented in one or more of software and hardware, and the like. The storage device 1214 may include one or more data volumes 1310, in which stored pages 1312 are allocated at physical memory blocks.

[0092] In some implementations, the data storage application 1204 may include or communicate with a page manager 1314 and / or a savepoint manager 1316. The page manager 1314 may communicate with a page management module 1320 at the persistence layer 1212, which may include a free block manager 1322, monitoring page state information 1324, such as the state of physical pages in the storage device 1214 and the state of logical pages in the persistence layer 1212 (and optionally in the page buffer 1304). The savepoint manager 1316 may communicate with a savepoint coordinator 1326 at the persistence layer 1212 to handle savepoints, which are used to create a consistent persistent state of the database for restarting after a possible crash.

[0093] In some implementations of the data storage application 1204, the page management module of the persistence layer 1212 can implement shadow paging. A free block manager 1322 within the page management module 1320 can maintain the state of the physical page. The page buffer 1304 can include a fixed page state buffer that operates as discussed herein. A converter component 1340, which can be part of the page management module 1320 or in communication with the page management module 1320, can be responsible for the mapping between logical pages and physical pages written to the storage device 1214. The converter 1340 can maintain the current mapping of the logical page to the corresponding physical page in the converter table 1342. The converter 1340 can maintain the current mapping of the logical page 1306 to the corresponding physical page in one or more converter tables 1342. When the logical page 1306 is read from the storage device 1214, the storage page to be loaded can be looked up from the one or more converter tables 1342 using the converter 1340. When the logical page is written to the storage device 1214 for the first time after the save point, a new free physical page is allocated to the logical page. The free block manager 1322 marks the new physical page as “used” and the new mapping is stored in the one or more converter tables 1342 .

[0094] The persistence layer 1212 can ensure that changes made in the data storage application 1204 are sustainable, and can ensure that the data storage application 1204 can be restored to the most recent committed state after restart. The writing of data to the storage device 1214 does not need to be synchronized with the end of the write transaction. In this way, when the write transaction is completed, uncommitted changes can be written to the disk, while the committed changes may not have been written to the disk yet. After a system crash, the changes made by the unfinished transaction can be rolled back. In this process, the changes caused by the committed transaction will not be lost. A recorder component 1344 can also be included to store the changes made to the data of the data storage application in a linear log. The recorder component 1344 can be used to replay operations during recovery, because the last save point ensures that all operations are applied to the data, and ensures that the transaction with the recorded "commit" record is committed before the pending transaction is rolled back at the end of the recovery process.

[0095] For some data storage applications, writing data to disk is not necessarily synchronized with the end of the write transaction. It may happen that uncommitted changes are written to disk while, at the same time, committed changes are not yet written to disk when the write transaction completes. After a system crash, changes made by transactions that have not yet completed must be rolled back, and changes made by committed transactions must not be lost.

[0096] To ensure that committed changes are not lost, the logger component 1344 can write redo log information whenever a change is made. This information can be written to disk at the latest when the transaction ends. The log entries can be persisted in a separate log volume, while regular data is written to the data volume. Using the redo log, committed changes can be recovered even if the corresponding data page has not been written to disk. To undo uncommitted changes, the persistence layer 1212 can use a combination of undo log entries (from one or more logs) and shadow paging.

[0097] Persistent interface 1302 can handle read and write requests for storage (e.g., in-memory storage, etc.). Persistent interface 1302 can also provide write methods for writing data with and without recording. If a recorded write operation is used, persistent interface 1302 calls logger 1344. In addition, logger 1344 provides an interface that allows storage (e.g., in-memory storage, etc.) to directly add log entries to a log queue. The logger interface also provides a method for requesting that log entries in an in-memory log queue be flushed to disk.

[0098] The log entry contains a log sequence number, the type of log entry, and an identifier of the transaction. Depending on the type of operation, additional information is recorded by the logger 1344. For example, for an entry of type "update", this would be the identification of the record affected and the afterimage of the modified data.

[0099] When the data application 1204 is restarted, the log entries need to be processed. To speed up this process, the redo logs are not always processed from the beginning. Instead, as described above, save points can be performed periodically to write all changes made since the last save point to disk (e.g., in memory, etc.). When the system is started, only the logs created after the last save point need to be processed. After the next backup operation, the old log entries before the save point position can be deleted.

[0100] When logger 1344 is called to write a log entry, it does not write to disk immediately. Instead, it may place the log entry in a log queue in memory. The entries in the log queue may be written to disk at the latest when the corresponding transaction completes (commits or aborts). To ensure that the committed changes are not lost, the commit operation is not successfully completed before the corresponding log entry is flushed to disk. Writing the log queue entry to disk may also be triggered by other events, for example, when the log queue page is full or when a savepoint is executed.

[0101] Using the current theme, logger 1344 can write database logs (or simply referred to as "logs" in this article) sequentially into a memory buffer in a natural order (e.g., chronological order, etc.). If multiple physical hard disks / storage devices are used to store log data, multiple log partitions can be defined. Thereafter, logger 1344 (as described above, its role is to generate and organize log data) can load balance the writing of log buffers on all available log partitions. In some cases, load balancing is performed according to a round-robin allocation scheme, in which various write operations are directed to the log buffer in a sequential and continuous manner. With this arrangement, the log buffers of a single log segment of a particular partition of a multi-partition log are not continuous. However, the log buffers in the log segments of all partitions can be reordered into the correct order during recovery.

[0102] As described above, the data storage application 1204 can use shadow paging so that the savepoint manager 1316 can write transactionally consistent savepoints. With this arrangement, the data backup includes a copy of all data pages included in a particular savepoint, which is the first step in the data backup process. The current subject matter can also be applied to other types of data page storage devices.

[0103] In some implementations, the current subject matter can be configured to be implemented in system 1400, such as Fig.14As shown. System 1400 may include processor 1410, memory 1420, storage device 1430, and input / output device 1440. Each of components 1410, 1420, 1430, and 1440 may be interconnected using system bus 1450. Processor 1410 may be configured to process instructions for execution within system 1400. In some implementations, processor 1410 may be a single-threaded processor. In an alternative implementation, processor 1410 may be a multi-threaded processor. Processor 1410 may also be configured to process instructions stored in memory 1420 or storage device 1430, including receiving or sending information through input / output device 1440. Memory 1420 may store information within system 1400. Memory 1420 may be a computer-readable medium. In an alternative implementation, memory 1420 may be a volatile memory unit. In yet other implementations, memory 1420 may be a non-volatile memory unit. Storage device 1430 may be capable of providing mass storage for system 1400. In some implementations, storage device 1430 may be a computer readable medium. In an optional implementation, storage device 1430 may be a floppy disk device, a hard disk device, an optical disk device, a magnetic tape device, a non-volatile solid-state memory, or any other type of storage device. Input / output device 1440 may be configured to provide input / output operations for system 1400. In some implementations, input / output device 1440 may include a keyboard and / or a pointing device. In an optional implementation, input / output device 1440 may include a display unit for displaying a graphical user interface.

[0104] Fig.15 An exemplary process 1500 for performing data compression according to some implementations of the current subject matter is shown. Process 1500 may be performed by Figure 2a The system 200 shown in FIG. 15 is executed, and in particular, uses the data storage application 204. At 1502, the data storage application 204 can receive a request (e.g., Figure 2a At 1504, the front-end encoding may be applied to one or more buckets of strings in the dictionary having the front-end encoding bucket size to generate front-end encoding buckets for a plurality of strings (e.g., Figure 2a At 1506, one or more portions of the plurality of front-end encoding buckets of the string may be concatenated to form one or more blocks having a block size. Then, at 1508, the one or more blocks may be compressed. At 1510, a set of compressed blocks corresponding to each string in the dictionary may be stored in the persistence layer 206, as shown in FIG. Figure 2aAs shown, a set of compressed blocks can store all strings in a data set.

[0105] In some implementations, the current subject matter can include one or more of the following optional features. In some implementations, each block in the set of compressed blocks can include a bucket header and a sequence of compressed buckets.

[0106] In some implementations, the method may further include inserting a terminator between storage buckets of the string in the plurality of front-end encoding storage buckets of the string. The terminator may be uncompressed.

[0107] In some implementations, each string may include a string terminator, wherein each string terminator is compressed.

[0108] In some optional implementations, the length of each string may be stored and compressed with the string.

[0109] In some implementations, the block size may be at least one of: a fixed size and a variable size.

[0110] In some implementations, compressing can include independently performing compression of each front-end encoding bucket in the plurality of buckets in parallel.

[0111] In some implementations, one or more front-end encoding buckets may be configured to be sampled to form one or more super blocks. Each super block may be configured to be subsequently compressed to generate a shared syntax for compressing the block. For example, the shared syntax may be used to perform accelerated compression of the block.

[0112] In some implementations, compression of the blocks can include re-pairing compression.

[0113] In some implementations, the method 1100 may further include: receiving a request to access data in the set of stored compressed blocks; in response to the received request, identifying one or more compressed blocks in the set of stored compressed blocks; and at least partially decompressing the identified compressed blocks to generate uncompressed data. The decompression may include: decompressing string prefixes and suffixes within the identified compressed blocks using front-end encoding; and decompressing the string suffixes within the identified compressed blocks using re-pairing decompression. In addition, the re-pairing decompression may include iteratively expanding each symbol in the symbol tree corresponding to the data stored in the identified compressed blocks.

[0114] Fig.16 An exemplary process 1600 for performing data decompression according to some implementations of the current subject matter is shown. Process 1600 may be performed by Figure 2aThe illustrated system 200 performs, and in particular uses, the data storage application 204. At 1602, one or more compressed blocks in the set of stored compressed blocks can be identified in response to a request to access data in the set of stored compressed blocks. At 1604, a string prefix within the identified compressed block can be decompressed using front-end encoding. At 1606, a string suffix within the identified compressed block can be decompressed using re-pairing decompression. At 1608, uncompressed data can be generated.

[0115] In some implementations, the current subject matter may include one or more of the following optional features. In some implementations, the re-pairing decompression may include iteratively expanding each symbol in the symbol tree corresponding to the data stored in the identified compressed block. The symbol tree may include multiple nodes. The compressed block may be generated from the front-end encoding bucket of one or more strings in the dictionary. The front-end encoding bucket may be configured to be sampled to form one or more super blocks. Each super block may be configured to be compressed to generate a shared syntax for compression of the compressed block. The multiple nodes may include at least one of the following: terminal characters, non-terminal characters, and any combination thereof. In some implementations, the method may also include performing multiple re-pairing decompressions in parallel. The number of terminal characters may be limited to a predetermined number. In addition, the number of iterative expansions for each symbol may be determined based on the predetermined number.

[0116] In some implementations, re-pairing decompression may include initializing a stack location in a memory corresponding to each symbol in a symbol tree, simultaneously loading each symbol in the symbol tree from a storage device into the memory using a vectorized re-pairing extension, merging the loaded symbols into the uncompressed data by evaluating one or more predicates associated with the symbols, and repeating the simultaneous loading and merging using a predetermined number of times.

[0117] In some implementations, each block in the set of compressed blocks may include a bucket header and a sequence of compressed buckets. The block size may be at least one of: a fixed size and a variable size. In addition, the compressed blocks may be compressed using re-pairing compression.

[0118] The systems and methods disclosed herein can be embodied in various forms, including, for example, data processors, such as computers that also include databases, digital electronic circuits, firmware, software, or combinations thereof. In addition, the above-mentioned features and other aspects and principles of the implementation of the present disclosure can be implemented in various environments. Such environments and related applications can be specially constructed to perform various processes and operations according to the disclosed implementations, or they can include general-purpose computers or computing platforms that are selectively activated or reconfigured by code to provide necessary functions. The processing disclosed herein is not inherently related to any particular computer, network, architecture, environment, or other device, and can be implemented by an appropriate combination of hardware, software, and / or firmware. For example, various general-purpose machines can be used with programs written according to the teachings of the disclosed implementations, or special-purpose devices or systems can be more conveniently constructed to perform the required methods and techniques.

[0119] The systems and methods disclosed herein may be implemented as a computer program product, i.e., a computer program tangibly embodied in an information carrier (e.g., a machine-readable storage device or a propagated signal) to be executed by a data processing device (e.g., a programmable processor or one or more computers) or to control the operation. The computer program may be written in any form of programming language (including compiled or interpreted languages) and may be deployed in any form (including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment). The computer program may be deployed to execute on one or more computers at one site or distributed across multiple sites and interconnected by a communications network.

[0120] As used herein, the term "user" may refer to any entity including a person or a computer.

[0121] Although in some cases ordinal numbers such as first, second, etc. can be related to order; however, ordinal numbers used in this document do not necessarily indicate order. For example, ordinal numbers can be used only to distinguish one item from another, such as to distinguish a first event from a second event, but do not necessarily imply any time order or fixed reference system (so that the first event in one paragraph of the description can be different from the first event in another paragraph of the description).

[0122] The foregoing description is intended to illustrate rather than limit the scope of the invention, which is defined by the scope of the appended claims. Other implementations are within the scope of the appended claims.

[0123] These computer programs (which may also be referred to as programs, software, software applications, applications, components or codes) include machine instructions for programmable processors and may be implemented in high-level procedural and / or object-oriented programming languages ​​and / or assembly / machine languages. As used herein, the term "machine-readable medium" refers to any computer program product, device and / or device for providing machine instructions and / or data to a programmable processor, such as a disk, an optical disk, a memory and a programmable logic device (PLD), including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor. A machine-readable medium may store such machine instructions non-temporarily, such as a non-temporary solid-state memory or a magnetic hard drive or any equivalent storage medium. A machine-readable medium may optionally or additionally store such machine instructions in a temporary manner, such as a processor cache or other random access memory associated with one or more physical processor cores.

[0124] In order to provide interaction with a user, the subject matter described herein can be implemented on a computer having a display device, such as a cathode ray tube (CRT) or liquid crystal display (LCD) monitor for displaying information to the user, and a keyboard and pointing device, such as a mouse or trackball, through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user. For example, the feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback, and input from the user can be received in any form, including but not limited to sound, voice, or tactile input.

[0125] The subject matter described herein can be implemented in a computing system including: including back-end components (such as one or more data servers), or including middleware components (such as one or more application servers), or including front-end components, such as one or more client computers with a graphical user interface or a web browser, through which a user can interact with an implementation of the subject matter described herein, or any combination of such back-end components, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (such as a communication network). Examples of communication networks include, but are not limited to, a local area network (LAN), a wide area network (WAN), and the Internet.

[0126] A computing system may include clients and servers. Clients and servers are typically, but not exclusively, remote from each other and typically interact through a communication network. The relationship between client and server is through computer programs running on the respective computers and having a client-server relationship to each other.

[0127] The implementations described in the foregoing description do not represent all implementations consistent with the subject matter described herein. Rather, they are only some examples consistent with aspects related to the described subject matter. Although some variations have been described in detail above, other modifications or additions are possible. In particular, in addition to those features and / or changes described herein, other features and / or changes may also be provided. For example, the above implementations may be directed to various combinations and subcombinations of the disclosed features and / or combinations and subcombinations of several other features disclosed above. In addition, the logic flows depicted in the accompanying drawings and / or described herein do not necessarily need to be in the specific order or sequential order shown to achieve the desired results. Other implementations may be within the scope of the appended claims.

Claims

1. A computer-implemented method comprising: identifying one or more compressed blocks in the stored set of compressed blocks in response to a request to access data in the stored set of compressed blocks; as well as Decompress the string prefix within the identified compressed block using the front-end encoding; Decompress the string suffix within the identified compressed block using re-pairing decompression; as well as Generate uncompressed data, wherein the re-pairing decompression comprises iteratively expanding each symbol in a symbol tree corresponding to data stored in the identified compressed block, wherein the symbol tree comprises a plurality of nodes, wherein the plurality of nodes comprises at least one of: a terminal character, a non-terminal character, and any combination thereof, wherein the number of terminal characters is limited to a predetermined number, wherein the number of iterative expansions for each symbol is determined based on the predetermined number, The one or more compressed blocks are generated from one or more front encoding buckets of strings in a dictionary, the one or more front encoding buckets being configured to be sampled to form one or more super blocks, wherein each of the one or more super blocks is configured to be compressed to generate a compressed shared syntax for the one or more compressed blocks, wherein the one or more compressed blocks are compressed using re-pairing compression, wherein the re-pairing decompression uses an extract function and a locate function, wherein the extract function calls a DecodeString function, and wherein the DecodeString function is called using an output buffer that already contains a previously decoded string and a bucket buffer that contains a compressed bucket after a header and keeps track of how many bits of the compressed bucket have been decoded, and the locate function is performed by performing a binary search on the header of the bucket in a compression dictionary, and Among them, re-pairing and decompression include: Initializing a stack location in memory corresponding to each symbol in the symbol tree; loading each symbol in the symbol tree from a storage device into the memory simultaneously using a vector instruction; merging the loaded symbols into the uncompressed data by evaluating one or more predicates associated with the symbols; and The simultaneous loading and the merging are repeated using the predetermined number.

2. The method according to claim 1, further comprising: Perform multiple re-pair decompressions in parallel.

3. The method according to claim 1, wherein: Each block in the set of compressed blocks includes a bucket header and a sequence of compressed buckets.

4. The method according to claim 1, wherein: The block size is at least one of: a fixed size and a variable size.

5. A system comprising: at least one programmable processor; as well as A non-transitory machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform the following operations: identifying one or more compressed blocks in the stored set of compressed blocks in response to a request to access data in the stored set of compressed blocks; as well as Decompress the string prefix within the identified compressed block using the front-end encoding; Decompress the string suffix within the identified compressed block using re-pairing decompression; as well as Generate uncompressed data, wherein the re-pairing decompression comprises iteratively expanding each symbol in a symbol tree corresponding to data stored in the identified compressed block, wherein the symbol tree comprises a plurality of nodes, wherein the plurality of nodes comprises at least one of: a terminal character, a non-terminal character, and any combination thereof, wherein the number of terminal characters is limited to a predetermined number, wherein the number of iterative expansions for each symbol is determined based on the predetermined number, The one or more compressed blocks are generated from one or more front encoding buckets of strings in a dictionary, the one or more front encoding buckets being configured to be sampled to form one or more super blocks, wherein each of the one or more super blocks is configured to be compressed to generate a compressed shared syntax for the one or more compressed blocks, wherein the one or more compressed blocks are compressed using re-pairing compression, wherein the re-pairing decompression uses an extract function and a locate function, wherein the extract function calls a DecodeString function, and wherein the DecodeString function is called using an output buffer that already contains a previously decoded string and a bucket buffer that contains a compressed bucket after a header and keeps track of how many bits of the compressed bucket have been decoded, and the locate function is performed by performing a binary search on the header of the bucket in a compression dictionary, and Among them, re-pairing and decompression include: Initializing a stack location in memory corresponding to each symbol in the symbol tree; loading each symbol in the symbol tree from a storage device into the memory simultaneously using a vector instruction; merging the loaded symbols into the uncompressed data by evaluating one or more predicates associated with the symbols; and The simultaneous loading and the merging are repeated using the predetermined number.

6. The system according to claim 5, wherein: The operations also include performing multiple re-pairing decompressions in parallel.

7. The system according to claim 5, wherein: Each block in the set of compressed blocks includes a bucket header and a sequence of compressed buckets.

8. The system according to claim 5, wherein: The block size is at least one of: a fixed size and a variable size.

9. A computer program product comprising a non-transitory machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising: identifying, in response to a request to access data in a stored set of compressed blocks, one or more compressed blocks in the stored set of compressed blocks; as well as Decompress the string prefix within the identified compressed block using the front-end encoding; Decompress the string suffix within the identified compressed block using re-pairing decompression; as well as Generate uncompressed data, wherein the re-pairing decompression comprises iteratively expanding each symbol in a symbol tree corresponding to data stored in the identified compressed block, wherein the symbol tree comprises a plurality of nodes, wherein the plurality of nodes comprises at least one of: a terminal character, a non-terminal character, and any combination thereof, wherein the number of terminal characters is limited to a predetermined number, wherein the number of iterative expansions for each symbol is determined based on the predetermined number, The one or more compressed blocks are generated from one or more front encoding buckets of strings in a dictionary, the one or more front encoding buckets being configured to be sampled to form one or more super blocks, wherein each of the one or more super blocks is configured to be compressed to generate a compressed shared syntax for the one or more compressed blocks, wherein the one or more compressed blocks are compressed using re-pairing compression, wherein the re-pairing decompression uses an extract function and a locate function, wherein the extract function calls a DecodeString function, and wherein the DecodeString function is called using an output buffer that already contains a previously decoded string and a bucket buffer that contains a compressed bucket after a header and keeps track of how many bits of the compressed bucket have been decoded, and the locate function is performed by performing a binary search on the header of the bucket in a compression dictionary, and Among them, re-pairing and decompression include: Initializing a stack location in memory corresponding to each symbol in the symbol tree; loading each symbol in the symbol tree from a storage device into the memory simultaneously using a vector instruction; merging the loaded symbols into the uncompressed data by evaluating one or more predicates associated with the symbols; and The simultaneous loading and the merging are repeated using the predetermined number.

Citation Information

Patent Citations

  • Advanced database compression on modern hardware

    US62864782P0

  • Adaptive dictionary compression / decompression for column-store databases

    EP2889787A2

  • Parallel compression and decompression using a cooperative dictionary

    US5729228A