Data balancing method, computer program product, device and storage medium
By judging the location information of node migration and the amount of data copies in the distributed storage system, the data balancing process is optimized, the problem of performance waste caused by frequent migration is solved, and efficient and accurate data balancing is achieved.
Patent Information
- Application Number
- CN202410831699.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In distributed storage systems, frequent node migration leads to a waste of system performance. Existing technologies cannot effectively optimize the data balancing process, resulting in resource waste and performance degradation.
By obtaining the location information of the node, the total number of racks and the amount of data copies, it is judged whether the migration operation meets the preset conditions, and data balancing is performed only when the conditions are met. The scheduled task and delayed task mechanism is used to reduce ineffective data balancing operations. Optimize the division of data domains and data distribution.
It effectively reduces the impact of rack topology adjustment on system performance, improves the accuracy and efficiency of data balancing, avoids ineffective data balancing operations, and reduces resource waste.
Smart Images

Figure CN118409867B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data balancing method, a computer program product, a device and a storage medium. Background Art
[0002] A distributed storage system cluster usually contains a large number of nodes. Due to the limitations of the computer room environment and the rack slots in the computer room, these nodes generally need to be placed on different racks.
[0003] In the prior art, when a computer room is renovated or a node position is adjusted in a distributed storage system, the cluster is generally adjusted online in real time. The adjustment method is usually to migrate nodes one by one, and migrate different nodes multiple times in a short period of time to ultimately achieve the target rack topology. However, each time a node is migrated, the system will believe that the rack topology in the cluster has changed, resulting in a change in the data domain, which will trigger a data balance. Frequent migration of the rack positions of nodes in the cluster in a short period of time can easily lead to a large waste of system performance, which requires further optimization. Summary of the invention
[0004] Based on this, it is necessary to provide a data balancing method, computer program product, device and storage medium that can effectively balance data and reduce the impact of rack topology adjustment on system performance in response to the above technical problems.
[0005] In order to solve the above technical problems, in a first aspect, a data balancing method is provided, the method comprising:
[0006] In response to a node performing a migration operation on a rack, obtaining first position information of the node before the migration operation and second position information of the node after the migration operation;
[0007] determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information;
[0008] When the migration operation does not meet the first preset condition, the total number of racks and the amount of data copies are obtained, and whether the migration operation meets the second preset condition is determined according to the total number of racks and the amount of data copies;
[0009] When the migration operation meets the second preset condition, obtaining the current node rack topology information and the target rack topology information recorded in the database;
[0010] Determining whether the migration operation meets a third preset condition according to the current node rack topology information and the target rack topology information recorded in the database;
[0011] When the migration operation meets the third preset condition, data balancing is performed according to a preset data balancing method.
[0012] In one embodiment, determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information includes:
[0013] Acquire first location information and second location information, wherein the location information is rack location information of the node;
[0014] Determining whether the first location information is the same as the second location information, and if the first location information is the same as the second location information, it is considered that the migration operation does not meet the first preset condition;
[0015] If the first location information is different from the second location information, it is considered that the migration operation meets the first preset condition.
[0016] In one embodiment, obtaining the total number of racks and the amount of data copies, and determining whether the migration operation meets the second preset condition according to the total number of racks and the amount of data copies includes:
[0017] Get the total number of racks and the number of data copies. The total number of racks is the total number of racks deployed in the distributed storage system, and the number of data copies is the number of each data block stored in the distributed storage system.
[0018] Compare the total number of racks and the amount of data copies;
[0019] When the total number of racks is less than or equal to the number of data copies, it is considered that the migration operation does not meet the second preset condition;
[0020] When the total number of racks is greater than the number of data copies, the migration operation is considered to meet the second preset condition.
[0021] In one embodiment, the method further comprises:
[0022] When the migration operation does not meet the first preset condition, a scheduled task with a preset duration is generated, and the scheduled task has a unique identifier;
[0023] In response to the scheduled task being completed, obtaining a unique identifier of the scheduled task;
[0024] The unique identifier is in the form of absolute time.
[0025] In one embodiment, the method further comprises:
[0026] Obtain the unique identifier of the current scheduled task, and obtain the rack topology information corresponding to the current scheduled task according to the unique identifier of the current scheduled task;
[0027] Obtain the unique identifier of the last scheduled task, and obtain the rack topology information corresponding to the last scheduled task based on the unique identifier of the last scheduled task;
[0028] Determine the node migration status based on the unique identifier of the current scheduled task and the unique identifier corresponding to the previous scheduled task;
[0029] If the unique identifier of the current scheduled task is different from the unique identifier corresponding to the previous scheduled task, it is considered that the node has been migrated, and the rack topology information of the current scheduled task is used to overwrite the rack topology information corresponding to the previous scheduled task.
[0030] In one embodiment, the target rack topology information is stored in a database in the form of a key-value pair, and the method includes:
[0031] Using the unique identifier of the target rack topology information as the key value and the target rack topology information as the value, a key-value pair is constructed;
[0032] Encrypt the key-value pair using the preset authentication information to generate mapping encryption information of the key-value pair;
[0033] Generate virtual key-value pair information based on preset authentication information, key-value pair, and mapping encryption information and store it in a database;
[0034] Use preset scripts to assign virtual key-value pair information to variables.
[0035] In one embodiment, the method further includes: obtaining a unique identifier of the target rack topology information recorded in the database, wherein obtaining the unique identifier of the target rack topology information recorded in the database includes:
[0036] Obtaining mapping encryption information and preset authentication information corresponding to the target rack topology information;
[0037] Execute the preset script to determine the mapping encryption information in the virtual key-value pair information corresponding to the variable assignment;
[0038] Decrypt the mapped encrypted information using the preset authentication information to obtain key-value pair information;
[0039] Find the unique identifier corresponding to the target rack topology information from the key-value pair information.
[0040] In one embodiment, judging whether the migration operation satisfies the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database includes:
[0041] When the migration operation meets the second preset condition, a delayed task with a lease is generated;
[0042] Based on the monitoring mechanism in the distributed key-value storage system, the key value is monitored in real time to obtain the key value status information;
[0043] When the lease expires, extract the unique identifier corresponding to the key value in the delayed task and delete the key value;
[0044] Compare the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to determine whether the delayed task is effective;
[0045] When the unique identifier corresponding to the key value in the delayed task is consistent with the latest unique identifier in the database, it is considered that the migration operation does not meet the third preset condition;
[0046] When the unique identifier corresponding to the key value in the delayed task is inconsistent with the latest unique identifier in the database, it is considered that the migration operation meets the third preset condition.
[0047] In one embodiment, performing data balancing according to a preset data balancing method includes:
[0048] Obtain the data information stored in the node and the number of the target rack where the node is located after the migration operation;
[0049] Find the data information stored in other nodes on the target rack according to the target rack number;
[0050] Determine whether the data information stored in the node is the same as the data information stored in other nodes;
[0051] If the data information stored in the node is the same as the data information stored in other nodes, any copy of the same data information is used as the data information to be distributed to the balancing rack.
[0052] In one embodiment, the method further comprises:
[0053] Select a balanced rack. Selecting a balanced rack includes:
[0054] Obtaining the number of each rack in the distributed storage system, wherein the number of each rack corresponds to a data domain;
[0055] A rack having a number different from that of the target rack and having data information stored in a node on the rack different from the data information to be allocated is selected as a balancing rack.
[0056] In one embodiment, the method further includes: selecting a balancing node in a balancing rack, wherein selecting the balancing node in the balancing rack includes:
[0057] Obtain the load of data information stored in each node in the distributed storage system;
[0058] According to the load of each node, each node is used as a leaf node of the Harmanff tree to construct the Harmanff tree; wherein the Harmanff tree has multiple levels, including low level, middle level, and high level, the leaf nodes of the low level have relatively the least load, and the leaf nodes of the high level have relatively the most load;
[0059] When selecting a balancing node, the load of the data information to be distributed is used as the load threshold, and the level of the Harman tree that meets the load threshold is selected as the target level;
[0060] For nodes in the target layer, the nodes with the shortest distance to the node and directly connected to the node are selected from the upper nodes from left to right as the balancing nodes for data balancing.
[0061] In one embodiment, the method further comprises:
[0062] Get the data information stored by the node and the data information stored by other nodes;
[0063] Perform feature extraction on the data information stored in the node and the data information stored in other nodes respectively to obtain a first feature vector and a second feature vector;
[0064] Constructing a correlation matrix according to the first eigenvector and the second eigenvector;
[0065] The bond energy algorithm is used to transform the correlation matrix to obtain a high correlation data group matrix;
[0066] Perform data balancing based on the high-correlation data cluster matrix;
[0067] Among them, the bond energy algorithm is used to transform the correlation matrix, and the high correlation data group matrix is obtained, including:
[0068] Transform the rows and columns of the correlation matrix;
[0069] Calculate the bond energy value of the correlation matrix after each row-column transformation, and use the transformed correlation matrix corresponding to the maximum bond energy value as the high-correlation data group matrix;
[0070] Among them, the formula for calculating the bond energy value of the correlation matrix after each row and column transformation is as follows:
[0071] ;
[0072] Where E represents bond energy, L (i,j) represents the number of tasks that access the i-th node and the j-th node together, and N represents the total number of nodes.
[0073] In order to solve the above technical problem, in a second aspect, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0074] In order to solve the above technical problem, in the third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: the processor implements the steps of the method described in the first aspect when executing the computer program.
[0075] In order to solve the above technical problem, in a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0076] Different from the prior art, in the present application, in response to a node performing a migration operation on a rack, first position information of the node before the migration operation is obtained and second position information of the node after the migration operation is obtained; whether the migration operation satisfies a first preset condition is determined based on the first position information and the second position information; if not, the total number of racks and the amount of data copies are obtained, and whether the migration operation satisfies a second preset condition is determined based on the total number of racks and the amount of data copies; if satisfied, the current node rack topology information and the target rack topology information recorded in the database are obtained; whether the migration operation satisfies a third preset condition is determined based on the current node rack topology information and the target rack topology information recorded in the database; if satisfied, data balancing is performed according to a preset data balancing method, and by judging whether the migration operation satisfies multiple judgment conditions, data balancing is performed on the migration operations that meet multiple judgment conditions, so that data balancing can be performed accurately and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A schematic diagram of a flow chart of a data balancing method in an embodiment;
[0078] Figure 2 is a flow chart of a data balancing method in another embodiment;
[0079] Figure 3 is a structural block diagram of a data equalization device in one embodiment;
[0080] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0082] The cluster of the distributed storage system includes a large number of nodes for storing data. The nodes here refer to servers. Due to the limitations of the computer room environment and the rack slots in the computer room, the nodes generally need to be placed on different racks. In order to store data safely, different nodes in the cluster are even placed on racks in different computer rooms. Since distributed storage systems usually adopt a multi-copy data protection strategy, different data of the same data block are stored on nodes in different racks. When a rack has a power outage or other related failure, it can effectively avoid the loss of different copies of the same data block in the system at the same time, greatly improving the fault tolerance of the distributed storage system and effectively protecting the integrity of the data.
[0083] Therefore, distributed storage systems often have the characteristics of rack awareness, that is, when distributing replica data to nodes, all nodes in the same rack are treated as a data domain (a logically divided domain concept), and nodes on different racks are in different data domains. In the same data domain, at most one replica of the data stored in a data block is stored, and different replicas of the same data in a data block are stored on nodes in different racks. When the position of the node in the computer room changes, the data domain needs to be re-divided according to the latest rack topology of all nodes in the cluster after each change, and finally all replica data in the system are distributed according to the data domain, that is, data balancing operation, to meet the rack-aware data strategy requirements of the latest node rack layout.
[0084] However, if there are layout changes caused by new node migration in a short period of time, the previous migration will actually become a temporary rack topology. The data balancing triggered by the temporary rack topology does not have much practical significance. In addition, frequent data balancing and node migration in a short period of time will have a greater impact on the performance of the system.
[0085] In view of the above technical problems, in one embodiment, Figure 1 As shown, the present application provides a data balancing method, which specifically includes the following steps:
[0086] Step 101: in response to a node performing a migration operation on a rack, obtaining first position information of the node before the migration operation and second position information of the node after the migration operation.
[0087] Step 102: determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information.
[0088] Specifically, in response to a node performing a migration operation on a rack, first position information of the node before the migration operation and second position information of the node after the migration operation are obtained. The first position information here refers to the rack position information of the node before the migration operation, and the second position information refers to the rack position information of the node after the migration operation. It can be understood that the rack position information is the rack to which the node belongs.
[0089] The node migration trajectory can be obtained through the first location information and the second location information. According to the node migration trajectory, it is judged whether the node migration operation meets the first preset condition, wherein the first preset condition refers to the change of the data domain. If the node migration operation causes the data domain to change, it is considered that the node migration operation meets the first preset condition.
[0090] In one embodiment, it can be determined whether the first location information is the same as the second location information. When the first location information is the same as the second location information, it means that the node is performing a migration operation on the same rack, which will not cause changes in the data domain, and it is considered that the node migration operation does not meet the first preset condition; when the first location information is different from the second location information, it means that the node is performing a migration operation on different racks, and it is considered that the node migration operation will cause changes in the data domain, and the node migration operation meets the first preset condition.
[0091] For example, the same rack may include multiple nodes. Assuming that node A is migrated from position 01 of rack 1 to position 02 of rack 1, since the rack where node A is located has not changed, the data domain where node A is located has not changed, and no subsequent data balancing operation is required. However, when node A is migrated from position 01 of rack 2 to position 01 of rack 2, the rack where node A is located has changed, so the data domain where node A is located may change, which will trigger rack perception and determine whether the migration operation meets the data balancing prerequisite.
[0092] Step 103: When the migration operation does not meet the first preset condition, the total number of racks and the amount of data copies are obtained, and whether the migration operation meets the second preset condition is determined according to the total number of racks and the amount of data copies.
[0093] When the migration operation does not meet the first preset condition, it is further determined whether the migration operation meets the second preset condition. The second preset condition is used to determine whether the migration operation meets the prerequisite for data balancing.
[0094] Specifically, when the current migration operation does not meet the first preset condition, the rack perception is triggered, and the total number of racks and the number of data copies can be obtained, where the total number of racks is the total number of racks deployed in the distributed storage system, and the number of data copies is the number of each data block stored in the distributed storage system. The total number of racks and the number of data copies are compared. When the total number of racks is less than or equal to the number of data copies, it is considered that the migration operation does not meet the second preset condition; when the total number of racks is greater than the number of data copies, it is considered that the migration operation meets the second preset condition.
[0095] By comparing the total number of racks and the number of data copies, it can be determined whether the current distributed storage system environment meets the conditions for subsequent data balancing. For example, if the total number of racks in the distributed storage system is 3 and the number of data copies is 2, in an extreme case, if all nodes are eventually migrated to one rack, then the data blocks with 2 data copies will definitely be deployed on the same node, which conflicts with the principle of storing different copies of the same data of the same data block on nodes in different racks. The current distributed storage system environment does not meet the prerequisites for data balancing, and there is no need to perform subsequent data balancing operations.
[0096] Step 104: When the migration operation meets the second preset condition, obtain the current node rack topology information and the target rack topology information recorded in the database.
[0097] Step 105 : determining whether the migration operation satisfies a third preset condition according to the current node rack topology information and the target rack topology information recorded in the database.
[0098] Different from the prior art, in which a data balancing operation is triggered each time a node migration operation is performed, in the present application, a data balancing operation will not be immediately triggered each time a node migration operation is performed. Instead, it is first determined whether the migration operation meets a third preset condition based on the current node rack topology information and the target rack topology information recorded in the database. When the node migration operation meets the third preset condition, the data balancing operation is performed, which can avoid invalid data balancing and reduce waste of system resources.
[0099] In practical applications, when multiple node migrations are performed in a short period of time, if what is actually needed is the rack topology information after the last node migration, data balancing may be performed only on the last node migration to avoid invalid data balancing.
[0100] In one embodiment, when the migration operation meets the second preset condition, a scheduled task of a preset duration is generated, and the scheduled task has a unique identifier; in response to the completion of the scheduled task, the unique identifier of the scheduled task is obtained; and the unique identifier of the target rack topology information recorded in the database is obtained.
[0101] When it is determined that the migration operation meets the prerequisite of data balancing, it is further distinguished whether the migration operation corresponds to effective data balancing or invalid data balancing. A scheduled task with a preset duration can be set. When it is determined that the migration operation meets the second preset condition, a scheduled task with a preset duration is generated. Each scheduled task corresponds to a unique identifier, which is used to represent the rack topology information. The preset duration can be set according to actual needs or the experience of the operator. This application does not limit the value of the preset duration.
[0102] It is understandable that in this application, if a scheduled task does not reach the preset duration (during which the scheduled task is not effective), if the node performs a migration operation again, resulting in a new rack topology for the rack where the node is located, a scheduled task will also be generated.
[0103] In one embodiment, the unique identifier of the current scheduled task can be obtained, and the rack topology information corresponding to the current scheduled task can be obtained based on the unique identifier of the current scheduled task; the unique identifier of the previous scheduled task can be obtained, and the rack topology information corresponding to the previous scheduled task can be obtained based on the unique identifier of the previous scheduled task; the node migration status can be judged based on the unique identifier of the current scheduled task and the unique identifier corresponding to the previous scheduled task; wherein, if the unique identifier of the current scheduled task is different from the unique identifier corresponding to the previous scheduled task, it is considered that the node has migrated, and the rack topology information corresponding to the previous scheduled task is used to overwrite the rack topology information corresponding to the previous scheduled task.
[0104] In order to determine whether data balancing is required for this adjustment of the rack topology after the scheduled task expires, it is necessary to record the rack topology information at this time when the scheduled task is generated. If the rack topology is adjusted multiple times in a short period of time, in fact, only the rack topology adjusted for the last time is the final target topology, and the topology formed by the intermediate adjustment will not cause data balancing and adjustment in this application. Therefore, in this application, a new set of rack topology information is not recorded each time a node is migrated, but only a set of the latest rack topology information is recorded. After each node migration, the record is updated to the latest rack topology information, which will greatly reduce the amount of invalid rack topology structure data recorded, and is conducive to the subsequent judgment and analysis of the recorded data.
[0105] In one embodiment, judging whether the migration operation meets the third preset condition based on the current node rack topology information and the target rack topology information recorded in the database includes: when the migration operation meets the second preset condition, generating a delayed task with a lease; based on the listening mechanism in the distributed key-value storage system, monitoring the key value in real time and obtaining the key value status information; when the lease expires, extracting the unique identifier corresponding to the key value in the delayed task and deleting the key value; comparing the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to judge whether the delayed task is effective; when the unique identifier corresponding to the key value in the delayed task is consistent with the latest unique identifier in the database, it is considered that the migration operation does not meet the third preset condition; when the unique identifier corresponding to the key value in the delayed task is inconsistent with the latest unique identifier in the database, it is considered that the migration operation meets the third preset condition.
[0106] In this application, since only the latest rack topology information is recorded, but each previous node migration generates a scheduled task, and relevant information is also needed to be used for judgment after the scheduled task expires, it is set to record a unique identifier each time the topology information is recorded, and the generated delayed task will also carry the same unique identifier information, so that when the delayed task expires, first determine whether the unique identifier of this delayed task (the rack topology information at the end of the delayed task) and the unique identifier in the current database (the rack topology information at the start of the delayed task) are the same. If they are the same, it means that there has been no new node migration from the generation of the delayed task to the time when it takes effect, and the rack topology information has not been changed. Therefore, this delayed task can make rack perception effective and balance the cluster data. If the unique identifier of the delayed task is different from the unique identifier of the rack topology in the database, it proves that the rack topology that triggered the delayed task has been changed later, and there is no need for data balancing for this delayed task. By introducing a unique identifier, it is beneficial to quickly determine whether rack perception needs to take effect after the delayed task expires.
[0107] The target rack topology information recorded in the database is stored in the database in the form of a key-value pair. The unique identifier of the target rack topology information can be used as the key value and the target rack topology information can be used as the value to construct a key-value pair; the key-value pair is encrypted using the preset authentication information to generate the mapping encryption information of the key-value pair; virtual key-value pair information is generated based on the preset authentication information, key-value pair, and mapping encryption information and stored in the database; and the virtual key-value pair information is assigned a variable using a preset script.
[0108] In one embodiment, the method also includes: obtaining a unique identifier of the target rack topology information recorded in the database, and obtaining the unique identifier of the target rack topology information recorded in the database includes: obtaining mapping encryption information and preset authentication information corresponding to the target rack topology information; executing a preset script to determine the mapping encryption information in the virtual key-value pair information corresponding to the variable assignment; using the preset authentication information to decrypt the mapping encryption information to obtain the key-value pair information; and searching for the unique identifier corresponding to the target rack topology information from the key-value pair information.
[0109] Specifically, the preset authentication information may be information such as an authentication code used for login verification. The authentication information may be used to encrypt the key-value pair to generate mapping encryption information, wherein the encryption processing may be a transcoding method in which the data is converted into a string and the non-ASCII letters or numbers are replaced by hexadecimal escapes, and then the first 9-digit authentication code is put in front of the transcoding to perform algorithm transcoding compilation. The mapping encryption information and the preset authentication information are stored in the database as virtual key-value pair information, and a one-to-one correspondence between the key-value pair and the mapping encryption information of the key-value pair is established. The key-value pair can be found later according to the one-to-one correspondence between the mapping encryption information of the key-value pair and the mapping encryption information of the key-value pair.
[0110] The preset authentication information can be used as a key, and the mapped encrypted information can be used as a virtual key-value pair. The preset authentication information and the virtual key-value pair can be stored in a database. Later, the variable can be obtained, and the preset script can be called according to the variable to obtain the preset authentication information and the mapped encrypted information. The mapped encrypted information is decrypted according to the preset authentication information to obtain the key-value pair. Since the data in the stored key-value pair information corresponds to the virtual key name, even if the data is leaked, the thief can only obtain the virtual key name without practical meaning, and cannot know the specific meaning of the data, thereby improving security.
[0111] Step 106: When the migration operation satisfies the third preset condition, data balancing is performed according to a preset data balancing method.
[0112] In order to ensure that the final rack topology can meet the requirements of data redundancy and safety, in this application, when the delayed task takes effect, and it has been determined that the current rack topology requires adjustment of the data domain and data migration, the data domain will be renumbered. The data domain number can be any value, and the number value does not affect the data distribution of the system. It is mainly used to distinguish different data domains and mark the data domain to which the node belongs. When balancing the data, this number can be used to allocate storage locations for copies of the data block, and different copies of the same data block can be stored on nodes with different numbers to meet the requirements of rack perception.
[0113] The data information stored in the node and the number of the target rack where the node is located after the migration operation can be obtained; the data information stored in other nodes on the target rack can be found according to the number of the target rack; it can be determined whether the data information stored in the node is the same as the data information stored in other nodes; if the data information stored in the node is the same as the data information stored in other nodes, any copy of the same data information is allocated to the balanced rack as the data information to be allocated.
[0114] For example, assume that there are three racks (rack 1, rack 2, rack 3) and four nodes (node A, node B, node C, node D) in a distributed storage system. Node A and node B are on rack 1, node C is on rack 2, and node D is on rack 3. Assuming that each data block stores two copies, it is impossible for a copy of any data block to be on both node A and node B at the same time. One rack corresponds to one data domain. If node A is migrated from rack 1 to rack 2, at this time, node B is on rack 1, node A and node C are on rack 2, and node D is on rack 3. According to the requirements of rack perception, the same copy data of the same data block is placed on nodes in different racks, so it is necessary to ensure that node A and node C cannot store the same data.
[0115] If the data stored on Node A and Node C are different, it means that the migration of Node A from Rack 1 to Rack 2 will not cause the data domain to change, and no data balancing is required for this node migration operation. If the data stored on Node A and Node C are the same, it means that the migration of Node A from Rack 1 to Rack 2 will cause the data domain to change, and data balancing is required. Any of the same data information stored in Node A or Node C can be allocated to the balanced rack as the data information to be allocated.
[0116] Among them, selecting a balanced rack includes: obtaining the number of each rack in the distributed storage system, wherein the number of each rack corresponds to a data domain; selecting a rack whose number is different from that of the target rack and whose data information stored in the nodes on the rack is different from the data information to be allocated as a balanced rack.
[0117] After selecting the balancing rack, you can further select the balancing node and distribute the data information to be distributed to the balancing node.
[0118] In one embodiment, the load of data information stored in each node in the distributed storage system can be obtained; each node is used as a leaf node of the Harman tree according to the load of each node to construct a Harman tree; wherein the Harman tree has multiple levels, including low level, middle level, and high level, the leaf nodes of the low level have relatively the least load, and the leaf nodes of the high level have relatively the most load.
[0119] Specifically, the nodes can be monitored and detected in real time to obtain the load status of the nodes, which can include the data response time of the nodes, the data memory load, etc. Nodes with different loads are used as leaf nodes of the Harman tree. Each leaf node stores the data information stored in the node, and the Harman tree is constructed by the Harman algorithm. The Harman tree refers to a binary tree constructed by giving n weights as n leaf nodes. If the weighted path length of the tree is minimized, such a binary tree is called a Huffman Tree.
[0120] The nodes with different loads obtained are used as leaf nodes with certain weights in the Huffman tree. According to the Huffman algorithm, the two smallest nodes among the leaf nodes with certain weights are used as left and right subtrees to construct a binary tree. The nodes of the constructed binary tree are the sum of the weights of the left and right subtrees. Then the two leaf nodes with the smallest weights are deleted, and the newly generated binary tree nodes and the remaining leaf nodes are constructed through the Huffman algorithm. This cycle is repeated until only one tree is left, which is the Huffman tree.
[0121] The Harmanff tree can be divided into multiple levels, including low level, middle level and high level. The nodes with the least load are placed in the low level, and the nodes with the most load are placed in the high level. After the nodes are layered, a parent node is assigned to each node. For each node, a node that can be directly connected and has the shortest distance is selected from the nodes of all the layers above the layer where the node is located as the parent node.
[0122] The order of processing nodes in the process of selecting parent nodes is from the low level to the high level of the Huffman tree, from the left to the right of each layer. This is due to the characteristics of the Huffman tree construction process. The left node of each layer has a smaller value than the right node, and the lower node has a smaller value than the upper node. By giving priority to selecting the optimal parent node for the node with less load, the use time of the node with less remaining load is extended, and the overall optimality is achieved by selecting the parent node with the shortest distance for each node.
[0123] When selecting a balancing node, the load of the data information to be allocated is used as the load threshold, wherein the load of the data information to be allocated can be calculated based on the size of the space occupied by the data to be allocated, and the level of the Harman tree that meets the load threshold is selected as the target level; for the nodes in the target level, the nodes that are shortest to the node and directly connected to the node are selected from the upper nodes from left to right as balancing nodes for data balancing, which can perceive the nodes that meet the load threshold more quickly, thereby efficiently and evenly distributing the data to be allocated to the balancing nodes.
[0124] In one embodiment, data information stored in a node and data information stored in other nodes can be obtained; feature extraction is performed on the data information stored in the node and the data information stored in other nodes respectively to obtain a first eigenvector and a second eigenvector; a correlation matrix is constructed based on the first eigenvector and the second eigenvector; a bond energy algorithm is used to transform the correlation matrix to obtain a high-correlation data cluster matrix; data balancing is performed based on the high-correlation data cluster matrix, wherein the bond energy algorithm is used to transform the correlation matrix to obtain a high-correlation data cluster matrix, including: performing a row-column transformation on the correlation matrix; calculating the bond energy value of the correlation matrix after each row-column transformation, and using the transformed correlation matrix corresponding to the maximum bond energy value as the high-correlation data cluster matrix.
[0125] Specifically, the feature extraction model can be used to extract features from the data information stored in the node and the data information stored in other nodes to obtain a first feature vector corresponding to the data information stored in the node and a second feature vector corresponding to the data information stored in other nodes. The other nodes here may include nodes in a distributed storage system other than the node. The feature extraction model can be RNN, CNN or resnet, etc., and its model type is not limited. A correlation matrix is constructed based on the first feature vector and the second feature vector, and the correlation matrix is transformed into rows and columns, and the bond energy of each row and column transformation is calculated.
[0126] Among them, the formula for calculating the bond energy value of the correlation matrix after each row and column transformation is as follows:
[0127] ;
[0128] Where E represents bond energy, L (i,j) represents the number of tasks that access the i-th node and the j-th node together, and N represents the total number of nodes.
[0129] By calculating the highly correlated data cluster matrix, we can select the racks where data information stored by other nodes similar to the data stored by the node is located. When data balancing is required, the data to be allocated can be allocated to the balanced rack. By clustering nodes with strong dependencies together to form several node sets, the efficiency of selecting balanced racks can be improved, and placing highly correlated data information on the same rack or even the same node can improve resource utilization.
[0130] In this application, first, when migrating the position of a node on the rack, first determine whether this migration operation actually causes a change in the distribution of the cluster data domain. If it does not cause a change in the data domain distribution, no processing or operation is performed. If this migration operation causes a change in the data domain distribution within the cluster, a scheduled task is generated to obtain a unique identifier. When the migration operation meets the prerequisite for data balance, a delayed task is generated. At the same time, the rack topology information of the nodes in the current cluster is recorded in the database, and the delayed task is waited for to take effect. It is determined again whether the latest rack topology information of the cluster (the rack topology information when the delayed task is completed) is the same as the target rack topology information recorded in the database (the rack topology information when the delayed task starts). If they are the same, it is considered that there is no new node migration operation that causes a change in the rack topology between the start of the delayed task and the effective time of the delayed task. At this time, the data domain can be redistributed and the storage data can be balanced. If the latest rack topology information is different from the previously recorded one, it is considered that the node migration has occurred again between the start of the delayed task and the effective time of the delayed task. Therefore, this delayed task does not need to balance any data until the next delayed task expires. It is sufficient to determine whether it needs to take effect. The method in this application can effectively avoid the situation where data balancing is generated multiple times due to frequent node migration in a short period of time, and can ensure as much as possible that after each adjustment of the rack topology, only one effective data distribution calculation and balancing is generated for the final adjusted rack topology, avoiding invalid data balancing, thereby greatly reducing the impact of rack topology adjustment on system performance.
[0131] In a feasible implementation, the data response time, bandwidth usage and data memory load of the node may be obtained, the node load may be calculated according to the data response time, bandwidth usage and data memory load of the node, and a priority may be assigned to each node according to the node load, wherein the specific calculation formula may be as follows:
[0132] ;
[0133] Among them, P is the node load, F1 is the node resource response time, F2 is the node bandwidth utilization, F3 is the node resource load memory, x is the preset weight of the node resource response time, y is the preset weight of the node bandwidth utilization, and z is the preset weight of the node load memory.
[0134] The preset weight x of the node's resource response time, the preset weight y of the node's bandwidth usage, the preset weight z of the node's load memory, etc. can be set according to their impact on the node load. For example, when the node's load memory has a greater impact on the load pressure index, the value of z can be set to be greater than the value of x and the value of y. This application does not limit the specific values of x, y, and z.
[0135] After calculating the load of each node, the inverse of the load value can be used as the weight of each node. The node is selected as the balancing node according to its weight. Generally, the node with a larger weight value has a higher priority, and vice versa. The node with a smaller weight value has a lower priority. In this way, the load of the entire system can be more evenly distributed, and the reliability of data balancing is improved.
[0136] In order to better illustrate the data balancing method provided by the present application, in a specific implementation, the steps of the data balancing method are as follows: Figure 2 As shown:
[0137] S1: Judgment after host migration
[0138] When a node in the cluster is migrated to a new location in a rack, the following conditions are used to determine whether rack awareness is effective. First, the second location information (destination rack D) of the node after the migration operation is determined. rack ) and the first location information that has not been migrated (source rack S rack ) relationship, if D rack =S rack , then this migration is a position adjustment and migration of a node in the rack, and there is no need to adjust the data domain distribution of the cluster or perform data balancing, so no operation is required. rack ≠S rack , then the total number of racks occupied by the nodes in the current system cluster is counted Sum rack , compared with the amount of data copies C, if Sum rack ≤C, the rack topology after this migration cannot meet the requirements of rack perception for data distribution, that is, it does not meet the prerequisite for data balance, so no record or operation is required. rack > C, and the number of racks occupied by the nodes is less than the number of nodes, that is, Sum rack <Sum node , it proves that there is more than one node on at least one rack. At this point, it is considered that this migration meets the requirements of rack perception, and it is necessary to re-divide the data domain and migrate and balance the data. When the above conditions are met, in this application, data balancing is not performed immediately, but a delayed-effective method is designed to record information and wait until the delay time arrives before performing relevant data balancing operations.
[0139] S2: Setting of scheduled tasks and recording of information
[0140] When a certain migration host meets the conditions in S1, this application first uses the absolute time of the system to generate a unique identifier. The unique identifier can be expressed in the form of UUID. UUID (Universally Unique Identifier) is a 128-bit value that can be calculated by a certain algorithm. In order to improve efficiency, the commonly used UUID can be shortened to 16 bits. UUID is used to identify the attribute type and is regarded as a unique identifier in all space and time. In general, it can be guaranteed that this value is truly unique and any UUID generated anywhere will not have the same value. One benefit of using UUID is that new identifiers can be created for new services. In this way, when the client is looking for a service, it only needs to indicate the UUID related to a certain type of service (or a specific service) in its service search request. If the service provider can match the available service with this UUID, a response will be returned. While generating the unique identifier, count the rack topology information of the current cluster. Assume that the cluster has 5 nodes, namely ip1, ip2, ip3, ip4, and ip5, and 3 racks, namely r1, r2, and r3. After a migration, the rack topology distribution is ip1 and ip2 on r1, ip3 and ip4 on r2, and ip5 on r3. The rack topology Topo counted in this application is rack= {ip1:r1,ip2:r1,ip3:r2,ip4:r2,ip5:r3}. The distributed storage system designed in this application uses etcd (distributed key-value storage system) for inter-cluster communication and data access. Therefore, the rack topology information after this migration and the uuid of this migration are recorded in etcd (distributed key-value storage system) in key-value form, where key is uuid and value is Topo rack. In addition, the delayed effectiveness task designed in this application does not need to introduce other components. The purpose of the delayed task in this application is achieved by using the lease and watcher mechanism in etcd (distributed key-value storage system). Assuming that a node migration occurs at time T and meets the conditions in S1, this application first generates a key value of delay_xxxx (xxxx takes the aforementioned unique identifier uuid), and then assigns a lease to the key with a lease duration of t. Then, the watcher mechanism is used to monitor changes in the key. After waiting for t time, the key will be deleted due to lease expiration. At this time, the watcher mechanism of etcd (distributed key-value storage system) running on each node recognizes that the delay_xxxx key has been deleted, and it is considered that a delayed task has expired and it is necessary to determine whether it needs to take effect. Each time the host is migrated and S1 is met, information will be recorded in accordance with this application and a key with a lease will be generated, but the uuid-Topo recorded in the database rack Only one copy of the information is retained, that is, the rack topology information after the latest migration and the generated uuid.
[0141] S3: Processing after the scheduled task expires
[0142] The key delay_uuid set in step S2 will be deleted when T+t expires. When the monitoring mechanism of the nodes in the cluster detects that the key prefixed with delay_ is deleted, it first extracts the uuid value in the key, and then compares it with the uuid recorded in the database. If they are different, the delayed task is ignored. If the uuids are the same, it proves that no other delayed tasks have been generated from the generation of the delayed task to its effectiveness. At this time, the rack topology recorded in the database should be the rack topology after the last node migration operation. At this time, compare the rack topology information of the nodes in the current cluster with the target rack topology information recorded in the database one by one to see if they are consistent. If there is inconsistent information, the delayed task does not need to take effect and no operation is performed. If all the information is consistent, it is considered that rack perception can be implemented at this time. First, according to the recorded topology information Topo rack= {ip1:r1,ip2:r1,ip3:r2,ip4:r2,ip5:r3} re-divides the data domain of the nodes, marks the data domain of ip1 and ip2 as 1, the data domain of ip3 and ip4 as 2, and the data domain of ip5 as 3, and then re-places and balances the data in the system according to the replica data placement strategy of distributed storage.
[0143] It should be understood that although Figure 1-Figure 2The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0144] In one embodiment, Figure 3 As shown, a data balancing device is provided, including: an acquisition module 30, a judgment module 31 and a balancing module 32, wherein:
[0145] The acquisition module 30 is used to obtain, in response to the node performing a migration operation on the rack, first position information of the node before the migration operation and second position information of the node after the migration operation; when the migration operation meets the second preset condition, obtain the current node rack topology information and the target rack topology information recorded in the database;
[0146] The judgment module 31 is used to judge whether the migration operation meets the first preset condition according to the first position information and the second position information; when the migration operation does not meet the first preset condition, obtain the total number of racks and the amount of data copies, and judge whether the migration operation meets the second preset condition according to the total number of racks and the amount of data copies; judge whether the migration operation meets the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database;
[0147] The balancing module 32 is configured to perform data balancing according to a preset data balancing method when the migration operation meets a third preset condition.
[0148] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0149] Determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information includes:
[0150] Acquire first location information and second location information, wherein the location information is rack location information of the node;
[0151] Determining whether the first location information is the same as the second location information, and if the first location information is the same as the second location information, it is considered that the migration operation does not meet the first preset condition;
[0152] If the first location information is different from the second location information, it is considered that the migration operation meets the first preset condition.
[0153] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0154] Obtaining the total number of racks and the amount of data copies, and judging whether the migration operation meets the second preset condition according to the total number of racks and the amount of data copies includes:
[0155] Get the total number of racks and the number of data copies. The total number of racks is the total number of racks deployed in the distributed storage system, and the number of data copies is the number of each data block stored in the distributed storage system.
[0156] Compare the total number of racks and the amount of data copies;
[0157] When the total number of racks is less than or equal to the number of data copies, it is considered that the migration operation does not meet the second preset condition;
[0158] When the total number of racks is greater than the number of data copies, the migration operation is considered to meet the second preset condition.
[0159] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0160] The method also includes:
[0161] When the migration operation does not meet the first preset condition, a scheduled task with a preset duration is generated, and the scheduled task has a unique identifier;
[0162] In response to the scheduled task being completed, obtaining a unique identifier of the scheduled task;
[0163] The unique identifier is in the form of absolute time.
[0164] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0165] The method also includes:
[0166] Obtain the unique identifier of the current scheduled task, and obtain the rack topology information corresponding to the current scheduled task according to the unique identifier of the current scheduled task;
[0167] Obtain the unique identifier of the last scheduled task, and obtain the rack topology information corresponding to the last scheduled task based on the unique identifier of the last scheduled task;
[0168] Determine the node migration status based on the unique identifier of the current scheduled task and the unique identifier corresponding to the previous scheduled task;
[0169] If the unique identifier of the current scheduled task is different from the unique identifier corresponding to the previous scheduled task, it is considered that the node has been migrated, and the rack topology information of the current scheduled task is used to overwrite the rack topology information corresponding to the previous scheduled task.
[0170] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0171] The target rack topology information is stored in the database in the form of key-value pairs. The method includes:
[0172] Using the unique identifier of the target rack topology information as the key value and the target rack topology information as the value, a key-value pair is constructed;
[0173] Encrypt the key-value pair using the preset authentication information to generate mapping encryption information of the key-value pair;
[0174] Generate virtual key-value pair information based on preset authentication information, key-value pair, and mapping encryption information and store it in a database;
[0175] Use preset scripts to assign virtual key-value pair information to variables.
[0176] In one embodiment, the above device can implement another implementation method of the data balancing method, and the specific steps are as follows: the method also includes: obtaining a unique identifier of the target rack topology information recorded in the database, and obtaining the unique identifier of the target rack topology information recorded in the database includes:
[0177] Obtaining mapping encryption information and preset authentication information corresponding to the target rack topology information;
[0178] Execute the preset script to determine the mapping encryption information in the virtual key-value pair information corresponding to the variable assignment;
[0179] Decrypt the mapped encrypted information using the preset authentication information to obtain key-value pair information;
[0180] Find the unique identifier corresponding to the target rack topology information from the key-value pair information.
[0181] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0182] Judging whether the migration operation meets the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database includes:
[0183] When the migration operation meets the second preset condition, a delayed task with a lease is generated;
[0184] Based on the monitoring mechanism in the distributed key-value storage system, the key value is monitored in real time to obtain the key value status information;
[0185] When the lease expires, extract the unique identifier corresponding to the key value in the delayed task and delete the key value;
[0186] Compare the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to determine whether the delayed task is effective;
[0187] When the unique identifier corresponding to the key value in the delayed task is consistent with the latest unique identifier in the database, it is considered that the migration operation does not meet the third preset condition;
[0188] When the unique identifier corresponding to the key value in the delayed task is inconsistent with the latest unique identifier in the database, it is considered that the migration operation meets the third preset condition.
[0189] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0190] Data balancing according to the preset data balancing method includes:
[0191] Obtain the data information stored in the node and the number of the target rack where the node is located after the migration operation;
[0192] Find the data information stored in other nodes on the target rack according to the target rack number;
[0193] Determine whether the data information stored in the node is the same as the data information stored in other nodes;
[0194] If the data information stored in the node is the same as the data information stored in other nodes, any copy of the same data information is used as the data information to be distributed to the balancing rack.
[0195] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0196] The method also includes:
[0197] Select a balanced rack. Selecting a balanced rack includes:
[0198] Obtaining the number of each rack in the distributed storage system, wherein the number of each rack corresponds to a data domain;
[0199] A rack having a number different from that of the target rack and having data information stored in a node on the rack different from the data information to be allocated is selected as a balancing rack.
[0200] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0201] Select the balanced nodes in the balanced rack. The balanced nodes in the balanced rack include:
[0202] Obtain the load of data information stored in each node in the distributed storage system;
[0203] According to the load of each node, each node is used as a leaf node of the Harmanff tree to construct the Harmanff tree; wherein the Harmanff tree has multiple levels, including low level, middle level, and high level, the leaf nodes of the low level have relatively the least load, and the leaf nodes of the high level have relatively the most load;
[0204] When selecting a balancing node, the load of the data information to be distributed is used as the load threshold, and the level of the Harman tree that meets the load threshold is selected as the target level;
[0205] For nodes in the target layer, the nodes with the shortest distance to the node and directly connected to the node are selected from the upper nodes from left to right as the balancing nodes for data balancing.
[0206] In one embodiment, the above device can implement another implementation of the data balancing method, and the specific steps are as follows:
[0207] The method also includes:
[0208] Get the data information stored by the node and the data information stored by other nodes;
[0209] Perform feature extraction on the data information stored in the node and the data information stored in other nodes respectively to obtain a first feature vector and a second feature vector;
[0210] Constructing a correlation matrix according to the first eigenvector and the second eigenvector;
[0211] The bond energy algorithm is used to transform the correlation matrix to obtain a high correlation data group matrix;
[0212] Perform data balancing based on the high-correlation data cluster matrix;
[0213] Among them, the bond energy algorithm is used to transform the correlation matrix, and the high correlation data group matrix is obtained, including:
[0214] Transform the rows and columns of the correlation matrix;
[0215] Calculate the bond energy value of the correlation matrix after each row-column transformation, and use the transformed correlation matrix corresponding to the maximum bond energy value as the high-correlation data group matrix;
[0216] Among them, the formula for calculating the bond energy value of the correlation matrix after each row and column transformation is as follows:
[0217] ;
[0218] Where E represents bond energy, L (i,j) represents the number of tasks that access the i-th node and the j-th node together, and N represents the total number of nodes.
[0219] For the specific definition of the data balancing device, please refer to the definition of the data balancing method above, which will not be repeated here. Each module in the above-mentioned data balancing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0220] In one embodiment, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the data balancing methods provided by the above methods.
[0221] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data balancing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0222] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0223] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0224] Step 101: in response to a node performing a migration operation on a rack, obtaining first position information of the node before the migration operation and second position information of the node after the migration operation.
[0225] Step 102: determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information.
[0226] Step 103: When the migration operation does not meet the first preset condition, the total number of racks and the amount of data copies are obtained, and whether the migration operation meets the second preset condition is determined according to the total number of racks and the amount of data copies.
[0227] Step 104: When the migration operation meets the second preset condition, obtain the current node rack topology information and the target rack topology information recorded in the database.
[0228] Step 105 : determining whether the migration operation satisfies a third preset condition according to the current node rack topology information and the target rack topology information recorded in the database.
[0229] Step 106: When the migration operation satisfies the third preset condition, data balancing is performed according to a preset data balancing method.
[0230] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0231] Determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information includes:
[0232] Acquire first location information and second location information, wherein the location information is rack location information of the node;
[0233] Determining whether the first location information is the same as the second location information, and if the first location information is the same as the second location information, it is considered that the migration operation does not meet the first preset condition;
[0234] If the first location information is different from the second location information, it is considered that the migration operation meets the first preset condition.
[0235] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0236] Obtaining the total number of racks and the amount of data copies, and judging whether the migration operation meets the second preset condition according to the total number of racks and the amount of data copies includes:
[0237] Get the total number of racks and the number of data copies. The total number of racks is the total number of racks deployed in the distributed storage system, and the number of data copies is the number of each data block stored in the distributed storage system.
[0238] Compare the total number of racks and the amount of data copies;
[0239] When the total number of racks is less than or equal to the number of data copies, it is considered that the migration operation does not meet the second preset condition;
[0240] When the total number of racks is greater than the number of data copies, the migration operation is considered to meet the second preset condition.
[0241] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0242] The method also includes:
[0243] When the migration operation does not meet the first preset condition, a scheduled task with a preset duration is generated, and the scheduled task has a unique identifier;
[0244] In response to the scheduled task being completed, obtaining a unique identifier of the scheduled task;
[0245] The unique identifier is in the form of absolute time.
[0246] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0247] The method also includes:
[0248] Obtain the unique identifier of the current scheduled task, and obtain the rack topology information corresponding to the current scheduled task according to the unique identifier of the current scheduled task;
[0249] Obtain the unique identifier of the last scheduled task, and obtain the rack topology information corresponding to the last scheduled task based on the unique identifier of the last scheduled task;
[0250] Determine the node migration status based on the unique identifier of the current scheduled task and the unique identifier corresponding to the previous scheduled task;
[0251] If the unique identifier of the current scheduled task is different from the unique identifier corresponding to the previous scheduled task, it is considered that the node has been migrated, and the rack topology information of the current scheduled task is used to overwrite the rack topology information corresponding to the previous scheduled task.
[0252] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0253] The target rack topology information is stored in the database in the form of key-value pairs. The method includes:
[0254] Using the unique identifier of the target rack topology information as the key value and the target rack topology information as the value, a key-value pair is constructed;
[0255] Encrypt the key-value pair using the preset authentication information to generate mapping encryption information of the key-value pair;
[0256] Generate virtual key-value pair information based on preset authentication information, key-value pair, and mapping encryption information and store it in a database;
[0257] Use preset scripts to assign virtual key-value pair information to variables.
[0258] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the method further includes: obtaining a unique identifier of the target rack topology information recorded in the database, and obtaining the unique identifier of the target rack topology information recorded in the database includes:
[0259] Obtaining mapping encryption information and preset authentication information corresponding to the target rack topology information;
[0260] Execute the preset script to determine the mapping encryption information in the virtual key-value pair information corresponding to the variable assignment;
[0261] Decrypt the mapped encrypted information using the preset authentication information to obtain key-value pair information;
[0262] Find the unique identifier corresponding to the target rack topology information from the key-value pair information.
[0263] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0264] Judging whether the migration operation meets the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database includes:
[0265] When the migration operation meets the second preset condition, a delayed task with a lease is generated;
[0266] Based on the monitoring mechanism in the distributed key-value storage system, the key value is monitored in real time to obtain the key value status information;
[0267] When the lease expires, extract the unique identifier corresponding to the key value in the delayed task and delete the key value;
[0268] Compare the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to determine whether the delayed task is effective;
[0269] When the unique identifier corresponding to the key value in the delayed task is consistent with the latest unique identifier in the database, it is considered that the migration operation does not meet the third preset condition;
[0270] When the unique identifier corresponding to the key value in the delayed task is inconsistent with the latest unique identifier in the database, it is considered that the migration operation meets the third preset condition.
[0271] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0272] Data balancing according to the preset data balancing method includes:
[0273] Obtain the data information stored in the node and the number of the target rack where the node is located after the migration operation;
[0274] Find the data information stored in other nodes on the target rack according to the target rack number;
[0275] Determine whether the data information stored in the node is the same as the data information stored in other nodes;
[0276] If the data information stored in the node is the same as the data information stored in other nodes, any copy of the same data information is used as the data information to be distributed to the balancing rack.
[0277] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0278] The method also includes:
[0279] Select a balanced rack. Selecting a balanced rack includes:
[0280] Obtaining the number of each rack in the distributed storage system, wherein the number of each rack corresponds to a data domain;
[0281] A rack having a number different from that of the target rack and having data information stored in a node on the rack different from the data information to be allocated is selected as a balancing rack.
[0282] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0283] The method further includes: selecting a balancing node in the balancing rack, wherein selecting the balancing node in the balancing rack includes:
[0284] Obtain the load of data information stored in each node in the distributed storage system;
[0285] According to the load of each node, each node is used as a leaf node of the Harmanff tree to construct the Harmanff tree; wherein the Harmanff tree has multiple levels, including low level, middle level, and high level, the leaf nodes of the low level have relatively the least load, and the leaf nodes of the high level have relatively the most load;
[0286] When selecting a balancing node, the load of the data information to be distributed is used as the load threshold, and the level of the Harman tree that meets the load threshold is selected as the target level;
[0287] For nodes in the target layer, the nodes with the shortest distance to the node and directly connected to the node are selected from the upper nodes from left to right as the balancing nodes for data balancing.
[0288] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0289] The method also includes:
[0290] Get the data information stored by the node and the data information stored by other nodes;
[0291] Perform feature extraction on the data information stored in the node and the data information stored in other nodes respectively to obtain a first feature vector and a second feature vector;
[0292] Constructing a correlation matrix according to the first eigenvector and the second eigenvector;
[0293] The bond energy algorithm is used to transform the correlation matrix to obtain a high correlation data group matrix;
[0294] Perform data balancing based on the high-correlation data cluster matrix;
[0295] Among them, the bond energy algorithm is used to transform the correlation matrix, and the high correlation data group matrix is obtained, including:
[0296] Transform the rows and columns of the correlation matrix;
[0297] Calculate the bond energy value of the correlation matrix after each row-column transformation, and use the transformed correlation matrix corresponding to the maximum bond energy value as the high-correlation data group matrix;
[0298] Among them, the formula for calculating the bond energy value of the correlation matrix after each row and column transformation is as follows:
[0299] ;
[0300] Where E represents bond energy, L (i,j) represents the number of tasks that access the i-th node and the j-th node together, and N represents the total number of nodes.
[0301] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0302] Step 101: in response to a node performing a migration operation on a rack, obtaining first position information of the node before the migration operation and second position information of the node after the migration operation.
[0303] Step 102: determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information.
[0304] Step 103: When the migration operation does not meet the first preset condition, the total number of racks and the amount of data copies are obtained, and whether the migration operation meets the second preset condition is determined according to the total number of racks and the amount of data copies.
[0305] Step 104: When the migration operation meets the second preset condition, obtain the current node rack topology information and the target rack topology information recorded in the database.
[0306] Step 105 : determining whether the migration operation satisfies a third preset condition according to the current node rack topology information and the target rack topology information recorded in the database.
[0307] Step 106: When the migration operation satisfies the third preset condition, data balancing is performed according to a preset data balancing method.
[0308] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0309] Determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information includes:
[0310] Acquire first location information and second location information, wherein the location information is rack location information of the node;
[0311] Determining whether the first location information is the same as the second location information, and if the first location information is the same as the second location information, it is considered that the migration operation does not meet the first preset condition;
[0312] If the first location information is different from the second location information, it is considered that the migration operation meets the first preset condition.
[0313] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0314] Obtaining the total number of racks and the amount of data copies, and judging whether the migration operation meets the second preset condition according to the total number of racks and the amount of data copies includes:
[0315] Get the total number of racks and the number of data copies. The total number of racks is the total number of racks deployed in the distributed storage system, and the number of data copies is the number of each data block stored in the distributed storage system.
[0316] Compare the total number of racks and the amount of data copies;
[0317] When the total number of racks is less than or equal to the number of data copies, it is considered that the migration operation does not meet the second preset condition;
[0318] When the total number of racks is greater than the number of data copies, the migration operation is considered to meet the second preset condition.
[0319] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0320] The method also includes:
[0321] When the migration operation does not meet the first preset condition, a scheduled task with a preset duration is generated, and the scheduled task has a unique identifier;
[0322] In response to the scheduled task being completed, obtaining a unique identifier of the scheduled task;
[0323] The unique identifier is in the form of absolute time.
[0324] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0325] The method also includes:
[0326] Obtain the unique identifier of the current scheduled task, and obtain the rack topology information corresponding to the current scheduled task according to the unique identifier of the current scheduled task;
[0327] Obtain the unique identifier of the last scheduled task, and obtain the rack topology information corresponding to the last scheduled task based on the unique identifier of the last scheduled task;
[0328] Determine the node migration status based on the unique identifier of the current scheduled task and the unique identifier corresponding to the previous scheduled task;
[0329] If the unique identifier of the current scheduled task is different from the unique identifier corresponding to the previous scheduled task, it is considered that the node has been migrated, and the rack topology information of the current scheduled task is used to overwrite the rack topology information corresponding to the previous scheduled task.
[0330] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0331] The target rack topology information is stored in the database in the form of key-value pairs. The method includes:
[0332] Using the unique identifier of the target rack topology information as the key value and the target rack topology information as the value, a key-value pair is constructed;
[0333] Encrypt the key-value pair using the preset authentication information to generate mapping encryption information of the key-value pair;
[0334] Generate virtual key-value pair information based on preset authentication information, key-value pair, and mapping encryption information and store it in a database;
[0335] Use preset scripts to assign virtual key-value pair information to variables.
[0336] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: the method further includes: obtaining a unique identifier of the target rack topology information recorded in the database, and obtaining the unique identifier of the target rack topology information recorded in the database includes:
[0337] Obtaining mapping encryption information and preset authentication information corresponding to the target rack topology information;
[0338] Execute the preset script to determine the mapping encryption information in the virtual key-value pair information corresponding to the variable assignment;
[0339] Decrypt the mapped encrypted information using the preset authentication information to obtain key-value pair information;
[0340] Find the unique identifier corresponding to the target rack topology information from the key-value pair information.
[0341] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0342] Judging whether the migration operation meets the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database includes:
[0343] When the migration operation meets the second preset condition, a delayed task with a lease is generated;
[0344] Based on the monitoring mechanism in the distributed key-value storage system, the key value is monitored in real time to obtain the key value status information;
[0345] When the lease expires, extract the unique identifier corresponding to the key value in the delayed task and delete the key value;
[0346] Compare the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to determine whether the delayed task is effective;
[0347] When the unique identifier corresponding to the key value in the delayed task is consistent with the latest unique identifier in the database, it is considered that the migration operation does not meet the third preset condition;
[0348] When the unique identifier corresponding to the key value in the delayed task is inconsistent with the latest unique identifier in the database, it is considered that the migration operation meets the third preset condition.
[0349] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0350] Data balancing according to the preset data balancing method includes:
[0351] Obtain the data information stored in the node and the number of the target rack where the node is located after the migration operation;
[0352] Find the data information stored in other nodes on the target rack according to the target rack number;
[0353] Determine whether the data information stored in the node is the same as the data information stored in other nodes;
[0354] If the data information stored in the node is the same as the data information stored in other nodes, any copy of the same data information is used as the data information to be distributed to the balancing rack.
[0355] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0356] The method also includes:
[0357] Select a balanced rack. Selecting a balanced rack includes:
[0358] Obtaining the number of each rack in the distributed storage system, wherein the number of each rack corresponds to a data domain;
[0359] A rack having a number different from that of the target rack and having data information stored in a node on the rack different from the data information to be allocated is selected as a balancing rack.
[0360] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0361] The method further includes: selecting a balancing node in the balancing rack, wherein selecting the balancing node in the balancing rack includes:
[0362] Obtain the load of data information stored in each node in the distributed storage system;
[0363] According to the load of each node, each node is used as a leaf node of the Harmanff tree to construct the Harmanff tree; wherein the Harmanff tree has multiple levels, including low level, middle level, and high level, the leaf nodes of the low level have relatively the least load, and the leaf nodes of the high level have relatively the most load;
[0364] When selecting a balancing node, the load of the data information to be distributed is used as the load threshold, and the level of the Harman tree that meets the load threshold is selected as the target level;
[0365] For nodes in the target layer, the nodes with the shortest distance to the node and directly connected to the node are selected from the upper nodes from left to right as the balancing nodes for data balancing.
[0366] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0367] The method also includes:
[0368] Get the data information stored by the node and the data information stored by other nodes;
[0369] Perform feature extraction on the data information stored in the node and the data information stored in other nodes respectively to obtain a first feature vector and a second feature vector;
[0370] Constructing a correlation matrix according to the first eigenvector and the second eigenvector;
[0371] The bond energy algorithm is used to transform the correlation matrix to obtain a high correlation data group matrix;
[0372] Perform data balancing based on the high-correlation data cluster matrix;
[0373] Among them, the bond energy algorithm is used to transform the correlation matrix, and the high correlation data group matrix is obtained, including:
[0374] Transform the rows and columns of the correlation matrix;
[0375] Calculate the bond energy value of the correlation matrix after each row-column transformation, and use the transformed correlation matrix corresponding to the maximum bond energy value as the high-correlation data group matrix;
[0376] Among them, the formula for calculating the bond energy value of the correlation matrix after each row and column transformation is as follows:
[0377] ;
[0378] Where E represents bond energy, L (i,j) represents the number of tasks that access the i-th node and the j-th node together, and N represents the total number of nodes.
[0379] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0380] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0381] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A data balancing method, characterized in that: include: In response to a node performing a migration operation on a rack, obtaining first position information of the node before the migration operation and second position information of the node after the migration operation; Determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information; wherein, determining whether the migration operation satisfies the first preset condition according to the first location information and the second location information comprises: determining whether the first location information is the same as the second location information, and if the first location information is the same as the second location information, then considering that the migration operation does not satisfy the first preset condition; When the migration operation does not meet the first preset condition, the total number of racks and the amount of data copies are obtained, and whether the migration operation meets the second preset condition is judged according to the total number of racks and the amount of data copies; wherein, judging whether the migration operation meets the second preset condition according to the total number of racks and the amount of data copies comprises: comparing the total number of racks and the amount of data copies; when the total number of racks is greater than the amount of data copies, it is considered that the migration operation meets the second preset condition; When the migration operation meets the second preset condition, obtaining the current node rack topology information and the target rack topology information recorded in the database; Determine whether the migration operation meets the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database; wherein, determining whether the migration operation meets the third preset condition according to the current node rack topology information and the target rack topology information recorded in the database includes: when the migration operation meets the second preset condition, generate a delayed task with a lease; based on the listening mechanism in the distributed key-value storage system, monitor the key value in real time to obtain the key value status information; the key value is the unique identifier of the target rack topology information; when the lease expires, extract the unique identifier corresponding to the key value in the delayed task; compare the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to determine whether the delayed task is effective; when the unique identifier corresponding to the key value in the delayed task is inconsistent with the latest unique identifier in the database, it is considered that the migration operation meets the third preset condition; When the migration operation meets the third preset condition, data balancing is performed according to a preset data balancing method.
2. The method according to claim 1, characterized in that The determining whether the migration operation satisfies a first preset condition according to the first location information and the second location information further includes: Acquire first location information and second location information, wherein the location information is rack location information of the node; Determining whether the first location information is the same as the second location information; If the first location information is different from the second location information, it is considered that the migration operation satisfies the first preset condition.
3. The method according to claim 1, characterized in that The obtaining of the total number of racks and the amount of data copies, and judging whether the migration operation satisfies the second preset condition according to the total number of racks and the amount of data copies further comprises: Obtain the total number of racks and the number of data copies, where the total number of racks is the total number of racks deployed in the distributed storage system, and the number of data copies is the number of each data block stored in the distributed storage system; Comparing the total number of racks and the number of data copies; When the total number of racks is less than or equal to the number of data copies, it is considered that the migration operation does not meet the second preset condition.
4. The method according to claim 1, characterized in that: The method further comprises: When the migration operation does not meet the first preset condition, generating a scheduled task with a preset duration, the scheduled task having a unique identifier; In response to the scheduled task being completed, obtaining a unique identifier of the scheduled task; The unique identifier is in the form of absolute time.
5. The method according to claim 4, characterized in that The method further comprises: Obtain a unique identifier for the current scheduled task, and obtain rack topology information corresponding to the current scheduled task according to the unique identifier of the current scheduled task; Obtain the unique identifier of the last scheduled task, and obtain the rack topology information corresponding to the last scheduled task according to the unique identifier of the last scheduled task; Determine the node migration status according to the unique identifier of the current scheduled task and the unique identifier corresponding to the previous scheduled task; If the unique identifier of the current scheduled task is different from the unique identifier corresponding to the previous scheduled task, it is considered that the node has been migrated, and the rack topology information of the current scheduled task is used to overwrite the rack topology information corresponding to the previous scheduled task.
6. The method according to claim 1, characterized in that The target rack topology information is stored in a database in the form of a key-value pair, and the method includes: Using the unique identifier of the target rack topology information as the key value and the target rack topology information as the value, a key-value pair is constructed; Encrypting the key-value pair using preset authentication information to generate mapping encryption information of the key-value pair; Generate virtual key-value pair information according to the preset authentication information, the key-value pair, and the mapping encryption information and store it in a database; The virtual key-value pair information is assigned a variable value using a preset script.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining a unique identifier of the target rack topology information recorded in the database, wherein obtaining the unique identifier of the target rack topology information recorded in the database includes: Obtaining mapping encryption information and preset authentication information corresponding to the target rack topology information; Execute the preset script to determine the mapping encryption information in the virtual key-value pair information corresponding to the variable assignment; Decrypting the mapping encryption information using the preset authentication information to obtain key-value pair information; Find the unique identifier corresponding to the target rack topology information from the key-value pair information.
8. The method according to claim 6, characterized in that The step of judging whether the migration operation satisfies a third preset condition according to the current node rack topology information and the target rack topology information recorded in the database further includes: Compare the unique identifier corresponding to the key value in the delayed task with the latest unique identifier in the database to determine whether the delayed task is effective; When the unique identifier corresponding to the key value in the delayed task is consistent with the latest unique identifier in the database, it is considered that the migration operation does not meet the third preset condition.
9. The method according to claim 1, characterized in that: The performing data balancing according to the preset data balancing method includes: Obtain the data information stored in the node and the number of the target rack where the node is located after the migration operation; Searching for data information stored in other nodes on the target rack according to the number of the target rack; Determine whether the data information stored in the node is the same as the data information stored in the other nodes; If the data information stored in the node is the same as the data information stored in the other nodes, any one of the same data information is distributed to the balancing rack as the data information to be distributed.
10. The method according to claim 9, characterized in that The method further comprises: Selecting a balanced rack, wherein the selecting a balanced rack comprises: Obtaining the number of each rack in the distributed storage system, wherein the number of each rack corresponds to a data domain; A rack having a number different from that of the target rack and having data information stored in a node on the rack different from the data information to be allocated is selected as a balancing rack.
11. The method according to claim 10, characterized in that The method further includes: selecting a balancing node in a balancing rack, wherein selecting a balancing node in a balancing rack includes: Obtain the load of each node in the distributed storage system; According to the load of each node, each node is used as a leaf node of the Harmanff tree to construct the Harmanff tree; wherein the Harmanff tree has multiple levels, including low level, middle level, and high level, the leaf nodes of the low level have relatively the least load, and the leaf nodes of the high level have relatively the most load; When selecting a balancing node, the load of the data information to be distributed is used as the load threshold, and the level of the Harman tree that meets the load threshold is selected as the target level; For nodes in the target layer, the nodes with the shortest distance to the node and directly connected to the node are selected from the upper nodes from left to right as the balancing nodes for data balancing.
12. The method according to claim 9, characterized in that The method further comprises: Get the data information stored by the node and the data information stored by other nodes; Perform feature extraction on the data information stored in the node and the data information stored in other nodes respectively to obtain a first feature vector and a second feature vector; constructing a correlation matrix according to the first eigenvector and the second eigenvector; The bond energy algorithm is used to transform the correlation matrix to obtain a high correlation data group matrix; Performing data balancing according to the high-correlation data group matrix; Among them, the bond energy algorithm is used to transform the correlation matrix, and the high correlation data group matrix is obtained, including: Performing row-column transformation on the correlation matrix; Calculate the bond energy value of the correlation matrix after each row-column transformation, and use the transformed correlation matrix corresponding to the maximum bond energy value as the high-correlation data group matrix; Among them, the formula for calculating the bond energy value of the correlation matrix after each row and column transformation is as follows: ; Where E represents bond energy, L (i,j) represents the number of tasks that access the i-th node and the j-th node together, and N represents the total number of nodes.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
14. A computer device 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 method according to any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Data processing method and device, computer equipment and computer readable storage medium
CN117008818A
Distributed cluster data balancing method based on balanced multi-way tree
CN118012602A
