Restorage multi-channel video recording system and method for fine-grained management and data reading method

Through a fine-grained restoration multi-channel video recording system, the disk management setup module, file read and write module and file generation management module cooperate with each other, solving the problems of low reading and writing efficiency and easy data loss in the existing video recording system, and achieving efficient reading and writing and data robustness.

CN119645309AActive Publication Date: 2025-03-18E SURFING VISION TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing video recording systems are inefficient when reading and writing video data and are prone to data loss. Especially in high-definition video and multi-camera scenarios, the disk is prone to reach a bottleneck in read and write performance, and short-term abnormalities may lead to long-term video loss.

Method used

It provides a fine-grained restoration multi-channel video recording system, which cooperates with the disk management setting module, file reading and writing module and file generation management module to achieve efficient reading and writing data and reduce the risk of data loss. Specific measures include setting the locale based on the disk's single read and write data, generating fine-grained storage small files, and storing and retrieving data through inode information.

Benefits of technology

It improves the data reading and writing efficiency of the video recording system, reduces the risk of data loss, and can meet the needs of large-scale data storage in high-definition video and multi-camera scenarios, avoiding disk read and write performance bottlenecks and video loss problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645309A_ABST
    Figure CN119645309A_ABST
Patent Text Reader

Abstract

The invention relates to a re-storage multi-channel video recording system and method based on fine-grained management and a data reading method. The system comprises a disk management setting module used for carrying out region setting on a disk according to the single read-write data volume of the disk to obtain a disk region layout; the file generation management module is used for acquiring a to-be-stored file and a file granularity value and generating the to-be-stored file into k small storage files with the size of the file granularity value; the file read-write module is used for generating a file list according to the k small storage files; matching one or more data clusters according to each piece of file information, and storing the small storage files corresponding to the file information into the matched one or more data clusters; generating index node information according to the data stored in each data cluster, and storing the index node information to the corresponding index node. According to the system, through mutual cooperation of the disk management setting module, the file read-write module and the file generation management module, efficient data read-write is formed, and multi-channel data storage of the data loss risk is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Traditional video recording systems use conventional file systems and large-volume files (100M~4GB) to store videos. As a result, there are two problems with traditional video recording systems: one problem is that the conventional file system used generally performs poorly in the read and write performance of large amounts of data in order to take into account the read and write efficiency of various types and sizes of files and reduce disk resource waste. In recent years, in particular, the clarity of camera videos has become higher and higher, and more and more cameras have been connected to a single video recording system, resulting in an increasing scale of data read and write in the video recording system; if the data read and write method of the video recording system is not improved, the disk will easily reach the bottleneck of read and write performance and cannot meet product requirements. Another problem is that if a short-term abnormality occurs in the recording system during the recording process, causing the large volume of files to be stored to be damaged, it may cause long-term video loss, and inevitably cause robustness issues in video storage.

[0003] The data of existing video recording systems are mostly audio and video data, and the data type is relatively simple, but the data volume is large, and the data storage has obvious characteristics. In order to meet the requirements of large-scale audio and video data storage, it is necessary to deeply improve the video storage capacity of the video recording system in terms of read and write speed and video storage robustness based on the characteristics of audio and video data storage. Summary of the invention

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

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] On the one hand, a fine-grained management re-storage multi-channel video recording system is provided, comprising: a disk management setting module, a file reading and writing module connected to the disk management setting module, and a file generation management module connected to the file reading and writing module;

[0007] The disk management setting module is used to set the disk area according to the single read and write data volume of the disk to obtain the disk area layout; the disk area 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 corresponding to the n index nodes one by one in sequence;

[0008] The file generation management module is used to obtain the file to be stored and the file granularity value and generate k small storage files with the size of the file granularity value from the file to be stored;

[0009] The file reading and writing module is used to generate a file list consisting of k corresponding file information according to the k stored small files; match the corresponding one or more data clusters according to the starting cluster and the ending cluster of each file information, and then store the stored small files corresponding to the file information into the matching one or more data clusters;

[0010] 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 in the corresponding index node; k and n are natural numbers not equal to 0, and k is not greater than n.

[0011] Preferably, the disk information area is used to record the disk area setting information; and / or, the file list area is used to store the file list, a sector of the file list area includes k information entries, each of the information entries is used to record one piece of the file information; and / or, each of the index nodes is used to store one piece of the index node information; and / or, each of the data clusters is used to store the data of the stored small files.

[0012] Preferably, the file information includes a start cluster, an end cluster, video recording duration information, I frame records, creation time, modification time, data size and read / write permissions.

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

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

[0015] In another aspect, a method for reading data 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 described above, and the method for reading data comprises the following steps:

[0016] Obtaining file information of the data to be read, the file information including a starting data cluster number and an ending data cluster number;

[0017] According to the file information, a matching search algorithm is used to perform matching on the fine-grained management heavy storage multi-channel video recording system 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 index node information, the data storage area of ​​the fine-grained management heavy storage multi-channel 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 includes:

[0020] According to the starting data cluster number and the ending data cluster number of the file information, matching is performed in the data storage area of ​​the fine-grained management heavy storage multi-channel video recording system to obtain file data cluster data;

[0021] According to the cluster numbers of the data clusters of the file data clusters, matching is performed in the index area of ​​the fine-grained management heavy storage multi-channel video recording system to obtain corresponding index node information.

[0022] In another aspect, a method for re-storing multi-channel video recordings with fine-grained management is provided, comprising the following steps:

[0023] Obtaining a disk for storing data and a single read / write data volume of the disk, performing area setting on the disk according to the single read / write data volume of the disk, and obtaining a disk area layout; the disk area 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 corresponding to the n index nodes in sequence one by one;

[0024] Obtaining a file to be stored and a file granularity value, and generating k small storage files with the size of the file granularity value from the file to be stored;

[0025] Generate a file list consisting of k corresponding file information according to the k stored small files; match one or more corresponding data clusters according to the starting cluster and the ending cluster of each file information, and then store the stored small files corresponding to the file information into the matching one or more data clusters;

[0026] Generate index node information according to the data stored in each data cluster and store the index node information in the corresponding index node; k and n are natural numbers not equal to 0, and k is not greater than n.

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

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

[0029] The memory is used to store program codes and transmit the program codes to the processor;

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

[0031] The fine-grained management re-storage multi-channel video recording system, method and data reading method, the fine-grained management re-storage multi-channel video recording system comprises a disk management setting module, a file read-write module connected to the disk management setting module and a file generation management module connected to the file read-write module; the disk management setting module is used to set the disk area according to the single read and write data volume of the disk to obtain the disk area layout; the disk area layout includes a disk information area, a file list area, an index area and a data storage area, a sector of the index area includes n index nodes, a sector of the data storage area includes n data clusters corresponding to the n index nodes one by one in sequence; the file A generation management module is used to obtain the files to be stored and the file granularity value and to generate k small storage files with the file granularity value size from the files to be stored; a file read-write module is used to generate a file list consisting of corresponding k file information based on the k small storage files; one or more corresponding data clusters are matched according to the starting cluster and the ending cluster of each file information, and then the small storage files corresponding to the file information are stored in the matching one or more data clusters; wherein the file read-write module 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; k and n are natural numbers not equal to 0, and k is not greater than n.

[0032] It can be seen from the above technical scheme that the present application has the following advantages: the fine-grained management heavy storage multi-channel video 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 of data and reduced risk of data loss, thereby solving the technical problems of low efficiency and easy data loss in the reading and writing of video recording data in the existing video recording system. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0034] Figure 1 This is a framework flow chart of the fine-grained management and re-storage multi-channel video recording system described in an embodiment of the present application;

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

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

[0037] Figure 4 A flowchart of the steps of the method for re-storing multiple video recordings with fine-grained management described in an embodiment of the present application;

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

[0039] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] In the description of the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may 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 clearly and specifically defined.

[0041] In the embodiments of the present application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings 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 storage files, the video units generated by the video recording system are smaller in size, and the video recording system will manage the video data in a detailed manner.

[0044] Storage-focused: Focus on improving the efficiency of file storage, rather than being compatible with the storage and management of files of various types and sizes.

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

[0046] Digital video equipment: refers to equipment used for video recording and monitoring, including hard disk video recorders (DVRs) and digital cameras.

[0047] The embodiment of the present application provides a fine-grained management re-storage multi-channel video recording system, method and data reading method, which solves the technical problems of low efficiency and easy data loss in the reading and writing of video data in the existing video recording system. In this embodiment, the fine-grained management re-storage multi-channel video recording system, method and data reading method are described using the video file of audio and video data as an example.

[0048] Embodiment 1:

[0049] Figure 1 This is a framework flow chart of the fine-grained management and re-storage multi-channel video recording system described in an embodiment of the present application. Figure 2 This is a schematic diagram of the disk area layout in the fine-grained management heavy storage multi-channel video recording system described in an embodiment of the present application.

[0050] like Figure 1 As shown, an embodiment of the present application provides a fine-grained management heavy storage multi-channel video recording system, including a disk management setting module 10, a file read and write module 20 connected to the disk management setting module 10, and a file generation management module 30 connected to the file read and write module 20.

[0051] like Figure 1 and Figure 2As shown, in an embodiment of the present application, the disk management setting module 10 is used to set the disk area according to the amount of data read and written at a single time on the disk to obtain a disk area layout; the disk area layout includes a disk information area 11, a file list area 12, an index area 13 and a data storage area 14, a sector of the index area 13 includes n index nodes, and a sector of the data storage area 14 includes n data clusters corresponding to the n index nodes in sequence.

[0052] It should be noted that the amount of data read and written by the disk at a time can be set according to demand and is not specifically limited here. The disk information area 11, the file list area 12, the index area 13 and the data storage area 14 all contain multiple clusters, each cluster contains multiple sectors, and a sector sector contains several bytes. For example, a cluster includes 512 sectors, and a sector sector contains 512 bytes. In this 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, data area, etc. of the disk does not focus on the storage requirements of large file data volumes, which is prone to performance bottlenecks in multi-channel high-definition video recording scenarios. However, the fine-grained management heavy storage multi-channel video recording system sets the cluster size to a larger number of sectors through the disk management setting module 10, and divides the disk to be stored into four partitions: the disk information area, the file list area, the index area and the data storage area, so that the disk cluster can read and write more data in a single input and output IO, and the frequency of input and output IO is reduced, thereby improving the read and write efficiency of the disk.

[0053] In an embodiment of the present application, the disk information area 11 is used to record disk area setting information; and / or, the file list area 12 is used to store a file list, a sector of the file list area 12 includes k information entries, each information entry is used to record a piece of 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 small files.

[0054] It should be noted that the disk information area 11 is used to record the disk area setting information, and the disk area setting information includes the number of clusters in 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 the storage area for the file list. An entry in the file list records the file information of a small file. The file information includes the starting cluster, the ending cluster, the recording duration information, the I frame record, the creation time, the modification time, the data size and the read-write permissions, etc. The fine-grained management heavy storage multi-channel recording system can help quickly index the starting position of the small file storage and jump to the specified end position time point through the file information in the file list area 12. The index area 13 is the index area for storing data. The data storage area 14 is a data storage device, and the data cluster stores specific storage data. There is a one-to-one sequential correspondence between an index node and a data cluster.

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

[0056] It should be noted that the file generation management module 30 controls the file to be stored to generate a small storage file with a file granularity value (the size of a single file volume, such as several MB). The fine-grained management heavy storage multi-channel video recording system divides the file to be stored into small storage files of several MB level through the file generation management module 20. This fine-grained storage small file enables the disk management setting module 10 of the fine-grained management heavy storage multi-channel video recording system to adapt to efficient level 1 indexing; at the same time, even if a small storage file is damaged, only the short-term video recording of the small storage file is lost, not the long-term video recording of the entire large file (such as the file to be stored), which improves the robustness of the storage of the fine-grained management heavy storage multi-channel video recording system. In this embodiment, the file to be stored can be selected as a video file. In other embodiments, the file to be stored 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 reading and writing module 20 is used to generate a file list consisting of k corresponding file information according to k stored small files; match one or more corresponding data clusters according to the starting cluster and ending cluster of each file information, and then store the stored small files corresponding to the file information into the matching one or more data clusters. Among them, the file information includes the starting cluster, the ending cluster, the recording duration information, the I frame record, the creation time, the modification time, the data size and the read and write permissions; k and n are natural numbers not equal to 0, and k is not greater than n.

[0058] It should be noted that the file read / write module 20 generates k file information based on the k small files stored with the file granularity value size generated by the file generation management module 30, and the k file information constitutes a file list. Afterwards, the data cluster number of the small file is determined based on the starting cluster and the ending cluster of the file information, and the small file is stored in one or more matching data clusters. In this embodiment, the file list also generated by the file read / write module 20 is stored in the file list area 12 of the disk. The fine-grained management heavy storage multi-channel video recording system allows users to obtain an overview of each small file through the file list and file information of the file read / write module 20. Through the starting cluster and the ending cluster of the file information, the user can directly locate the location of the small file through the fine-grained management heavy storage multi-channel video recording system. The I-frame record of file information allows the fine-grained management heavy storage multi-channel video recording system to quickly locate the data storage location, which facilitates the reading of small stored files. For example, if the stored small file is video data, the file reading and writing module 20 and the disk management setting module 10 can cooperate with each other to quickly extract the file that needs to be recorded and played back, thereby significantly improving the performance of the fine-grained management heavy storage multi-channel video recording system.

[0059] In an embodiment of the present application, the file read / write module 30 is further 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, wherein the index node information includes the cluster number of the current data cluster, the cluster number of the previous data cluster and the cluster number of the next data cluster.

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

[0061] In the embodiment of the present application, the fine-grained management re-storage multi-channel video recording system forms a multi-channel data storage that efficiently reads and writes data and reduces the risk of data loss through the cooperation of the disk management setting module, the file read and write module and the file generation management module, and supports most storage products. In this embodiment, the fine-grained management re-storage multi-channel video recording system uses the characteristics of audio and video data storage and the shortcomings of conventional file systems as case examples. By designing the disk management setting module, the file read and write module and the file generation management module, the reading, writing and indexing methods of audio and video data are improved, so that larger block data can be read and written from the disk at a time, and the data index directly uses the first-level index. By expanding the single data read and write volume and improving the data indexing efficiency, the large-scale data storage and reading and writing capabilities of the fine-grained management re-storage multi-channel video recording system are improved. The fine-grained management re-storage multi-channel video recording system allows conventional disks to be used for the storage of multi-channel video data, reducing the threshold and cost of storage hardware for multi-channel video recording products.

[0062] It should be noted that in order to make the storage files more stable and reliable, the fine-grained management multi-channel video recording system uses a fine-grained management video recording file mechanism (generating k small storage files with the file granularity value from the file to be stored) set by the file generation management module. The size of a single small storage file is several MB, and it is adapted to the level 1 index to improve the efficiency of data reading. The fine-grained management multi-channel video recording system also has the feature that when an abnormality occurs in an individual small storage file, only the small storage file is lost for a short time, and the entire file to be stored will not be lost for a long time, thereby reducing the loss rate of stored data.

[0063] The present application provides a fine-grained management heavy storage multi-channel video recording system, including a disk management setting module, a file read-write module connected to the disk management setting module, and a file generation management module connected to the file read-write module; the disk management setting module is used to set the disk area according to the single read and write data volume of the disk to obtain the disk area layout; the disk area layout includes a disk information area, a file list area, an index area and a data storage area, a sector of the index area includes n index nodes, and a sector of the data storage area includes n data clusters corresponding to the n index nodes one by one in sequence; the file generation management module is used to Obtain the file to be stored and the file granularity value and generate k small storage files with the file granularity value size from the file to be stored; the file reading and writing module is used to generate a file list consisting of corresponding k file information according to the k small storage files; match one or more corresponding data clusters according to the starting cluster and the ending cluster of each file information, and then store the small storage files corresponding to the file information in the matching one or more data clusters; wherein the file reading and writing module 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; k and n are natural numbers not equal to 0, and k is not greater than n. The fine-grained management heavy storage multi-channel video recording system forms a multi-channel data storage with efficient reading and writing of data and reduced data loss risk through the cooperation of the disk management setting module, the file reading and writing module and the file generation management module; it solves the technical problems of low efficiency and easy data loss in the reading and writing of video data in the existing video recording system.

[0064] In one embodiment of the present application, the disk management setting module 10 is also used to detect the disk space in real time to obtain the remaining storage space data.

[0065] It should be noted that the fine-grained management heavy storage multi-channel video recording system detects the disk space in real time through the disk management setting module 10, and provides the user with disk information to facilitate the user's disk management.

[0066] Embodiment 2:

[0067] Figure 3This is a flowchart of the steps of the data reading method of the fine-grained management and re-storage multi-channel video recording system described in an embodiment of the present application.

[0068] like Figure 3 As shown, the embodiment of the present application provides a data reading method for a fine-grained management re-storage multi-channel video recording system, which is applied to the above-mentioned fine-grained management re-storage multi-channel video recording system. The data reading method includes the following steps:

[0069] S1. Obtain file information of the data to be read, the file information including the start data cluster number and the end data cluster number.

[0070] It should be noted that the content of the fine-grained management re-storage multi-channel video recording system has been described in Example 1, and will not be repeated in this embodiment. In step S1, 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 the file information on the fine-grained management heavy storage multi-channel video recording system to obtain the index node information corresponding to the file information.

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

[0073] S3. According to the last data cluster number and the next data cluster number of all index node information, the data storage area of ​​the fine-grained management heavy storage multi-channel 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 where the to-be-read data is stored is determined according to step S2, and the data is directly read from the matching data cluster to obtain the file data corresponding to the file information.

[0075] In the embodiment of the present application, because the conventional file system takes into account the indexing efficiency of various files and the maximum volume limit of a single file, a three-level progressive indexing method is generally used to index data in the disk. Compared with the first and second level indexes, the third level index consumes more instructions for a single index. Storage files are generally large, so most of the data reading and writing of storage files must use the third level index, resulting in low data indexing efficiency and limiting the data reading and writing performance. The data reading 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 from the index node to the data cluster to read the data through the data cluster organization method of the fine-grained management re-storage multi-channel video recording system. An index node and a data cluster of the fine-grained management re-storage multi-channel video recording system correspond one to one in sequence, and the index positioning to the data cluster is a first-level index, which improves the efficiency of data reading. The cluster number of the previous data cluster and the cluster number of the next data cluster are recorded through the index node information, providing support for search and traversal functions for data reading.

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

[0077] According to the starting data cluster number and the ending data cluster number of the file information, the data storage area of ​​the heavy storage multi-channel video recording system of fine-grained management is matched to obtain the file data cluster data;

[0078] According to the cluster numbers of each data cluster of the file data cluster, matching is performed in the index area of ​​the fine-grained management heavy storage multi-channel video recording system to obtain corresponding index node information.

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

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

[0081] Embodiment three:

[0082] Figure 4 This is a flowchart of the steps of the fine-grained management method for restoring multi-channel recordings described in an embodiment of the present application.

[0083] like Figure 4 As shown, the embodiment of the present application provides a fine-grained management method for re-storing multi-channel recordings, including the following steps:

[0084] S100. Obtain the disk for storing data and the amount of data read and written at a time on the disk, and set the disk area according to the amount of data read and written at a time on the disk to obtain the disk area layout; the disk area layout includes a disk information area, a file list area, an index area, and a data storage area, a sector of the index area includes n index nodes, and a sector of the data storage area includes n data clusters corresponding to the n index nodes one by one in sequence;

[0085] S200. Obtain the file to be stored and the file granularity value and generate k small storage files of the file granularity value size from the file to be stored;

[0086] S300. Generate a file list consisting of k file information corresponding to k stored small files; match one or more corresponding data clusters according to the starting cluster and the ending cluster of each file information, and then store the stored small files corresponding to the file information into the matching one or more data clusters;

[0087] S400. Generate index node information according to the data stored in each data cluster and store the index node information in 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 contents of the fine-grained management method for re-storing multi-channel recordings correspond to the contents of the modules in the system of Example 1. Example 1 has already elaborated on the module contents of the fine-grained management system for re-storing multi-channel recordings, and this embodiment will not repeat the step contents of the fine-grained management method for re-storing multi-channel recordings.

[0089] In an embodiment of the present application, the disk information area is used to record disk area setting information; and / or, the file list area is used to store a file list, a sector of the file list area includes k information entries, each information entry is used to record a piece of 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 for storing small files; and / or, the index node information includes the cluster number of the current data cluster, the cluster number of the previous data cluster and the cluster number of the next data cluster.

[0090] Embodiment 4:

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

[0092] like Figure 5 As shown, an embodiment of the present application provides a terminal device, including a processor and a memory;

[0093] A memory, used for storing program codes and transmitting the program codes to a processor;

[0094] The processor is used to execute the above-mentioned fine-grained management and re-storage multi-channel video recording method according to the instructions in the program code.

[0095] It should be noted that the processor is used to execute the steps in the above-mentioned fine-grained management and multi-channel video re-storage method embodiment according to the instructions in the program code. Alternatively, the processor implements the functions of each module / unit in the above-mentioned system / device embodiment when executing the computer program.

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

[0097] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that this does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0098] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (dSIC), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0099] The memory may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. The memory may 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, etc. equipped on the terminal device. Furthermore, the memory may include both an internal storage unit of the terminal device and an external storage device. The memory is used to store computer programs and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.

[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0101] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0103] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

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

[0105] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A fine-grained management re-storage multi-channel video recording system, characterized in that: include: A disk management setting module, a file reading and writing module connected to the disk management setting module, and a file generation management module connected to the file reading and writing module; The disk management setting module is used to perform area setting on the disk according to the amount of data read and written at a time on the disk to obtain a disk area layout; the disk area 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 corresponding to the n index nodes in sequence; The file generation management module is used to obtain the file to be stored and the file granularity value and generate k small storage files with the size of the file granularity value from the file to be stored; The file reading and writing module is used to generate a file list consisting of k corresponding file information according to the k stored small files; match the corresponding one or more data clusters according to the starting cluster and the ending cluster of each file information, and then store the stored small files corresponding to the file information into the matching one or more data clusters; 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 in the corresponding index node; k and n are natural numbers that are not 0, and k is not greater than n.

2. The fine-grained management and re-storage multi-channel video recording system according to claim 1 is characterized in that: The disk information area is used to record the disk area setting information; and / or, the file list area is used to store the file list, a sector of the file list area includes k information entries, each of the information entries is used to record one piece of the file information; and / or, each of the index nodes is used to store one piece of the index node information; and / or, each of the data clusters is used to store the data of the stored small files.

3. The fine-grained management and re-storage multi-channel video recording system according to claim 1, characterized in that: The file information includes the start cluster, the end cluster, the video duration information, the I frame record, the creation time, the modification time, the data size and the read and write permissions.

4. The fine-grained management and re-storage multi-channel video recording system according to claim 1, characterized in that: The index node information includes the cluster number of the current data cluster, the cluster number of the previous data cluster and the cluster number of the next data cluster.

5. The fine-grained management and re-storage multi-channel video recording system according to claim 1, characterized in that: The disk management setting module is also used to detect the space of the disk in real time and obtain the remaining storage space data.

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

7. The data reading method of the fine-grained management and re-storage multi-channel video recording system according to claim 6 is characterized in that: The content of the matching search algorithm includes: According to the starting data cluster number and the ending data cluster number of the file information, matching is performed in the data storage area of ​​the fine-grained management heavy storage multi-channel video recording system to obtain file data cluster data; According to the cluster numbers of the data clusters of the file data clusters, matching is performed in the index area of ​​the fine-grained management heavy storage multi-channel video recording system to obtain corresponding index node information.

8. A fine-grained management method for restoring multi-channel video recordings, characterized in that: The following steps are involved: Obtaining a disk for storing data and a single read / write data volume of the disk, performing area setting on the disk according to the single read / write data volume of the disk, and obtaining a disk area layout; the disk area 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 corresponding to the n index nodes in sequence one by one; Obtaining a file to be stored and a file granularity value, and generating k small storage files with the size of the file granularity value from the file to be stored; Generate a file list consisting of k corresponding file information according to the k stored small files; match one or more corresponding data clusters according to the starting cluster and the ending cluster of each file information, and then store the stored small files corresponding to the file information into the matching one or more data clusters; Generate index node information according to the data stored in each data cluster and store the index node information in the corresponding index node; k and n are natural numbers that are not 0, and k is not greater than n.

9. The fine-grained management and re-storage method for multi-channel video recording according to claim 8, characterized in that: The disk information area is used to record the disk area setting information; and / or, the file list area is used to store the file list, a sector of the file list area includes k information entries, each of which is used to record one piece of file information; and / or, each index node is used to store one piece of index node information; and / or, each data cluster is used to store the data of the stored small files; and / or, the index node information includes the current data cluster number, the previous data cluster number and the next data cluster number.

10. A terminal device, characterized in that: including a processor and a memory; The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the fine-grained management and re-storage multi-channel video recording method as described in claim 8 or 9 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

  • Virtual disk processing method and device

    CN108073352A

  • Distributed storage method and device

    CN109799947A

  • Optimizing a File System for Different Types of Applications in a Compute Cluster Using Dynamic Block Size Granularity

    US20110258378A1