Data storage method and apparatus

By configuring the original partition set in the distributed storage system HBase and using the consistent hashing algorithm to establish the correspondence between row keys and partitions, the data hotspot problem is solved, and the balanced distribution of data access pressure and load optimization are achieved.

CN115469814BActive Publication Date: 2026-06-26AGRICULTURAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AGRICULTURAL BANK OF CHINA
Filing Date
2022-10-19
Publication Date
2026-06-26

Smart Images

  • Figure CN115469814B_ABST
    Figure CN115469814B_ABST
Patent Text Reader

Abstract

The application discloses a data storage method and device, which can store data corresponding to a row key in a data table in an original partition according to a preset original correspondence between the row key and the original partition, and in the case that a data re-storage request of the data table is received, distribute data access or storage pressure of one partition to multiple partitions by migrating data to be adjusted stored in the partition to other partitions, so as to relieve a data hotspot problem. In addition, after data re-storage, the application modifies the correspondence between the row key of the data to be adjusted and the original partition in the original correspondence to the correspondence between the row key of the data to be adjusted and a target partition, so that the partition to which the data to be searched belongs can be determined according to the modified original correspondence in subsequent data searching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and more specifically, to a data storage method and apparatus. Background Technology

[0002] In the distributed storage system HBase, a region is the smallest unit of distributed storage, and different regions can be distributed across different server nodes. To store a data table in HBase, you can pre-partition it according to the row key order, meaning you pre-determine which partition will store data corresponding to a certain range of row keys.

[0003] When pre-partitioning according to row key order, adjacent rows are stored in one region. In a data table, adjacent rows often have close relationships and similar access probabilities. Therefore, pre-partitioning according to row key order often causes data hotspots, that is, data in certain regions is frequently accessed, causing the server node to which that region belongs to bear a huge data access pressure. Summary of the Invention

[0004] In view of the above problems, this application is made to provide a data storage method and apparatus to alleviate the data hotspot problem in distributed storage systems.

[0005] The specific plan is as follows:

[0006] Firstly, a data storage method is provided for application in the distributed storage system HBase. This method includes:

[0007] Configure the original partition set of the data table to be stored, wherein the original partition set includes several original partitions;

[0008] According to the preset original correspondence, the data to be stored in the data table is stored in the corresponding original partition. The original correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the original partition where each row of data is to be stored.

[0009] Upon receiving a data restorage request for the data table, the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored are determined based on the data restorage request. The partition to which the data to be adjusted belongs is determined according to the row key of the data to be adjusted and the original correspondence.

[0010] In the partition to be adjusted, the data to be adjusted is obtained according to the row key;

[0011] The data to be adjusted is stored in the target partition, and the data to be adjusted is deleted from the partition to be adjusted.

[0012] Modify the partition to be adjusted in the original correspondence that corresponds to the row key of the data to be adjusted to the target partition.

[0013] Secondly, a data storage device is provided for use in the distributed storage system HBase, the device comprising:

[0014] The partition set configuration unit is used to configure the original partition set of the data table to be stored, wherein the original partition set includes several original partitions;

[0015] The initial data storage unit is used to store the data to be stored in the data table into the corresponding original partition according to the preset original correspondence relationship. The original correspondence relationship is used to characterize the correspondence between the row key of each row of data in the data table and the original partition where each row of data is to be stored.

[0016] The data restorage unit is configured to, upon receiving a data restorage request for the data table, determine the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data restorage request; determine the partition to which the data to be adjusted belongs based on the row key of the data to be adjusted and the original correspondence; retrieve the data to be adjusted in the partition to be adjusted based on the row key; store the data to be adjusted in the target partition; delete the data to be adjusted in the partition to be adjusted; and modify the partition to be adjusted corresponding to the row key of the data to be adjusted in the original correspondence to the target partition.

[0017] By employing the above technical solutions, the data storage solution provided in this application can be applied to alleviate the data hotspot problem. For example, it can re-store data on partitions that bear a large data access and storage pressure. Specifically, by transferring the data stored in the partition to be adjusted to at least one target partition, the data access or storage pressure of one partition can be distributed to multiple partitions, thereby alleviating the data hotspot problem. In addition, this solution modifies the correspondence between the row key of the data to be adjusted and the original partition in the original correspondence to the relationship between the row key of the data to be adjusted and the target partition, so that the partition to which the data to be searched belongs can be determined according to the modified original correspondence during subsequent data searches. Attached Figure Description

[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0019] Figure 1 A flowchart illustrating a data storage method provided in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of the structure of a data storage device provided in an embodiment of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] This application provides a data storage method and apparatus that can be applied to HBase, a distributed storage system composed of several server nodes. It can implement data restorage tasks in HBase and alleviate data hotspot issues. It should be noted that a partition (Region) is the smallest unit of distributed storage in HBase. Different partitions can be distributed across different server nodes, but a single partition cannot be split across multiple server nodes. Furthermore, all data within a partition belongs to a single data table.

[0023] Figure 1 This is a flowchart illustrating a data storage method according to an embodiment of this application. The data storage method provided by this application can have two parts: the first part is an initial data storage method, and the second part is a data re-storage method. Combined with... Figure 1 As shown, the initial data storage method for the first part may include the following steps:

[0024] Step S101: Configure the original partition set of the data table to be stored.

[0025] It should be noted that the original partition set of the data table is configured before the data table is stored in the distributed storage system HBase. Specifically, the configuration of the original partition set can be achieved through functional components used to provide consistency services for HBase. These functional components can be ZooKeeper, ETCD, or Braft, etc. The original partition set can include several original partitions, and the maximum number of original partitions in the partition set is the total number of partitions available in HBase.

[0026] Step S102: According to the preset original correspondence, store the data to be stored in the data table into the corresponding original partition.

[0027] The original correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the original partition where the data is to be stored. For example, according to the original correspondence, the data corresponding to row key A in the data table can be stored in the original partition a, where the original partition a is the original partition corresponding to row key A in the original correspondence.

[0028] If a data re-storage request for the data table is received, the steps of the second part of the data re-storage method are executed. The data re-storage method may include the following steps:

[0029] Step S103: Determine the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data re-storage request.

[0030] Step S104: Determine the partition to which the data to be adjusted belongs based on the row key of the data to be adjusted and the original correspondence.

[0031] Step S105: In the partition to be adjusted, obtain the data to be adjusted according to the row key.

[0032] Step S106: Store the data to be adjusted in the target partition and delete the data to be adjusted in the partition.

[0033] Step S107: Modify the partition to be adjusted in the original correspondence that corresponds to the row key of the data to be adjusted to the target partition.

[0034] The data storage method of this application embodiment can store the data corresponding to the row key in the data table into the original partition according to the preset original correspondence between the row key and the original partition. When a data re-storage request of the data table is received, the data to be adjusted stored in the partition to be adjusted is migrated to other partitions for storage, thereby distributing the data access or storage pressure of one partition to multiple partitions, thereby alleviating the data hotspot problem. In addition, after the data re-storage, this solution also modifies the correspondence between the row key of the data to be adjusted and the original partition in the original correspondence to the relationship between the row key of the data to be adjusted and the target partition, so that the partition to which the data to be searched belongs can be determined according to the modified original correspondence during subsequent data search.

[0035] The process of generating the correspondence between row keys and original partitions is described below. In some embodiments provided in this application, the process of generating the original correspondence of the data table may include:

[0036] S01. Perform a consistent hash operation on the row key of each row of data in the data table to obtain the first operation result of each row key.

[0037] S02. Perform consistent hashing on the information of each original partition in the original partition set to obtain the second operation result of each original partition.

[0038] S03. For each row key of the data table: In the original partition set, filter out the original partitions that have a second operation result greater than the first operation result of the row key. Among the filtered original partitions, determine the original partition with the smallest first operation result as the original partition corresponding to the row key.

[0039] By using the consistent hashing algorithm to process row key and partition information, row keys and partitions can be mapped to the same data range on a data axis. Based on the relationship between the first and second hashing results, the correspondence between row keys and partitions is determined, allowing data corresponding to a given row key in the data table to be stored in the corresponding partition. Consistent hashing establishes a more balanced correspondence between row keys and partitions, reducing the possibility of a few partitions corresponding to a large number of row keys, thus balancing data storage across partitions to some extent. Furthermore, consistent hashing can also be used in data routing. It can perform a consistent hash operation on the row key of data to be routed, thereby determining the partition to which the data belongs, simplifying the HBase system architecture by eliminating the need for components like Zookeeper.

[0040] Optionally, the data restorage request can be sent to HBase when the server node is overloaded, the remaining storage space is small, and expansion is needed. Specifically, the storage space of the data table can be expanded by adding new partitions to the original partition set of the data table. The new partitions can belong to existing server nodes or newly added server nodes.

[0041] In one possible implementation, the data restorage request can be used to add a new partition to the original partition set.

[0042] Based on the above, determining the row key of the data to be adjusted and the target partition for storing the data to be adjusted based on the data restorage request may include:

[0043] S11. Based on the data restorage request, obtain information used to characterize the newly added partition.

[0044] S12. Establish a target correspondence according to the rules for establishing the original correspondence. The target correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the partition in the original partition set after adding the new partition to store each row of data.

[0045] S13. Compare the original correspondence and the target correspondence, and determine the row key and corresponding target partition for each of the several data to be adjusted based on the comparison result. The target partition is the partition where the data to be adjusted corresponding to a certain row key is to be stored.

[0046] Based on the above, after deleting the data to be adjusted from the partition to be adjusted, the method may further include:

[0047] Add the new partition to the original partition set.

[0048] It should be noted that a consistent hashing algorithm is used to establish the mapping between row keys and partitions. Therefore, after adding a new partition to the original partition set, the mapping between row keys and partitions will change. The new mapping can be calculated based on the original partition set after the addition of the new partition. Adding a new partition does not affect all original partitions. Specifically, the partition to be adjusted is the partition adjacent to the new partition on the mapped data axis, requiring only a small amount of data to be restored. Furthermore, the data re-storage method provided in this application can also be applied to the case of deleting original partitions from the original partition set. Specifically, a target mapping can be established based on the deleted original partition set, and the data on the original partition to be deleted can be migrated and stored on the corresponding target partition.

[0049] In one possible implementation, the partition to be adjusted includes the memory of the partition to be adjusted and the storage files of the partition to be adjusted.

[0050] Based on the above, the step of retrieving the data to be adjusted in the partition to be adjusted according to the row key and storing the data to be adjusted in the target partition may include:

[0051] Based on the row key of each piece of data to be adjusted, the first data to be adjusted is obtained from the memory of the partition to be adjusted, and the first data is used to generate temporary memory for the target partition to store the data to be adjusted.

[0052] Based on the row key of each piece of data to be adjusted, obtain the second data to be adjusted from the storage file of the partition to be adjusted, and generate a temporary storage file of the target partition to store the data to be adjusted from the second data;

[0053] The temporary memory of each of the target partitions is converted into the memory of this partition, and the temporary storage files of each of the target partitions are converted into storage files of this partition.

[0054] It should be noted that data restorage takes a certain amount of time, and during the data restorage process, new data is allowed to be written to the partition to be adjusted according to the original correspondence. Therefore, all storage files in the partition to be adjusted can be processed sequentially according to the storage order. If a new storage file is generated during the process, the newly generated storage file is added to the processing queue mentioned above. When restoring the data in the memory of the partition to be adjusted, if no new data is written to memory within a certain period of time, the data restorage process is prepared to end, the new partition is enabled, the original restorage data is deleted, and the correspondence between the row key and the partition is updated.

[0055] The data restorage provided in this application is also applicable to solving the task of restoring data in an existing set of original partitions, so as to alleviate the data hotspot problem without adding new partitions.

[0056] In some embodiments provided in this application, the data restorage request can be used to adjust the original correspondence to a target correspondence, wherein the target correspondence is used to characterize the correspondence between the row key of each row of data in the restorage data table and each original partition in the original dataset.

[0057] Based on the above, determining the row key of the data to be adjusted and the target partition for storing the data to be adjusted based on the data restorage request may include:

[0058] Based on the data restorage request, obtain the row key that has different correspondences in the target correspondence and the original correspondence, and obtain the row key of the data to be adjusted;

[0059] In the target correspondence, the partition corresponding to the row key of the data to be adjusted is obtained, and the target partition for storing the data to be adjusted is obtained.

[0060] The data storage method described above can alleviate the data hotspot problem without adding new partitions by modifying the correspondence between row keys and original partitions. For example, data stored in original partitions with large data storage or data access pressure can be migrated to original partitions with smaller data volumes.

[0061] The data storage device provided in the embodiments of this application is described below. The data storage device described below can be referred to in correspondence with the data storage method described above. This device can be applied to the distributed storage system HBase.

[0062] See Figure 2 , Figure 2 This is a schematic diagram of the structure of a data storage device disclosed in an embodiment of this application.

[0063] like Figure 2 As shown, the device may include:

[0064] The partition set configuration unit 11 is used to configure the original partition set of the data table to be stored, wherein the original partition set includes a plurality of original partitions;

[0065] The initial data storage unit 12 is used to store the data to be stored in the data table into the corresponding original partition according to the preset original correspondence relationship. The original correspondence relationship is used to characterize the correspondence between the row key of each row of data in the data table and the original partition where each row of data is to be stored.

[0066] The data re-storage unit 13 is configured to, upon receiving a data re-storage request from the data table, determine the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data re-storage request; determine the partition to which the data to be adjusted belongs based on the row key of the data to be adjusted and the original correspondence; retrieve the data to be adjusted based on the row key in the partition to be adjusted; store the data to be adjusted in the target partition; delete the data to be adjusted in the partition to be adjusted; and modify the partition to be adjusted corresponding to the row key of the data to be adjusted in the original correspondence to the target partition.

[0067] In some embodiments provided in this application, the original correspondence may be generated according to preset rules, which include:

[0068] Perform a consistent hash operation on the row key of each row of data in the data table to obtain the first operation result for each row key;

[0069] A consistent hash operation is performed on the information of each original partition in the original partition set to obtain the second operation result for each original partition.

[0070] For each row key of the data table: in the original partition set, the original partitions that have a second operation result greater than the first operation result of the row key are selected. Among the selected original partitions, the original partition with the smallest first operation result is determined as the original partition corresponding to the row key.

[0071] In some embodiments provided in this application, the data restorage request can be used to add new partitions to the original partition set.

[0072] Based on the above, the process by which the data re-storage unit 13 determines the row key of the data to be adjusted and the target partition for storing the data to be adjusted based on the data re-storage request may include:

[0073] Based on the data restorage request, obtain information to characterize the newly added partition;

[0074] Based on the rules for establishing the original correspondence, a target correspondence is established. The target correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the partition in the original partition set after adding the new partition to store each row of data.

[0075] The original correspondence and the target correspondence are compared, and the row key and the corresponding target partition for each of the several data to be adjusted are determined according to the comparison result. The target partition is the partition where the data to be adjusted corresponding to a certain row key is to be stored.

[0076] Based on the above, the data re-storage unit 13 can also be used to add the new partition to the original partition set after deleting the data to be adjusted from the partition to be adjusted.

[0077] In one possible implementation, the partition to be adjusted may include the memory of the partition to be adjusted and the storage files of the partition to be adjusted.

[0078] Based on the above, the process by which the data re-storage unit 13 retrieves the data to be adjusted in the partition to be adjusted according to the row key and stores the data to be adjusted in the target partition may include:

[0079] Based on the row key of each piece of data to be adjusted, the first data to be adjusted is obtained from the memory of the partition to be adjusted, and the first data is used to generate temporary memory for the target partition to store the data to be adjusted.

[0080] Based on the row key of each piece of data to be adjusted, obtain the second data to be adjusted from the storage file of the partition to be adjusted, and generate a temporary storage file of the target partition to store the data to be adjusted from the second data;

[0081] The temporary memory of each of the target partitions is converted into the memory of this partition, and the temporary storage files of each of the target partitions are converted into storage files of this partition.

[0082] In some embodiments provided in this application, the data restorage request can be used to adjust the original correspondence to a target correspondence, wherein the target correspondence is used to characterize the correspondence between the row key of each row of data in the restorage data table and each original partition in the original dataset.

[0083] Based on the above, the process by which the data re-storage unit 13 determines the row key of the data to be adjusted and the target partition for storing the data to be adjusted based on the data re-storage request may include:

[0084] Based on the data restorage request, obtain the row key that has different correspondences in the target correspondence and the original correspondence, and obtain the row key of the data to be adjusted;

[0085] In the target correspondence, the partition corresponding to the row key of the data to be adjusted is obtained, and the target partition for storing the data to be adjusted is obtained.

[0086] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0087] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0088] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data storage method, characterized in that, Applied to the distributed storage system HBase, this method includes: Configure the original partition set of the data table to be stored, wherein the original partition set includes several original partitions; According to a preset original correspondence, the data to be stored in the data table is stored in the corresponding original partition. The original correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the original partition where each row of data is to be stored. The original correspondence is generated according to preset rules, which include: performing a consistent hash operation on the row key of each row of data in the data table to obtain a first operation result for each row key; performing a consistent hash operation on the information of each original partition in the original partition set to obtain a second operation result for each original partition, so as to map the row key and the original partition to the same data range data axis based on the consistent hash operation; for each row key of the data table: in the original partition set, original partitions with a second operation result greater than the first operation result of the row key are selected, and the original partition with the smallest first operation result among the selected original partitions is determined as the original partition corresponding to the row key. Upon receiving a data restorage request for the data table, the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored are determined based on the data restorage request. The partition to which the data to be adjusted belongs is determined according to the row key of the data to be adjusted and the original correspondence. In the partition to be adjusted, the data to be adjusted is obtained according to the row key; The data to be adjusted is stored in the target partition, and the data to be adjusted is deleted from the partition to be adjusted. Modify the partition to be adjusted in the original correspondence that corresponds to the row key of the data to be adjusted to the target partition.

2. The method according to claim 1, characterized in that, The data restorage request is used to add a new partition to the original partition set; Determining the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data restorage request includes: Based on the data restorage request, obtain information to characterize the newly added partition; Based on the rules for establishing the original correspondence, a target correspondence is established. The target correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the partition in the original partition set after adding the new partition to store each row of data. Compare the original correspondence with the target correspondence, and determine the row key and corresponding target partition for each of several data to be adjusted based on the comparison result. The target partition is the partition where the data to be adjusted corresponding to a certain row key is to be stored. After deleting the data to be adjusted from the partition to be adjusted, the method further includes: Add the new partition to the original partition set.

3. The method according to claim 2, characterized in that, The partition to be adjusted includes the memory of the partition to be adjusted and the storage files of the partition to be adjusted; The step of retrieving the data to be adjusted in the partition to be adjusted according to the row key and storing the data to be adjusted in the target partition includes: Based on the row key of each piece of data to be adjusted, the first data to be adjusted is obtained from the memory of the partition to be adjusted, and the first data is used to generate temporary memory for the target partition to store the data to be adjusted. Based on the row key of each piece of data to be adjusted, obtain the second data to be adjusted from the storage file of the partition to be adjusted, and generate a temporary storage file of the target partition to store the data to be adjusted from the second data; The temporary memory of each of the target partitions is converted into the memory of this partition, and the temporary storage files of each of the target partitions are converted into storage files of this partition.

4. The method according to claim 1, characterized in that, The data restorage request is used to adjust the original correspondence to a target correspondence, and the target correspondence is used to characterize the correspondence between the row key of each row of data in the restorage data table and each original partition in the original partition set; Determining the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data restorage request includes: Based on the data restorage request, obtain the row key that has different correspondences in the target correspondence and the original correspondence, and obtain the row key of the data to be adjusted; In the target correspondence, the partition corresponding to the row key of the data to be adjusted is obtained, and the target partition for storing the data to be adjusted is obtained.

5. A data storage device, characterized in that, This device is used in the distributed storage system HBase and includes: A partition set configuration unit is used to configure the original partition set of the data table to be stored, wherein the original partition set includes several original partitions; The initial data storage unit is used to store the data to be stored in the data table into the corresponding original partition according to a preset original correspondence. The original correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the original partition where each row of data is to be stored. The original correspondence is generated according to preset rules, which include: performing a consistent hash operation on the row key of each row of data in the data table to obtain a first operation result for each row key; performing a consistent hash operation on the information of each original partition in the original partition set to obtain a second operation result for each original partition, so as to map the row key and the original partition to the same data range data axis based on the consistent hash operation; for each row key of the data table: in the original partition set, original partitions with a second operation result greater than the first operation result of the row key are selected, and the original partition with the smallest first operation result among the selected original partitions is determined as the original partition corresponding to the row key. The data restorage unit is configured to, upon receiving a data restorage request for the data table, determine the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data restorage request; determine the partition to which the data to be adjusted belongs based on the row key of the data to be adjusted and the original correspondence; retrieve the data to be adjusted in the partition to be adjusted based on the row key; store the data to be adjusted in the target partition; delete the data to be adjusted in the partition to be adjusted; and modify the partition to be adjusted corresponding to the row key of the data to be adjusted in the original correspondence to the target partition.

6. The apparatus according to claim 5, characterized in that, The data restorage request is used to add a new partition to the original partition set; The process by which the data re-storage unit determines the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data re-storage request includes: Based on the data restorage request, obtain information to characterize the newly added partition; Based on the rules for establishing the original correspondence, a target correspondence is established. The target correspondence is used to characterize the correspondence between the row key of each row of data in the data table and the partition in the original partition set after adding the new partition to store each row of data. Compare the original correspondence with the target correspondence, and determine the row key and corresponding target partition for each of several data to be adjusted based on the comparison result. The target partition is the partition where the data to be adjusted corresponding to a certain row key is to be stored. The data re-storage unit is also used to add the new partition to the original partition set after deleting the data to be adjusted from the partition to be adjusted.

7. The apparatus according to claim 6, characterized in that, The partition to be adjusted includes the memory of the partition to be adjusted and the storage files of the partition to be adjusted; The process by which the data re-storage unit retrieves the data to be adjusted in the partition to be adjusted according to the row key and stores the data to be adjusted in the target partition includes: Based on the row key of each piece of data to be adjusted, the first data to be adjusted is obtained from the memory of the partition to be adjusted, and the first data is used to generate temporary memory for the target partition to store the data to be adjusted. Based on the row key of each piece of data to be adjusted, obtain the second data to be adjusted from the storage file of the partition to be adjusted, and generate a temporary storage file of the target partition to store the data to be adjusted from the second data; The temporary memory of each of the target partitions is converted into the memory of this partition, and the temporary storage files of each of the target partitions are converted into storage files of this partition.

8. The apparatus according to claim 5, characterized in that, The data restorage request is used to adjust the original correspondence to a target correspondence, and the target correspondence is used to characterize the correspondence between the row key of each row of data in the restorage data table and each original partition in the original partition set; The process by which the data re-storage unit determines the row key of the data to be adjusted and the target partition where the data to be adjusted is to be stored based on the data re-storage request includes: Based on the data restorage request, obtain the row key that has different correspondences in the target correspondence and the original correspondence, and obtain the row key of the data to be adjusted; In the target correspondence, the partition corresponding to the row key of the data to be adjusted is obtained, and the target partition for storing the data to be adjusted is obtained.