A data writing management method, device and medium based on server hyper-convergence

By creating storage areas in server hyper-convergence and performing automatic segmentation and hashing processing, the problem of uneven load when writing data is solved, performance optimization and load balancing during data storage and retrieval are achieved, and data writing is ensured. Input and read efficiency.

CN118409716BActive Publication Date: 2024-09-10CHENGDU SHANMEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410873604.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-10
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

In the process of server hyper-convergence, due to the large amount of data and uneven load after partitioning when writing data, the load in some partition areas is too high while other areas are idle, resulting in data writing paralysis and inability to effectively store and process data.

Method used

By creating storage areas in the server and automatically dividing them, when the write volume exceeds the capacity, row keys are generated and hashed, and the load information of each partition is obtained for load balancing calculations to achieve even distribution of resources and improve distribution. Database cluster performance.

Benefits of technology

Through hashing processing and load balancing optimization, we ensure the performance of data in the storage and retrieval process, improve the efficiency of data writing and reading, achieve regional-level load balancing within the cluster, and avoid data writing paralysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409716B
    Figure CN118409716B
Patent Text Reader

Abstract

The present invention discloses a data writing management method, device and medium based on server hyper-convergence, which creates a storage area in the server and writes the inserted data into the storage area; when the writing amount of the inserted data exceeds the storage area capacity, the storage area is automatically divided; the regional server capacity and the regional server ratio are obtained, and the storage area is pre-partitioned to obtain partitions; the spatial load information of each partition area and the data access load information of each partition are obtained, and load balancing calculation is performed on the data. The normal writing of data is ensured by partitioning, and the load balancing calculation is performed on the data according to the partition spatial load information and the data access load information, so as to realize the uniform distribution of resources and improve the overall performance of the distributed database cluster. After processing, the written data can be evenly named in the pre-partition area, and the data is evenly stored in each area, which improves the efficiency of data writing and reading, and realizes the load balancing at the regional level within the cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data writing management method, device and medium based on server hyper-convergence. Background Art

[0002] In the process of server hyper-convergence, it is usually necessary to aggregate data from different data sources into a central data repository so that data sets can be processed and analyzed. However, in the process of data writing, when the server is executing data writing, when the data volume is large, it cannot be stored. Therefore, in order to perform normal data storage operations, this solution needs to split the region when the server writes data exceeding the regional threshold. However, after the split, when the data is written to each partition, the migration of the data is random and only stops when the region in the specified regional server is traversed. This process will take a long time, and in the process of server hyper-convergence, it is necessary to meet the ability to effectively expand resources, dynamically reallocate storage, and adapt to changing data processing needs;

[0003] In a multi-node network environment, due to the complexity and large amount of data, after the data reaches the server, due to the differences in performance and processing capabilities of each partition area, its writing is random. Often, at a certain moment, some partition areas have a high access frequency, resulting in a high load on the partition, while some areas have a low access frequency, a light load or even idle, wasting storage space, and after partitioning, the load is uneven, causing data writing to be paralyzed or even causing the written data to be unavailable. Summary of the invention

[0004] The technical problem to be solved by the present invention is that when the amount of data is large, the data cannot be stored normally, and the data storage is uneven after partitioning. The purpose is to provide a data writing management method, device and medium based on server hyper-convergence, by creating a storage area in the server, and writing the inserted data into the storage area; when the writing amount of the inserted data exceeds the storage area capacity, the storage area is automatically divided to ensure the normal writing process of the data, obtain the regional server capacity and the regional server ratio, generate a row key according to the unique identifier of the data, and hash the row key to obtain the partition. By converting the data into a hash value of a fixed length through hashing, the uniformity and security of the data node can be enhanced, which helps to optimize the performance of the data in the storage and retrieval process. After obtaining the partition, the spatial load information of each partition area and the data access load information of each partition are obtained, and the data is load balanced. The load balancing is used to achieve uniform distribution of resources and improve the overall performance of the distributed database cluster.

[0005] The present invention is achieved through the following technical solutions:

[0006] A first aspect of the present invention provides a data writing management method based on server hyper-convergence, comprising the following specific steps:

[0007] Create a storage area in the server and write the inserted data into the storage area;

[0008] When the amount of inserted data written exceeds the storage area's capacity, the storage area is automatically split;

[0009] Obtain the regional server capacity and the regional server ratio, perform pre-partitioning on the storage area, obtain the regional server capacity and the regional server ratio, and generate multiple pre-partitions;

[0010] Use virtual node mapping to extract the unique identifier of each partition and generate a row key based on the unique identifier of the data;

[0011] Hash the row keys to obtain multiple partitions where data can be written equally;

[0012] Obtain the spatial load information of each partition area and the data access load information of each partition, and perform load balancing calculations on the data.

[0013] The present invention creates a storage area in a server and writes the inserted data into the storage area; when the written amount of the inserted data exceeds the storage area capacity, the storage area is automatically divided to ensure the normal writing process of the data, obtain the regional server capacity and the regional server ratio, perform pre-partition processing on the storage area, generate a row key according to the unique identifier of the data, perform hash processing on the row key to obtain a partition, and through the hash processing, the uniformity and security of the data node can be enhanced by converting the data into a hash value of a fixed length, which is helpful to optimize the performance of the data in the storage and retrieval process, and after obtaining the partition, obtain the spatial load information of each partition area and the data access load information of each partition, perform load balancing calculation on the data, realize the uniform distribution of resources through load balancing, and improve the overall performance of the distributed database cluster. After the processing, the written data can be equally named in the pre-partition area, and the data is evenly stored in each area, which improves the efficiency of data writing and reading, and realizes the load balancing of the regional level in the cluster.

[0014] Furthermore, the step of pre-partitioning includes:

[0015] Obtain the regional server capacity and regional server ratio, and generate multiple pre-partitions;

[0016] Use virtual node mapping to extract the unique identifier of each partition and generate a row key based on the unique identifier of the data;

[0017] The row keys are hashed to obtain multiple partitions where data can be written equally.

[0018] Furthermore, the step of generating the identifier includes:

[0019] Get the true label of the character box for each sequence in the dataset;

[0020] Get the character box line segments and the number of annotation points of the character box, and generate identifiers by expanding and contracting.

[0021] Furthermore, the specific steps of generating the identifier by expansion and contraction include:

[0022] Shrink the real label of the character box inward to obtain the shrunken label;

[0023] Expand the true label of the character box outward to obtain the expanded label;

[0024] According to the shrinkage label and expansion label, the shrinkage and expansion offsets are obtained respectively;

[0025] Normalize the offsets of contraction and expansion and output the identifier.

[0026] Furthermore, the specific steps of obtaining the offsets of contraction and expansion respectively according to the contraction tag and the expansion tag include:

[0027] The contracted labels and expanded labels are binarized using a fixed threshold to obtain the detected character boxes.

[0028] Get the minimum inscribed rectangle of the character box, and finally expand and shrink the minimum inscribed rectangle to get the boundary line of the final character box. Determine the final offset based on the area, perimeter and expansion factor of the final character box.

[0029] Furthermore, the specific steps of generating a row key according to the unique identifier of the data include:

[0030] Obtain the pre-partition capacity and the number of pre-partitions, and determine the number of virtual nodes based on the number of pre-partitions;

[0031] Get the primary key of the written data, and obtain the starting key and universal unique identifier of the written data;

[0032] The row key is generated by combining the write data start key and the universal unique identifier.

[0033] Furthermore, the hashing process of the row key specifically includes:

[0034] Construct a hash function, map the row key value through the hash function, and obtain the hash value;

[0035] Modulo the number of nodes according to the hash value;

[0036] Distribute data to different storage nodes based on hash values.

[0037] Furthermore, the specific steps of performing load balancing calculation on the data include:

[0038] Obtaining the spatial load information of each partition area and the data access load information of each partition, and obtaining the data access threshold of each partition;

[0039] According to the data access threshold of the partition, filter out the overload and hungry nodes of each partition;

[0040] Each load cost value is calculated according to the load overload and hungry nodes of each partition, and load balancing adjustments are made based on the load cost value.

[0041] Furthermore, the specific steps of calculating each load cost value include:

[0042] Exchange the maximum load area and the minimum load area in the server and calculate the new cost value;

[0043] If the calculated cost value is less than the original value, the new cost value is used;

[0044] Otherwise, the load area exchange is iterated, and a new cost value is calculated. The optimal cost value is selected within the iteration threshold, and the load balancing adjustment is performed according to the optimal cost value.

[0045] A second aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a data write management method based on server hyper-convergence is implemented.

[0046] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data writing management method based on server hyper-convergence.

[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0048] The present invention creates a storage area in a server and writes the inserted data into the storage area; when the written amount of the inserted data exceeds the storage area capacity, the storage area is automatically divided to ensure the normal writing process of the data, obtain the regional server capacity and the regional server ratio, perform pre-partition processing on the storage area, generate a row key according to the unique identifier of the data, perform hash processing on the row key to obtain a partition, and through the hash processing, the uniformity and security of the data node can be enhanced by converting the data into a hash value of a fixed length, which is helpful to optimize the performance of the data in the storage and retrieval process, and after obtaining the partition, obtain the spatial load information of each partition area and the data access load information of each partition, perform load balancing calculation on the data, realize the uniform distribution of resources through load balancing, and improve the overall performance of the distributed database cluster. After the processing, the written data can be equally named in the pre-partition area, and the data is evenly stored in each area, which improves the efficiency of data writing and reading, and realizes the load balancing of the regional level in the cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0050] Figure 1 4 is a data processing flow chart in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0052] As a possible implementation, Figure 1As shown, the first aspect of this embodiment provides a data writing management method based on server hyper-convergence, including the following specific steps: creating a storage area in the server, and writing the inserted data into the storage area; when the write amount of the inserted data exceeds the storage area capacity, the storage area is automatically divided; the regional server capacity and the regional server ratio are obtained, and the storage area is pre-partitioned, and the regional server capacity and the regional server ratio are obtained to generate multiple pre-partitions; the unique identifier of each partition is extracted by virtual node mapping, and a row key is generated according to the unique identifier of the data; the row key is hashed to obtain multiple partitions to which data can be written equally; the regional space load information of each partition and the data access load information of each partition are obtained, and load balancing calculations are performed on the data. This embodiment creates a storage area in the server and writes the inserted data into the storage area; when the amount of inserted data written exceeds the storage area capacity, the storage area is automatically divided to ensure the normal writing process of the data, obtain the regional server capacity and the regional server ratio, pre-partition the storage area, generate a row key according to the unique identifier of the data, and hash the row key to obtain the partition. The hashing process can enhance the uniformity and security of the data node by converting the data into a hash value of a fixed length, which helps to optimize the performance of the data in the storage and retrieval process. After the partition is obtained, the spatial load information of each partition area and the data access load information of each partition are obtained, and the data is load balanced. Through load balancing, resources are evenly distributed and the overall performance of the distributed database cluster is improved. After the processing, the written data can be evenly named in the pre-partition area, and data is evenly stored in each area, which improves the efficiency of data writing and reading, and realizes load balancing at the regional level within the cluster.

[0053] This example aims to solve the problem of slow data writing efficiency and inability to write large amounts of data. In order to speed up the data writing speed and efficiency, when writing data, the server creates a region by default. Once data is inserted, all data will be written to the region if the capacity of the region is valid until the region is large enough to be split. Region splitting is automatic and has a certain impact on database performance. To solve this problem, first, it is necessary to pre-partition the regions managed by the regional server, calculate the number of regions through a formula, and each region has its own start and end keys. Secondly, the row keys are hashed through a hash algorithm, so that the written data can hit these pre-partitioned regions equally, so that the data is evenly stored in each region, thereby improving the efficiency of data writing and reading, and realizing regional-level load balancing within the cluster. After the server initially generates the storage area, each storage area has a data storage table. As the amount of stored data increases, the amount of data in the table becomes larger and larger during the data storage process. When the size of the region reaches the threshold, it will be divided into multiple regions, but each region has a storage range. Therefore, each region has a starting row key and an ending row key, which represent the range of the stored row keys and store a certain continuous segment of data in the table. Therefore, this application uses row keys for partition processing to ensure that after partitioning, the written data can be queried and garbled characters are not written. Specifically, the steps of pre-partition processing include: obtaining the regional server capacity and regional server ratio, generating multiple pre-partitions; using virtual node mapping to extract the unique identifier of each partition, and generating row keys based on the unique identifier of the data; hashing the row keys to obtain multiple partitions where data can be written equally.

[0054] In some possible embodiments, the step of generating the identifier includes: obtaining the true label of the character box of each sequence in the data set; obtaining the character box line segments and the number of annotation points of the character box, and generating the identifier by expansion and contraction.

[0055] In some possible embodiments, the specific steps of generating an identifier by expansion and contraction include: contracting the real label of the character frame inward to obtain a contracted label; expanding the real label of the character frame outward to obtain an expanded label; obtaining the contraction and expansion offsets according to the contraction label and the expansion label respectively; normalizing the contraction and expansion offsets and outputting the identifier. The contraction and expansion offsets are normalized because, during the calculation of the identifier, since the contraction and expansion offsets will change according to the partition threshold after each partition writes data, the boundaries of the partition area will have some fluctuations. Normalization is performed to obtain a more accurate offset, which can be used to reduce the boundary cost of the partition area when performing subsequent character frame calculations, obtain a more accurate partition area, and obtain more accurate load balancing.

[0056] In some possible embodiments, the specific steps of obtaining the offsets of contraction and expansion according to the contraction label and the expansion label respectively include: using a fixed threshold to binarize the contraction label and the expansion label to obtain the detected character box, and realizing end-to-end calculation for each partition area, and using a differentiable binarization method to obtain the character box after offset processing.

[0057] Get the minimum inscribed rectangle of the character box, expand and shrink the minimum inscribed rectangle, get the boundary line of the final character box, and determine the final offset based on the area, perimeter and expansion factor of the final character box. By processing the offset multiple times, get the accurate partition area to ensure the stability of the partition.

[0058] In some possible embodiments, the specific steps of generating a row key according to the unique identifier of the data include:

[0059] Obtain the pre-partition capacity and the number of pre-partitions, and determine the number of virtual nodes based on the number of pre-partitions;

[0060] Get the primary key of the written data, and obtain the starting key and universal unique identifier of the written data;

[0061] The row key is generated by combining the write data start key and the universal unique identifier.

[0062] In some possible embodiments, hashing the row key specifically includes: constructing a hash function, mapping the row key value through the hash function to obtain a hash value; modulo the number of nodes according to the hash value; and distributing the data to different storage nodes according to the hash value. Specifically, the row key hashing process is used in databases and data storage systems to ensure efficient access and distribution of data. Row key hashing can help evenly distribute data to different nodes, thereby improving query efficiency and load balancing. Distributing data to different storage nodes according to hash values ​​can ensure that the hash function can evenly distribute key values ​​to avoid data skew.

[0063] In some possible embodiments, the specific steps of performing load balancing calculation on data include:

[0064] Obtaining the spatial load information of each partition area and the data access load information of each partition, and obtaining the data access threshold of each partition;

[0065] According to the data access threshold of the partition, filter out the overload and hungry nodes of each partition;

[0066] Each load cost value is calculated according to the load overload and hungry nodes of each partition, and load balancing adjustments are made based on the load cost value.

[0067] In some possible embodiments, when performing load balancing calculations, using only regional load balancing may cause frequently read and written areas to be stored on the same regional server, resulting in the phenomenon that only some regional servers are busy and other regional servers are idle during the server hyper-convergence process. And the load status of each area in each regional server cannot be obtained according to the number of areas, so this embodiment needs to achieve load balancing through regional migration or exchange. If the real-time load of the area cannot be obtained, the regional migration exchange strategy cannot be derived, that is, there is no way to know which area and regional server has a higher load, and between which regional servers to migrate and exchange to achieve the purpose of load balancing, and the load of each regional server cannot be balanced. In this case, highly concurrent queries will cause congestion, which will greatly reduce the performance of the server after hyper-convergence. The improved load balancing strategy can regularly monitor the read and write requests of each area and regional server on the regional server, and record overloaded regional servers and low-load regional servers.

[0068] Specifically, the specific steps for calculating each load cost value include: exchanging the maximum load area and the minimum load area in the server and calculating a new cost value; if the calculated cost value is less than the original value, the new cost value is used; otherwise, the load area exchange is iterated, and a new cost value is calculated, the optimal cost value is selected within the iteration threshold, and the load balancing adjustment is performed according to the optimal cost value. In the process of calculating the new cost value, if the calculated cost value is less than the original value, the migration or exchange of the area is effective. Finally, a load migration planning table is output. In the table, each plan represents an area exchange of two nodes, or the migration of an area in one node to another node.

[0069] A second aspect of this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a data write management method based on server hyper-convergence is implemented.

[0070] A third aspect of this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data writing management method based on server hyper-convergence.

[0071] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data writing management method based on server hyper-convergence, It is characterized in that The specific steps include: Create a storage area in the server and write the inserted data into the storage area; When the amount of inserted data written exceeds the storage area's capacity, the storage area is automatically split; Obtain the regional server capacity and the regional server ratio, perform pre-partitioning on the storage area, obtain the regional server capacity and the regional server ratio, and generate multiple pre-partitions; Get the true label of the character box of each sequence in the dataset, get the character box line segment and the number of annotated points of the character box, generate identifiers by expansion and contraction, and use virtual node mapping to extract the unique identifier of each partition; Obtain the pre-partition capacity and the number of pre-partitions, and determine the number of virtual nodes according to the number of pre-partitions; obtain the primary key of the written data, obtain the starting key of the written data and the universal unique identifier; combine the starting key of the written data and the universal unique identifier to generate a row key; Hash the row key and build a hash function. Use the hash function to map the row key value to get the hash value. Modulo the number of nodes based on the hash value, distribute the data to different storage nodes based on the hash value, and get multiple partitions where data can be written equally. Obtain the spatial load information of each partition area and the data access load information of each partition, and perform load balancing calculations on the data.

2. The data writing management method based on server hyper-convergence according to claim 1, It is characterized in that The specific steps of generating the identifier by expansion and contraction include: Shrink the real label of the character box inward to obtain the shrunken label; Expand the true label of the character box outward to obtain the expanded label; According to the shrinkage label and expansion label, the shrinkage and expansion offsets are obtained respectively; Normalize the offsets of contraction and expansion and output the identifier.

3. The data writing management method based on server hyper-convergence according to claim 2, It is characterized in that The specific steps of obtaining the offsets of contraction and expansion respectively according to the contraction tag and the expansion tag include: Use a fixed threshold to binarize the contraction label and expansion label to obtain the detected character box; Get the minimum inscribed rectangle of the character box, and finally expand and shrink the minimum inscribed rectangle to get the boundary line of the final character box. Determine the final offset based on the area, perimeter and expansion factor of the final character box.

4. The data writing management method based on server hyper-convergence according to claim 1, It is characterized in that The specific steps of performing load balancing calculation on data include: Obtaining the spatial load information of each partition area and the data access load information of each partition, and obtaining the data access threshold of each partition; According to the data access threshold of the partition, filter out the overload and hungry nodes of each partition; Each load cost value is calculated according to the load overload and hungry nodes of each partition, and load balancing adjustments are made based on the load cost value.

5. The data writing management method based on server hyper-convergence according to claim 4, It is characterized in that The specific steps of calculating each load cost value include: Exchange the maximum load area and the minimum load area in the server and calculate the new cost value; If the calculated cost value is less than the original value, the new cost value is used; Otherwise, the load area exchange is iterated, and a new cost value is calculated. The optimal cost value is selected within the iteration threshold, and the load balancing adjustment is performed according to the optimal cost value.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the data writing management method based on server hyper-convergence is implemented as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the data writing management method based on server hyper-convergence is implemented as described in any one of claims 1 to 5.