Key value storage method and device for log structure merge tree, equipment and medium

By moving up and deleting duplicate key values ​​to the LSM-Tree SSTable file according to the access frequency, the read amplification and delay problems of LSM-Tree when storing data is solved, and more efficient data access is achieved.

CN120179616APending Publication Date: 2025-06-20CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510151315.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

LSM-Tree has read amplification problems and delay problems when storing data, especially the access to the underlying data will lead to serious read amplification problems, and the design does not consider the impact of access frequency of file data.

Method used

By obtaining the access frequency of the SSTable file, determine whether the file needs to be uploaded, and perform layer-by-layer up operations on the floating file, delete the duplicate key value until the floating file floats to the highest level.

Benefits of technology

By dynamically calculating access frequency and achieving upward movement of high-hot merged files, shortening access paths, significantly reducing read and amplifying problems, and reducing total operation delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179616A_ABST
    Figure CN120179616A_ABST
Patent Text Reader

Abstract

The invention provides a key value storage method and device for a log structure merge tree, equipment and a medium, and relates to the technical field of information storage, and the method comprises the steps: obtaining the access frequency of an SSTable file of the log structure merge tree; based on the access frequency of the SSTable file, judging whether the SSTable file needs to float or not to obtain a floating file; performing layer-by-layer floating operation on the floating file, comparing to obtain repeated key values of the SSTable file of the current layer and the floating file after each time of floating, and deleting the repeated key values from the floating file to obtain an updated floating file; and repeating the operations of floating and deleting repeated key values by updating the floating file until the floating file floats to the highest layer. The invention provides an up-shift key value storage structure based on access frequency distribution, which realizes the up-shift of high-heat merged files by dynamically calculating the access frequency for each merged file, and greatly reduces the read amplification problem by shortening the access path, and effectively reduces the total operation delay at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information storage, and more particularly, to a key-value storage method, apparatus, device and medium for a log-structured merge tree. Background Art

[0002] Key-value storage is a common non-relational storage method. By removing some unnecessary features in relational databases, key-value storage reduces the coupling of stored data and greatly improves the read and write performance of data. Among them, the log-structured merge tree (LSM-Tree) is a relatively mainstream design method in current key-value storage systems. The basic idea of LSM-Tree is to aggregate multiple write operations in memory by writing logs sequentially. After the memory reaches a certain storage capacity, they are dumped into files in the form of batch processing, that is, the values in memory are written to disk in the order of writing. At the same time, LSM-Tree stores these files in multiple levels in a hierarchical manner through compression and merging to facilitate fast search. However, the data stored at the bottom of the LSM-Tree will be retained at the bottom all the time, and accessing this bottom data will cause serious read amplification problems. Summary of the Invention

[0003] The purpose of the present invention is to provide a key-value storage method, apparatus, device and medium for a log-structured merge tree to improve the above problems. To achieve the above purpose, the technical solutions adopted by the present invention are as follows:

[0004] In a first aspect, the present application provides a key-value storage method for a log-structured merge tree, including:

[0005] Obtaining the access frequency of SSTable files of the log-structured merge tree;

[0006] Based on the access frequency of the SSTable files, determining whether the SSTable files need to float up to obtain floating-up files;

[0007] Performing a layer-by-layer floating-up operation on the floating-up files. After each floating-up, comparing to obtain the key-values that are repeated between the SSTable files of the current layer and the floating-up files, and deleting the repeated key-values from the floating-up files to obtain updated floating-up files; repeating the operations of floating up and deleting the repeated key-values with the updated floating-up files until the floating-up files float up to the highest layer.

[0008] In a second aspect, the present application provides a key-value storage apparatus for a log-structured merge tree, including:

[0009] A first acquisition module, configured to obtain the access frequency of SSTable files of the log-structured merge tree;

[0010] A judgment module, configured to judge whether an SSTable file needs to be floated up based on the access frequency of the SSTable file, so as to obtain a floated-up file;

[0011] A floating-up module, configured to perform a layer-by-layer floating-up operation on the floated-up file. After each floating-up, compare to obtain duplicate key values between the SSTable file of the current layer and the floated-up file, and delete the duplicate key values from the floated-up file to obtain an updated floated-up file; repeat the operations of floating up and deleting duplicate key values with the updated floated-up file until the floated-up file floats up to the highest layer.

[0012] In a third aspect, the present application further provides a key-value storage device for a log-structured merge tree, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned key-value storage method for the log-structured merge tree are implemented.

[0013] In a fourth aspect, the present application further provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned key-value storage method for the log-structured merge tree are implemented.

[0014] The beneficial effects of the present invention are as follows:

[0015] The present invention proposes an upward-shifting key-value storage structure based on access frequency distribution. By dynamically calculating the access frequency of each merged file, the upward movement of high-heat merged files is realized. By shortening the access path, the read amplification problem is greatly reduced, and at the same time, the total operation delay is effectively reduced.

[0016] Other features and advantages of the present invention will be described in the subsequent specification, and some of them will become obvious from the specification, or can be understood by implementing the embodiments of the present invention. Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is a flowchart of the key-value storage method for the log-structured merge tree according to the embodiment of the present application;

[0019] Figure 2 It is a schematic diagram of the floating-up process of the floated-up file according to the embodiment of the present application;

[0020] Figure 3Schematic diagram of the key-value storage device of the log structure merge tree in the embodiment of the present application;

[0021] Figure 4 Schematic diagram of the key-value storage device of the log structure merge tree in the embodiment of the present application.

[0022] Markings in the figure: 100 - First acquisition module; 200 - Judgment module; 201 - First calculation unit; 220 - Second calculation unit; 221 - Setting unit; 222 - Searching unit; 223 - Updating unit; 230 - Comparison unit; 300 - Floating module; 400 - Second acquisition module; 500 - Downward movement module; 600 - Second merging module; 800 - Key-value storage device of the log structure merge tree; 801 - Processor; 802 - Memory; 803 - Multimedia component; 804 - I / O interface; 805 - Communication component. Detailed implementation manners

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention generally described and illustrated in the figures herein can be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiments of the present invention provided herein is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.

[0024] It should be noted that like reference numerals and letters denote like items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0025] Key-value storage is a common non-relational storage method. By removing some unnecessary features in relational databases, key-value storage reduces the coupling of stored data and greatly improves the read and write performance of data. Among them, log-structured storage, namely LSM-Tree (Log-Structured Merge Tree), is a relatively mainstream design method in current key-value storage systems. The basic idea of LSM-Tree is to aggregate multiple write operations in memory by writing logs sequentially. After the memory reaches a certain storage capacity, they are dumped into files in the form of batch processing, and the values in memory are also written to the disk in sequential write mode. At the same time, LSM-Tree stores these files in multiple levels in a hierarchical manner through compression and merging to facilitate quick search. Compared with traditional B-Tree, LSM-Tree converts random writes into sequential writes, greatly improving the write efficiency. However, LSM-Tree still has two deficiencies: one is that the data flow direction is unidirectional and fixed. The data stored at the bottom of LSM-Tree will always be retained at the bottom until they become old data and are deleted by the compression operation. When accessing this bottom data, it will cause the read amplification problem to become more serious; the other is that the design of LSM-Tree does not consider the impact of the access frequency of file data, which ultimately leads to higher latency when accessing the underlying data with high frequency.

[0026] Embodiment 1

[0027] As Figure 1 shown, to solve the existing technical problems, this application provides a key-value storage method for a log-structured merge tree, including steps S100, S200, and S300:

[0028] The log-structured merge tree has layers L0 - L6 from top to bottom; among them, layer L0 is the top layer and is used to store the latest data.

[0029] Step S100: Obtain the access frequency of the SSTable files of the log-structured merge tree;

[0030] Specifically, create a counter in each SSTable file, and update the counter of this SSTable file each time a key-value pair is read.

[0031] Regularly traverse all SSTables, count the number of reads of the SSTable files recorded by the counter, and obtain the access frequency.

[0032] The access frequency counted in this step is for the SSTable file, not for individual key-values. When floating up, the entire SSTable file is also moved up as a whole, rather than moving up individual key-values. The internal data of an SSTable file is stored in byte order, that is, the content stored in a storage file is ordered. When accessing in order, the overall floating-up method of the file in this application can achieve the effect of prefetching, so that accessing all data in this file can reduce the read amplification.

[0033] Step S200: Based on the access frequency of the SSTable file, determine whether the SSTable file needs to float up to obtain the floating-up file; specifically including:

[0034] Step S210: Calculate the access frequency of each SSTable file in the highest layer of the log-structured merge tree and compare them to obtain the minimum reference frequency;

[0035] The minimum reference frequency is represented by minf(U,0), where u represents the Uth SSTable file in layer L0, and 0 represents layer L0;

[0036] Step S220: Multiply the minimum reference frequency by a preset floating-up constant to obtain the floating-up reference value;

[0037] The floating-up reference value = γ × minf(U,0), where γ is the floating-up constant;

[0038] The floating-up constant controls the floating-up frequency, and its default value can be set to 3, but it can be adjusted according to the situation. The specific adjustment strategy is:

[0039] Find the target file with the minimum access frequency in the SSTable files in the highest layer;

[0040] Obtain the most recent access time of the target file. When the interval between the most recent access time and the current time is greater than the preset value, the default value of the floating-up constant is reduced according to the interval between the most recent access time and the current time to obtain the updated floating-up constant. For example, divide the preset interval value by the actual time interval to obtain the reduction ratio, and then multiply the reduction ratio by the floating-up constant to obtain the reduced floating-up constant. After the floating-up constant becomes smaller, the floating-up frequency of the lower-layer data will increase, so that the data with high access heat in the lower layer can replace the data with low access heat in layer L0 earlier.

[0041] Step S230: Compare the access frequency of the SSTable files in other layers with the floating-up reference value. If there is an SSTable file whose access frequency is greater than the floating-up reference value, then this SSTable file needs to float up to obtain the floating-up file.

[0042] The other layers refer to L1 - L6 layers. The access frequency of each SSTable file in L1 - L6 layers is expressed as f(T, I), where I represents the I - th layer and T represents the T - th SSTable file in the I - th layer.

[0043] When f(T, I) ≥ γ × minf(U, 0), then this SSTable file needs to float up and becomes a floating - up file.

[0044] Step S300: Perform a floating - up operation layer by layer on the floating - up file. After each floating - up, compare to obtain the key values that are repeated between the SSTable file of the current layer and the floating - up file, and delete the repeated key values from the floating - up file to obtain an updated floating - up file. Repeat the operations of floating - up and deleting repeated key values with the updated floating - up file until the floating - up file floats up to the highest layer.

[0045] See Figure 2 , in the figure, a, b, c, d, e, f, g, i, j, k, l, m, n, o represent unstructured data. Among them, abi is stored in the SSTable file of the L0 layer, cdf and jlo are respectively stored in two SSTable files of the L1 layer, and efg and kmn are respectively stored in two SSTable files of the L6 layer. When accessing the e data in the L6 layer and the access frequency of this SSTable file reaches the floating - up threshold, at this time, take the SSTable where efg is located as the floating - up file and move it up. During the moving - up process, there is a repeated key value f with cdf in the L1 layer. The f in the SSTable where efg is located has an earlier storage time and is the repeated old value. Therefore, retain the f value in the original L1 layer, and at the same time remove the f value from the floating - up file, leaving only eg. Move the SSTable where eg is located up to the L0 layer. The next time when accessing the values of e or g, the access path can be shortened and the read amplification is reduced.

[0046] As an optional implementation manner, the method further includes step S400:

[0047] Obtain the target file with the minimum access frequency according to the access frequency of the SSTable file in the highest layer;

[0048] After the floating - up file floats up to the highest layer, determine whether the number of SSTable files in the current highest layer is greater than a preset threshold; if so, move the target file down;

[0049] After the target file is moved down to the next layer, perform a merging process on it with the SSTable file with repeated key values in the next layer. The merging process is carried out according to the multi - way merge algorithm (such as k - way merge). Multi - way merge algorithm:

[0050] After each downward movement, search for the SSTable files in the current N layer that have duplicate key values with the target file to obtain the files to be merged;

[0051] Extract the key-value pairs from the files to be merged and the target file, and merge the extracted key-value pairs into an ordered list of key-value pairs; among them, for the duplicate keys during the merging process, keep the latest key-value pairs and delete the other old key-value pairs; each SSTable is written with key-value pairs appended during a certain period of time, so there must be a difference in the time of the key-value pairs in different SSTables, and the newness and oldness of the keys can be judged according to the time;

[0052] Construct a new SSTable file according to the list of key-value pairs (including generating a new BloomFilter and DataBlocks), insert the new SSTable file into the current N layer, and delete the original files to be merged.

[0053] This application designs a new data flow direction for the log-structured merge tree, enabling the data at the bottom layer to move up to the upper layer, thereby reducing the read overhead. At the same time, two important properties of the storage structure are guaranteed:

[0054] 1. The degree of newness and oldness of the data in the SSTable decreases sequentially from the top layer to the bottom layer. The data in the top layer is the latest, and the data in the bottom layer is the oldest.

[0055] 2. Except for the SSTables in the L0 layer that allow duplicate data, no duplicate data is allowed between the SSTables in the other layers.

[0056] This application guarantees these two requirements during the process of moving up the data, thus ensuring that the data can be read efficiently and accurately.

[0057] Embodiment 2

[0058] As Figure 3 shown, this application also provides a key-value storage device for a log-structured merge tree, including:

[0059] The first acquisition module 100 is used to acquire the access frequency of the SSTable files of the log-structured merge tree;

[0060] The judgment module 200 is used to judge whether the SSTable file needs to float based on the access frequency of the SSTable file to obtain the floating file;

[0061] The floating module 300 is used to perform a layer-by-layer floating operation on the floating file. After each floating, it compares to find the key values that are repeated between the current layer's SSTable file and the floating file, and deletes the repeated key values from the floating file to obtain an updated floating file. The operations of floating and deleting repeated key values are repeatedly performed on the updated floating file until the floating file reaches the highest layer.

[0062] As an optional implementation manner, the judgment module 200 includes:

[0063] The first calculation unit 210 is used to calculate and compare the access frequencies of each SSTable file in the highest layer of the log-structured merge tree to obtain the minimum reference frequency.

[0064] The second calculation unit 220 is used to multiply the minimum reference frequency by a preset floating constant to obtain a floating reference value.

[0065] The comparison unit 230 is used to compare the access frequencies of SSTable files in other layers with the floating reference value. If there is an SSTable file whose access frequency is greater than the floating reference value, then this SSTable file needs to be floated to obtain a floating file.

[0066] The second calculation unit 220 includes:

[0067] The setting unit 221 is used to set the default value of the floating constant to 3.

[0068] The searching unit 222 is used to search for the target file with the minimum access frequency in the SSTable files of the highest layer.

[0069] The updating unit 223 is used to obtain the most recent access time of the target file. When the interval between the most recent access time and the current time is greater than a preset value, the default value of the floating constant is reduced according to the interval between the most recent access time and the current time to obtain an updated floating constant.

[0070] As an optional implementation manner, it further includes:

[0071] The second obtaining module 400 is used to obtain the target file with the minimum access frequency according to the access frequencies of the SSTable files in the highest layer.

[0072] The downward movement module 500 is used to determine whether the number of SSTable files in the current highest layer is greater than a preset threshold after the floating file reaches the highest layer; if so, the target file is moved downward.

[0073] The second merging module 600 is used to merge the target file with the SSTable files with duplicate key values in the next layer after the target file is moved downward to the next layer.

[0074] Embodiment 3

[0075] Corresponding to the above method embodiment, in this embodiment, a key-value storage device for a log-structured merge tree is also provided. A key-value storage device for a log-structured merge tree described below can be correspondingly referred to the key-value storage method for a log-structured merge tree described above.

[0076] Figure 4 is a block diagram of a key-value storage device 800 for a log-structured merge tree shown according to an exemplary embodiment. As Figure 4 shown, the key-value storage device 800 for the log-structured merge tree includes a processor 801 and a memory 802. The key-value storage device 800 for the log-structured merge tree may further include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805. Among them, the processor 801 is used to control the overall operation of the key-value storage device 800 for the log-structured merge tree to complete all or part of the steps in the above key-value storage method for the log-structured merge tree. The memory 802 is used to store various types of data to support the operation of the key-value storage device 800 for the log-structured merge tree. These data may include, for example, commands for any application or method operating on the key-value storage device 800 for the log-structured merge tree, and application-related data, such as contact data, received and sent messages, pictures, audio, video, and so on. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc.

[0077] The multimedia component 803 may include a screen and an audio component. Among them, the screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, and the microphone is used to receive external audio signals.

[0078] The received audio signal can be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting the audio signal. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the other interface modules can be a keyboard, a mouse, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the key-value storage device 800 of the log-structured merge tree and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them. Accordingly, the communication component 805 may include: a Wi-Fi module, a Bluetooth module, and an NFC module.

[0079] In an exemplary embodiment, the device 800 for mutual signature and verification of digital files can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above-mentioned key-value storage method of the log-structured merge tree.

[0080] In another exemplary embodiment, a computer-readable storage medium including program commands is also provided. When the program commands are executed by a processor, the steps of the above-mentioned key-value storage method of the log-structured merge tree are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program commands, and the above program commands can be executed by the processor 801 of the key-value storage device 800 of the log-structured merge tree to complete the above-mentioned key-value storage method of the log-structured merge tree.

[0081] Embodiment 4

[0082] Corresponding to the method embodiment of the above-mentioned key-value storage of the log-structured merge tree, a readable storage medium is also provided in this embodiment. The following-described readable storage medium and the above-described key-value storage method of the log-structured merge tree can be correspondingly referred to each other.

[0083] A readable storage medium stores a computer program thereon. When the computer program is executed by a processor, the steps of the embodiment of the key-value storage method of the above-mentioned log-structured merge tree are implemented.

[0084] Specifically, the readable storage medium can be various readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0085] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0086] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A key-value storage method for a log-structured merge tree, characterized in that: include: Get the access frequency of the SSTable file of the log structure merge tree; Based on the access frequency of the SSTable file, determine whether the SSTable file needs to be floated, and obtain the floated file; The floating file is floated up layer by layer. After each floating up, the SSTable file of the current layer is compared with the floating file to find duplicate key values. The duplicate key values ​​are deleted from the floating file to obtain an updated floating file. The floating and deleting duplicate key value operations are repeated with the updated floating file until the floating file floats to the highest layer.

2. A key value storage method of a log structure merge tree according to claim 1, characterized in that: The method of judging whether the SSTable file needs to be floated based on the access frequency of the SSTable file and obtaining the floated file includes: Calculate the access frequency of each SSTable file in the highest level of the log structure merge tree and compare them to get the minimum baseline frequency; Multiply the minimum reference frequency by the preset floating constant to obtain the floating reference value; Compare the access frequency of SSTable files in other layers with the size of the floating benchmark value. If there is an SSTable file whose access frequency is greater than the floating benchmark value, the SSTable file needs to be floated to obtain a floating file.

3. A key value storage method of a log structure merge tree according to claim 2, characterized in that: The method of multiplying the minimum reference frequency by a preset floating constant to obtain a floating reference value includes: Set the default value of the floating constant to 3; Find the target file with the lowest access frequency in the SSTable file of the highest level; The most recent access time of the target file is obtained. When the interval between the most recent access time and the current time is greater than a preset value, the default value of the floating constant is reduced according to the interval between the most recent access time and the current time to obtain an updated floating constant.

4. The key value storage method of a log structure merge tree according to claim 1, characterized in that: The method further comprises: According to the access frequency of the highest-level SSTable file, the target file with the lowest access frequency is obtained; After the floating file floats to the highest layer, determine whether the number of SSTable files in the current highest layer is greater than the preset threshold; if so, move the target file down; After the target file is moved down to the next layer, it is merged with the SSTable file with duplicate key values ​​in the next layer.

5. A key-value storage device for a log structure merge tree, comprising: The first acquisition module is used to obtain the access frequency of the SSTable file of the log structure merge tree; A judgment module is used to judge whether the SSTable file needs to be floated based on the access frequency of the SSTable file and obtain the floated file; The floating module is used to float the floating file layer by layer. After each floating, the SSTable file of the current layer is compared with the floating file to find out the duplicate key values. The duplicate key values ​​are deleted from the floating file to obtain the updated floating file. The floating and deleting duplicate key value operations are repeated with the updated floating file until the floating file floats to the highest layer.

6. The key-value storage device of the log structure merge tree according to claim 5, characterized in that: The judging module comprises: The first calculation unit is used to calculate the access frequency of each SSTable file in the highest layer of the log structure merge tree and compare them to obtain the minimum benchmark frequency; A second calculation unit is used for multiplying a preset floating constant by a minimum reference frequency to obtain a floating reference value; The comparison unit is used to compare the access frequency of SSTable files in other layers with the size of the floating reference value. If the access frequency of an SSTable file exists that is greater than the floating reference value, the SSTable file needs to be floated to obtain a floating file.

7. A key-value storage device for a log-structured merge tree according to claim 6, characterized in that: The second computing unit comprises: A setting unit is used to set the default value of the floating constant to 3; A search unit, used for searching the target file with the lowest access frequency in the SSTable file of the highest level; The updating unit is used to obtain the most recent access time of the target file. When the interval between the most recent access time and the current time is greater than a preset value, the default value of the floating constant is reduced according to the interval between the most recent access time and the current time to obtain an updated floating constant.

8. A key-value storage device for a log-structured merge tree according to claim 5, characterized in that: Also includes: The second acquisition module is used to obtain the target file with the lowest access frequency according to the access frequency of the SSTable file at the highest level; The down-shift module is used to determine whether the number of SSTable files in the current highest layer is greater than the preset threshold after the floating files float to the highest layer; If so, move the target file down; The second merging module is used to merge the target file with the SSTable file with duplicate key values ​​in the next layer after the target file is moved down to the next layer.

9. A key-value storage device of a log-structured merge tree, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the key-value storage method of the log-structured merge tree as described in any one of claims 1 to 5 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the key-value storage method of the log-structured merge tree as claimed in any one of claims 1 to 5.