CN109753224B - Storage structure and storage structure configuration method - Google Patents

Storage structure and storage structure configuration method Download PDF

Info

Publication number
CN109753224B
CN109753224B CN201711072321.2A CN201711072321A CN109753224B CN 109753224 B CN109753224 B CN 109753224B CN 201711072321 A CN201711072321 A CN 201711072321A CN 109753224 B CN109753224 B CN 109753224B
Authority
CN
China
Prior art keywords
area
index
root directory
index area
bitmap
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711072321.2A
Other languages
Chinese (zh)
Other versions
CN109753224A (en
Inventor
吕志明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201711072321.2A priority Critical patent/CN109753224B/en
Publication of CN109753224A publication Critical patent/CN109753224A/en
Application granted granted Critical
Publication of CN109753224B publication Critical patent/CN109753224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a storage structure and a storage structure configuration method. The storage structure includes: a data area, a static index area and a dynamic index area. The data area, the static index area and the dynamic index area respectively adopt independent storage resources to store data, so that cross-resource storage of a plurality of storage resources is realized through the data area, the static index area and the dynamic index area. Therefore, the index area and the data area can be stored separately, and the index area can be expanded according to requirements. The index area is divided into a static index area and a dynamic index area, different data index requirements can be met, independent storage resources are configured for each area, and cross-resource application of a plurality of storage resources can be realized.

Description

Storage structure and storage structure configuration method
Technical Field
The invention relates to the technical field of data storage, in particular to a storage structure and a storage structure configuration method.
Background
The conventional block storage structure generally adopts the storage structure shown in fig. 1 of the specification, and mainly includes a formatting information area, an index area and a data area. The storage structure divides the index area and the data area on the same storage resource, and can realize the independent management of the index area and the concurrent reading and writing of the data area.
However, the disadvantages of this memory structure are: only a single storage resource can be described, and cross-resource application of a plurality of storage resources is not supported. The storage space of the index area is fixed, and the index area can be insufficient if the storage resources are increased.
Disclosure of Invention
In order to overcome the above-mentioned deficiencies in the prior art, the present invention provides a storage structure and a storage structure configuration method, which separately store an index area and a data area, and configure an independent storage resource for each area, so as to implement a cross-resource application of multiple storage resources.
It is a first object of a preferred embodiment of the present invention to provide a memory structure, which includes: a data area, a static index area and a dynamic index area;
the data area, the static index area and the dynamic index area respectively adopt independent storage resources to store data, so that cross-resource storage of a plurality of storage resources is realized through the data area, the static index area and the dynamic index area.
A second object of a preferred embodiment of the present invention is to provide a storage structure configuration method, applied to a storage device, for configuring the storage structure, where the method includes:
establishing a data area, a static index area and a dynamic index area, and respectively configuring corresponding storage resources for the data area, the static index area and the dynamic index area so as to realize cross-resource storage of a plurality of storage resources through the data area, the static index area and the dynamic index area;
dividing the data area into a plurality of data blocks with the same storage space;
configuring a volume index area and a first root directory index area of the static index area;
and configuring an object index area and a second root directory index area of the dynamic index area.
Compared with the prior art, the invention has the following beneficial effects:
the preferred embodiment of the invention provides a storage structure and a storage structure configuration method. The storage structure includes: a data area, a static index area and a dynamic index area. The data area, the static index area and the dynamic index area respectively adopt independent storage resources to store data, so that the cross-resource storage of a plurality of storage resources is realized through the data area, the static index area and the dynamic index area. Therefore, the index area and the data area can be stored separately, and the index area can be expanded according to requirements. The index area is divided into a static index area and a dynamic index area, different data index requirements can be met, independent storage resources are configured for each area, and cross-resource application of a plurality of storage resources can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram of a memory structure in the prior art.
FIG. 2 is a schematic diagram of a memory structure according to a preferred embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a data area according to a preferred embodiment of the invention.
FIG. 4 is a block diagram of a static index area according to a preferred embodiment of the present invention.
FIG. 5 is a diagram illustrating a structure of a dynamic index area according to a preferred embodiment of the present invention.
FIG. 6 is a flowchart illustrating a method for configuring a memory structure according to a preferred embodiment of the present invention.
FIG. 7 is a flowchart illustrating the sub-steps of step S130 shown in FIG. 6 according to a preferred embodiment of the present invention.
Fig. 8 is a flowchart illustrating sub-steps of step S140 shown in fig. 6 according to a preferred embodiment of the present invention.
Icon: 10-a storage structure; 100-a data area; 110-a data block; 120-reserved area; 200-static index area; 210-volume index area; 212-volume index header information area; 214-a primary bitmap index area; 2140-primary bitmap unit; 216-a secondary bitmap index area; 2160-secondary bitmap unit; 220-first root directory index area; 222-first root directory index header area; 224-root directory information index area; 2240-root directory information element; 226-root directory occupies block index area; 2260-root directory occupies block units; 228-a first root directory bitmap area; 2280 — root directory bitmap unit; 300-dynamic index zone; 310-a second root directory index area; 312-a second root directory index header; 314-a second root directory bitmap area; 320-object index area; 322-a first memory area; 3220-object information element; 324-a first bitmap area; 3240-object information bitmap element; 326-a second storage area; 3260-object occupied Block Unit; 328-second bitmap area; 3280-object occupied block bitmap cell; 329-object index header area.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
The preferred embodiment of the present invention provides a memory structure 10. Referring to fig. 2, fig. 2 is a schematic diagram illustrating a memory structure 10 according to a preferred embodiment of the invention. The memory structure 10 includes: a data area 100, a static index area 200, and a dynamic index area 300.
In this embodiment, the data area 100, the static index area 200, and the dynamic index area 300 respectively use independent storage resources to store data, so as to implement cross-resource storage of multiple storage resources through the data area 100, the static index area 200, and the dynamic index area 300.
In this embodiment, the data area 100 is an area for storing service data. The static index area 200 is an index area responsible for resource and service configuration update. The dynamic index area 300 is an index area responsible for dynamically updating service data during the process of storing service.
In the present embodiment, by separately storing the storage structures 10, the storage space of each storage region can be enlarged and reduced according to actual requirements. Particularly, for the index area, the index area is divided into the independent static index area 200 and dynamic index area 300, so that the storage space of the area can be flexibly adjusted, and the situation that the index area is insufficient due to the fixed storage space of the index area is avoided.
In this embodiment, the corresponding storage resource may be selected according to different data read-write types. For example, the data information stored in the static index area 200 has the characteristics of many read times, few erase times, and no data loss, and may preferably adopt a Solid State Drive (SSD) as a storage resource, and perform raid1 redundancy processing. The data information stored in the dynamic index area 300 has the characteristics of multiple reading times, multiple erasing times and data loss prevention, and an enterprise-level disk can be preferably used as a storage resource, and raid1 redundancy processing is performed at the same time. The storage resources used in the data area 100 may be set according to the actual data service, and an SMR (split magnetic Recording) hard disk may be preferably used.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data area 100 according to a preferred embodiment of the invention. The data area 100 includes a plurality of data blocks 110 having the same storage space.
In the present embodiment, the data area 100 is divided into a plurality of data blocks 110 with fixed storage space size. The size of the storage space into which each data block 110 is divided may be set according to the total storage space of the entire data area 100 and the number of data blocks 110. For example, each data block 110 may be set to a size of 2G.
In the present embodiment, when the data area 100 uses an SMR hard disk as a storage resource, a reserved area 120 for preventing written data from overwriting a next data block 110 is provided at the end of each data block 110.
In this embodiment, the SMR hard disk is composed of many tracks, and different tracks are allowed to overlap with each other, thereby greatly increasing the storage density without reducing the size of the magnetic head. Because the widths of the SMR read-write heads are different, the widths of the read heads are consistent with that of the Track, the widths of the write heads are large, and the subsequent part of disk data can be covered when the write heads are written in sequence. Therefore, in the design of the present scheme, a reserved area 120 is set at the end of each data block 110 to ensure that the last data written by the write head in the current data block 110 does not overlap the data in the next data block 110.
In the present embodiment, the size of the space set in the reserved area 120 may be determined according to the width of the SMR hard disk head, for example, the reserved area 120 may be set to 4MB (greater than the width of the head). The space occupied by the reserved area 120 may be included in the space (2G) of the data block 110, or a small area may be separately divided after the space of the data block 110 as the reserved area 120.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a static index area 200 according to a preferred embodiment of the invention.
In this embodiment, the static index area 200 includes: a volume index area 210 for describing the occupation of the data blocks 110 in the data area 100. The volume index area 210 includes a volume index header information area 212, a primary bitmap index area 214, and a secondary bitmap index area 216.
In this embodiment, the secondary bitmap index area 216 includes a plurality of secondary bitmap units 2160, each data block 110 has a corresponding secondary bitmap unit 2160, and the secondary bitmap units 2160 are used for storing the occupation status of the data block 110. For example, the information stored in the secondary bitmap unit 2160 may be 0/1 flag information, and when a certain data block 110 is occupied, that is, when data information is stored in the data block 110, the flag information stored in the secondary bitmap unit 2160 corresponding to the data block 110 is 1. Otherwise, when the data block 110 is not occupied, the flag information stored in the secondary bitmap unit 2160 is 0.
In this embodiment, the primary bitmap index area 214 includes a plurality of primary bitmap units 2140 for storing the occupation status of primary groups, wherein each primary group stores the occupation information of a plurality of secondary bitmap units 2160.
In this embodiment, the plurality of secondary bitmap units 2160 can be divided into a plurality of primary groups, each having a corresponding primary bitmap unit 2140. The information stored in the primary bitmap unit 2140 may also adopt 0/1 flag information. For example, when all the data blocks 110 corresponding to the secondary bitmap units 2160 included in a certain primary group are occupied, the flag information stored in the primary bitmap unit 2140 is 1, otherwise, it is 0. For example, the primary group includes four secondary bitmap units 2160, and if the flag information of the four secondary bitmap units 2160 is all 1 (i.e. the data block 110 is occupied), the primary bitmap unit 2140 corresponding to the primary group is identified as 1, otherwise, it is 0.
In this embodiment, the number of primary bitmap cells 2140 and the number of secondary bitmap cells 2160 in one primary group may preferably be set to the same number to optimize the lookup efficiency. For example, there are 1024 x 1024 data blocks 110, and the worst case minimum number of lookups is 1024+ 1024.
In the present embodiment, the volume index header information area 212 is used for storing data block 110 information (e.g., the number of data blocks 110, the size of the storage space of each data block 110, etc.) of the data area 100, primary bitmap unit 2140 information (e.g., the number of primary bitmap units 2140, the size of the storage space of each primary bitmap unit 2140), secondary bitmap unit 2160 information (e.g., the number of secondary bitmap units 2160, the size of the storage space of each secondary bitmap unit 2160), and parity information.
In this embodiment, by setting the volume index area 210, when the data block 110 is allocated, the unused data block 110 can be quickly retrieved by adopting a two-level bitmap index design, and the index efficiency can be effectively improved.
Referring to fig. 4 again, the static index area 200 further includes: a first root directory index area 220 for describing the occupation status of each data block 110 in the root directory area.
In this embodiment, the root directory area refers to a data storage area assigned to each root directory in the data area 100, where each root directory area includes a plurality of data blocks 110. For example, in a video surveillance system, the root directory generally refers to a data directory of an image capturing device (e.g., a camera), and a storage device applying the storage structure 10 may pre-allocate a separate data storage area, i.e., a root directory area, for each image capturing device.
In this embodiment, the first root directory index area 220 includes: a first root directory index header area 222, a root directory information index area 224, a root directory occupied block index area 226, and a first root directory bitmap area 228.
In this embodiment, the root directory information index area 224 includes a plurality of root directory information units 2240, and the root directory information units 2240 are configured to store root directory information, such as a root directory name, a storage space size of a root directory area, and the like.
In this embodiment, the root directory occupied block index area 226 includes a plurality of root directory occupied block units 2260, where the root directory occupied block units 2260 are configured to store address information of occupied data blocks 110 in the root directory area.
In this embodiment, the first root directory bitmap region 228 includes a plurality of root directory bitmap units 2280, and the root directory bitmap unit 2280 is configured to store the occupation status of the root directory occupation block unit 2260.
In this embodiment, the root directory information index area 224 and the root directory occupied block index area 226 may be partitioned according to a fixed size of storage space, after the partitioning, the number of the root directory information units 2240 is consistent with the number of the root directory occupied block units 2260, and the root directory information units and the root directory occupied block index area correspond to each other from front to back according to the arrangement order.
In this embodiment, the information stored in the root directory bitmap unit 2280 may also adopt 0/1 flag information. When data information is stored in a certain root directory occupied block unit 2260, the corresponding root directory bitmap unit 2280 is identified as 1, and the reverse identification is 0.
In this embodiment, the first root directory index header 222 is configured to store the number of root directories, information about root directory information units 2240 (e.g., the number of root directory information units 2240, the size of a storage space of each root directory information unit 2240, etc.), information about root directory occupied block units 2260 (e.g., the number of root directory occupied block units 2260, the size of a storage space of each root directory occupied block unit 2260, etc.), information about root directory bitmap units 2280 (e.g., the number of root directory bitmap units 2280, the size of a storage space of each root directory bitmap unit 2280, etc.), and check information.
In this embodiment, by setting the first root directory index area 220, it is possible to quickly find out which data blocks 110 in the root directory area corresponding to the current root directory are occupied, so as to retrieve the unused data blocks 110.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a dynamic index area 300 according to a preferred embodiment of the invention.
In this embodiment, the dynamic index area 300 includes: a second root directory index area 310, wherein the second root directory index area 310 corresponds to the first root directory index area 220 of the static index area 200. The second root directory index area 310 may include: a second root directory index header area 312 and a second root directory bitmap area 314.
In this embodiment, the dynamic index area 300 further includes: an object index area 320 for describing the occupancy of data blocks 110 allocated for object usage. The object index area 320 includes: a first storage area 322, a first bitmap area 324, a second storage area 326, a second bitmap area 328, and an object index header area 329.
In this embodiment, the object is a subdirectory belonging to the root directory. In a video surveillance system, the object may refer to, but is not limited to, a data directory acquired by a certain image acquisition device in a day cycle or a week cycle.
In this embodiment, the first storage area 322 includes a plurality of object information units 3220 for storing object information (e.g., object names). The first bitmap area 324 includes a plurality of object information bitmap elements 3240 for storing occupancy of the object information elements 3220.
In this embodiment, the second storage area 326 includes a plurality of object occupying block units 3260 for storing address information of the object occupying data blocks 110. The second bitmap area 328 includes a plurality of object occupied block bitmap cells 3280 for storing the occupation status of the object occupied block cells 3260.
In this embodiment, the information stored in the object information bitmap unit 3240 and/or the object occupied block bitmap unit 3280 may also adopt 0/1 flag information. The identification method is similar to that described above, and is not described herein again.
In this embodiment, the object index header 329 is used to store the number of objects, information of the object information unit 3220, information of the object occupied block unit 3260, information of the object information bitmap unit 3240, information of the object occupied block bitmap unit 3280, and check information.
In this embodiment, when the root directory area is configured in advance, if the data area 100 employs multiple storage resources, multiple data blocks 110 on different storage resources can be selected as the root directory area, so as to implement discrete distribution of data. After the root directory area is allocated, the data block 110 allocation of the object is limited in the designated root directory area, and the data block 110 required by the object allocation can be quickly searched. In addition, when the index area is expanded, it can be effectively ensured that the root directory area does not increase extra overhead due to the expansion of the storage space, which affects the performance of the storage structure 10.
In this embodiment, since the storage space required by different objects may be different, the dynamic index area 300 that is easy to erase and write repeatedly is adopted to meet the requirement of dynamic change of data storage. When the data is deleted, the object is used as the minimum deletable granularity, the data service of the whole root directory is not involved, the complexity of the system is simplified, and the occurrence of file fragments is avoided.
The preferred embodiment of the invention also provides a storage structure configuration method. The method is applied to a storage device, and is used for configuring the storage structure 10.
In this embodiment, the storage device may be applied to, but is not limited to, a video monitoring system, where the video monitoring system includes a plurality of image capturing devices (e.g., cameras), and the storage device is used for storing data information captured by the image capturing devices.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for configuring a memory structure according to a preferred embodiment of the invention. The specific flow of the storage structure configuration method is described in detail below.
Step S110, a data area 100, a static index area 200, and a dynamic index area 300 are established, and corresponding storage resources are configured for the data area 100, the static index area 200, and the dynamic index area 300, respectively, so as to implement resource-crossing storage of a plurality of storage resources through the data area 100, the static index area 200, and the dynamic index area 300.
In this embodiment, the storage device may configure one corresponding storage resource for each of the static index area 200 and the dynamic index area 300, and may configure one or more storage resources for the data area 100 according to actual data storage requirements.
Step S120, dividing the data area 100 into a plurality of data blocks 110 with the same storage space.
In this embodiment, the storage device arranges one or more storage resources corresponding to the data area 100 in order, and divides the data area 100 into data blocks 110 arranged in order and having a fixed storage space size according to the total capacity of the storage space of the data area 100.
In step S130, the volume index area 210 and the first root directory index area 220 of the static index area 200 are configured.
Referring to fig. 7, fig. 7 is a flowchart illustrating sub-steps of step S130 shown in fig. 6 according to a preferred embodiment of the present invention. The step S130 includes: substep S131, substep S132, substep S133, and substep S134.
In sub-step S131, a volume index area 210 and a first root directory index area 220 are created.
In the sub-step S132, a volume index header information area 212, a primary bitmap index area 214, and a secondary bitmap index area 216 are configured in the volume index area 210 to describe the occupation status of each data block 110 in the data area 100.
In this embodiment, the storage device divides the primary bitmap index area 214 into a plurality of primary bitmap units 2140, and divides the secondary bitmap index area 216 into a plurality of secondary bitmap units 2160.
In this embodiment, after configuring the static index area 200, the storage device writes the number of data blocks 110 in the data area 100, the ordering information, and the address information corresponding to each data block 110 into the volume index header information area 212. Meanwhile, the storage device sets both the primary bitmap unit 2140 in the primary bitmap index area 214 and the secondary bitmap unit 2160 in the secondary bitmap index area 216 to an idle state (i.e., marks flag information as 0). Finally, the volume index area 210 is verified as a whole, and the information of the primary bitmap unit 2140, the information of the secondary bitmap unit 2160, and the verification information are written into the volume index header information area 212.
In the substep S133, a designated root directory area is allocated to each root directory in the data area 100.
In the present embodiment, each root directory region includes a plurality of data blocks 110.
In the substep S134, a first root directory index header area 222, a first root directory bitmap area 228, a root directory information index area 224, and a root directory occupied block index area 226 are configured in the first root directory index area 220, so as to describe the occupied situation of each data block 110 in the root directory area.
In this embodiment, the storage device divides the root directory information index area 224 into a plurality of root directory information units 2240, divides the root directory occupied block index area 226 into a plurality of root directory occupied block units 2260, and divides the first root directory bitmap area 228 into a plurality of root directory bitmap units 2280.
In this embodiment, when a storage space is to be allocated for a root directory (e.g., a camera), the root directory area corresponding to the root directory is divided, and then the first root directory index area 220 corresponding to the root directory is allocated. For example, to allocate a root directory area with a storage space of 2TB, and the storage size of each data block 110 is 2GB, the storage device finds an available data block 110 from the volume index area 210, and stores the address information corresponding to the available data block 110 in the first root directory index area 220. The storage process comprises the following steps: an available location is first found from the first root directory bitmap area 228. The root directory information is written to the root directory index information area 224. Writing the address information of data block 110 to root directory occupies block index area 226. The corresponding root directory bitmap cell 2280 is then identified as occupied (i.e., flag information is 1) in the first root directory bitmap area 228. Finally, the secondary bitmap index region 216 at the corresponding location in the volume index region 210 is identified as occupied.
In the present embodiment, reference may be made to the above description of fig. 4 for specific descriptions of the volume index area 210 and the first root directory index area 220.
In step S140, the object index area 320 and the second root directory index area 310 of the dynamic index area 300 are configured.
Referring to fig. 8, fig. 8 is a flowchart illustrating sub-steps of step S140 shown in fig. 6 according to a preferred embodiment of the present invention. The step S140 includes: substep S141, substep S142, and substep S143.
In the substep S141, an object index area 320 and a second root directory index area 310 are created.
In the substep S142, a corresponding second root directory index area 310 is configured in the dynamic index area 300 according to the first root directory index area 220.
In this embodiment, the second root directory index area 310 corresponds to the first root directory index area 220 of the static index area 200. The second root directory index area 310 includes: a second root directory index header area 312 and a second root directory bitmap area 314.
In the sub-step S143, an object index header 329, a first bitmap 324, a first storage area 322, a second bitmap 328 and a second storage area 326 are configured in the object index area 320 to describe the occupation of the data block 110 allocated to the object.
In this embodiment, a service data table may be generated according to the object index area 320, and is used for recording data information related to the object.
In this embodiment, the configuration operation of the object index area 320 is similar to the configuration of the first root directory index area 220, and is not described herein again. The object index area 320 and the second root directory index area 310 may be described in detail with reference to fig. 5.
In this embodiment, when data related to an object needs to be deleted, the corresponding data block 110 may be found according to the object index area 320, the data information stored in the data block 110 is deleted, the object index area 320 is released, and then the root directory bitmap unit 2280 corresponding to the first root directory bitmap area 228 is set to be in an idle state.
In this embodiment, when all data of a root directory needs to be deleted, the corresponding address information is first found according to the object index area 320, and the object information in the dynamic index area 300 is cleared. Then, the corresponding first root directory index area 220 is found in the static index area 200, the first root directory index area 220 is cleared, the data blocks 110 occupied by the root directory are released, and the corresponding secondary bitmap unit 2160 is set to be in an idle state in the volume index area 210.
In summary, the preferred embodiment of the present invention provides a memory structure and a memory structure configuration method. The storage structure includes: a data area, a static index area and a dynamic index area. The data area, the static index area and the dynamic index area respectively adopt independent storage resources to store data, so that cross-resource storage of a plurality of storage resources is realized through the data area, the static index area and the dynamic index area.
Therefore, the index area and the data area can be stored separately, the index area is divided into a static index area and a dynamic index area, and different data index requirements are met. Independent storage resources are configured for each region, and cross-resource application of a plurality of storage resources can be realized.
In addition, the discrete distribution of data storage can be realized, and the data indexing efficiency is high. With the increase or decrease of the storage space of the data area, the storage capacity of the index area can be dynamically adjusted without affecting the performance of the storage structure.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A memory structure, characterized in that it comprises: the data area comprises a plurality of data blocks with the same storage space;
the data area, the static index area and the dynamic index area respectively adopt independent storage resources to store data, so that cross-resource storage of a plurality of storage resources is realized through the data area, the static index area and the dynamic index area;
the static index area includes: a volume index area for describing the occupation condition of the data blocks in the data area;
the volume index area comprises a volume index header information area, a primary bitmap index area and a secondary bitmap index area;
the secondary bitmap index area comprises a plurality of secondary bitmap units for storing the occupation condition of the data blocks, and the primary bitmap index area comprises a plurality of primary bitmap units for storing the occupation condition of primary groups, wherein each primary group stores the occupation information of the secondary bitmap units;
the volume index header information area is used for storing data block information, primary bitmap unit information, secondary bitmap unit information and verification information of the data area;
wherein the number of the primary bitmap units is the same as the number of the secondary bitmap units in any one of the primary groups.
2. The storage structure according to claim 1, wherein when the data area employs an SMR hard disk as a storage resource, a reserved area for preventing written data from overwriting a next data block is provided at an end of each data block.
3. The storage structure of any of claims 1-2, wherein the static index area further comprises: the first root directory index area is used for describing the occupation condition of each data block in the root directory area;
the first root directory index area includes: a first root directory index head area, a first root directory bitmap area, a root directory information index area and a root directory occupation block index area;
the root directory information index area comprises a plurality of root directory information units for storing root directory information;
the root directory occupation block index area comprises a plurality of root directory occupation block units for storing the address information of occupied data blocks in the root directory area;
the first root directory bitmap area comprises a plurality of root directory bitmap units for storing the occupation condition of the root directory occupation block units;
the first root directory index header area is used for storing the number of root directories, information unit of the root directories, information unit of occupied blocks of the root directories, information unit of bitmap of the root directories and verification information.
4. The storage structure according to claim 3, wherein the dynamic index area comprises: a second root directory index area corresponding to the first root directory index area;
the second root directory index area includes: a second root directory index header area and a second root directory bitmap area.
5. The storage structure of claim 1, wherein the dynamic index area further comprises: an object index area for describing an occupation status of a data block allocated to an object;
the object index area includes: the object index comprises an object index head area, a first bitmap area, a first storage area, a second bitmap area and a second storage area;
the first storage area includes a plurality of object information units for storing object information;
the first bitmap area comprises a plurality of object information bitmap units for storing the occupation condition of the object information units;
the second storage area comprises a plurality of object occupying block units for storing address information of object occupying data blocks;
the second bitmap area comprises a plurality of object occupation block bitmap units for storing occupation conditions of the object occupation block units;
the object index header area is used for storing the number of objects, the information of object information units, the information of object occupied block units, the information of object information bitmap units, the bitmap units of object occupied blocks and the check information.
6. A storage structure configuration method applied to a storage device, wherein the method is used for configuring the storage structure of any one of claims 1 to 5, and the method comprises:
establishing a data area, a static index area and a dynamic index area, and respectively configuring corresponding storage resources for the data area, the static index area and the dynamic index area so as to realize cross-resource storage of a plurality of storage resources through the data area, the static index area and the dynamic index area;
dividing the data area into a plurality of data blocks with the same storage space;
configuring a volume index area and a first root directory index area of the static index area;
and configuring an object index area and a second root directory index area of the dynamic index area.
7. The method according to claim 6, wherein the configuring the volume index area and the first root directory index area of the static index area comprises:
establishing a volume index area and a first root directory index area;
configuring a volume index header information area, a primary bitmap index area and a secondary bitmap index area in the volume index area to describe the occupation condition of each data block in the data area;
allocating a designated root directory area for each root directory in the data area, wherein each root directory area comprises a plurality of data blocks;
and configuring a first root directory index head area, a first root directory bitmap area, a root directory information index area and a root directory occupied block index area in the first root directory index area so as to describe the occupied condition of each data block in the root directory area.
8. The method according to claim 7, wherein the configuring the object index area and the second root directory index area of the dynamic index area comprises:
establishing an object index area and a second root directory index area;
configuring a corresponding second root directory index area in the dynamic index area according to the first root directory index area, wherein the second root directory index area includes: a second root directory index header area and a second root directory bitmap area;
and configuring an object index head area, a first bitmap area, a first storage area, a second bitmap area and a second storage area in the object index area so as to describe the occupation condition of the data blocks allocated to the object for use.
CN201711072321.2A 2017-11-03 2017-11-03 Storage structure and storage structure configuration method Active CN109753224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711072321.2A CN109753224B (en) 2017-11-03 2017-11-03 Storage structure and storage structure configuration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711072321.2A CN109753224B (en) 2017-11-03 2017-11-03 Storage structure and storage structure configuration method

Publications (2)

Publication Number Publication Date
CN109753224A CN109753224A (en) 2019-05-14
CN109753224B true CN109753224B (en) 2022-05-13

Family

ID=66398565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711072321.2A Active CN109753224B (en) 2017-11-03 2017-11-03 Storage structure and storage structure configuration method

Country Status (1)

Country Link
CN (1) CN109753224B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459412B (en) 2020-03-30 2023-07-04 北京百度网讯科技有限公司 Disk management method and device and electronic equipment
CN111651127B (en) * 2020-06-10 2023-05-02 杭州海康威视数字技术股份有限公司 Monitoring data storage method and device based on shingled magnetic recording disk
CN112380416A (en) * 2020-11-25 2021-02-19 北京慕华信息科技有限公司 Method for updating course index, course searching method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8285757B2 (en) * 2007-01-31 2012-10-09 Agency For Science, Technology And Research File system for a storage device, methods of allocating storage, searching data and optimising performance of a storage device file system
US8321652B2 (en) * 2008-08-01 2012-11-27 Infineon Technologies Ag Process and method for logical-to-physical address mapping using a volatile memory device in solid state disks
CN103577339B (en) * 2012-07-27 2018-01-30 深圳市腾讯计算机系统有限公司 A kind of date storage method and system
CN102982182B (en) * 2012-12-21 2017-02-08 浙江宇视科技有限公司 Data storage planning method and device
CN103593477A (en) * 2013-11-29 2014-02-19 华为技术有限公司 Collocation method and device of Hash database
CN105138286A (en) * 2015-08-11 2015-12-09 智云创新(北京)科技有限公司 Method for mixed utilization of SSD and SMR hard disks in disk file system
CN105653720B (en) * 2016-01-07 2020-03-27 北京人大金仓信息技术股份有限公司 Flexibly configurable hierarchical database storage optimization method
CN106933516A (en) * 2017-03-16 2017-07-07 郑州云海信息技术有限公司 A kind of storage controlling method and device of the storage system of blending agent
CN107122136B (en) * 2017-04-25 2021-02-02 浙江宇视科技有限公司 Capacity obtaining method and device

Also Published As

Publication number Publication date
CN109753224A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
US7363420B2 (en) Method and file structures for managing data on a flash disk
EP3617867B1 (en) Fragment management method and fragment management apparatus
US6609187B1 (en) Method and apparatus for supporting resizing of file system partitions
CN109947363B (en) Data caching method of distributed storage system
US7933938B2 (en) File storage system, file storing method and file searching method therein
CN108021513B (en) Data storage method and device
CN106970765B (en) Data storage method and device
US7660837B2 (en) Method for automatically managing disk fragmentation
US20150120988A1 (en) Method of Accessing Data in Multi-Layer Cell Memory and Multi-Layer Cell Storage Device Using the Same
CN109753224B (en) Storage structure and storage structure configuration method
CN113568582B (en) Data management method, device and storage equipment
CN113495889B (en) Distributed object storage method and device, electronic equipment and storage medium
US20150134877A1 (en) Data storage system with passive partitioning in a secondary memory
JPH10333949A (en) Data storage control system
CN111309245A (en) Layered storage writing method and device, reading method and device and system
US20050097274A1 (en) Storage system and its access control method
CN115617264A (en) Distributed storage method and device
US6967869B1 (en) Method and device to improve USB flash write performance
CN113434470B (en) Data distribution method and device and electronic equipment
WO2011121870A1 (en) Data recording device, and data recording method
CN105068896B (en) Data processing method and device based on RAID backup
CN110286848B (en) Data processing method and device
CN109739688B (en) Snapshot resource space management method and device and electronic equipment
CN109582235B (en) Management metadata storage method and device
KR20150127434A (en) Memory management apparatus and control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant