Fine-grained managed re-storage multi-recording system, method and data reading method

The fine-grained management of the heavy-storage multi-channel recording system solves the problems of low read/write efficiency and easy data loss in recording systems, achieving efficient storage and robust audio and video data management.

CN119645309BActive Publication Date: 2025-12-26E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411775061.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-12-26
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Existing video recording systems are inefficient and prone to data loss when reading and writing video data. Especially in environments with high-resolution cameras and multiple cameras, the disk is likely to reach the read and write performance bottleneck. Brief anomalies during recording can cause large files to be damaged, resulting in long-term video loss.

Method used

The heavy-storage multi-channel recording system, which adopts fine-grained management, divides the disk into disk information area, file list area, index area and data storage area through disk management settings module, file read and write module and file generation management module. It generates small files and performs efficient storage and indexing, and uses index node information to quickly locate data and reduce the risk of data loss.

Benefits of technology

It improves the read and write efficiency of the recording system, reduces the risk of data loss, adapts to efficient reading and writing of large amounts of audio and video data, and enhances the robustness and data storage capacity of the recording system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645309B_ABST
    Figure CN119645309B_ABST
Patent Text Reader

Abstract

The application relates to a fine-grained management re-storage multi-path video recording system, a method and a data reading method, the system comprising a disk management setting module for performing area setting on a disk according to a single reading and writing data volume of the disk to obtain a disk area layout; a file generation management module for acquiring a to-be-stored file and a file granularity value and generating k storage small files with the file granularity value of the to-be-stored file; a file reading and writing module for generating a file list according to the k storage small files; matching one or more data clusters according to each file information, and then storing the storage small files corresponding to the file information into the matched one or more data clusters; generating index node information according to the stored data of each data cluster and storing the index node information into the corresponding index node. The system cooperates the disk management setting module, the file reading and writing module and the file generation management module to form the multi-path data storage with efficient reading and writing data and reduced data loss risk.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a fine-grained management re-storage multi-channel video recording system, method and data reading method. BACKGROUND

[0002] The conventional video recording system stores video recording in the manner of using a regular file system and large-volume files (100M-4GB). Thus, the conventional video recording system has two problems. One problem is that the regular file system used generally performs poorly in the read-write performance of large amounts of data in order to balance the read-write efficiency of various types and sizes of files and reduce the waste of disk resources. In recent years, the resolution of camera videos is getting higher and higher, and more and more cameras are connected to a single video recording system, resulting in the increasing of the data read-write scale of the video recording system. If the data read-write manner of the video recording system is not improved, the disk is likely to reach the read-write performance bottleneck and cannot meet the product requirements. The other problem is that if a short-term abnormality occurs in the recording system during the recording process, the large-volume file to be stored is damaged, which may cause the loss of long-time recording and inevitably cause the robustness problem of video recording storage.

[0003] The data of the existing video recording system is mainly audio and video data, and the data type is relatively single, but the data volume is large, and the data storage has obvious characteristics. In order to meet the requirements of storing large amounts of audio and video data, it is necessary to improve the video storage capacity of the video recording system in terms of read-write speed and recording storage robustness according to the characteristics of audio and video data storage. SUMMARY

[0004] The present application provides a fine-grained management re-storage multi-channel video recording system, method and data reading method, which is used to solve the technical problems of low efficiency and easy data loss in the read-write recording data manner of the existing video recording system.

[0005] In order to achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0006] On the one hand, a fine-grained management re-storage multi-channel video recording system is provided, which comprises a disk management setting module, a file read-write module connected with the disk management setting module, and a file generation management module connected with the file read-write module.

[0007] The disk management setting module is used to set the disk area according to the single read-write data volume of the disk to obtain a disk area layout. The disk area layout comprises a disk information area, a file list area, an index area and a data storage area. One sector of the index area comprises n index nodes, and one sector of the data storage area comprises n data clusters sequentially corresponding to the n index nodes.

[0008] The file generation management module is configured to acquire a file to be stored and a file granularity value, and generate k storage small files with the file granularity value from the file to be stored.

[0009] The file read-write module is configured to generate a file list composed of k file information according to the k storage small files, match one or more data clusters according to a start cluster and an end cluster of each file information, and store the storage small file corresponding to the file information into the matched one or more data clusters.

[0010] The file read-write module is further configured to generate index node information according to data stored in each data cluster and store the index node information into a corresponding index node; k and n are natural numbers other than 0, k is not greater than n; and the file granularity value is the size of a single file volume.

[0011] Preferably, the disk information area is configured to record the disk region setting information; the file list area is configured to store the file list, one sector of the file list area includes k information entries, and each information entry is configured to record one file information; each index node is configured to store one index node information; and each data cluster is configured to store data of the storage small file.

[0012] Preferably, the file information includes a start cluster, an end cluster, a video recording time length information, an I-frame record, a creation time, a modification time, a data size, and a read-write permission.

[0013] Preferably, the index node information includes a current data cluster cluster number, a previous data cluster cluster number, and a next data cluster cluster number.

[0014] Preferably, the disk management setting module is further configured to detect a space of the disk in real time to obtain remaining storage space data.

[0015] In another aspect, a data reading method of a fine-grained management re-storage multi-channel video recording system is provided, which is applied to the fine-grained management re-storage multi-channel video recording system and includes the following steps:

[0016] Acquiring file information of data to be read, the file information including a start data cluster number and an end data cluster number;

[0017] Using a matching search algorithm to match the fine-grained management re-storage multi-channel video recording system according to the file information to obtain each index node information corresponding to the file information;

[0018] According to the last data cluster number and the next data cluster number of all the inode information, the data storage area of the fine-grained management re-stored multi-path video recording system is traversed to extract data, and the file data corresponding to the file information is read.

[0019] Preferably, the content of the matching search algorithm comprises:

[0020] According to the start data cluster number and the end data cluster number of the file information, the file data cluster data is obtained by matching in the data storage area of the fine-grained management re-stored multi-path video recording system.

[0021] According to the data cluster numbers of the file data cluster data, the corresponding inode information is obtained by matching in the index area of the fine-grained management re-stored multi-path video recording system.

[0022] In another aspect, a fine-grained management re-stored multi-path video recording method is provided, comprising the following steps:

[0023] The disk to be stored and the single read-write data volume of the disk are obtained, the disk is regionally set according to the single read-write data volume of the disk, and the disk region layout is obtained; the disk region layout comprises a disk information area, a file list area, an index area, and a data storage area, one sector of the index area comprises n index nodes, and one sector of the data storage area comprises n data clusters sequentially corresponding to the n index nodes;

[0024] The file to be stored and the file granularity value are obtained, and k storage small files with the file granularity value are generated from the file to be stored;

[0025] According to the k storage small files, a file list comprising k file information is generated; according to the start cluster and the end cluster of each file information, one or more data clusters are matched, and the storage small file corresponding to the file information is stored in the matched one or more data clusters;

[0026] According to the data stored in each data cluster, inode information is generated and stored in the corresponding index node; k and n are natural numbers not equal to 0, and k is not greater than n; the file granularity value is the size of the volume of a single file.

[0027] Preferably, the disk information area is used for recording the disk region setting information; and / or, the file list area is used for storing the file list, one sector of the file list area includes k information entries, each of the information entries is used for recording one piece of the file information; and / or, each of the index nodes is used for storing one piece of the index node information; and / or, each of the data clusters is used for storing the data of the stored small file; and / or, the index node information includes a current data cluster cluster number, a previous data cluster cluster number and a next data cluster cluster number.

[0028] In still another aspect, a terminal device is provided, comprising a processor and a memory;

[0029] The memory is configured to store program code and transmit the program code to the processor.

[0030] The processor is configured to execute the above-mentioned fine-grained management re-storage multi-recording method according to instructions in the program code.

[0031] The fine-grained management re-storage multi-recording system, method and data reading method, the fine-grained management re-storage multi-recording system comprises a disk management setting module, a file reading and writing module connected with the disk management setting module, and a file generation management module connected with the file reading and writing module; the disk management setting module is used for performing region setting on a disk according to a single reading and writing data volume of the disk to obtain a disk region layout; the disk region layout comprises a disk information area, a file list area, an index area and a data storage area, one sector of the index area comprises n index nodes, and one sector of the data storage area comprises n data clusters sequentially corresponding to the n index nodes; the file generation management module is used for obtaining a to-be-stored file and a file granularity value, and generating k stored small files with the file granularity value from the to-be-stored file; the file reading and writing module is used for generating a file list comprising k pieces of file information according to the k stored small files; matching one or more data clusters according to a start cluster and an end cluster of each piece of file information, and storing the stored small file corresponding to the file information into the matched one or more data clusters; wherein the file reading and writing module is further used for generating index node information according to the data stored in each data cluster, and storing the index node information into the corresponding index node; k and n are natural numbers not equal to 0, and k is not greater than n.

[0032] From the above technical solutions, it can be seen that the present application has the following advantages: the fine-grained management re-storage multi-recording system cooperates with the disk management setting module, the file reading and writing module and the file generation management module to form a multi-channel data storage with efficient reading and writing data and reduced data loss risk, thereby solving the technical problems of low efficiency and easy data loss in the reading and writing recording data mode of the existing recording system. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0034] Figure 1 A framework flowchart of the fine-grained management re-storage multi-channel recording system described in the embodiments of the present application;

[0035] Figure 2 A schematic diagram of the disk area layout in the fine-grained management re-storage multi-channel recording system described in the embodiments of the present application;

[0036] Figure 3 A step flowchart of the data reading method of the fine-grained management re-storage multi-channel recording system described in the embodiments of the present application;

[0037] Figure 4 A step flowchart of the fine-grained management re-storage multi-channel recording method described in the embodiments of the present application;

[0038] Figure 5 A schematic diagram of the terminal device described in the embodiments of the present application. DETAILED DESCRIPTION

[0039] In order to make the purposes, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the accompanying drawings. Obviously, the embodiments described below only constitute some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.

[0040] In the description of the embodiments of the present application, the terms "first" and "second" are only used for description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features with "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.

[0041] In the embodiments of the present application, unless specifically defined and limited otherwise, the terms "mount", "connect", "connect", "fix", and the like should be understood in a broad sense, for example, can be fixed connection, can also be detachable connection, or integrated; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0042] Patent terms:

[0043] Fine-grained management: Compared with traditional video files to be stored, the recording system generates smaller recording units per volume, and the recording system will fine-grained management of recording data.

[0044] Re-storage: Focus on improving the efficiency of storing files to be stored, rather than storing and managing various types and sizes of files.

[0045] Multi-recording system: A software system that simultaneously reads and writes multiple video recordings.

[0046] Digital video device: Refers to devices used for video recording and monitoring, including hard disk recorders (DVR) and digital video cameras.‌

[0047] The embodiments of the present application provide a fine-grained management re-storage multi-recording system, method and data reading method, which solves the technical problems of low efficiency and easy data loss in the read-write recording data mode of the existing recording system. In the embodiments, the fine-grained management re-storage multi-recording system, method and data reading method take the recording file of audio and video data as an example for illustration.

[0048] Embodiment one:

[0049] Figure 1 The framework flowchart of the fine-grained management re-storage multi-recording system described in the embodiments of the present application, Figure 2 The schematic diagram of the disk area layout in the fine-grained management re-storage multi-recording system described in the embodiments of the present application.

[0050] As Figure 1 shown, the present application provides a fine-grained management re-storage multi-recording system, which includes a disk management setting module 10, a file reading and writing module 20 connected with the disk management setting module 10, and a file generation management module 30 connected with the file reading and writing module 20.

[0051] As Figure 1 and Figure 2As shown, in the embodiment of the present application, the disk management setting module 10 is configured to set the disk region according to the disk single read-write data volume, to obtain a disk region layout; the disk region layout includes a disk information area 11, a file list area 12, an index area 13, and a data storage area 14, one sector of the index area 13 includes n index nodes, and one sector of the data storage area 14 includes n data clusters sequentially corresponding to the n index nodes.

[0052] It should be noted that the disk single read-write data volume can be set according to requirements, which is not limited herein. The disk information area 11, the file list area 12, the index area 13, and the data storage area 14 each include a plurality of clusters, each cluster includes a plurality of sectors sector, and one sector sector includes a plurality of bytes. For example, one cluster includes 512 sectors sector, and one sector sector includes 512 bytes. In the embodiment, in order to improve the disk utilization rate in various types of file storage scenarios, the conventional file system generally divides the disk into small clusters, and the layout of the directory area and the data area of the disk does not consider the storage demand of large file data volume, which is prone to performance bottleneck in the multi-channel high-definition video recording scenario. However, the multi-channel recording system with the fine-grained storage of the present application sets the cluster size to a larger sector number through the disk management setting module 10, divides the disk to be stored into the disk information area, the file list area, the index area, and the data storage area, so that the disk cluster single input-output IO can read and write more data, the frequency of input-output IO is reduced, and the read-write efficiency of the disk is improved.

[0053] In the embodiment of the present application, the disk information area 11 is configured to record disk region setting information; and / or, the file list area 12 is configured to store a file list, one sector of the file list area 12 includes k information entries, and each information entry is configured to record one piece of file information; and / or, each index node is configured to store one piece of index node information; and / or, each data cluster is configured to store data of a small file.

[0054] It should be noted that the disk information area 11 is used to record disk area setting information, and the disk area setting information includes the number of clusters of the file list area 12, the index area 13 and the data storage area 14, the number of sectors in each cluster, etc. The file list area 12 is a storage area of a file list, one entry of the file list records file information of a storage small file, and the file information includes a start cluster, an end cluster, video recording duration information, I-frame recording, creation time, modification time, data size and read-write permission, etc. The fine-grained management re-storage multi-channel video recording system can help quickly index the start position of the storage small file and jump to the time point of the specified end position through the file information of the file list area 12. The index area 13 is an index area for storing data. The data storage area 14 is a data storage, and a data cluster stores specific storage data. One index node and one data cluster are in a one-to-one sequential correspondence.

[0055] In the embodiment of the present application, the file generation management module 30 is configured to obtain a to-be-stored file and a file granularity value, and generate k storage small files of the to-be-stored file with the file granularity value.

[0056] It should be noted that the file generation management module 30 controls the to-be-stored file to generate storage small files of the file granularity value (the size of a single file volume, such as several MB). The fine-grained management re-storage multi-channel video recording system divides the to-be-stored file into storage small files of several MB through the file generation management module 20. The fine-grained storage small file enables the disk management setting module 10 of the fine-grained management re-storage multi-channel video recording system to adapt to efficient 1-level indexing. At the same time, even if a storage small file is damaged, only short video recording of the storage small file is lost, not long video recording of the entire large file (such as the to-be-stored file), which improves the robustness of the fine-grained management re-storage multi-channel video recording system. In the embodiment, the to-be-stored file can be a video recording file. In other embodiments, the to-be-stored file can also be other data files that need to be stored, such as documents, images, etc.

[0057] In the embodiment of the present application, the file read-write module 20 is configured to generate a file list composed of k file information according to the k storage small files; match one or more data clusters corresponding to each file information according to the start cluster and the end cluster of each file information, and then store the storage small file corresponding to the file information into the matched one or more data clusters. The file information includes a start cluster, an end cluster, video recording duration information, I-frame recording, creation time, modification time, data size and read-write permission; k and n are natural numbers greater than 0, and k is not greater than n.

[0058] It should be noted that the file reading and writing module 20 generates k file information according to the k storage small files with the file granularity value generated by the file generation management module 30, and forms a file list by the k file information. Then, the data cluster number stored in the storage small file is determined according to the start cluster and the end cluster of the file information, and the storage small file is stored in the matched one or more data clusters. In the embodiment, the file reading and writing module 20 also generates the file list, which is stored in the file list area 12 of the disk. The file list and the file information of the file reading and writing module 20 can enable the user to obtain the overview of each storage small file through the fine-grained management and re-stored multi-channel recording system. The user can directly locate the position of the storage small file through the start cluster and the end cluster of the file information through the fine-grained management and re-stored multi-channel recording system. The fine-grained management and re-stored multi-channel recording system can quickly locate the data storage position through the I-frame record of the file information, which provides convenience for reading the storage small file. For example, if the storage small file is recording data, the fine-grained management and re-stored multi-channel recording system can quickly extract the file of the required recording playback scene through the cooperation of the file reading and writing module 20 and the disk management setting module 10, so that the performance of the fine-grained management and re-stored multi-channel recording system is significantly improved.

[0059] In the embodiment of the present application, the file reading and writing module 30 is also used to generate index node information according to the data stored in each data cluster and store the index node information in the corresponding index node. The index node information includes the current data cluster number, the previous data cluster number and the next data cluster number.

[0060] It should be noted that the fine-grained management and re-stored multi-channel recording system can enable the user to quickly read the data stored in the disk management setting module 10 through the index node information. In the embodiment, the data cluster number can be the data cluster number.

[0061] In the embodiment of the present application, the fine-grained management and re-stored multi-channel recording system cooperates with the disk management setting module, the file reading and writing module and the file generation management module to form a multi-channel data storage with efficient data reading and writing and low data loss risk, which supports most storage products. In the embodiment, the fine-grained management and re-stored multi-channel recording system takes the characteristics of audio and video data storage and the shortcomings of conventional file systems as examples, improves the reading and writing and indexing of audio and video data by designing the disk management setting module, the file reading and writing module and the file generation management module, so that a larger block of data is read and written from the disk at a time, and the data index directly uses the first-level index. By expanding the amount of data read and written at a time and improving the data indexing efficiency, the mass data storage and reading and writing capability of the fine-grained management and re-stored multi-channel recording system is improved. The fine-grained management and re-stored multi-channel recording system enables the conventional disk to be used for storing multi-channel recording data, and reduces the threshold and cost of storage hardware of the multi-channel recording product.

[0062] It should be noted that, in order to make the storage file more stable and reliable, the fine-grained management re-storage multi-channel recording system sets a fine-grained management recording file mechanism (generates k storage small files with a file granularity value) through the file generation management module, the volume of a single storage small file is several MB, which is adapted to the first-level index, and the efficiency of data reading is improved. When an individual storage small file is abnormal, only the storage small file is lost temporarily, and the entire to-be-stored file is not lost for a long time, thereby reducing the loss rate of storage data.

[0063] The fine-grained management re-storage multi-channel recording system provided in the application includes a disk management setting module, a file reading and writing module connected with the disk management setting module, and a file generation management module connected with the file reading and writing module; the disk management setting module is used to perform regional setting on a disk according to a single reading and writing data volume of the disk, and obtain a disk region layout; the disk region layout includes a disk information area, a file list area, an index area, and a data storage area, one sector of the index area includes n index nodes, and one sector of the data storage area includes n data clusters sequentially corresponding to the n index nodes; the file generation management module is used to obtain a to-be-stored file, a file granularity value, and generate k storage small files with the file granularity value; the file reading and writing module is used to generate a file list composed of k file information according to the k storage small files; match one or more data clusters corresponding to each file information according to a start cluster and an end cluster of each file information, and then store the storage small file corresponding to the file information into the matched one or more data clusters; wherein the file reading and writing module is further used to generate index node information according to the data stored in each data cluster and store the index node information into the corresponding index node; k and n are natural numbers greater than 0, and k is not greater than n. The fine-grained management re-storage multi-channel recording system cooperates with the disk management setting module, the file reading and writing module, and the file generation management module to form a multi-channel data storage with efficient data reading and writing and reduced data loss risk; and the technical problems of low efficiency and easy data loss in the reading and writing recording data mode of the existing recording system are solved.

[0064] In an embodiment of the application, the disk management setting module 10 is further used to detect the space of the disk in real time to obtain residual storage space data.

[0065] It should be noted that the fine-grained management re-storage multi-channel recording system detects the space of the disk in real time through the disk management setting module 10, provides the information of the disk for the user, and facilitates the management of the disk by the user.

[0066] Embodiment two:

[0067] Figure 3A flow chart of steps of a data reading method of a fine-grained management re-storage multi-path video recording system.

[0068] As shown in Figure 3 The data reading method of the fine-grained management re-storage multi-path video recording system is applied to the fine-grained management re-storage multi-path video recording system, and includes the following steps:

[0069] S1. Obtain file information of data to be read, the file information including a starting data cluster number and an ending data cluster number.

[0070] It should be noted that the content of the fine-grained management re-storage multi-path video recording system has been described in Embodiment One, and will not be repeated in this embodiment. In step S1, the file information of the data to be read is obtained to provide a basis for data reading in subsequent steps.

[0071] S2. According to the file information, a matching search algorithm is used to match on the fine-grained management re-storage multi-path video recording system to obtain each index node information corresponding to the file information.

[0072] It should be noted that in step S2, a matching search algorithm is used according to the file information in step S1 on the fine-grained management re-storage multi-path video recording system to obtain the location of the stored data of the data to be read. The location can be theoretically composed of a data cluster number or multiple data cluster numbers, and each data cluster corresponds to index node information. The index node information includes the previous data cluster number and the next data cluster number, which facilitates obtaining the previous and next data of the current data cluster.

[0073] S3. According to the previous data cluster number and the next data cluster number of all index node information, the data storage area of the fine-grained management re-storage multi-path video recording system is traversed to extract data, and the file data corresponding to the file information is read.

[0074] It should be noted that in step S3, the data cluster of the stored location of the data to be read is determined according to step S2, and the data is directly read from the matched data cluster to obtain the file data corresponding to the file information.

[0075] In the embodiments of the present application, because the conventional file system considers the index efficiency of various files and the maximum volume limit of a single file, a three-level progressive index method is generally used to index data in the disk. The third-level index needs to consume more instructions than the first and second-level indexes. The storage file is generally large, so most data read and write of the storage file use the third-level index, which results in low data index efficiency and limits the data read and write performance. The data read method of the fine-grained management re-storage multi-channel video recording system reads data through the data cluster organization method of the fine-grained management re-storage multi-channel video recording system, designs the data structure of the index node and the matching search algorithm of the index node to the data cluster. One index node and one data cluster of the fine-grained management re-storage multi-channel video recording system are sequentially corresponding, the data cluster is one-level index from the index positioning, and the efficiency of data read is improved. The last data cluster cluster number and the next data cluster cluster number are recorded through the index node information, which provides support for the search and traversal functions of data read.

[0076] In the embodiments of the present application, according to the requirements of the one-level index, the data read method of the fine-grained management re-storage multi-channel video recording system designs the matching search algorithm of the index node to the data cluster, and the content of the matching search algorithm includes:

[0077] According to the start data cluster number and the end data cluster number of the file information, the data cluster data of the fine-grained management re-storage multi-channel video recording system is matched in the data storage area, and the file data cluster data is obtained.

[0078] According to the data cluster cluster numbers of the file data cluster data, the index area of the fine-grained management re-storage multi-channel video recording system is matched, and the corresponding index node information is obtained.

[0079] It needs to be explained that the data sector can be directly matched by the index node number: read (disk number disk_num, data storage sector start sector + index node directory_item_number * 512); Note: one index node corresponds to one data cluster, and one data cluster contains 512 sectors. It only needs three instructions to determine the matching from the data cluster to the index node through the matching search algorithm, the first instruction is to match the index sector confirmation, the second instruction is to match one or more index node information, and the third instruction is to determine the matching data cluster data. In the embodiment, the content of matching the index node through the data cluster cluster number includes: finding the sector where the matched index node is located: sector = zone start position directory_start + current data cluster cluster number current_clus / 16; Note: one sector sector stores 16 index nodes. Read the sector content where the index node is located: data = read (disk number disk_num, sector). Obtain the index node matched by the data cluster: dir_item = (DIR_ITEM_STRUCT) data + current data cluster cluster number current_clus / 16.

[0080] In the embodiment of the application, the matching search algorithm can be illustrated by the following example, because the starting data cluster cluster number first_cluster is recorded in the file information of the file list, and one index node and one data cluster are one-to-one sequentially corresponding. In other words, the serial number of a certain index node and its corresponding data cluster cluster number are the same. The starting index node first_directory_item can be found through the starting data cluster cluster number first_cluster. The index node information records the current data cluster cluster number first_cluster, the next data cluster cluster number next_cluster, and the previous data cluster cluster number previous_cluster, etc. The second data cluster is found by using the starting index node first_directory_item; the second index node is found by using the data cluster cluster number, and then the third data cluster is found; and such a cycle can match to find all data clusters of file information in all disks, and obtain the matching data cluster data.

[0081] Embodiment three:

[0082] Figure 4 The step flow chart of the fine-grained management re-storage multi-channel recording method described in the embodiment of the application.

[0083] As Figure 4 shown, the embodiment of the application provides a fine-grained management re-storage multi-channel recording method, including the following steps:

[0084] S100. obtaining a disk to be stored data and a disk single read-write data volume, setting a region for the disk according to the disk single read-write data volume, and obtaining a disk region layout; the disk region layout includes a disk information area, a file list area, an index area, and a data storage area, one sector of the index area includes n index nodes, and one sector of the data storage area includes n data clusters sequentially corresponding to the n index nodes;

[0085] S200. obtaining a file to be stored and a file granularity value, and generating k storage small files with the file granularity value for the file to be stored;

[0086] S300. generating a file list composed of k file information according to the k storage small files; matching one or more data clusters according to the start cluster and the end cluster of each file information, and then storing the storage small file corresponding to the file information into the matched one or more data clusters;

[0087] S400. generating index node information according to the data stored in each data cluster, and storing the index node information into the corresponding index node; k and n are natural numbers not equal to 0, and k is not greater than n.

[0088] It should be noted that the step content of the fine-grained management and re-storage multi-channel recording method corresponds to the content of the modules in the system of embodiment one, and the modules of the fine-grained management and re-storage multi-channel recording system have been described in detail in embodiment one. Therefore, the step content of the fine-grained management and re-storage multi-channel recording method will not be repeated in this embodiment.

[0089] In the embodiments of the present application, the disk information area is used to record disk region setting information; and / or, the file list area is used to store a file list, one sector of the file list area includes k information entries, and each information entry is used to record a file information; and / or, each index node is used to store an index node information; and / or, each data cluster is used to store data of a storage small file; and / or, the index node information includes a current data cluster cluster number, a previous data cluster cluster number, and a next data cluster cluster number.

[0090] Embodiment four:

[0091] Figure 5 A schematic diagram of a terminal device according to an embodiment of the present application.

[0092] As shown in Figure 5 , the present application provides a terminal device, which includes a processor and a memory;

[0093] The memory is used to store program code and transmit the program code to the processor;

[0094] The processor is configured to execute the above-mentioned fine-grained management method for re-storing multi-recording according to the instructions in the program code.

[0095] It should be noted that the processor is configured to execute the above-mentioned fine-grained management method for re-storing multi-recording according to the instructions in the program code. Alternatively, the processor executes the computer program to realize the functions of each module / unit in the above-mentioned system / device embodiments.

[0096] For example, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory and executed by the processor to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which is used to describe the execution process of the computer program in the terminal device.

[0097] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The terminal device can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that it does not constitute a limitation on the terminal device, and can include more or fewer components than the illustration, or combine certain components, or different components, for example, the terminal device can also include an input / output device, a network access device, a bus, and the like.

[0098] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0099] The memory can be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory can also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, and the like. Further, the memory can include both the internal storage unit and the external storage device of the terminal device. The memory is used to store the computer program and other programs and data required by the terminal device. The memory can also be used to temporarily store data that has been output or will be output.

[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0101] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0102] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0103] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can be physically present separately, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0104] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0105] The above embodiments are merely used to illustrate the technical solutions of the present application, rather than limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A fine-grained managed re-storage multi-recording system, characterized by, The application relates to a disk management setting module, a file reading and writing module connected with the disk management setting module, and a file generation management module connected with the file reading and writing module. The disk management setting module is used for region setting of the disk according to a single-time reading and writing data volume of the disk, so as to obtain a disk region layout; the disk region layout comprises a disk information area, a file list area, an index area and a data storage area; one sector of the index area comprises n index nodes; and one sector of the data storage area comprises n data clusters sequentially corresponding to the n index nodes. The file generation management module is used for obtaining a to-be-stored file and a file granularity value, and generating k storage small files with the file granularity value. The file reading and writing module is used for generating a file list comprising k file information according to the k storage small files; matching one or more data clusters according to a starting cluster and an ending cluster of each file information; and storing the storage small files corresponding to the file information into the matched one or more data clusters. The file reading and writing module is further used for generating index node information according to the data stored in each data cluster, and storing the index node information into the corresponding index node. K and n are natural numbers greater than 0, k is not greater than n; and the file granularity value is the size of a single file volume. The disk information area is used for recording the disk region setting information; the file list area is used for storing the file list; one sector of the file list area comprises k information entries; each information entry is used for recording one file information; each index node is used for storing one index node information; and each data cluster is used for storing the data of the storage small file.

2. The fine-grained managed re-storage video recording system of claim 1, wherein, The file information comprises a starting cluster, an ending cluster, video recording time length information, I frame recording, creation time, modification time, data size and reading and writing permission.

3. The fine-grained managed re-storage video recording system of claim 1, wherein, The index node information comprises a current data cluster cluster number, a previous data cluster cluster number and a next data cluster cluster number.

4. The fine-grained managed re-storage video recording system of claim 1, wherein, The disk management setting module is further used for detecting the space of the disk in real time, so as to obtain residual storage space data.

5. The fine-grained managed re-storage video recording system of claim 1, wherein, The data reading method comprises the following steps:

6. A data reading method of a fine-grained managed re-storage multi-recording system, applied to the fine-grained managed re-storage multi-recording system as claimed in any one of claims 1-5, characterized in that, Obtaining file information of to-be-read data, wherein the file information comprises a starting data cluster number and an ending data cluster number; According to the file information, a matching search algorithm is used to match on the fine-grained management re-storage multi-channel video recording system, so as to obtain each index node information corresponding to the file information; According to the previous data cluster cluster number and the next data cluster cluster number of all the index node information, the data storage area of the fine-grained management re-storage multi-channel video recording system is traversed to extract data, so as to read the file data corresponding to the file information. The content of the matching search algorithm comprises:

7. The data reading method of the fine-grained managed re-storage video recording system according to claim 6, wherein, According to the starting data cluster number and the ending data cluster number of the file information, the data storage area of the fine-grained management re-storage multi-channel video recording system is matched, so as to obtain file cluster data. ​ According to the matching of each data cluster number of the file data cluster data in the index area of the fine-grained management re-storage multi-path recording system, corresponding index node information is obtained.

8. A method for fine-grained managed re-storage multi-recording, characterized by, The method comprises the following steps: Obtaining a disk to be stored and a single read-write data volume of the disk, setting a region of the disk according to the single read-write data volume of the disk, and obtaining a disk region layout; the disk region layout comprises a disk information area, a file list area, an index area, and a data storage area, one sector of the index area comprises n index nodes, and one sector of the data storage area comprises n data clusters sequentially corresponding to the n index nodes; Obtaining a file to be stored and a file granularity value, and generating k storage small files with the file granularity value; According to the k storage small files, a file list comprising k file information is generated; according to the start cluster and the end cluster of each file information, one or more data clusters corresponding to the file information are matched, and the storage small file corresponding to the file information is stored in the matched one or more data clusters; According to the data stored in each data cluster, index node information is generated and stored in the corresponding index node; k and n are natural numbers other than 0, k is not greater than n, and the file granularity value is the size of the volume of a single file.

9. The method of claim 8, wherein the fine-grained managed re-recording method is characterized by, The disk information area is used for recording the disk region setting information; the file list area is used for storing the file list, one sector of the file list area comprises k information entries, each information entry is used for recording one file information; each index node is used for storing one index node information; each data cluster is used for storing the data of the storage small file; and the index node information comprises a current data cluster number, a previous data cluster number, and a next data cluster number.

10. A terminal device, comprising: The device comprises a processor and a memory. The memory is used for storing program code and transmitting the program code to the processor. The processor is used for executing the fine-grained management re-storage multi-path recording method according to the instructions in the program code.

Citation Information

Patent Citations

  • High-definition video-circulating memory IP camera

    CN101827209A

  • Data reading and writing method and device

    CN106708443A