Image data processing method and device, electronic equipment and storage medium
By splitting image data into index information and data information, and storing them separately in random write and sequential write resources, the inefficiency problem in shingled magnetic recording hard disk data storage schemes is solved, achieving efficient data management and fast retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-24
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, data storage solutions for sequential write resources, such as shingled magnetic recording hard disks, are difficult to adapt to random write resources, resulting in low data read and write processing efficiency.
Image data is split into index information and data information, and stored in random write resources and sequential write resources respectively to form a pre-configuration file system. Unified management is achieved through the pre-organization and integration of random write resources and sequential write resources.
It improves data storage efficiency and retrieval speed, avoids insufficient space caused by allocating random write resources in shingled hard disks, and ensures fast retrieval of index information.
Smart Images

Figure CN115396620B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of cloud storage, and particularly relate to an image data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the continuous development of monitoring technology, in order to better realize big data storage, hard disk manufacturers have launched shingled magnetic recording hard disks and other sequential write resources, such as shingled magnetic recording hard disks, which accommodate more magnetic tracks and can improve the storage surface density to meet the demand for big data storage. However, the related art has few big data storage solutions for using shingled magnetic recording hard disks and other sequential write resources, and since previous storage solutions use random write resources, it is difficult to adapt to data read and write processing using shingled magnetic recording hard disks and other sequential write resources. SUMMARY
[0003] In embodiments of the present application, an image data processing method, device, electronic equipment and storage medium are provided to realize data storage of sequential write resources and random write resources organized in a file system.
[0004] In a first aspect, an image data processing method is provided in embodiments of the present application, applied to a cloud storage node, the cloud storage node being associated with a preconfigured file system, and the preconfigured file system being formed by pre-organizing and integrating random write resources and sequential write resources; the method comprises:
[0005] obtaining to-be-stored image data;
[0006] splitting the to-be-stored image data into to-be-stored index information and to-be-stored data information;
[0007] writing the to-be-stored index information into the random write resources of the preconfigured file system and writing the to-be-stored data information into the sequential write resources of the preconfigured file system.
[0008] In a second aspect, an image data processing device is also provided in embodiments of the present application, configured in a cloud storage node, the cloud storage node being associated with a preconfigured file system, and the preconfigured file system being formed by pre-organizing and integrating random write resources and sequential write resources; the device comprises:
[0009] a data acquisition module configured to obtain to-be-stored image data;
[0010] a data splitting module configured to split the to-be-stored image data into to-be-stored index information and to-be-stored data information;
[0011] The data writing module is configured to write the to-be-stored index information into the random write resource of the preconfigured file system and write the to-be-stored data information into the sequential write resource of the preconfigured file system.
[0012] In a third aspect, an electronic device is provided in the embodiments of the present application, and the electronic device comprises:
[0013] one or more processing apparatuses;
[0014] a storage apparatus configured to store one or more programs;
[0015] When the one or more programs are executed by the one or more processing apparatuses, the one or more processing apparatuses implement the image data processing method according to any one of the embodiments of the present application.
[0016] In a fourth aspect, a computer readable storage medium is provided in the embodiments of the present application, and the computer readable storage medium stores a computer program, which, when executed by a processing apparatus, implements the image data processing method according to any one of the embodiments of the present application.
[0017] In the embodiments of the present application, an image data processing method is provided. A preconfigured file system is configured through pre-organization and integration of a random write resource and a sequential write resource. When to-be-stored image data is acquired, the to-be-stored image data is split into to-be-stored index information and to-be-stored data information, the to-be-stored index information is written into the random write resource of the preconfigured file system, and the to-be-stored data information is written into the sequential write resource of the same preconfigured file system. According to the present application, the sequential resource and the random resource are organized together in the file system, different types of data are stored through a new file system combining the random write resource and the non-random write resource, the random write resource is separated from the shingled hard disk as a separate device, and thus there is sufficient random write resource to store the to-be-stored index information, which avoids the problem of insufficient space caused by opening out the random write resource from the shingled hard disk to store too much data, thereby affecting the retrieval efficiency when the to-be-stored index information is used for retrieval.
[0018] The above summary of the application is merely a summary of the technical solutions of the present application. In order to enable a clearer understanding of the technical means of the present application, the embodiments of the present application can be implemented according to the contents of the specification, and in order to enable the above and other purposes, features and advantages of the present application to be more apparent and easy to understand, the specific embodiments of the present application are described below. BRIEF DESCRIPTION OF DRAWINGS
[0019] Other features, objects, and advantages of the application will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. The drawings are not to be construed as limiting the scope of the application. Like reference numerals designate corresponding parts throughout the several views. In the drawings:
[0020] Figure 1 is a flow chart of an image data processing method provided in an embodiment of the application;
[0021] Figure 2 is a cloud storage system networking schematic diagram based on a cloud storage solution provided in an embodiment of the application;
[0022] Figure 3 is a file system formatting region part content schematic diagram provided in an embodiment of the application;
[0023] Figure 4 is an index structure schematic diagram of a file organization format provided in an embodiment of the application;
[0024] Figure 5 is a data structure schematic diagram of a file organization format provided in an embodiment of the application;
[0025] Figure 6 is a file identification change diagram provided in an embodiment of the application;
[0026] Figure 7 is a structural block diagram of an image data processing apparatus provided in an embodiment of the application;
[0027] Figure 8 is a structural schematic diagram of an electronic device provided in an embodiment of the application. DETAILED DESCRIPTION
[0028] The application will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the application, but not to limit the application. In addition, it should be noted that, for the convenience of description, only the parts related to the application are shown in the drawings, but not all the structures.
[0029] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations (or steps) may be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operation is completed, but may also have additional steps not included in the figures. The process may correspond to a method, function, procedure, subroutine, subroutine, etc.
[0030] Figure 1 This is a flowchart of an image data processing method provided in an embodiment of the present invention. The technical solution of this embodiment is applicable to reading and writing image data under surveillance scenarios. The method can be executed by an image data processing device, which can be implemented in software and / or hardware and integrated on any electronic device with network communication capabilities, such as a cloud storage node.
[0031] like Figure 1 As shown, the image data processing method in this application embodiment may include the following steps:
[0032] S110. Obtain the image data to be stored.
[0033] S120. The image data to be stored is split into index information to be stored and data information to be stored.
[0034] When storing image data, it's crucial to ensure both fast data writing and efficient, accurate data location and retrieval—in other words, consider read / write efficiency. To address this, the data is analyzed and separated into an index portion and a raw data portion for separate storage. The index portion forms the basis for fast retrieval, while the separated raw data portion contains the data itself that needs to be retrieved.
[0035] S130, Write the index information to be stored to the random write resource of the pre-configuration system and write the data information to be stored to the sequential write resource of the pre-configuration system.
[0036] The pre-configuration file system is deployed on the corresponding cloud storage node, and the pre-configuration file system is formed by pre-organizing and integrating random write resources and sequential write resources through the cloud storage node.
[0037] See Figure 2, the cloud storage system networking based on the cloud storage solution can include a cloud storage management server CDM and a cloud storage node CDV, one cloud storage management server CDM can manage multiple cloud storage nodes CDV, and one cloud storage node CDV is associated with a random write resource and a set of sequential write resources. Wherein, the random write resource is composed of a random write hard disk; the sequential write resource can be composed of a sequential write hard disk; the sequential write resource can also be composed of a random write hard disk, and the random write hard disk included is instructed to sequentially write to ensure that data will only be sequentially written.
[0038] The cloud storage node can organize and associate the sequential write resource and the random write resource together to form a pre-configured file system, focusing on the unified management of different types of resources. For example, by designing a set of file system organization formats (hereinafter referred to as CDS5 format), the sequential write resource can be added to the same file system in the form of a link, realizing the management of different types of resources using one file system. The random write resource here can be a conventional magnetic recording hard disk CMR, and the sequential write resource can be a shingled hard disk, a tape library, etc., but it is not specifically a shingled magnetic recording hard disk.
[0039] The pre-configured file system of the cloud storage node is pre-organized and integrated according to the preset file system organization format, and then the data content required to be written by the cloud storage system is stored in the form of a file on each write resource of the cloud storage node. On this basis, the image data file to be stored can be split into an index part and a data part, that is, the index information to be stored and the data information to be stored are obtained. The index part is used to quickly find the data information of a specified time, the data of the index part exists in random writing, and the index part is stored in the random write resource in the form of a file; the data part only exists in sequential writing, and the data part is stored in the sequential write resource in the form of a file.
[0040] In an optional solution, referring to Figure 3 In the random write resource of the pre-configured file system, a metadata area is pre-divided, and the format information META of the pre-configured file system is stored in the metadata area pre-divided in the random write resource of the pre-configured file system. For example, all sequential write resources and random write resources are combined to form a file system CDS5. When the system is installed, a fixed part of the metadata area of the file system CDS5 can be divided in the random write resource of the file system, and the file system is formatted, and the format information META of the file system is saved in the metadata area.
[0041] In an optional solution, referring to Figure 3The metadata area pre-divided in the random write resource of the preconfigured file system can record the sequential write resource added to the file system.
[0042] In an alternative of the embodiment, the image data processing method in the embodiment can further include the following steps.
[0043] When adding a new sequential write resource to the preconfigured file system, the resource link information of the new sequential write resource is written in the resource link field of the metadata area pre-divided in the random write resource of the preconfigured file system, forming a resource link record.
[0044] Referring to Figure 3 When adding a sequential write resource, the resource link information of the resource is added to the data resource link of the metadata area of the file system, forming a resource link record.
[0045] Table 1 shows the field contents of the resource link information
[0046] Resource name Resource path Resource size Resource start position Resource end position sda / dev / sda 1 TB 0 1 TB
[0047] Optionally, as shown in Table 2, the above data can be divided into file system metadata information, index information of file organization format UNVRD, and data information of file organization format UNVRD, and the three kinds of data are sorted and classified according to importance. Once the file system index information is lost, the files in the file system cannot be read and written, once the UNVRD index information is lost, the entire file cannot be read, and if the data information is lost, only part of the data cannot be read, so that the three kinds of data are divided according to the priority.
[0048] Table 2 shows the data priority division
[0049] Data name Priority File system index information 1 UNVRD index information 2 UNVRD data information 3
[0050] Referring to Table 1, according to the priority, specific protection measures are set for the data. For example, the content with priority 1 is saved in multiple copies. The content with priority 2 is saved in RAID6 mode. The content with priority 3 is saved in RAID5 mode.
[0051] In an alternative of the embodiment, the operation of splitting the to-be-stored image data into to-be-stored index information and to-be-stored data information can include the following operations:
[0052] The to-be-stored image data is put into the index part according to the preset file organization format to obtain the to-be-stored index information, and the original acquisition data in the to-be-stored image data is put into the data part to obtain the corresponding to-be-stored data information.
[0053] According to the preconfigured file organization format capable of quick retrieval and separation of index and data, the to-be-stored image data in the monitoring can be divided into random write data and sequential write data based on quick retrieval, which correspond to the index and data indicated in the preconfigured file organization format respectively. The original acquisition data is placed in the data part indicated in the file organization format, and the quick retrieval information generated based on the original data is placed in the index indicated in the file organization format.
[0054] The file organization format is preconfigured to be more conducive to reading and writing, which is referred to as UNVRD format. In the UNVRD file organization format, the specific storage location of the original acquisition data is recorded in each index file, so that the position to be read of the file can be directly located through the index file. That is, the index file and the data file indicated by the UNVRD file organization format can be directly found in sequence through the file index, and then the data file corresponding to the second number can be directly found according to the single GOP position in the index file, so that the retrieval is relatively fast.
[0055] As an alternative, refer to Figure 4 The index structure adopted by the index file indicated by the file organization format is recorded in the to-be-stored index information in the index file. In order to prevent data loss, the to-be-stored index information includes at least two identical header fields and an index field, and the data source identifier and the data source description of the to-be-stored image data are recorded in the header field. For example, the to-be-stored index information of the index file stores multiple identical header fields HEADER, and each index follows the header field HEADER. The header field HEADER mainly includes a data source identifier magic and a data source description. The index file indicated by the file organization format is recorded in time, and the number of currently written indexes.
[0056] As an alternative, refer to Figure 5The file organization format shown indicates the data structure adopted by the data file. When recording the data information to be stored in the data file, each video I frame group corresponds to an index. The content in the index includes: the universal time coordinated (UTC), the total number of preset space sizes (for example, the space size is 4 KB) of the storage units occupied by the I frame group, and the I frame group length. The I frame group data block stores all the data packets in the I frame group. When locating and reading the specified I frame group in the file, the specified I frame group position is found in the data file by reading the file index. The index file suffix is.index, and the data file suffix is.data. The index file and the data file have the same name and the same directory structure. For example, the index file path is "user directory / camera code / date / storage type / file name.index". The data file path is "user directory / camera code / date / storage type / file name.data".
[0057] In an optional solution of the embodiment, the writing of the index information to be stored into the random write resource of the preconfigured file system and the writing of the data information to be stored into the sequential write resource of the preconfigured file system can include the following operations:
[0058] If the file is created for the first time, a data file is created under the current date directory of the sequential write resource of the preconfigured file system, and a same-named index file is created under the current date directory of the random write resource of the preconfigured file system; and the index information to be stored is written into the created index file, and the data information to be stored is written into the created same-named data file; wherein the file size of the data file is a preset multiple of the minimum full coverage unit size.
[0059] In another optional solution of the embodiment, the writing of the index information to be stored into the random write resource of the preconfigured file system and the writing of the data information to be stored into the sequential write resource of the preconfigured file system can include the following operations:
[0060] If the file is not created for the first time, a data file not fully written in the last date directory of the sequential write resource of the preconfigured file system is found, and the data information to be stored is written into the found data file; and an index file corresponding to the data file not fully written in the last date directory of the random write resource of the preconfigured file system is found, and the index information to be stored is written into the found index file.
[0061] As an optional solution, the image data processing method in the embodiment can further include the following steps: querying the index file in the corresponding date directory according to a playback query time period, and querying the data file in the sequential write resource of the preconfigured file system according to the queried index file for playback.
[0062] According to the playback query time period, the corresponding index file under the corresponding directory is found, the first secondary index and the last secondary index are taken out, and the corresponding start and end time is found by using the dichotomy method; then, the corresponding I frame group offset is found according to the index corresponding to the start time, and the corresponding data file is played. The single minimum full coverage unit of the data file is according to the zone of the hard disk.
[0063] Optionally, the size of a single data file is N* the minimum full coverage unit of the sequential write resource. A newly created file is named as a U file, and the file size reaches the agreed size, then the current data file and the index file are modified as B files. If the input data stream causes the storage to stop, the data index file name is modified as a C file. If there is no minimum full coverage unit corresponding to the sequential write resource, the minimum full coverage unit is set as 2 GB. Based on the characteristics of the index file and the data file, the sizes of the index file storage unit and the data file storage unit are different.
[0064] Optionally, if the sequential write resource is a RAID5 (2 data disks and 1 parity disk) of 3 hard disks, and a single hard disk is taken as a zone of 256 MB, then the minimum full coverage unit is 256 MB*2 = 512 MB = 0.5 GB. The INDEX file system is 1 MB at least, and it is required that the data file is preferably a multiple of 1 GB, and the size of a single file can be 1 GB.
[0065] As an optional solution, refer to Figure 6 For the index file and the data file, if the file reaches the agreed single file write size and ends the file, the file name is modified as a B file, and the file end time is set. If the file ends because there is no input stream, the file name is modified as a C file, and the file end time is set. Among them, the naming rule of the index file is S start time label.index, and the naming rule of the data file is S start time label.data. The start time refers to the time when the data file is created, and is expressed by UTC time. Flag, B identifies a full file, U identifies a file being written. C identifies a file that has not been written full and can be repeatedly written. Optionally, at least one data file is deleted each time, and the index file under the corresponding directory is deleted.
[0066] According to the image data processing method provided in the embodiment of the present application, the file system in which the sequential resources and the random resources are organized and managed together stores different types of data through a new file system combining the random write resources and the non-random write resources, and does not open out random write resources in a tile type hard disk, but separates the random write resources from the tile type hard disk as a separate device, so that there is sufficient random write resources to store the to-be-stored index information, and the problem of insufficient space caused by opening out too much data in the random write resources in the tile type hard disk is avoided, so as to avoid affecting the retrieval efficiency when the to-be-stored index information is used for retrieval.
[0067] Figure 7 is a structural block diagram of an image data processing device provided in the embodiment of the present application. The technical solution of the embodiment can be applied to the case of reading and writing image data monitored in a monitoring scene, the device can be realized in the form of software and / or hardware, and is integrated on any electronic device with network communication function, such as a cloud storage node. As shown in Figure 7 The image data processing device in the embodiment of the present application can include the following:
[0068] The data acquisition module 710 is configured to acquire to-be-stored image data.
[0069] The data splitting module 720 is configured to split the to-be-stored image data into to-be-stored index information and to-be-stored data information.
[0070] The data writing module 730 is configured to write the to-be-stored index information into the random write resources of the preconfigured file system and write the to-be-stored data information into the sequential write resources of the preconfigured file system.
[0071] The cloud storage node is associated with a preconfigured file system, and the preconfigured file system is formed by pre-organizing and integrating the random write resources and the sequential write resources.
[0072] On the basis of the above-mentioned embodiment, optionally, the metadata area pre-divided in the random write resources of the preconfigured file system stores the formatting information of the preconfigured file system.
[0073] On the basis of the above-mentioned embodiment, optionally, the metadata area pre-divided in the random write resources of the preconfigured file system stores the resource link information of the sequential write resources.
[0074] On the basis of the above-mentioned embodiment, optionally, the device further includes:
[0075] When adding a new sequential write resource in the pre-configured file system, resource link information of the new sequential write resource is written in the resource link field of the metadata area pre-divided in the random write resource of the pre-configured file system, forming a resource link record.
[0076] On the basis of the above embodiment, optionally, the resource link record comprises a sequential write resource name, a sequential write resource path, a sequential write resource size, and a sequential write resource start and end position.
[0077] On the basis of the above embodiment, optionally, the data splitting module 720 comprises:
[0078] The quick search content generated based on the original acquisition data in the to-be-stored image data is put into an index part according to a preset file organization format to obtain to-be-stored index information, and the original acquisition data in the to-be-stored image data is put into a data part to obtain corresponding to-be-stored data information.
[0079] On the basis of the above embodiment, optionally, the to-be-stored index information comprises at least two same header fields and an index field, and the header field records a data source identifier and a data source description of the to-be-stored image data.
[0080] On the basis of the above embodiment, optionally, the data writing module 730 comprises:
[0081] A data file is created under a current date directory of a sequential write resource of the pre-configured file system, and a same-named index file is created under a current date directory of a random write resource of the pre-configured file system;
[0082] The to-be-stored index information is written into the created index file, and the to-be-stored data information is written into the created same-named data file; and a file size of the data file is a preset multiple of a minimum full coverage unit size.
[0083] On the basis of the above embodiment, optionally, the data writing module 730 comprises:
[0084] An un-filled data file under a previous date directory is searched in a sequential write resource of the pre-configured file system, and the to-be-stored data information is written into the searched data file;
[0085] An index file corresponding to the un-filled data file under the previous date directory is searched in a random write resource of the pre-configured file system, and the to-be-stored index information is written into the searched index file.
[0086] On the basis of the above embodiment, optionally, the apparatus further comprises:
[0087] According to the playback query time period, an index file in a corresponding date directory is queried, and according to the queried index file, a data file is searched in a resource in a preconfigured file system sequence to play back.
[0088] The image data processing apparatus provided in the embodiments of the present application can execute the image data processing method provided in any of the embodiments of the present application, has the corresponding functions and advantages of executing the image data processing method, and the technical details not described in the embodiments are referable to the image data processing method provided in any of the embodiments of the present application.
[0089] Figure 8 is a structural schematic diagram of an electronic device provided in the embodiments of the present application. As shown in the structure, the electronic device provided in the embodiments of the present application comprises one or more processors 810 and a storage device 820. Figure 8 The processor 810 in the electronic device can be one or more, Figure 8 The storage device 820 is configured to store one or more programs. The one or more programs are executed by the one or more processors 810, so that the one or more processors 810 implement the image data processing method according to any of the embodiments of the present application.
[0090] The electronic device can further comprise an input device 830 and an output device 840.
[0091] The processor 810, the storage device 820, the input device 830 and the output device 840 in the electronic device can be connected through a bus or other means, Figure 8 for example, through a bus.
[0092] The storage device 820 in the electronic device is a computer readable storage medium, which can be configured to store one or more programs. The program can be a software program, a computer executable program and a module. For example, the program instructions / module of the image data processing method provided in the embodiments of the present application. The processor 810 executes the software program, instructions and modules stored in the storage device 820, so as to execute various function applications and data processing of the electronic device, that is, to implement the image data processing method in the above method embodiments.
[0093] The storage 820 can include a program storage area and a data storage area. The program storage area can store an operating system and applications required by at least one function. The data storage area can store data created according to the use of the electronic device, and the like. In addition, the storage 820 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, or other non-volatile solid state storage device. In some examples, the storage 820 can further include a memory disposed remotely from the processor 810, which can be connected to the device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0094] The input device 830 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. The output device 840 can include a display device such as a display screen.
[0095] And when the one or more programs included in the above electronic device are executed by the one or more processors 810, the programs perform the following operations:
[0096] Obtaining image data to be stored;
[0097] Splitting the image data to be stored into index information to be stored and data information to be stored;
[0098] Writing the index information to be stored into a random write resource of a pre-configured file system and writing the data information to be stored into a sequential write resource of the pre-configured file system;
[0099] The pre-configured file system is deployed in a corresponding cloud storage node, and the pre-configured file system is pre-organized and integrated by the cloud storage node to form the random write resource and the sequential write resource.
[0100] Of course, those skilled in the art can understand that when the one or more programs included in the above electronic device are executed by the one or more processors 810, the programs can also perform the related operations in the image data processing method provided in any embodiment of the present application.
[0101] A computer readable storage medium is provided in an embodiment of the present application, and the computer readable storage medium stores a computer program. The program is executed by a processor to execute an image data processing method. The method includes:
[0102] Obtaining image data to be stored;
[0103] Splitting the image data to be stored into index information to be stored and data information to be stored;
[0104] write the to-be-stored index information into a random write resource of the pre-configured file system and write the to-be-stored data information into a sequential write resource of the pre-configured file system;
[0105] The pre-configured file system is deployed in a corresponding cloud storage node, and the pre-configured file system is pre-organized and integrated with the random write resource and the sequential write resource by the cloud storage node.
[0106] Optionally, the program, when executed by the processor, further causes the processor to perform the image data processing method provided in any of the embodiments of the present application.
[0107] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination thereof. The computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus or device.
[0108] The computer readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer readable program code is borne. Such a propagated data signal can take on multiple forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can transmit, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device.
[0109] The program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination thereof.
[0110] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0111] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples.
[0112] Note that the above only describes the preferred embodiments of the present application and the applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. An image data processing method, characterized by, The application is applied to a cloud storage node, the cloud storage node is associated with a preconfigured file system, and the preconfigured file system is formed by pre-organizing and integrating random write resources and sequential write resources; a metadata area pre-divided in the random write resources of the preconfigured file system stores information used for recording the sequential write resources added to the file system; and the method comprises the following steps: Obtaining image data to be stored; Splitting the image data to be stored into index information to be stored and data information to be stored; the splitting comprises the following steps: placing quick search content generated based on original collection data in the image data to be stored into an index part according to a preset file organization format to obtain the index information to be stored, and placing the original collection data in the image data to be stored into a data part to obtain corresponding data information to be stored; the index information to be stored is recorded in an index file indicated by the preconfigured file organization format, and the data information to be stored is recorded in a data file; each video I frame group corresponds to an index when the data information to be stored is recorded in the data file; Writing the index information to be stored into random write resources of the preconfigured file system and writing the data information to be stored into sequential write resources of the preconfigured file system.
2. The method of claim 1, wherein, The metadata area pre-divided in the random write resources of the preconfigured file system stores format information of the preconfigured file system.
3. The method of claim 1, wherein, The metadata area pre-divided in the random write resources of the preconfigured file system stores resource link information of the sequential write resources.
4. The method of claim 3, wherein, The method further comprises the following steps: When a new sequential write resource is added to the preconfigured file system, writing resource link information of the new sequential write resource into a resource link field of the metadata area pre-divided in the random write resources of the preconfigured file system to form a resource link record; The resource link record comprises a sequential write resource name, a sequential write resource path, a sequential write resource size, and a sequential write resource start and end position.
5. The method of claim 1, wherein: The index information to be stored comprises at least two same header fields and an index field; and the header fields record a data source identifier and a data source description of the image data to be stored.
6. The method of claim 1, wherein, Writing the index information to be stored into random write resources of the preconfigured file system and writing the data information to be stored into sequential write resources of the preconfigured file system comprises the following steps: Creating a data file under a current date directory of the sequential write resources of the preconfigured file system and creating an index file with the same name under a current date directory of the random write resources of the preconfigured file system; Writing the index information to be stored into the created index file and writing the data information to be stored into the data file with the same name; and a file size of the data file is a preset multiple of a minimum full coverage unit size.
7. The method of claim 1, wherein, Writing the index information to be stored into random write resources of the preconfigured file system and writing the data information to be stored into sequential write resources of the preconfigured file system comprises the following steps: Finding a data file that is not fully written under a previous date directory in the sequential write resources of the preconfigured file system, and writing the data information to be stored into the found data file; and Find the index file corresponding to the data file not filled in the last date directory in the random write resource of the pre-configured file system, and write the to-be-stored index information into the found index file.
8. An image data processing apparatus characterized by comprising: The cloud storage node is associated with a pre-configured file system, and the pre-configured file system is formed by pre-organizing and integrating random write resources and sequential write resources. A metadata area pre-divided in the random write resource of the pre-configured file system stores information used for recording the sequential write resource joined in the file system. The device comprises: A data acquisition module is configured to acquire to-be-stored image data. A data splitting module is configured to split the to-be-stored image data into to-be-stored index information and to-be-stored data information. The splitting includes: placing quick search content based on original collected data in the to-be-stored image data into an index part according to a pre-configured file organization format to obtain the to-be-stored index information, and placing the original collected data in the to-be-stored image data into a data part to obtain corresponding to-be-stored data information. The to-be-stored index information is recorded in an index file indicated by the pre-configured file organization format, and the to-be-stored data information is recorded in a data file. Each video I frame group corresponds to an index when the to-be-stored data information is recorded in the data file. A data writing module is configured to write the to-be-stored index information into a random write resource of the pre-configured file system and write the to-be-stored data information into a sequential write resource of the pre-configured file system.
9. An electronic device, comprising: One or more processing devices; A storage device configured to store one or more programs; When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the image data processing method of any one of claims 1-7. The program is executed by the processing device to implement the image data processing method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Data storage method and device and storage system
CN111399762A