Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for data storage

A data storage and data technology, applied in the computer field, can solve the problems of storage failure, idle storage space of storage unit, data overflow of storage unit, etc., and achieve the effect of improving the success rate

Active Publication Date: 2014-02-12
SHENZHEN TENCENT COMP SYST CO LTD
View PDF4 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when the above method is used to store data in each storage unit (the capacity of each storage unit is the same), since each storage unit stores the same number of logical data copies, on the one hand, some storage units with small storage capacity will generate data overflow, leading to storage failure; on the other hand, some storage units with large storage capacity have idle storage space, resulting in waste of storage resources

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for data storage
  • Method and device for data storage
  • Method and device for data storage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] A possible application scenario of this embodiment is: each storage unit has stored logical data, and the data storage method adopted may be the same as that in the prior art. For example, when storing, the data to be stored is hashed into N logical areas through a hash operation, and the data in each logical area is called a piece of logical data, and a total of N logical data can be obtained. Then, the N shares of logical data are evenly divided according to the number of storage units, and stored in each storage unit. However, after using the existing method to store data, there will be the same number of copies of logical data stored in each storage unit, but the storage usage rate is different. On the one hand, it will cause data overflow in some storage units with small storage capacity, resulting in storage On the other hand, some storage units with large storage capacity have the defect of idle storage space, resulting in waste of storage resources.

[0035] Th...

Embodiment 2

[0077] An application scenario of the embodiment of the present invention is: each storage unit does not store logical data, or has stored logical data according to the method provided by the embodiment of the present invention. The storage usage of the storage unit tends to be consistent.

[0078] Such as Image 6 As shown, the embodiment of the present invention provides a data storage method, including:

[0079] 201. Acquire the sum of the number of logical data shares to be stored.

[0080] 202. Calculate the respective storage capabilities of each storage unit.

[0081] One implementation of this step is: calculating the maximum number of copies of logic data that each storage unit can store respectively; rate ratio. For the specific calculation method, refer to the detailed description in step 102 above.

[0082] 203. Determine the target number of logical data to be written into each storage unit according to the sum of the logical data shares to be stored and the ...

Embodiment 3

[0091] Such as Figure 7 As shown, an embodiment of the present invention provides a data storage device, including:

[0092] An acquisition module 11, configured to acquire the sum of the actual number of logical data stored in each storage unit;

[0093] Calculation module 12, used to calculate the respective storage capacity of each storage unit and the total storage capacity of each storage unit;

[0094] The obtaining module 11 is also used to obtain the target logical data ratio of each storage unit according to the ratio of the respective storage capacity of each storage unit to the total storage capacity;

[0095] Determining module 13, for determining the target number of copies of logic data to be stored in each storage unit according to the sum of the actual number of copies of logical data stored in each storage unit and the ratio of target logic data in each storage unit;

[0096] The control module 14 is used for migrating logical data between storage units acc...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiments of the invention provide a method and a device for data storage. The method and the device for the data storage are used for increasing the success rate of the data storage and the utilization ratio of a storage space. The method comprises the steps: acquiring the sum of actual respectively-stored logical data copies of each storage unit; calculating the respective storage capacity of each storage unit and the total storage capacity of each storage unit; acquiring the target logical data proportion of each storage unit according to the respective storage capacity of each storage unit and the total storage capacity of each storage unit; determining the respective target logical data copies, needing to store, of each storage unit according to the sum of the actual respectively-stored logical data copies of each storage unit and the respective target logical data proportion of each storage unit; carrying out logical data migration among all the storage units according to the sum of actual respectively-stored logical data copies of each storage unit and the respective target logical data copies, needing to store, of each storage unit.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a data storage method and device. Background technique [0002] In the prior art, the implementation process of storing data in each storage unit is as follows: first, the data to be stored is hashed into N logical areas through a hash operation, and the data in each logical area is called a piece of logical data , a total of N logical data can be obtained. Then, the N shares of logical data are evenly divided according to the number of storage units, and stored in each storage unit, that is, the number of shares of logical data stored in each storage unit is the same. [0003] The formatting units of different storage units are different, which will cause the storage capacity of storage units with the same capacity to be different. For example, the capacities of storage unit A and storage unit B are both 1MB, and the formatting unit of storage unit A is 1KB, that is, the min...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F3/06
Inventor 张礼方钟超宇黄春刚曾凯源
Owner SHENZHEN TENCENT COMP SYST CO LTD