Data storage method, data reading method, data storage device, data reading equipment and readable storage medium

文档序号:1296039 发布日期:2020-08-07 浏览:6次 中文

阅读说明:本技术 数据存储、读取方法、装置、设备及可读存储介质 (Data storage method, data reading method, data storage device, data reading equipment and readable storage medium ) 是由 许海涛 于 2020-03-20 设计创作,主要内容包括:本发明公开了一种数据存储、读取方法、装置、设备及可读存储介质,所述数据存储方法包括:对多个磁盘进行分区,以使得分区后的每个所述磁盘至少具有第一存储区和第二存储区;将分区后的多个所述磁盘的所述第一存储区创建为RAID5磁盘阵列;将数据索引和与所述数据索引对应的数据存储在创建后的RAID5磁盘阵列中,并将与每个磁盘存储的所述数据对应的所述数据索引备份存储在本磁盘的所述第二存储区中。本发明能有效解决现有技术数据存储的利用率较低且不适用于不使用文件系统的存储方式的问题,以及能够在RAID5磁盘阵列失效后尽量多的读出较多的完整数据。(The invention discloses a data storage method, a data reading method, a data storage device, a data reading device and a readable storage medium, wherein the data storage method comprises the following steps: partitioning a plurality of disks, so that each disk after partitioning at least has a first storage area and a second storage area; creating the first storage area of the partitioned plurality of disks as a RAID5 disk array; storing a data index and data corresponding to the data index in a created RAID5 disk array, and storing the data index backup corresponding to the data stored in each disk in the second storage area of the disk. The invention can effectively solve the problems that the data storage in the prior art has low utilization rate and is not suitable for a storage mode without using a file system, and can read more complete data as much as possible after the RAID5 disk array fails.)

1. A method of storing data, comprising:

partitioning a plurality of disks, so that each disk after partitioning at least has a first storage area and a second storage area;

creating the first storage area of the partitioned plurality of disks as a RAID5 disk array;

storing data and a data index corresponding to the data in a created RAID5 disk array, and storing the data index backup corresponding to the data stored in each disk in the second storage area of the disk; the second storage area is used only for storing the data index.

2. The data storage method of claim 1, wherein the second storage area is a head storage area of the magnetic disk.

3. The data storage method of claim 1, wherein the RAID5 disk array stores data having a stripe depth of n times a data block size of the data; n is a positive integer and is greater than or equal to 2.

4. The data storage method of claim 1 wherein said RAID5 disk array is divided into a data index storage area and a data storage area, said data being stored in said data storage area, said data index being stored in said data index storage area.

5. The data storage method of claim 1, wherein the data is video data and the data index is a video data index.

6. A data reading method, comprising:

performing data index search in a RAID5 disk array created by a plurality of disks according to the search parameters of the data index; the plurality of disks are provided with a first storage area and a second storage area, the first storage area of the plurality of disks is created into the RAID5 disk array, the RAID5 disk array stores the data indexes and the data corresponding to the data indexes, and the second storage area of each disk only stores the data indexes which are backed up and correspond to the data stored in the disk;

when the data index search in the RAID5 disk array fails according to the search parameters, performing the data index search in the second storage area according to the search parameters;

and searching corresponding data in the RAID5 disk array according to the acquired data index.

7. A data storage device, comprising:

the device comprises a partitioning module, a storage module and a processing module, wherein the partitioning module is used for partitioning a plurality of disks so that each partitioned disk at least has a first storage area and a second storage area;

a RAID5 creating module, configured to create the first storage area of the partitioned multiple disks as a RAID5 disk array;

the storage module is used for storing data and data indexes corresponding to the data in a created RAID5 disk array, and storing the data index backups corresponding to the data stored in each disk in the second storage area of the disk; the second storage area is used only for storing the data index.

8. A data reading apparatus, comprising:

the first searching module is used for searching the data index in the RAID5 disk array created by the disks according to the searching parameters of the data index; the plurality of disks are provided with a first storage area and a second storage area, the first storage area of the plurality of disks is created into the RAID5 disk array, the RAID5 disk array stores the data indexes and the data corresponding to the data indexes, and the second storage area of each disk only stores the data indexes which are backed up and correspond to the data stored in the disk;

the second searching module is used for searching data indexes in the second storage area according to the searching parameters when the searching of the data indexes in the RAID5 disk array fails according to the searching parameters;

and the third searching module is used for searching corresponding data in the RAID5 disk array according to the acquired data index.

9. A data storage device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data storage method of any one of claims 1 to 5 when executing the computer program.

10. A data reading device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the data reading method of claim 6 when executing the computer program.

11. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform a data storage method according to any one of claims 1 to 5 or to perform a data reading method according to claim 6.

Technical Field

The present invention relates to the field of data storage and reading technologies, and in particular, to a data storage method, a data reading method, a data storage device, a data reading device, and a readable storage medium.

Background

In a video surveillance system, storage of a video media stream is one of the key technologies. At present, in some key places, the requirement on storage stability is relatively high, and certain redundancy requirements are required for data storage media.

Redundant Array of Independent Disks (RAID) is a common storage scheme for improving the security redundancy of data storage. Currently, the more common RAID techniques are: RAID1 and RAID 5. RAID1 requires more than two sets of disks to be mirrored, and is easier to design and implement. Only one block of data can be read per disc read, i.e. the block transfer rate is the same as the read rate of a single disc. When the main disk is damaged, the mirror disk can work instead of the main disk. The mirror disk is equivalent to a backup disk, and it is conceivable that the security of this disk model is very high, and the data security of RAID1 is the best at all RAID levels. But the utilization of its disks is only 50%, which is the lowest of all RAID levels. Whereas RAID5 generally consists of at least 3 disks and requires that each disk in RAID5 has equal capacity, RAID5 divides each disk into fixed-size spaces, the same-location intervals of each disk form a stripe, each stripe consists of N-1 disk data intervals and a check interval, and a stripe is the smallest data storage unit of RAID 5. The whole RAID5 array is virtualized into one disk, and it is equivalent to one disk for a user to operate. The parity check codes of all check intervals are on different disks, so that the reliability is improved, and errors of a single disk are allowed. RAID5 also uses parity bits of data to ensure data security, but instead of storing parity bits of data on separate disks, parity bits of data segments are stored on each disk alternately. Thus, any disk that is corrupted can reconstruct the corrupted data from the parity bits on the other disks. The greatest benefit of RAID5 is that RAID works as usual in the event of a disk being disconnected, which is far more tolerant to faults than RAID0 in which each disk must work properly. RAID5 is therefore one of the most common types in RAID levels. The parity bits, i.e., P bits, of RAID5 are obtained by exclusive or (xor) of the other stripe data. The calculation formula is P-D0 xorD1xorD2 … xorDN, wherein P represents check block, Dn represents corresponding data block, and xor is arithmetic operation sign XOR.

In order to improve the security of video data storage, the prior art adopts two storage schemes of RAID1 and RAID 5. For example, in a scheme with patent number CN20181069077.4 and the patent name of a data storage method and a data storage system apparatus, the data storage method creates a RAID1 disk array in a preset area of a RAID5 disk array, stores file system data in the RAID1 disk array, and stores service data in other areas of the RAID5 disk array except for an area occupied by a RAID1 disk array, that is, the file system data is stored by using a RAID1 with a higher security level, so that in the case of damage to any disk, the file system data is still complete, the service data on the remaining disks can still be read, and the security of the service data is ensured to a greater extent. However, this data storage scheme requires the simultaneous use of RAID1, which results in low utilization of data storage, and thus results in a large amount of space wasted on the disks. Moreover, the scheme of the patent is only suitable for a storage mode using a file system, and monitored video recording data can be stored in a non-file system mode, so that the scheme is not suitable for a storage mode not using a file system, such as a self-designed data storage format.

Disclosure of Invention

Embodiments of the present invention provide a data storage method, a data reading method, a data storage device, a data reading apparatus, and a readable storage medium, which can effectively solve the problems that in the prior art, the data storage utilization rate is low and the data storage is not suitable for a storage mode without using a file system.

An embodiment of the present invention provides a data storage method, including:

partitioning a plurality of disks, so that each disk after partitioning at least has a first storage area and a second storage area;

creating the first storage area of the partitioned plurality of disks as a RAID5 disk array;

storing data indexes and data corresponding to the data indexes in a disk array in the created RAID5, and storing the data index backups corresponding to the data stored in each disk in the second storage area of the disk; the second storage area is used only for storing the data index.

As an improvement of the above solution, the second storage area is a head storage area of the magnetic disk.

As an improvement to the above solution, the stripe depth of the storage data of the RAID5 disk array is n times the data block size of the data; n is a positive integer and is greater than or equal to 2.

As an improvement of the above solution, the RAID5 disk array has a data index storage area and a data storage area, the data is stored in the data storage area, and the data index of the backup is stored in the data index storage area; the data is video data, and the data index is a video data index.

Another embodiment of the present invention correspondingly provides a data reading method, which includes:

performing data index search in a RAID5 disk array created by a plurality of disks according to the search parameters of the data index; the plurality of disks are provided with a first storage area and a second storage area, the first storage area of the plurality of disks is created into the RAID5 disk array, the RAID5 disk array stores the data indexes and the data corresponding to the data indexes, and the second storage area of each disk only stores the data indexes which are backed up and correspond to the data stored in the disk;

when the data index search in the RAID5 disk array fails according to the search parameters, performing the data index search in the second storage area according to the search parameters;

and searching corresponding data in the RAID5 disk array according to the acquired data index.

Another embodiment of the present invention provides a data storage device, including:

the device comprises a partitioning module, a storage module and a processing module, wherein the partitioning module is used for partitioning a plurality of disks so that each partitioned disk at least has a first storage area and a second storage area;

a RAID5 creating module, configured to create the first storage area of the partitioned multiple disks as a RAID5 disk array;

the storage module is used for storing a data index and data corresponding to the data index in a created RAID5 disk array, and storing the data index backup corresponding to the data stored in each disk in the second storage area of the disk; the second storage area is used only for storing the data index.

Another embodiment of the present invention provides a data reading apparatus, including:

the first searching module is used for searching the data index in the RAID5 disk array created by the disks according to the searching parameters of the data index; the plurality of disks are provided with a first storage area and a second storage area, the first storage area of the plurality of disks is created into the RAID5 disk array, the RAID5 disk array stores the data indexes and the data corresponding to the data indexes, and the second storage area of each disk only stores the data indexes which are backed up and correspond to the data stored in the disk;

the second searching module is used for searching data indexes in the second storage area according to the searching parameters when the searching of the data indexes in the RAID5 disk array fails according to the searching parameters;

and the third searching module is used for searching corresponding data in the RAID5 disk array according to the acquired data index.

Another embodiment of the present invention provides a data storage device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the data storage device implements the data storage method according to the above embodiment of the present invention.

Another embodiment of the present invention provides a data reading apparatus, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the data reading method according to the above embodiment of the present invention when executing the computer program.

Another embodiment of the present invention provides a storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the data storage method described in the above embodiment of the present invention.

Another embodiment of the present invention provides a storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device where the computer-readable storage medium is located is controlled to execute the data reading method described in the above embodiment of the present invention.

Compared with the prior art, the data storage and reading method, device, equipment and readable storage medium provided by the embodiments of the present invention partition each disk, each partitioned disk has two storage areas, a first storage area of a plurality of disks is created as a RAID5 disk array and stores a data index and data corresponding to the data index, and a second storage area stores the backed-up data index. Thus, the data index is stored in two copies, the first copy of the data index is stored in a RAID5 disk array, the second copy of the data index is stored in the second storage area of each disk, and when the data index in a RAID5 disk array fails, the data index in the second storage area can be used to read data in a RAID5 disk array. Therefore, the two data indexes are respectively stored in the RAID5 disk array and the second storage area of each disk, so that the safety and the redundancy of data index storage can be greatly improved, and the safety of data storage can be ensured by storing the data in the RAID5 disk array. In addition, because the mode of storing the data with less data indexes in the whole video file by using "RAID 5+ the second storage area" and the mode of storing the data with more data by using the RAID5 disk array with higher storage utilization rate is adopted, the utilization rate of the data storage of the embodiment of the present invention is higher compared with the mode of storing the data by using "RAID 5+ RAID 1". In addition, the embodiment of the invention adopts a mode of separately storing the data index and the data, so that the embodiment of the invention is suitable for a storage mode without using a file system, such as a self-designed data storage format.

Drawings

Fig. 1 is a schematic flow chart of a data storage method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a storage structure of a RAID5 disk array in one embodiment of the present invention;

FIG. 3 is a flowchart illustrating a data reading method according to an embodiment of the present invention;

FIG. 4 is a flow chart illustrating reading data according to an embodiment of the present invention;

FIG. 5 illustrates data that may be read after a RAID5 disk array fails in one embodiment of the invention;

FIG. 6 is a schematic structural diagram of a data storage device according to an embodiment of the present invention;

fig. 7 is a schematic structural diagram of a data reading apparatus according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Fig. 1 is a schematic flow chart of a data storage method according to an embodiment of the present invention. The data storage method comprises the following steps:

s10, partitioning a plurality of disks, so that each disk after partitioning at least has a first storage area and a second storage area;

s11, creating the first storage area of the partitioned disks as a RAID5 disk array;

s12, storing data and data indexes corresponding to the data in the created RAID5 disk array, and storing the data index backup corresponding to the data stored in each disk in the second storage area of the disk; the second storage area is used only for storing the data index.

In the embodiment of the present invention, the data of the video file stored in the disk may be mainly divided into two parts: data index and data. The data index records the relevant information of the data corresponding to the index and is used for searching out the corresponding data. And the data is actually used in video playback, export, and other functions.

In the embodiment of the invention, the data and the data index are divided into two parts for storage. In order to ensure the security of the data index, two data indexes are stored, one is stored in the RAID5 disk array, and the other is stored in the second storage area of each disk. And the data is normally stored using the RAID5 disk array.

Specifically, when creating a RAID5 disk array, a disk is partitioned, the size of the capacity required for storing data indexes (generally in the order of 1/10000 in relation to the data size, index structure, and the like) is calculated from the disk capacity, and the disk is partitioned according to the size of the capacity, the size of the capacity of the second storage area is the size of the capacity required for data indexes, and the first storage area may be the remaining total capacity of the disk and used for creating a RAID5 disk array. There are many layout schemes for RAID5 disk arrays, and for example, 3 disks are created (the number of disks in a RAID5 disk array is > -3, or a RAID5 disk array may be created using more disks), and a common layout manner is shown in fig. 2. The storage area of each disk head is divided into a second storage area for storing a data index corresponding to the data stored in the disk, for example, D1 stores a data index corresponding to D7. In the created RAID5 disk array, taking a stripe depth of 4MB as an example, D1 corresponds to 0-4MB of data in the entire data index, D2 corresponds to 4-8MB of data therein, and so on. And P1 is the parity data corresponding to D1 and D2, the above figure is an example of 3 disks, and if there are more disks, there is only one parity in each stripe. Typically, the parity data of a RAID5 disk array is distributed across different disks, so part of the checksum is lost for each disk that is damaged. In addition, RAID5 disk arrays hold both data indexes and data.

In fig. 2, if the disks 2 and 3 are damaged, the remaining readable data are: d1, D4 and D7 …, the rest of data is lost, and only index 1 (i.e. the data index corresponding to data D1, D4 and D7 … in disk 1) can be read.

It is understood that the disk may be a magnetic disk, a floppy disk, etc., and is not limited herein.

In summary, in the embodiment of the present invention, each disk is partitioned, each partitioned disk has two storage areas, a first storage area of the multiple disks is created as a RAID5 disk array and stores a data index and data corresponding to the data index, and a second storage area stores the backed-up data index. Thus, the data index is stored in two copies, the first copy of the data index is stored in a RAID5 disk array, the second copy of the data index is stored in the second storage area of each disk, and when the data index in a RAID5 disk array fails, the data index in the second storage area can be used to read data in a RAID5 disk array. Therefore, the two data indexes are respectively stored in the RAID5 disk array and the second storage area of each disk, so that the safety and the redundancy of data index storage can be greatly improved, and the safety of data storage can be ensured by storing the data in the RAID5 disk array. In addition, because the mode of storing the data with less data indexes in the whole video file by using "RAID 5+ the second storage area" and the mode of storing the data with more data by using the RAID5 disk array with higher storage utilization rate is adopted, the utilization rate of the data storage of the embodiment of the present invention is higher compared with the mode of storing the data by using "RAID 5+ RAID 1". In addition, the embodiment of the invention adopts a mode of separately storing the data index and the data, so that the embodiment of the invention is suitable for a storage mode without using a file system, such as a self-designed data storage format.

The second storage area is, for example, a head storage area of the magnetic disk, and of course, the second storage area may also be another storage area of the magnetic disk.

In the embodiment of the present invention, further, the stripe depth of the storage data of the RAID5 disk array is n times the data block size of the data; n is a positive integer and is greater than or equal to 2.

Since a block of data generally needs to be a complete block to be used, it is necessary to allow as much data as possible to be completely read out after the RAID5 disk array fails. The stripe depth (i.e., the data block size) of the data stored in the RAID5 disk array needs to be several times the data size, so that a block of data is stored on only one or two disks and is affected by only one or two disks. Since the size of a block of data is usually about 1MB, the stripe depth in the example of the present invention is designed to be 4MB, which can be further adjusted according to the requirement in practical use.

Specifically, a storage area of the RAID5 disk array is divided into a data index storage area and a data storage area, a plurality of front stripes of the RAID5 disk array are used as the data index storage area, and the remaining stripes are used as the data storage area.

Illustratively, the data is video data, and the data index is a video data index. Of course, the data may also be image data, audio data, and the like, and the data index may also correspond to an image data index, an audio data index, and the like.

Fig. 3 is a schematic flow chart of a data storage method according to another embodiment of the present invention. The data storage method comprises the following steps:

s20, searching data indexes in the RAID5 disk array created by the multiple disks according to the search parameters of the data indexes; the plurality of disks are provided with a first storage area and a second storage area, the first storage area of the plurality of disks is created into the RAID5 disk array, the RAID5 disk array stores the data indexes and the data corresponding to the data indexes, and the second storage area of each disk only stores the data indexes which are backed up and correspond to the data stored in the disk;

s21, when the data index search in the RAID5 disk array fails according to the search parameters, the data index search is carried out in the second storage area according to the search parameters;

and S22, searching corresponding data in the RAID5 disk array according to the acquired data index.

In the embodiment of the present invention, the main flow of reading data is shown in fig. 4. The method comprises the following steps that firstly, according to search parameters (such as time range) of data to be searched, an index search unit is used for searching a corresponding data index list in a data index area of a RAID5 disk array; and secondly, sequentially reading out data corresponding to the indexes through a data reading unit according to the obtained data index list for playback and the like. For example, if the storage address corresponding to one of the data indexes is 16MB to 17MB in the first step, that is, the storage address of the data corresponding to the data index is 16MB to 17MB, the D5 area of the disk 2 can be calculated and obtained as the location of the data index through the layout of the disk in the above example, and when the data corresponding to the data index is played according to the time sequence in the second step and needs to be read, the data is read in the D5 area.

When the RAID5 disk arrays are in different states, there are some differences in the processing in the flow, which mainly includes two cases: a) RAID5 disk arrays are in a normal or degraded state (one disk is damaged); b) the RAID5 disk array is in a failed state. Two cases are described below:

a) RAID5 disk array is in normal or degraded state:

when the RAID5 disk array is in a normal state, the data in the RAID5 disk array can be completely read, and the data is read by using the data index in RAID 5. In addition, when the RAID5 disk array is in a degraded state, since one disk is damaged, the data index stored in the RAID5 disk array of the disk is not complete, and cannot be used to completely read the data in the disk, and at this time, the RAID5 disk array is used to reconstruct the complete data index and data.

b) RAID5 disk array is in a failed state;

a RAID5 disk array failure refers to the state of a RAID5 disk array after 2 or more disks have been damaged. At this time, some data cannot be read and reconstructed, for example, after the disk 2 and the disk 3 are damaged, the state of the stripe 4 is shown in fig. 5. At this time, only data 1, data 2, and data 3 can be completely read, while only a part of data 4 can be read on the disk 1, and data 5, data 6, and data 7 cannot be read at all.

Data reading flow after RAID5 disk array failure: the first step, according to the search parameter (such as time range) of the data to be searched, searching out the corresponding data index list in the second storage area of the disk by using the index search unit; and secondly, sequentially reading out data corresponding to the indexes through a data reading unit according to the obtained data index list for playback and the like. For example, the corresponding data index list is searched in the second storage area index 1 area of the disk 1, and then the corresponding data is read from the data storage area of the disk 1 according to the data index list.

Therefore, the two data indexes are respectively stored in the RAID5 disk array and the second storage area of each disk, so that the safety and the redundancy of data index storage can be greatly improved, and the safety of data storage can be ensured by storing the data in the RAID5 disk array. In addition, because the mode of storing the data with less data indexes in the whole video file by using "RAID 5+ the second storage area" and the mode of storing the data with more data by using the RAID5 disk array with higher storage utilization rate is adopted, the utilization rate of the data storage of the embodiment of the present invention is higher compared with the mode of storing the data by using "RAID 5+ RAID 1". In addition, the embodiment of the invention adopts a mode of separately storing the data index and the data, so that the embodiment of the invention is suitable for a storage mode without using a file system, such as a self-designed data storage format.

Fig. 6 is a schematic structural diagram of a data storage device according to an embodiment of the present invention. The data storage device includes:

a partitioning module 10, configured to partition a plurality of disks, so that each of the partitioned disks has at least a first storage area and a second storage area;

a RAID5 creating module 11, configured to create the first storage area of the partitioned multiple disks as a RAID5 disk array;

the storage module 12 is configured to store data and a data index corresponding to the data in a created RAID5 disk array, and store the data index backup corresponding to the data stored in each disk in the second storage area of the disk; the second storage area is used only for storing the data index.

According to the embodiment of the invention, the two data indexes are respectively stored in the RAID5 disk array and the second storage area of each disk, so that the safety and the redundancy of data index storage can be greatly improved, and the safety of data storage can be ensured by storing the data in the RAID5 disk array. In addition, because the mode of storing the data index with the data amount being less in the whole video file by using "RAID 5+ the second storage area" and the mode of storing the data with the data amount being more by using RAID5 with higher storage utilization rate is adopted, the utilization rate of the data storage of the embodiment of the present invention is higher compared with the storage mode of storing the data by using "RAID 5+ RAID 1". In addition, the embodiment of the invention adopts a mode of separately storing the data index and the data, so that the embodiment of the invention is suitable for a storage mode without using a file system, such as a self-designed data storage format.

Fig. 7 is a schematic structural diagram of a data reading apparatus according to an embodiment of the present invention. The data reading apparatus includes:

the first search module 20 is configured to perform data index search in a RAID5 disk array created by a plurality of disks according to search parameters of the data index; the plurality of disks are provided with a first storage area and a second storage area, the first storage area of the plurality of disks is created into the RAID5 disk array, the RAID5 disk array stores the data indexes and the data corresponding to the data indexes, and the second storage area of each disk only stores the data indexes which are backed up and correspond to the data stored in the disk;

the second searching module 21 is configured to, when a data index search in the first storage area according to the search parameter fails, perform a data index search in the RAID5 disk array according to the search parameter;

and the third searching module 22 is configured to search the corresponding data in the RAID5 disk array according to the obtained data index.

According to the embodiment of the invention, the two data indexes are respectively stored in the RAID5 disk array and the second storage area of each disk, so that the safety and the redundancy of data index storage can be greatly improved, and the safety of data storage can be ensured by storing the data in the RAID5 disk array. In addition, because the mode of storing the data with less data indexes in the whole video file by using "RAID 5+ the second storage area" and the mode of storing the data with more data by using the RAID5 disk array with higher storage utilization rate is adopted, the utilization rate of the data storage of the embodiment of the present invention is higher compared with the mode of storing the data by using "RAID 5+ RAID 1". In addition, the embodiment of the invention adopts a mode of separately storing the data index and the data, so that the embodiment of the invention is suitable for a storage mode without using a file system, such as a self-designed data storage format.

Another embodiment of the present invention provides a data storage device, including: a processor, a memory, and a computer program, such as a data storage program, stored in the memory and executable on the processor. The processor implements the steps in the above-described respective data storage method embodiments when executing the computer program. Alternatively, the processor implements the functions of the modules/units in the data storage device embodiments when executing the computer program.

Another embodiment of the present invention provides a data reading apparatus, including: a processor, a memory, and a computer program, such as a data reading program, stored in the memory and executable on the processor. The processor implements the steps in the above-described respective data reading method embodiments when executing the computer program. Alternatively, the processor implements the functions of the modules/units in the embodiments of the data reading apparatus when executing the computer program.

Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the data storage/reading device.

The data storage/reading device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing device. The data storage/reading device may include, but is not limited to, a processor, a memory. For example, the data storage/reading device may also include input/output devices, network access devices, buses, and the like.

The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is the control center for the data storage/retrieval device and that utilizes various interfaces and lines to connect the various parts of the overall data storage/retrieval device.

The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the data storage/reading device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a magnetic disk, memory, a plug-in magnetic disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.

Wherein, the data storage/reading device integrated module/unit can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.

It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.

While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据处理方法、装置、设备及机器可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类