WO2021249201A1 - 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 - Google Patents
一种基于叠瓦式磁记录盘的监控数据存储方法及装置 Download PDFInfo
- Publication number
- WO2021249201A1 WO2021249201A1 PCT/CN2021/096418 CN2021096418W WO2021249201A1 WO 2021249201 A1 WO2021249201 A1 WO 2021249201A1 CN 2021096418 W CN2021096418 W CN 2021096418W WO 2021249201 A1 WO2021249201 A1 WO 2021249201A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- magnetic recording
- information
- monitoring data
- recording area
- Prior art date
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 312
- 238000000034 method Methods 0.000 title claims abstract description 120
- 238000013500 data storage Methods 0.000 title claims abstract description 28
- 230000008569 process Effects 0.000 claims abstract description 50
- 238000012806 monitoring device Methods 0.000 claims description 6
- 238000011084 recovery Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 18
- 238000004590 computer program Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0653—Monitoring storage devices or systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of data storage technology, and in particular to a monitoring data storage method and device based on shingled magnetic recording disks.
- HDD Hard Disk Drive
- PMR Perpendicular Magnetic Recording
- SMR (Shingled Magnetic Recording, shingled magnetic recording) disk is the leading next-generation disk. It keeps the existing head and media unchanged, and achieves an increase in its storage area density by overlapping tracks like tiles. Compared with traditional HDDs, SMR disks contain more tracks in the same area through shingled storage, thereby increasing the storage area density and meeting the requirements of big data storage.
- the purpose of the embodiments of the present application is to provide a monitoring data storage method and device based on the shingled magnetic recording disk, so as to realize the storage of monitoring data using the shingled magnetic recording disk.
- the specific technical solutions are as follows:
- embodiments of the present application provide a monitoring data storage method based on shingled magnetic recording disks.
- the shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas.
- the method includes:
- the data index information of the monitoring data is obtained, and the data index information is stored in the conventional magnetic recording area.
- the embodiments of the present application provide a monitoring data storage device based on shingled magnetic recording disks.
- the shingled magnetic recording disks include a conventional magnetic recording area and a shingled magnetic recording area.
- the device includes:
- the acquisition module is used to acquire the monitoring data to be stored
- the storage module is used to store the monitoring data in the shingled magnetic recording area according to the sequential storage rules; in the process of storing the monitoring data, obtain the data index information of the monitoring data, and store the data index information in the conventional magnetic recording area.
- an embodiment of the present application provides an electronic device, including a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is executed by the machine-executable instructions Prompt: to implement the method provided in the first aspect of the embodiments of the present application.
- an embodiment of the present application provides a machine-readable storage medium that stores machine-executable instructions that, when called and executed by a processor, implement the method provided in the first aspect of the embodiments of the present application.
- the embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method provided in the first aspect of the embodiments of the present application.
- an embodiment of the present application provides a monitoring system.
- the monitoring system includes a monitoring device, a shingled magnetic recording disk, and electronic equipment.
- the shingled magnetic recording disk includes a conventional magnetic recording area and a shingled magnetic recording area;
- Monitoring equipment used to collect monitoring data and send the monitoring data to electronic equipment
- Electronic equipment used to receive the monitoring data sent by the monitoring equipment; store the monitoring data in the shingled magnetic recording area according to the order storage rules; in the process of storing the monitoring data, obtain the data index information of the monitoring data and index the data Information is stored in the conventional magnetic recording area;
- the shingled magnetic recording area in the shingled magnetic recording disk is used to store monitoring data
- the conventional magnetic recording area in the shingled magnetic recording disk is used to store data index information.
- the embodiment of the application provides a monitoring data storage method and device based on an shingled magnetic recording disk, wherein the method includes: obtaining monitoring data to be stored, storing the monitoring data in the shingled magnetic recording according to the order storage rule Area, in the process of storing monitoring data, the data index information of the monitoring data is obtained, and the data index information is stored in the conventional magnetic recording area.
- Shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas. Shingled magnetic recording areas are larger and used to store monitoring data and can only store data sequentially. Conventional magnetic recording areas are smaller and used for Store data index information. Therefore, in the process of storing monitoring data, read the data index information of the monitoring data and store the data index information in the conventional magnetic recording area, thereby realizing the use of shingled magnetic recording disks to store the monitoring data .
- FIG. 1 is a schematic flowchart of a monitoring data storage method based on shingled magnetic recording disks according to an embodiment of the application;
- FIG. 2 is a schematic diagram of the structural allocation of the shingled magnetic recording disk according to an embodiment of the application
- FIG. 3 is a schematic diagram of the structure allocation of a conventional magnetic recording area according to an embodiment of the application.
- FIG. 4 is a schematic diagram of the structural allocation of shingled magnetic recording areas according to an embodiment of the application.
- FIG. 5 is a schematic diagram of the allocation process of database file sub-regions according to an embodiment of the application.
- FIG. 6 is a schematic diagram of a format for storing video clips in an shingled magnetic recording area according to an embodiment of the application
- FIG. 7 is a schematic diagram of a format for storing picture data in an shingled magnetic recording area according to an embodiment of the application.
- FIG. 8 is a schematic diagram of the flow of filling zeros when the storage unit of the shingled magnetic recording area is less than 4KB according to an embodiment of the application;
- FIG. 9 is a schematic diagram of a process of writing a full 4KB of data in a storage unit of a shingled magnetic recording area according to an embodiment of the application.
- FIG. 10 is a schematic diagram of a flow of data writing maintaining 4KB alignment when switching segments of the shingled magnetic recording area according to an embodiment of the application;
- FIG. 11 is a schematic diagram of a flow of information data storage according to an embodiment of the application.
- FIG. 12 is a schematic diagram of the initialization process of an embodiment of the application.
- FIG. 13 is a schematic diagram of a process of adding a virtual hard disk according to an embodiment of the application.
- FIG. 14 is a schematic diagram of the initialization process of another embodiment of the application.
- 15 is a schematic diagram of the recovery process of the shingled magnetic recording area according to an embodiment of the application.
- 16 is a schematic diagram of the process of restoring the data index information of the video data in the sub-region of the database file from the video data according to an embodiment of the application;
- FIG. 17 is a schematic flowchart of restoring data index information of picture data in a sub-region of a database file from picture data according to an embodiment of the application;
- FIG. 18 is a schematic structural diagram of a monitoring data storage device based on shingled magnetic recording disks according to an embodiment of the application
- FIG. 19 is a schematic structural diagram of an electronic device according to an embodiment of the application.
- FIG. 20 is a schematic structural diagram of a monitoring system according to an embodiment of the application.
- embodiments of the present application provide a monitoring data storage method and device based on shingled magnetic recording disks.
- the method for storing monitoring data based on the shingled magnetic recording disk provided by the embodiment of the present application is first introduced.
- the method is applied to electronic equipment, which can be a device independent of the SMR disk, or a modular device inserted into the SMR disk.
- the monitoring data storage method based on the shingled magnetic recording disk provided by the embodiment of the present application can be set in at least one of software, hardware circuit, and logic circuit in an electronic device.
- the SMR disk includes a CMR (Conventional Magnetic Recording) area and an SMR area.
- the entire SMR disk is divided into a zone (storage unit) of 256MB.
- the storage space of the SMR area is relatively large, accounting for about 99% of the entire SMR disk. In a single zone, data can only be written sequentially, not randomly written, and only data that has been written can be read.
- the storage space of the CMR area is small, allowing data to be written randomly.
- each zone of the SMR disk has a special status, such as open (open), close (close), finish (end), etc.
- WP Write Pointer
- SMR disks are generally divided into two types: DeviceManage and HostManage.
- the Device Manage type of SMR disk is adapted by the disk manufacturer to the SMR disk storage logic in the disk firmware; the Host Manage type of SMR disk is developed and adapted by the disk integrator for the SMR disk storage logic.
- the SMR disk in the embodiment of this application is a Host Manage type SMR disk.
- All SMR disks fall within the protection scope of the embodiments of the present application.
- an embodiment of the present application provides a monitoring data storage method based on an shingled magnetic recording disk, as shown in FIG. 1, which may include the following steps.
- S102 Store the monitoring data in the shingled magnetic recording area according to the order storage rule.
- S103 In the process of storing the monitoring data, obtain data index information of the monitoring data, and store the data index information in a conventional magnetic recording area.
- Shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas. Shingled magnetic recording areas are larger and used to store monitoring data and can only store data sequentially. Conventional magnetic recording areas are smaller and used for Store data index information. Therefore, in the process of storing monitoring data, read the data index information of the monitoring data and store the data index information in the conventional magnetic recording area, thereby realizing the use of shingled magnetic recording disks to store the monitoring data .
- the SMR disk includes the CMR area and the SMR area.
- the CMR area is used to store the data index information of the monitoring data
- the SMR area is used to store the monitoring data.
- the monitoring data refers to the image data collected by the monitoring equipment.
- Data index information refers to basic information such as the data type, data size, data length, data start time, storage location, etc. of the monitoring data. The data index information is obtained from the monitoring data during the storage of the monitoring data It is read or generated when monitoring data is stored.
- the conventional magnetic recording area includes an information file subarea and a database file subarea; the information file subarea is pre-stored with the formatting information of the shingled magnetic recording disk, and the database file subarea is used to store the data index information of the monitoring data .
- the CMR area can provide a database function.
- the CMR area is used to store formatting information and database files of the SMR disk.
- the formatting information includes the attribute identification of the SMR disk, the storage unit index, etc. Formatted hardware information.
- the CMR area can include an information file subarea and a database file subarea.
- the information file subarea is pre-stored with the formatting information of the SMR disk.
- the database file subarea is used to store the data index information of the monitoring data and occupies most of the space of the CMR area. .
- the CMR area includes two information file sub-areas, which are located in the first and last zone of the CMR area, as shown in Figure 3.
- the number of information file sub-areas included in the CMR area is not specifically limited here, and it may be one or multiple.
- Each zone serves as a file, and the index manages the storage space of the entire SMR disk except the first zone.
- the CMR area is not limited to a storage method of a database.
- the shingled magnetic recording area includes a plurality of storage units; the formatting information of the shingled magnetic recording disk includes the attribute identification of the shingled magnetic recording disk and the unit index of each storage unit.
- S102 may specifically be: storing the monitoring data in the designated storage unit in the shingled magnetic recording area according to the sequential storage rule.
- the formatting information of the SMR disk includes the attribute identifier of the SMR disk and the unit index of each storage unit, and the attribute identifier of the SMR disk includes the size of the SMR disk, how many zones the SMR disk includes, etc.
- the SMR area is mainly allocated to surveillance data such as video data and picture data. The area allocation of the SMR area is shown in Figure 4. Different types of surveillance data are stored in different zones.
- the monitoring data includes multiple data types; the database file sub-area includes database units pre-allocated for monitoring data of different data types; each storage unit is used to store monitoring data of different data types.
- S102 may specifically be: according to the data type of the monitoring data, according to the order storage rule, storing the monitoring data in the storage unit corresponding to the data type in the shingled magnetic recording area.
- the step of storing the data index information in the conventional magnetic recording area may specifically be: according to the data type of the monitored data, storing the data index information in the database unit corresponding to the data type.
- the SMR area is used to store different types of monitoring data such as video data and picture data.
- the monitoring data of different data types is stored in a corresponding storage unit.
- the CMR area is used to store database files.
- the database file sub-areas includes database units pre-allocated for monitoring data of different data types.
- the database file sub-areas can be divided into video library, picture library, information library, etc. Take a 4T SMR disk as an example.
- the CMR area is about 40G and a total of 160 files.
- the method may further include: for any database unit, if the used storage space of the database unit reaches a preset threshold, deleting the earliest stored data index information in the database unit.
- the entire space occupied by the database can only grow continuously and cannot be recycled. Therefore, when a certain database unit occupies a full space (that is, the used storage space of the database unit reaches a preset threshold), the old data index information in the database unit needs to be deleted to free up space for new data index information to be inserted.
- priority can be assigned to the stored data index data, the newer the stored data index data, the higher the priority, and when deleting, the data index data with the lowest priority can be deleted.
- the allocation process of the database file sub-area is shown in Figure 5.
- Apply for a database file to determine whether the current disk is an SMR disk. If it is, search for the monitoring pre-allocated on the SMR disk.
- the database unit corresponding to the data type of the data stores the data index information of the monitoring data in the database unit, and if the database unit occupies full space, the earliest stored data index information in the database unit is deleted.
- the monitoring data includes monitoring data of multiple channels;
- the shingled magnetic recording area includes multiple storage units;
- S102 may specifically be: storing each data segment synchronously to each storage unit in the shingled magnetic recording area in accordance with the sequential storage rule, wherein the data segment includes at least the header of the data segment and the monitoring data of one channel.
- the segment header is used to record the data index information of the monitoring data of a channel;
- S103 may specifically be: when the monitoring data of a channel is started to be stored, the data segment header of the monitoring data is generated, the data index information of the monitoring data is recorded in the data segment header, and the data index information is stored in the conventional magnetic field. Record area.
- each data segment includes at least a data segment header and monitoring data of one channel.
- the data segment header records the monitoring of one channel.
- Data index information of the data After receiving the monitoring data of a channel to be stored, it is determined to start storing the monitoring data of the channel, and before starting to store the monitoring data of the channel, it is necessary to generate the data segment header first, and record a first in the data segment header. Copy data index information, and store the data index information in the regular recording area.
- Monitoring data includes video data and picture data.
- S102 can specifically be: each data segment is stored synchronously to each storage unit in the shingled magnetic recording area in accordance with the sequential storage rule, where the data segment includes a data segment header and a channel
- the video data and the end of the data section, the head and the end of the data section are used to record the data index information of the video data.
- the data index information recorded at the end of the data section is more than the data index information recorded at the head of the data section.
- S103 may specifically be: when starting to store the video data of one channel, generate a data segment header of the video data, record the data index information of the video data in the data segment header, and store the data index information in the conventional magnetic recording area ;
- the current data index information is obtained every preset time period, and the current data index information is used to update the data index information of the video data in the conventional magnetic recording area;
- the video data of the channel is recorded, the end of the data segment of the video data is generated, the data index information of the video data is recorded at the end of the data segment, and the data index information of the video data in the conventional magnetic recording area is updated.
- Each data segment includes a data segment header, a channel of video data, and a data segment tail.
- the data segment header and data segment tail record the video data data Index information. Since the data in the SMR area can only be written in sequence, at the beginning of the recording, a data segment header is generated, a data index information is recorded in the data segment header, and the data index information is stored in the CMR area, the data index information of the header The length of the recording data cannot be recorded; in the process of storing the recording data of one channel, the data index information is obtained from the recording data every preset time period (such as 1 minute, 2 minutes, etc.) as the current data index information (can Including the start time, current time, current location of the video data of a channel, etc.), and use the current data index information to update the data index information of the video data in the CMR area, that is, the video stored in the CMR area The data index data is updated to the latest obtained current data index information; when the recording data ends,
- S102 may specifically be: storing each data segment synchronously to each storage unit in the shingled magnetic recording area according to a sequential storage rule, where the data segment includes the header of the data segment and the picture data of one channel, The data segment header is used to record the data index information of the picture data.
- S103 may specifically be: when starting to store the picture data of one channel, generate a data segment header of the picture data, record the data index information of the picture data in the data segment header, and store the data index information in the conventional magnetic recording area .
- Each data segment includes a data segment header and picture data of one channel.
- the data segment header records the data index information of the picture data. After receiving the picture data of a channel to be stored, it is determined to start storing the picture data of the channel, and before starting to store the picture data of the channel, it is necessary to generate the data segment header first, and record a copy in the data segment header Data index information, and store the data index information in the CMR area.
- S102 may specifically be: storing each data segment synchronously in each storage unit in the shingled magnetic recording area according to a sequential storage rule, where the data The segment includes at least one channel of picture data and a data segment tail, and the data segment tail is used to record data index information of the picture data of one channel.
- S103 may specifically be: after storing the picture data of one channel, generate the end of the data segment of the picture data, record the data index information of the picture data at the end of the data segment, and store the data index information in the conventional magnetic recording area.
- Each data segment includes one channel of picture data and the end of the data segment.
- the end of the data segment records the data index information of the picture data. After receiving the picture data of a channel to be stored, it is determined to start storing the picture data of the channel. After the picture data of the channel is stored, the end of the data segment is generated, a data index information is recorded at the end of the data segment, and the The data index information is stored in the CMR area.
- the traditional database retrieval method can be used to read the corresponding monitoring data from the SMR area for playback, display, etc., which will not be repeated here.
- S102 may specifically be: storing the monitoring data in the shingled magnetic recording area according to the sequential storage rules and the preset bit alignment strategy, where the preset bit alignment strategy is determined according to the preset data size of the data index information.
- the data size of the data index information is set to 4KB
- the preset bit alignment strategy corresponding to the data size of 4KB is the DIO (Discrete Input/Output, discrete input/output) alignment method
- DIO Discrete Input/Output, discrete input/output
- the monitoring data is written into the SMR area using the preset bit alignment method DIO to ensure that the data of the last preset bit must be data index information. If there is a blank before the data of the last preset bit, fill it with 0 to adopt 4KB alignment Take the way DIO writes into the SMR area as an example, add 0 to the data bits less than 4K, as shown in Figure 8.
- the recording data is written into the recording buffer first, and then based on the characteristics of SMR disk sequential writing Write to SRM disk.
- the tail is less than 4KB part of the data with 0, increase the index of the clip, and then keep the original offset to continue to write data, as shown in Figure 10. It should be noted that if there is no I frame in the new video clip, the I frame needs to be copied.
- the method may further include: when the monitoring data is stored in the shingled magnetic recording area, if the monitoring data is not aligned, obtaining the write pointer of the storage unit storing the monitoring data in the shingled magnetic recording area , And adjust the offset of the stored monitoring data based on the write pointer.
- the monitoring data is not aligned when writing data
- the method may further include: obtaining information data associated with the monitoring data; storing the information data in a local buffer; in the process of storing the information data, reading the data index information of the information data, and storing the data index information To the conventional magnetic recording area.
- information data is mostly structured data, such as face, vehicle and other related attribute information.
- the storage method is shown in Figure 11. After obtaining the information data associated with the monitoring data, the information data is stored in the local buffer. And in the process of storing the information data, the data index information of the information data can be read, and the data index information can be stored in the CMR area.
- Data index information can be stored in the database file sub-area of the CMR area, and traditional database retrieval methods can be used, which can satisfy various attributes and condition combination retrieval, etc., read the corresponding information data from the buffer, display and display The corresponding video or picture data is output, so I won’t repeat it here.
- the SMR disk Before executing the monitoring data storage method based on the shingled magnetic recording disk provided by the embodiment of the present application, the SMR disk may also be initialized. As shown in FIG. 12, the initialization process includes the following steps.
- S1201 Obtain the area parameters of the conventional magnetic recording area and the shingled magnetic recording area.
- S1202 Initialize the information file sub-areas and the database file sub-areas in the conventional magnetic recording area according to the area parameters of the conventional magnetic recording area and the shingled magnetic recording area.
- the SMR disk Before the SMR disk is used for monitoring data storage, the SMR disk may have been used. Therefore, the SMR disk needs to be initialized first.
- the specific initialization operation is to initialize the information file subarea and the database file subarea in the CMR area. Among them, when initializing the unit index of the information file sub-area, it is necessary to add the usage status of the synchronized system information file; when initializing the logic of the database file sub-area, add the CMR area except the first and last zone, all other zones Pre-allocated as database free files.
- the initialization process can be divided into two parts: adding a virtual hard disk and initializing.
- the virtual hard disk adding process shown in Figure 13 performs disk hot plug detection. If a data disk is detected, the specified command is used to obtain the disk type. If it is an SMR disk, obtain the area parameters of the SMR area, where the area parameters of the SMR area include attribute information such as the size of the SMR area, and then add a virtual hard disk according to the area parameters of the SMR area.
- the initialization process shown in Figure 14 the area parameters of the CMR area are obtained, the WP of the SMR area is reset, and the attribute identification and unit index in the sub-area of the information file are initialized to complete the initialization.
- the conventional magnetic recording area includes a database file sub-area and at least two information file sub-areas; the information file sub-area is pre-stored with the formatting information of the shingled magnetic recording disk, and the database file sub-area is used to store monitoring data. Data index information.
- the method may further include: if the formatting information stored in any information file subregion is damaged, obtaining and using formatting information stored in other information file subregions to restore the damaged formatting information in the information file subregion.
- the formatting information of the shingled magnetic recording disk includes the unit index of each storage unit in the shingled magnetic recording area; if all the unit indexes stored in the sub-areas of the information file are damaged, the method further includes:
- the first step is to obtain and determine the information file sub-areas according to the positions of the sub-areas in the conventional magnetic recording area.
- the second step is to traverse the shingled magnetic recording area and read the tail information of each storage unit.
- the read unit index is stored in the information file sub-area.
- the read unit index is stored in the information file sub-area.
- the unit index in the subarea of the reconstruction information file mainly includes two parts: CMR area restoration and SMR area restoration. Since the location of the information file sub-region is fixed, the CMR area restoration is to determine the information file sub-region based on the location of each sub-region in the CMR area.
- the SMR area recovery is specifically shown in Figure 15. It traverses the SMR area, reads the tail information of each storage unit, and judges whether a valid unit index is read from the tail information of the storage unit, and if so, it will read the unit index. Store to the information file sub-area.
- the WP of the SMR area when the SMR disk is initialized, the WP of the SMR area is not reset, but the ID information of the SMR disk is recorded in the initialization information of the SMR disk. And record the ID information in the unit index at the head or tail of each storage unit.
- the ID information in the initialization information of the SMR disk is different from the ID information in the unit index of the head or tail of the storage unit, it means that the storage unit is invalid and needs to be repaired. You can correct the SMR at this time.
- the WP of the area is reset, or when monitoring data is stored, after the storage unit is obtained, the WP of the SMR area is reset.
- the format information of the shingled magnetic recording disk may also include the attribute identifier of the shingled magnetic recording disk. If the attribute identifier stored in one information file sub-area is damaged, the information stored in the other information file sub-area can be used. The attribute identification restores the damaged attribute identification in the sub-area of the information file.
- the conventional magnetic recording area includes a database file subarea and an information file subarea; the information file subarea is pre-stored with the attribute identification of the shingled magnetic recording disk and the unit index of each storage unit in the shingled magnetic recording area,
- the database file sub-area is used to store the data index information of the monitoring data.
- the method may further include: if the data index information stored in the database file subarea is damaged, searching for the storage unit corresponding to the unit index in the shingled magnetic recording area according to the unit index; in the storage unit, starting from the end of the data, According to the data length recorded at the end of the data, traverse forward in turn, find the end of the previous monitoring data, and restore the data index information of each monitoring data according to the data end of each monitoring data; or, in the storage unit, from the data From the beginning of the header, according to the data length recorded in the data header, it traverses backward in turn, finds the data header of the next monitoring data, and restores the data index information of each monitoring data according to the data header of each monitoring data.
- monitoring data mainly refers to video data and picture data.
- the data index information stored in the database file sub-area is damaged, the damaged data index information can be directly recovered from the video data.
- the unit index the corresponding storage unit can be found in the SMR area.
- the end of the storage unit is the data index information of the last video clip. Therefore, according to the length of the segment recorded in the data index information, the last video clip can be found. Data index information. In this way, the data index information of all video clips can be recovered. As shown in Figure 16, after traversing the SMR area once, the data index information of the recording data in the entire database file sub-area can be recovered.
- the damaged data index information can be directly recovered from the picture data.
- the corresponding storage unit can be found in the SMR area. After the corresponding picture data is found, all picture data can be found backwards according to the data index information of the picture data, as shown in Figure 17, after traversing all After the picture data, the data index information of the picture data in the entire database file sub-area can be recovered.
- the corresponding storage unit can be found in the SMR area, the corresponding picture data can be found, and all the picture data can be found forward according to the data index information of the picture data , After traversing all the picture data, the data index information of the picture data in the entire database file sub-area can be recovered.
- the embodiments of this application realize the management of the partition format of the SMR disk, and realize the storage and retrieval of monitoring data on the SMR disk, including file allocation, file data writing, file update, file overwriting, data retrieval, etc. . Moreover, the self-repair of the file system is also realized.
- the embodiments of the present application provide a monitoring data storage device based on shingled magnetic recording disks.
- the shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas, as shown in FIG. 18
- the device may include:
- the obtaining module 1810 is used to obtain the monitoring data to be stored
- the storage module 1820 is used to store the monitoring data in the shingled magnetic recording area according to the sequential storage rules; in the process of storing the monitoring data, obtain the data index information of the monitoring data, and store the data index information in the conventional magnetic recording area .
- the conventional magnetic recording area includes an information file subarea and a database file subarea; the information file subarea is pre-stored with the formatting information of the shingled magnetic recording disk, and the database file subarea is used to store the data index information of the monitoring data .
- the shingled magnetic recording area includes a plurality of storage units;
- the formatting information of the shingled magnetic recording disk includes the attribute identification of the shingled magnetic recording disk and the unit index of each storage unit;
- the storage module 1820 can be specifically used to store the monitoring data in a designated storage unit in the shingled magnetic recording area in accordance with a sequential storage rule.
- the monitoring data includes multiple data types;
- the database file sub-area includes database units pre-allocated for monitoring data of different data types; each storage unit is used to store monitoring data of different data types;
- the storage module 1820 can be specifically used to: according to the data type of the monitoring data, store the monitoring data in the storage unit corresponding to the data type in the shingled magnetic recording area according to the sequential storage rules; according to the data type of the monitoring data, store the data The index information is stored in the database unit corresponding to the data type.
- the device may also include:
- the deleting module is used to delete the earliest stored data index information in the database unit if the storage space used by the database unit reaches a preset threshold for any database unit.
- the device may also include:
- the initialization module is used to obtain the area parameters of the conventional magnetic recording area and the shingled magnetic recording area; according to the area parameters of the conventional magnetic recording area and the shingled magnetic recording area, initialize the information file sub-areas and the database in the conventional magnetic recording area File sub-area.
- the monitoring data includes monitoring data of multiple channels;
- the shingled magnetic recording area includes multiple storage units;
- the storage module 1820 can be specifically used to: store each data segment synchronously to each storage unit in the shingled magnetic recording area according to a sequential storage rule, where the data segment includes at least a data segment header and one channel of monitoring data, The data segment header is used to record the data index information of the monitoring data of a channel; when the monitoring data of a channel is started to be stored, the data segment header of the monitoring data is generated, and the data index information of the monitoring data is recorded in the data segment header , And store the data index information to the conventional magnetic recording area.
- the monitoring data includes video data;
- the data segment also includes a data segment tail, and the data segment tail is used to record data index information for updating the video data;
- the storage module 1820 can also be used to: in the process of storing the video data of a channel, obtain the current data index information every preset time period, and use the current data index information to update the video data in the conventional magnetic recording area Data index information; when the video data of a channel is stored, the end of the data segment of the video data is generated, the data index information of the video data is recorded at the end of the data segment, and the data index information of the video data in the conventional magnetic recording area is updated .
- the monitoring data includes image data.
- the monitoring data includes image data of multiple channels; the shingled magnetic recording area includes multiple storage units;
- the storage module 1820 can be specifically used to: store each data segment synchronously to each storage unit in the shingled magnetic recording area according to a sequential storage rule, wherein the data segment includes at least one channel of picture data and the end of the data segment, and the data The end of the segment is used to record the data index information of the picture data of a channel; after storing the picture data of a channel, the end of the data segment of the picture data is generated, the data index information of the picture data is recorded at the end of the data segment, and the data is indexed Information is stored in the conventional magnetic recording area.
- the storage module 1820 can be specifically used to store the monitoring data in the shingled magnetic recording area according to the sequence storage rules and preset bit alignment strategies, wherein the preset bit alignment strategy is preset according to the data index information The data size is determined.
- the device may also include:
- the adjustment module is used to obtain the write pointer of the storage unit storing the monitoring data in the shingled magnetic recording area if the monitoring data is not aligned when the monitoring data is stored in the shingled magnetic recording area, and based on the write pointer , Adjust the offset of the stored monitoring data.
- the obtaining module 1810 can also be used to obtain information data associated with monitoring data;
- the storage module 1820 can also be used to store information data in a local buffer; in the process of storing information data, read the data index information of the information data, and store the data index information in the conventional magnetic recording area.
- the conventional magnetic recording area includes a database file sub-area and at least two information file sub-areas; the information file sub-area is pre-stored with the formatting information of the shingled magnetic recording disk, and the database file sub-area is used to store monitoring data. Data index information;
- the device may also include:
- the recovery module is used to obtain and use formatting information stored in other information file sub-areas to perform formatting information that is damaged in any information file sub-area if the formatting information stored in any information file sub-area is damaged. recover.
- the formatting information of the shingled magnetic recording disk includes the unit index of each storage unit in the shingled magnetic recording area;
- the device may also include:
- the reconstruction module is used to obtain and determine the information file sub-areas according to the position of each sub-areas in the conventional magnetic recording area if the unit indexes stored in all the sub-areas of the information file are damaged; traverse the shingled magnetic recording area and read each The tail information of the storage unit; if a valid unit index is read from the tail information of the storage unit, the read unit index is stored in the information file sub-area; if the valid unit index is not read from the tail information of the storage unit Read the header information of each storage unit; if a valid unit index is read from the header information of the storage unit, store the read unit index in the information file sub-area.
- the conventional magnetic recording area includes a database file sub-area and at least two information file sub-areas; the information file sub-area is pre-stored with the attribute identification of the shingled magnetic recording disk and the information of each storage unit in the shingled magnetic recording area. Unit index, the database file sub-area is used to store the data index information of the monitoring data;
- the device may also include:
- the search module is used to search for the storage unit corresponding to the unit index in the shingled magnetic recording area according to the unit index if the data index information stored in the subarea of the database file is damaged;
- the recovery module is used in the storage unit to start from the end of the data, traverse forward in turn according to the data length recorded at the end of the data, find the end of the previous monitoring data, and restore each monitoring based on the end of each monitoring data
- the data index information of the data or, in the storage unit, starting from the data header, according to the data length recorded in the data header, traverse backward in turn to find the data header of the next monitoring data, and according to the data of each monitoring data
- the data header recovers the data index information of each monitoring data.
- Shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas. Shingled magnetic recording areas are larger and used to store monitoring data and can only store data sequentially. Conventional magnetic recording areas are smaller and used for Store data index information. Therefore, in the process of storing monitoring data, read the data index information of the monitoring data and store the data index information in the conventional magnetic recording area, thereby realizing the use of shingled magnetic recording disks to store the monitoring data .
- An embodiment of the present application provides an electronic device, as shown in FIG. 19, including a processor 1901 and a machine-readable storage medium 1902.
- the machine-readable storage medium 1902 stores machine-executable instructions that can be executed by the processor 1901.
- the device 1901 is prompted by machine-executable instructions to implement the monitoring data storage method based on shingled magnetic recording disks provided in the embodiments of the present application.
- the above-mentioned machine-readable storage medium may include RAM (Random Access Memory, random access memory), and may also include NVM (Non-Volatile Memory, non-volatile memory), for example, at least one disk storage.
- NVM Non-Volatile Memory, non-volatile memory
- the machine-readable storage medium may also be at least one storage device located far away from the foregoing processor.
- the above-mentioned processor may be a general-purpose processor, including CPU (Central Processing Unit), NP (Network Processor, network processor), etc.; it may also be DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
- CPU Central Processing Unit
- NP Network Processor, network processor
- DSP Digital Signal Processing, digital signal processor
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array, Field Programmable Gate Array
- other programmable logic devices discrete gates or transistor logic devices, discrete hardware components.
- the machine-readable storage medium 1902 and the processor 1901 may transmit data through a wired connection or a wireless connection, and the electronic device may communicate with other devices through a wired communication interface or a wireless communication interface. What is shown in FIG. 19 is only an example of data transmission between the processor 1901 and the machine-readable storage medium 1902 via a bus, and is not intended to limit the specific connection manner.
- Shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas. Shingled magnetic recording areas are larger and used to store monitoring data and can only store data sequentially. Conventional magnetic recording areas are smaller and used for Store data index information. Therefore, in the process of storing monitoring data, read the data index information of the monitoring data and store the data index information in the conventional magnetic recording area, thereby realizing the use of shingled magnetic recording disks to store the monitoring data .
- the embodiment of the present application provides a machine-readable storage medium that stores machine-executable instructions that, when called and executed by a processor, implement the monitoring data storage method based on the shingled magnetic recording disk provided by the embodiment of the present application.
- Shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas. Shingled magnetic recording areas are larger and used to store monitoring data and can only store data sequentially. Conventional magnetic recording areas are smaller and used for Store data index information. Therefore, in the process of storing monitoring data, read the data index information of the monitoring data and store the data index information in the conventional magnetic recording area, thereby realizing the use of shingled magnetic recording disks to store the monitoring data .
- a computer program product containing instructions, which when run on a computer, causes the computer to execute the shingled-based magnetic recording disk provided by the embodiments of the present application. Monitoring data storage method.
- the computer may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
- software it can be implemented in the form of a computer program product in whole or in part.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions may be transmitted from a website, computer, server, or data center.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
- the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD (Digital Versatile Disc)), or a semiconductor medium (such as an SSD (Solid State Disk, solid state hard disk)), etc. .
- the embodiment of the present application also provides a monitoring system.
- the monitoring system includes a monitoring device 2010, an shingled magnetic recording disk 2020, and an electronic device 2030.
- the shingled magnetic recording disk 2020 includes a conventional magnetic recording area and Shingled magnetic recording area;
- the monitoring device 2010 is used to collect monitoring data and send the monitoring data to the electronic device 2030;
- the electronic device 2030 is used to receive the monitoring data sent by the monitoring device 2010; store the monitoring data in the shingled magnetic recording area according to the order storage rules; in the process of storing the monitoring data, obtain the data index information of the monitoring data, and Data index information is stored in the conventional magnetic recording area;
- the shingled magnetic recording area in the shingled magnetic recording disk 2020 is used to store monitoring data
- the conventional magnetic recording area in the shingled magnetic recording disk 2020 is used to store data index information.
- Shingled magnetic recording disks include conventional magnetic recording areas and shingled magnetic recording areas. Shingled magnetic recording areas are larger and used to store monitoring data and can only store data sequentially. Conventional magnetic recording areas are smaller and used for Store data index information. Therefore, in the process of storing monitoring data, read the data index information of the monitoring data and store the data index information in the conventional magnetic recording area, thereby realizing the use of shingled magnetic recording disks to store the monitoring data .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Recording Or Reproducing By Magnetic Means (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
Description
录像库 | 图片库 | 信息库 | 预留 | 数据库空闲文件 |
1/20 | 1/5 | 1/5 | 1/10 | 剩余 |
Claims (35)
- 一种基于叠瓦式磁记录盘的监控数据存储方法,其特征在于,所述叠瓦式磁记录盘包括常规磁记录区域和叠瓦式磁记录区域,所述方法包括:获取待存储的监控数据;按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域;在存储所述监控数据的过程中,获取所述监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求1所述的方法,其特征在于,所述常规磁记录区域包括信息文件子区域和数据库文件子区域;所述信息文件子区域预先存储有所述叠瓦式磁记录盘的格式化信息,所述数据库文件子区域用于存储监控数据的数据索引信息。
- 根据权利要求2所述的方法,其特征在于,所述叠瓦式磁记录区域包括多个存储单元;所述叠瓦式磁记录盘的格式化信息包括所述叠瓦式磁记录盘的属性标识以及各存储单元的单元索引;所述按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域的步骤,包括:按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域中的指定存储单元。
- 根据权利要求3所述的方法,其特征在于,所述监控数据包括多种数据类型;所述数据库文件子区域包括针对不同数据类型的监控数据预先分配的数据库单元;所述各存储单元用于存储不同数据类型的监控数据;所述按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域中的指定存储单元的步骤,包括:根据所述监控数据的数据类型,按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域中所述数据类型对应的存储单元;所述将所述数据索引信息存储至所述数据库文件子区域的步骤,包括:根据所述监控数据的数据类型,将所述数据索引信息存储至所述数据类型对应的数据库单元。
- 根据权利要求4所述的方法,其特征在于,所述方法还包括:针对任一数据库单元,若该数据库单元已使用的存储空间达到预设阈值,则删除该数据库单元中最早存储的数据索引信息。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:获取所述常规磁记录区域和所述叠瓦式磁记录区域的区域参数;根据所述常规磁记录区域和所述叠瓦式磁记录区域的区域参数,初始化所述常规磁记录区域中的信息文件子区域和数据库文件子区域。
- 根据权利要求1所述的方法,其特征在于,所述监控数据包括多个通道的监控数据;所述叠瓦式磁记录区域包括多个存储单元;所述按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域的步骤,包括:将各个数据段按照顺序存储规则,同步存储至所述叠瓦式磁记录区域中的各存储单元,所述数据段至少包括数据段头部及一个通道的监控数据,所述数据段头部用于记录一个通道的监控数据的数据索引信息;所述在存储所述监控数据的过程中,获取所述监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域的步骤,包括:在开始存储一个通道的监控数据时,生成该监控数据的数据段头部,在所述数据段头部记录该监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求7所述的方法,其特征在于,所述监控数据包括录像数据;所述数据段还包括数据段尾部,所述数据段尾部用于记录录像数据更新的数据索引信息;在所述生成该监控数据的数据段头部,在所述数据段头部记录该监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域的步骤之后,所述方法还包括:在存储一个通道的录像数据的过程中,每间隔预设时间段,获取当前数据索引信息,并利用所述当前数据索引信息,更新所述常规磁记录区域中该录像数据的数据索引信息;在存储完一个通道的录像数据时,生成该录像数据的数据段尾部,在所述数据段尾部记录该录像数据的数据索引信息,并更新所述常规磁记录区域中该录像数据的数据索引信息。
- 根据权利要求7所述的方法,其特征在于,所述监控数据包括图片数据。
- 根据权利要求1所述的方法,其特征在于,所述监控数据包括多个通道的图片数据;所述叠瓦式磁记录区域包括多个存储单元;所述按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域的步骤,包括:将各个数据段按照顺序存储规则,同步存储至所述叠瓦式磁记录区域中的各存储单元,所述数据段至少包括一个通道的图片数据及数据段尾部,所述数据段尾部用于记录一个通道的图片数据的数据索引信息;所述在存储所述监控数据的过程中,获取所述监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域的步骤,包括:在存储一个通道的图片数据后,生成该图片数据的数据段尾部,在所述数据段尾部记录该图片数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求1所述的方法,其特征在于,所述按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域的步骤,包括:按照顺序存储规则及预设位对齐策略,将所述监控数据存储至所述叠瓦式磁记录区域,所述预设位对齐策略根据所述数据索引信息的预设数据大小确定。
- 根据权利要求11所述的方法,其特征在于,所述方法还包括:在存储所述监控数据至所述叠瓦式磁记录区域时,若出现所述监控数据未对齐的情况, 则获取所述叠瓦式磁记录区域中存储所述监控数据的存储单元的写指针,并基于所述写指针,调整存储所述监控数据的偏移量。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:获取所述监控数据关联的信息数据;将所述信息数据存储至本地缓冲区;在存储所述信息数据的过程中,读取所述信息数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求1所述的方法,其特征在于,所述常规磁记录区域包括数据库文件子区域和至少两个信息文件子区域;所述信息文件子区域预先存储有所述叠瓦式磁记录盘的格式化信息,所述数据库文件子区域用于存储监控数据的数据索引信息;所述方法还包括:若任一信息文件子区域中存储的格式化信息损坏,则获取并利用其他信息文件子区域存储的格式化信息对所述任一信息文件子区域中损坏的格式化信息进行恢复。
- 根据权利要求14所述的方法,其特征在于,所述叠瓦式磁记录盘的格式化信息包括所述叠瓦式磁记录区域中各存储单元的单元索引;若所有信息文件子区域中存储的单元索引均损坏,所述方法还包括:获取并根据所述常规磁记录区域中各子区域的位置,确定信息文件子区域;遍历所述叠瓦式磁记录区域,读取各存储单元的尾部信息;如果从所述存储单元的尾部信息中读取到有效的单元索引,则将读取到的单元索引存储至所述信息文件子区域;如果从所述存储单元的尾部信息中未读取到有效的单元索引,则读取各存储单元的头部信息;如果从所述存储单元的头部信息中读取到有效的单元索引,则将读取到的单元索引存储至所述信息文件子区域。
- 根据权利要求1所述的方法,其特征在于,所述常规磁记录区域包括数据库文件子区域和信息文件子区域;所述信息文件子区域预先存储有所述叠瓦式磁记录区域中各存储单元的单元索引,所述数据库文件子区域用于存储监控数据的数据索引信息;所述方法还包括:若所述数据库文件子区域中存储的数据索引信息损坏,则根据所述单元索引,在所述叠瓦式磁记录区域中查找所述单元索引对应的存储单元;在所述存储单元中,从数据尾部开始,根据所述数据尾部记录的数据长度,依次向前遍历,查找到前一个监控数据的数据尾部,并根据各监控数据的数据尾部恢复出各监控数据的数据索引信息;或者,在所述存储单元中,从数据头部开始,根据所述数据头部记录的数据长度,依次向后遍历,查找到后一个监控数据的数据头部,并根据各监控数据的数 据头部恢复出各监控数据的数据索引信息。
- 一种基于叠瓦式磁记录盘的监控数据存储装置,其特征在于,所述叠瓦式磁记录盘包括常规磁记录区域和叠瓦式磁记录区域,所述装置包括:获取模块,用于获取待存储的监控数据;存储模块,用于按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域;在存储所述监控数据的过程中,获取所述监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求17所述的装置,其特征在于,所述常规磁记录区域包括信息文件子区域和数据库文件子区域;所述信息文件子区域预先存储有所述叠瓦式磁记录盘的格式化信息,所述数据库文件子区域用于存储监控数据的数据索引信息。
- 根据权利要求18所述的装置,其特征在于,所述叠瓦式磁记录区域包括多个存储单元;所述叠瓦式磁记录盘的格式化信息包括所述叠瓦式磁记录盘的属性标识以及各存储单元的单元索引;所述存储模块,具体用于:按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域中的指定存储单元。
- 根据权利要求19所述的装置,其特征在于,所述监控数据包括多种数据类型;所述数据库文件子区域包括针对不同数据类型的监控数据预先分配的数据库单元;所述各存储单元用于存储不同数据类型的监控数据;所述存储模块,具体用于:根据所述监控数据的数据类型,按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域中所述数据类型对应的存储单元;根据所述监控数据的数据类型,将所述数据索引信息存储至所述数据类型对应的数据库单元。
- 根据权利要求20所述的装置,其特征在于,所述装置还包括:删除模块,用于针对任一数据库单元,若该数据库单元已使用的存储空间达到预设阈值,则删除该数据库单元中最早存储的数据索引信息。
- 根据权利要求19所述的装置,其特征在于,所述装置还包括:初始化模块,用于获取所述常规磁记录区域和所述叠瓦式磁记录区域的区域参数;根据所述常规磁记录区域和所述叠瓦式磁记录区域的区域参数,初始化所述常规磁记录区域中的信息文件子区域和数据库文件子区域。
- 根据权利要求17所述的装置,其特征在于,所述监控数据包括多个通道的监控数据;所述叠瓦式磁记录区域包括多个存储单元;所述存储模块,具体用于:将各个数据段按照顺序存储规则,同步存储至所述叠瓦式磁记录区域中的各存储单元,所述数据段至少包括数据段头部及一个通道的监控数据,所述数据段头部用于记录一个通道的监控数据的数据索引信息;在开始存储一个通道的监控数据时,生成该监控数据的数据段头部,在所述数据段头部记录该监控数据的数据索引信 息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求23所述的装置,其特征在于,所述监控数据包括录像数据;所述数据段还包括数据段尾部,所述数据段尾部用于记录录像数据更新的数据索引信息;所述存储模块,还用于:在存储一个通道的录像数据的过程中,每间隔预设时间段,获取当前数据索引信息,并利用所述当前数据索引信息,更新所述常规磁记录区域中该录像数据的数据索引信息;在存储完一个通道的录像数据时,生成该录像数据的数据段尾部,在所述数据段尾部记录该录像数据的数据索引信息,并更新所述常规磁记录区域中该录像数据的数据索引信息。
- 根据权利要求23所述的装置,其特征在于,所述监控数据包括图片数据。
- 根据权利要求17所述的装置,其特征在于,所述监控数据包括多个通道的图片数据;所述叠瓦式磁记录区域包括多个存储单元;所述存储模块,具体用于:将各个数据段按照顺序存储规则,同步存储至所述叠瓦式磁记录区域中的各存储单元,所述数据段至少包括一个通道的图片数据及数据段尾部,所述数据段尾部用于记录一个通道的图片数据的数据索引信息;在存储一个通道的图片数据后,生成该图片数据的数据段尾部,在所述数据段尾部记录该图片数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求17所述的装置,其特征在于,所述存储模块,具体用于:按照顺序存储规则及预设位对齐策略,将所述监控数据存储至所述叠瓦式磁记录区域,所述预设位对齐策略根据所述数据索引信息的预设数据大小确定。
- 根据权利要求27所述的装置,其特征在于,所述装置还包括:调整模块,用于在存储所述监控数据至所述叠瓦式磁记录区域时,若出现所述监控数据未对齐的情况,则获取所述叠瓦式磁记录区域中存储所述监控数据的存储单元的写指针,并基于所述写指针,调整存储所述监控数据的偏移量。
- 根据权利要求17所述的装置,其特征在于,所述获取模块,还用于获取所述监控数据关联的信息数据;所述存储模块,还用于将所述信息数据存储至本地缓冲区;在存储所述信息数据的过程中,读取所述信息数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域。
- 根据权利要求17所述的装置,其特征在于,所述常规磁记录区域包括数据库文件子区域和至少两个信息文件子区域;所述信息文件子区域预先存储有所述叠瓦式磁记录盘的格式化信息,所述数据库文件子区域用于存储监控数据的数据索引信息;所述装置还包括:恢复模块,用于若任一信息文件子区域中存储的格式化信息损坏,则获取并利用其他信息文件子区域存储的格式化信息对所述任一信息文件子区域中损坏的格式化信息进行 恢复。
- 根据权利要求30所述的装置,其特征在于,所述叠瓦式磁记录盘的格式化信息包括所述叠瓦式磁记录区域中各存储单元的单元索引;所述装置还包括:重建模块,用于若所有信息文件子区域中存储的单元索引均损坏,获取并根据所述常规磁记录区域中各子区域的位置,确定信息文件子区域;遍历所述叠瓦式磁记录区域,读取各存储单元的尾部信息;如果从所述存储单元的尾部信息中读取到有效的单元索引,则将读取到的单元索引存储至所述信息文件子区域;如果从所述存储单元的尾部信息中未读取到有效的单元索引,则读取各存储单元的头部信息;如果从所述存储单元的头部信息中读取到有效的单元索引,则将读取到的单元索引存储至所述信息文件子区域。
- 根据权利要求17所述的装置,其特征在于,所述常规磁记录区域包括数据库文件子区域和信息文件子区域;所述信息文件子区域预先存储有所述叠瓦式磁记录区域中各存储单元的单元索引,所述数据库文件子区域用于存储监控数据的数据索引信息;所述装置还包括:查找模块,用于若所述数据库文件子区域中存储的数据索引信息损坏,则根据所述单元索引,在所述叠瓦式磁记录区域中查找所述单元索引对应的存储单元;恢复模块,用于在所述存储单元中,从数据尾部开始,根据所述数据尾部记录的数据长度,依次向前遍历,查找到前一个监控数据的数据尾部,并根据各监控数据的数据尾部恢复出各监控数据的数据索引信息;或者,在所述存储单元中,从数据头部开始,根据所述数据头部记录的数据长度,依次向后遍历,查找到后一个监控数据的数据头部,并根据各监控数据的数据头部恢复出各监控数据的数据索引信息。
- 一种电子设备,其特征在于,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:实现权利要求1-16任一项所述的方法。
- 一种机器可读存储介质,其特征在于,存储有机器可执行指令,在被处理器调用和执行时,实现权利要求1-16任一项所述的方法。
- 一种监控系统,其特征在于,所述监控系统包括监控设备、叠瓦式磁记录盘及电子设备,所述叠瓦式磁记录盘包括常规磁记录区域和叠瓦式磁记录区域;所述监控设备,用于采集监控数据,并将所述监控数据发送至所述电子设备;所述电子设备,用于接收所述监控设备发送的所述监控数据;按照顺序存储规则,将所述监控数据存储至所述叠瓦式磁记录区域;在存储所述监控数据的过程中,获取所述监控数据的数据索引信息,并将所述数据索引信息存储至所述常规磁记录区域;所述叠瓦式磁记录盘中的叠瓦式磁记录区域,用于存储所述监控数据;所述叠瓦式磁记录盘中的常规磁记录区域,用于存储所述数据索引信息。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010521106.1A CN111651127B (zh) | 2020-06-10 | 2020-06-10 | 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 |
CN202010521106.1 | 2020-06-10 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021249201A1 true WO2021249201A1 (zh) | 2021-12-16 |
Family
ID=72349298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/096418 WO2021249201A1 (zh) | 2020-06-10 | 2021-05-27 | 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111651127B (zh) |
WO (1) | WO2021249201A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115712389A (zh) * | 2022-10-28 | 2023-02-24 | 哈尔滨工业大学(深圳) | 一种数据存储介质间的调度方法、装置及电子设备 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111651127B (zh) * | 2020-06-10 | 2023-05-02 | 杭州海康威视数字技术股份有限公司 | 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 |
CN112214169B (zh) * | 2020-09-28 | 2021-08-10 | 深圳大学 | 一种数据存储装置及存储数据的迁移方法 |
CN113467723A (zh) * | 2021-07-26 | 2021-10-01 | 浙江大华技术股份有限公司 | 一种数据存储方法、装置、设备及介质 |
CN114217741A (zh) * | 2021-11-30 | 2022-03-22 | 浙江大华技术股份有限公司 | 存储装置的存储方法及存储装置 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8856076B2 (en) * | 2011-06-17 | 2014-10-07 | International Business Machines Corporation | Rendering tape file system information in a graphical user interface |
CN104156172A (zh) * | 2013-01-17 | 2014-11-19 | 西部数据技术公司 | 数据存储装置的数据管理 |
CN108255408A (zh) * | 2016-12-28 | 2018-07-06 | 中国电信股份有限公司 | 数据存储方法以及系统 |
CN109753224A (zh) * | 2017-11-03 | 2019-05-14 | 浙江宇视科技有限公司 | 存储结构及存储结构配置方法 |
CN111399762A (zh) * | 2019-11-27 | 2020-07-10 | 杭州海康威视系统技术有限公司 | 数据存储方法、装置及存储系统 |
CN111506251A (zh) * | 2019-01-30 | 2020-08-07 | 杭州海康威视系统技术有限公司 | 数据处理方法、装置、smr存储系统及存储介质 |
CN111651127A (zh) * | 2020-06-10 | 2020-09-11 | 杭州海康威视数字技术股份有限公司 | 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9460751B2 (en) * | 2013-09-16 | 2016-10-04 | Seagate Technology Llc | Binding shingled recording bands |
CN103745007A (zh) * | 2014-01-24 | 2014-04-23 | 深圳市华宝电子科技有限公司 | 一种文件管理方法及装置 |
CN104461390B (zh) * | 2014-12-05 | 2017-10-24 | 华为技术有限公司 | 将数据写入叠瓦状磁记录smr硬盘的方法及装置 |
CN106548789B (zh) * | 2015-09-17 | 2019-05-17 | 伊姆西公司 | 用于操作叠瓦式磁记录设备的方法和装置 |
CN106201355B (zh) * | 2016-07-12 | 2018-12-11 | 腾讯科技(深圳)有限公司 | 数据处理方法和装置以及存储系统 |
CN110502455B (zh) * | 2018-05-18 | 2021-10-12 | 杭州海康威视数字技术股份有限公司 | 数据存储方法及系统 |
CN110149803B (zh) * | 2018-08-27 | 2023-06-09 | 深圳市锐明技术股份有限公司 | 数据存储方法、系统及终端设备 |
-
2020
- 2020-06-10 CN CN202010521106.1A patent/CN111651127B/zh active Active
-
2021
- 2021-05-27 WO PCT/CN2021/096418 patent/WO2021249201A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8856076B2 (en) * | 2011-06-17 | 2014-10-07 | International Business Machines Corporation | Rendering tape file system information in a graphical user interface |
CN104156172A (zh) * | 2013-01-17 | 2014-11-19 | 西部数据技术公司 | 数据存储装置的数据管理 |
CN108255408A (zh) * | 2016-12-28 | 2018-07-06 | 中国电信股份有限公司 | 数据存储方法以及系统 |
CN109753224A (zh) * | 2017-11-03 | 2019-05-14 | 浙江宇视科技有限公司 | 存储结构及存储结构配置方法 |
CN111506251A (zh) * | 2019-01-30 | 2020-08-07 | 杭州海康威视系统技术有限公司 | 数据处理方法、装置、smr存储系统及存储介质 |
CN111399762A (zh) * | 2019-11-27 | 2020-07-10 | 杭州海康威视系统技术有限公司 | 数据存储方法、装置及存储系统 |
CN111651127A (zh) * | 2020-06-10 | 2020-09-11 | 杭州海康威视数字技术股份有限公司 | 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115712389A (zh) * | 2022-10-28 | 2023-02-24 | 哈尔滨工业大学(深圳) | 一种数据存储介质间的调度方法、装置及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN111651127A (zh) | 2020-09-11 |
CN111651127B (zh) | 2023-05-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021249201A1 (zh) | 一种基于叠瓦式磁记录盘的监控数据存储方法及装置 | |
US20220413706A1 (en) | Data Storage Method, Apparatus and Storage System | |
US8806173B2 (en) | Elimination of duplicate written records | |
CN106951375B (zh) | 在存储系统中删除快照卷的方法及装置 | |
US9189494B2 (en) | Object file system | |
CN104484427B (zh) | 一种录像文件存储装置及方法 | |
CN113568582B (zh) | 数据管理方法、装置和存储设备 | |
JP2002123421A (ja) | フラッシュメモリのための再写像制御方法及びこれによるフラッシュメモリの構造 | |
CN100530190C (zh) | 用于处理信息的装置和方法 | |
WO2020103493A1 (zh) | 基于fat32文件系统的删除文件恢复方法及系统 | |
JP2015005229A (ja) | テープカートリッジのファイルを複製する方法、プログラム及びテープドライブ | |
CN109918352B (zh) | 存储器系统和存储数据的方法 | |
KR20120093061A (ko) | 광 디스크 저장 시스템에 저장된 미디어에의 액세스, 압축 및 추적 | |
JP2019028954A (ja) | ストレージ制御装置、プログラム、及び重複排除方法 | |
CN111143116A (zh) | 一种磁盘坏块处理的方法及装置 | |
US7152147B2 (en) | Storage control system and storage control method | |
CN113448946B (zh) | 数据迁移方法及装置、电子设备 | |
US10725970B2 (en) | Block storage device with optional deduplication | |
US20060015681A1 (en) | Apparatus and method for writing and reading data | |
JP5394394B2 (ja) | ファイルシステムにおけるファイル管理・編集方法及び装置 | |
KR102094786B1 (ko) | 파일 시스템 및 상기 파일 시스템을 이용한 파일 저장 방법 | |
KR20190089796A (ko) | 감시 시스템의 영상 관리 장치 및 방법 | |
JP4667225B2 (ja) | 制御装置およびコピー制御方法 | |
JP2005165485A (ja) | ファイル管理装置、ストレージ管理システム、システム管理方法、プログラム及び記録媒体 | |
CN115878017A (zh) | 数据处理方法及存储系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21821389 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21821389 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21821389 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.07.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21821389 Country of ref document: EP Kind code of ref document: A1 |