CN101739308A - Method for generating image file and storage system for image file - Google Patents

Method for generating image file and storage system for image file Download PDF

Info

Publication number
CN101739308A
CN101739308A CN200810173552A CN200810173552A CN101739308A CN 101739308 A CN101739308 A CN 101739308A CN 200810173552 A CN200810173552 A CN 200810173552A CN 200810173552 A CN200810173552 A CN 200810173552A CN 101739308 A CN101739308 A CN 101739308A
Authority
CN
China
Prior art keywords
image file
data cell
data
information
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200810173552A
Other languages
Chinese (zh)
Other versions
CN101739308B (en
Inventor
吴树桂
张阳
李连成
吕健
刘晓鹏
陈玄同
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CN2008101735527A priority Critical patent/CN101739308B/en
Publication of CN101739308A publication Critical patent/CN101739308A/en
Application granted granted Critical
Publication of CN101739308B publication Critical patent/CN101739308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for generating an image file and a storage system for the image file. The image file of a data source is generated by operating the following programs through a computer. The method for generating the image file comprises the following steps: generating a first image file, setting the information of the file head of the first image file according to a plurality of pieces of hardware parameter information of a first data source; dividing the first data source into a plurality of data units with the same capacity; if the content of currently read data units is different from that of previously read data units, recording the data units into corresponding data blocks; if the content of currently read data units is the same as that of the previously read data units, recording the sequence of the data units into the information of the first data block; establishing first file tail information used for marking the file length of the first image file.

Description

The generation method and the storage system thereof of image file
Technical field
A kind of generation method and system thereof of image file, particularly a kind of method and system thereof that is used to generate the image file of data structure with improvement.
Background technology
For general user, it is the numerous and diverse thing of part that computer system and application program thereof are installed, because the user need know the setting to peripheral device and computer system.And installation need expend the many time at every turn, if the words that make a mistake must do installation again.In order to save the time of installing, the someone has proposed the backup method of computer system.
The backup of so-called computer system is that the storage facilities with the computer system of source end carries out the backup of data, and wherein Bei Fen project has comprised system information or application program.If later on any mistake or damage have taken place computer system, the user is as long as return to Backup Data in the computer system, just computer system can be reverted to the complexion before the data backup.The user does not need to set computer system and set up applications in extra taking a lot of trouble, and the time of recovering is more deficient more than the time that computer system is installed.
Present PC (for example notebook computer) production firm; usually the Windows (Microsoft WindowsSystem) of operating system (Operation System) as Microsoft can before dispatching from the factory, PC just be housed in advance; because the data volume of this type operating system is huge and during mounting cost; so can utilize image file (image file) reduction technique the PC of will dispatch from the factory to be carried out the pre-installation (pre-installation) of operating system and/or other application programs usually; reaching the purpose of rapid installing operating system, and then improve Production Line usefulness.
The generation method of known image file please refer to shown in Figure 1ly, and it is that known image file generates synoptic diagram.Reading the relevant information (step S110) of the data source (referreding to herein as in the PC hard disk drive) of source end, wherein for example magnetic region quantity, archival location, and the archives quantity etc. of data source of relevant information in order to installing operating system and/or other application programs.Carry out image file according to the relevant information of data source and handle (step S120), with above-mentioned relevant information the archives in the data source compress handle and will compress after archives discharge again.
Generally speaking, known image file backup method can reach the advantage of its backup really for the direct backup between data source, and the image file of the end of for example will originating utilizes CD or other different Storage Medias to be reduced to the data source of destination.If but transmission course is sent to destination with world-wide web origin source end, then following point can occur: 1. from the beginning image file can only receive in regular turn; 2. data have loss in the transmission course, need accent transmitting once.So need expend the many time in transmission course.
Wherein, chief reason is the data structure composition of image file.The data structure of general image file is arranged actions such as compression according to the storage positions of files in the data source.If will rebuild image file, then need the shuffling information of image file, for instance, shuffling information may be positioned over the shelves heads (file head) or shelves tail (file tail) lining of image file.After for other destination, image file need being received fully, could come the reflection file is done the action of reduction of data (restore) according to shuffling information.
And, deposit mechanism according to the disk that various different operating system provided and also can the size of depositing of reflection file be limited to some extent.For example, for the FAT disk that Microsoft provided was deposited mechanism, FAT-16 had the restriction of single archives 2GBytes, and FAT-32 then has the restriction of single archives 4GByte.Deposit the restriction of archives if first data source of source end surpasses it, then can't carry out the processing of image file it.
Summary of the invention
In view of above problem, technical matters to be solved by this invention is to provide by computer moves following program in order to produce first image file of first data source.
For achieving the above object, the generation method of image file disclosed in this invention comprises the following steps: to produce the first reflection shelves head, according to the information in a plurality of hardware parameter information settings first reflection shelves heads (image file head) of first data source; Read the content of these a plurality of data cells one by one; First data source is divided into the identical data cell of a plurality of amount of capacity; When inequality, then data cell is recorded in the corresponding block as if the current data cell that reads and the content of the data cell that read before; If when the content of the current data cell that reads and the data cell that read before is identical, then putting in order of data cell is recorded in the first block information; Set up first grade of tail information, in order to the file length of mark first image file.
From another viewpoint of the present invention, the present invention more provides a kind of generation system of image file, moves following program in order to produce the image file of data source by computer.
For achieving the above object, the generation system of image file disclosed in this invention includes image file, data source, storage device and data management system.More include reflection shelves head, block information, a plurality of block and shelves tail information in the image file; Data source is in order to provide the Data Source that produces image file; Storage device is in order to the block in the storage map file; Data management system is connected in data source and storage device, and data management system is carried out following step: data source is divided into the identical data cell of a plurality of amount of capacity; When inequality, then data cell is recorded in the corresponding block as if the current data cell that reads and the content of the data cell that read before; If when the content of the current data cell that reads and the data cell that read before is identical, then putting in order of data cell is recorded to block information.
The invention provides a kind of deposit method and system of image file, make image file the backup of data source and asymmetrical duplicating.Only write down unduplicated data cell in image file of the present invention, the data cell that will have duplicate contents only writes down its position.So, in setting up the process of mapped file, can reduce the space of many repetitions, and can accelerate the time that is provided with of the mapping shelves of storage element.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is that known image file generates synoptic diagram;
The process flow diagram of Fig. 2 single image file for the present invention generates;
Fig. 3 is the structural representation of image file of the present invention;
Fig. 4 is applied to produce the workflow diagram of a plurality of image files for the present invention;
Fig. 5 is the structural representation of a plurality of image files;
Fig. 6 is the reduction process flow diagram of image file of the present invention.
Wherein, Reference numeral
300 image file generation systems
310 data sources
311 data cells
320 data management systems
330 storage devices
331 image files
3311 reflection shelves heads
3312 block information
3313 block
3314 grades of tail information
510 first data sources
511 first data cells
520 second data sources
521 second data cells
531 first image files
532 second image files
533 the 3rd image files
Embodiment
In order to illustrate further feature of the present invention and technology contents, see also following about detailed description of the present invention and accompanying drawing, yet appended accompanying drawing only provide with reference to and the explanation usefulness, be not to be used for the present invention is limited.
The present invention produces corresponding image file according to the disk structure of the data source of source end.Wherein the source end can be PC, notebook computer (notebook), lithographic plate computer (tablet pc) or mobile operation device.Set the source end in the present embodiment and comprise data source, wherein data source can be hard disk (hard disk), redundant arrays of inexpensive disks (RAID) or internal memory (memory card).The present invention can adjust data unit size wherein according to the difference of archiving mechanism, makes the size of image file of the present invention can not be subjected to archives economies such as EXT, NTFS, FAT16 or FAT32.
Please respectively with reference to figure 2 and shown in Figure 3, it is respectively the present invention and generates the process flow diagram of single image file and the structural representation of image file of the present invention.Image file generation system 300 of the present invention includes: data source 310, data management system 320, storage device 330 and image file 331.Image file 331 includes reflection shelves 3311, block information 3312, an a plurality of block 3313 and a shelves tail information 3314.Data source 310 is in order to provide the Data Source that produces image file 331.Storage device 330 is in order to these block 3313 in the storage map file 331.Data management system 320 is connected in data source 310 and storage device 330, and data management system 320 generates in order to carry out image file 331.Following steps are the workflow explanation of a kind of embodiment of the present invention:
Produce the first reflection shelves heads (a step S210), it is according to the information in a plurality of hardware parameter information settings reflection shelves of data source 310 3311.In reflection shelves 3311, write down the size of image file check information, image file and the total amount of all data cell 311 respectively.Wherein, the image file check information utilizes a cyclic redundancy check (CRC) (Cyclic Redundancy Check, (Low-Density Parity-Check code LDPC) produces for CRC) institute's generation, MD5 or low density parity check sign indicating number.
Subsequently, first data source is divided into the identical data cell of a plurality of amount of capacity (step S220).Do not limit the file length of data cell 311 in the present invention, the user can set according to factors such as the capacity of first data source 310 of desire backup or magnetic region sizes.From first data source reading of data unit (step S230) one by one.Current data cell of reading in is carried out beacon information (step S240).
The block that image file comprised is recorded to a block information (step S250).Be recorded to the explanation of block information 3312 in the present invention with following condition.Beacon information can also produce by cyclic redundancy check (CRC), MD5 or low density parity check sign indicating number produce.Then, whether contrast has the data cell (step S260) of repetition.If when current data cell that reads and data cell before do not repeat, the data cell that does not repeat is write to (step S261) in the corresponding block respectively.Wherein, the size of difference record data unit 311, the serial number and the memory address of data cell 311 in data source 310 of data cell 311 in the block information 3312.When if the current data cell that reads is identical with before data cell, then the serial number with the data cell that duplicates is recorded to (step S262) in the block information.Whether the beacon information of comparing current data unit 311 in the present invention has repetition with the beacon information of before data cell 311.In addition, also can the content of data unit 311 be compared, can know by inference easily, so do not add to give unnecessary details to these those skilled in the art.At last, set up first grade of tail information (step S270), in order to the file length of mark first image file.
The present invention produces single the image file except being applied in, and can also be applied to produce different image files.To illustrate below how the present invention produces the course of work of a plurality of image files, and please also refer to shown in Figure 4ly that it is applied to produce the workflow diagram of a plurality of image files for the present invention.And for knowing the job step of key diagram 4, also please refer to shown in Figure 5ly, it is the structural representation of a plurality of image files.Is example with two data sources (being respectively first data source 510 and second data source 520) in order to produce three image files (being respectively first image file 531, second image file 532 and the 3rd image file 533) in this examination, and the generative process of each image file may further comprise the steps:
Second data source (step S410) is provided.Set up second image file according to second data source and produce the second reflection shelves heads (step S420).According to the information (step S430) in a plurality of hardware parameter information settings second image file head of second data source.Second data source is divided into data cell (step S440).Wherein, for convenience of description first data source 510 is divided into a plurality of first data cells 511; And second data source 520 is divided into a plurality of second data cells 521.In regular turn the data cell in the data cell in second image file and first image file is compared (step S450).
Whether the data cell of judging first image file and the data cell of second image file consistent (step S460).If during the data cell of second image file and the data cell in first image file inequality, then data cell is recorded in the corresponding block of second image file (step S461).If have in the data cell in the data cell of second image file and first image file when identical, then write down in position to the second block information with identical block (step S462).At last, set up second grade of tail information (step S470).
Below describe at the reduction of the mapped file of Fig. 5, please refer to shown in Figure 6ly, it is the reduction process flow diagram of image file of the present invention.Resolve the reflection shelves head (step S610) of image file, it is according to the every information that is write down in the reflection shelves head, in order to set the reducing environment of image file on storage element.According to block information, with block writing in regular turn (step S620) in the storage element.
In writing the process of storage element, more include following determining step:, whether keep (step S630) in order to judge the current block that reads according to the numbering of block information recorded data block.When if block only is read one time, then after writing storage element, this block is deleted (step S631).When if this block is still quoted by other block information, the number of times that then still keeps this block and will quote total amount after writing storage element subtracts one (step S632), until finish block information to this block quote total amount till.Judge whether to finish the access (step S640) of all block.If finish all block accesses, then finish the reducing program of image file.If as yet when not finishing the access of all block, the access program of repeating step S620 then.
The invention provides a kind of generation system 300 and method, make backup and asymmetrical duplicate of image file data source 310 with image file that elasticity deposits.Only write down unduplicated data cell in image file of the present invention, the data cell that will have duplicate contents only writes down its position.So, in setting up the process of image file, can reduce the space of many repetitions.And the time that is provided with that can accelerate the image file of storage element.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (7)

1. the generation method of an image file is moved following program in order to produce one first image file of one first data source by computer, it is characterized in that this generation method comprises the following steps:
Produce one first reflection shelves head, according to the information in this first reflection shelves head of a plurality of hardware parameter information settings of this first data source;
Read the content of these a plurality of data cells one by one;
This first data source is divided into the identical data cell of a plurality of amount of capacity;
When inequality, then this data cell is recorded in the corresponding block as if current this data cell that reads and the content of the described data cell that had read;
When if the content of current this data cell that reads and the described data cell that had read is identical, being recorded in the one first block information then with this data cell; And
Set up one first grade of tail information, in order to the file length of this first image file of mark.
2. the generation method of image file according to claim 1 is characterized in that, writes down the size of an image file check information, image file and the sum of described data cell respectively in this reflection shelves head.
3. the generation method of image file according to claim 2 is characterized in that, this image file check information utilizes that a cyclic redundancy check (CRC) produces, MD5 or low density parity check sign indicating number produce.
4. the generation method of image file according to claim 1 is characterized in that, writes down the size of this data cell, the serial number and the memory address of this data cell in this data source of this data cell in this block information respectively.
5. the generation method of image file according to claim 1 is characterized in that, is provided with after this beacon information further comprising the steps of:
Current this data cell of reading in is provided with a beacon information;
Whether this beacon information that contrasts this current data cell has duplicate contents with before this beacon information;
This data cell that does not duplicate content is recorded in corresponding this block; And
This data cell that duplicates content is recorded in this block information.
6. the generation method of image file according to claim 1 is characterized in that, this first reflection shelves head back is further comprising the steps of finishing:
One second data source is provided;
Set up one second image file according to this second data source, and produce one second reflection shelves head, according to the information in this second reflection shelves head of a plurality of hardware parameter information settings of this second data source;
This second data source is divided into described data cell;
In regular turn the described data cell in this data cell in this second image file and this first image file is compared;
If during this data cell of this second image file and the described data cell in this first image file inequality, then this data cell is recorded in this block of this second image file;
If have in the described data cell in this data cell of this second image file and this first image file when identical, then write down and have in position to the one second block information of this identical block; And
Set up one second grade of tail information.
7. the generation system of an image file, it in order to produce one first image file of one first data source, is characterized in that this generation system includes by the following program of computer operation:
One image file, it includes a reflection shelves head, a block information, a plurality of block and one grade of tail information;
One data source is in order to provide the Data Source that produces this image file;
One storage device is in order to store the described block in this image file; And
One data management system, it is connected in this data source and this storage device, and this data management system is carried out following step:
This data source is divided into the identical data cell of a plurality of amount of capacity;
When inequality, then this data cell is recorded in corresponding this block as if current this data cell that reads and the content of the described data cell that read before; And
If when the content of current this data cell that reads and the described data cell that read before is identical, then this data cell is recorded in this block information.
CN2008101735527A 2008-11-06 2008-11-06 Method for generating image file and storage system for image file Active CN101739308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101735527A CN101739308B (en) 2008-11-06 2008-11-06 Method for generating image file and storage system for image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101735527A CN101739308B (en) 2008-11-06 2008-11-06 Method for generating image file and storage system for image file

Publications (2)

Publication Number Publication Date
CN101739308A true CN101739308A (en) 2010-06-16
CN101739308B CN101739308B (en) 2011-11-09

Family

ID=42462825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101735527A Active CN101739308B (en) 2008-11-06 2008-11-06 Method for generating image file and storage system for image file

Country Status (1)

Country Link
CN (1) CN101739308B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457387A (en) * 2010-10-22 2012-05-16 英业达集团(天津)电子技术有限公司 Method for receiving multicast packets
CN107239227A (en) * 2016-03-28 2017-10-10 慧荣科技股份有限公司 Image file making method of data storage device
CN111835993A (en) * 2020-09-16 2020-10-27 深圳市阿达视高新技术有限公司 Damage-proof video storage method, device, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6981005B1 (en) * 2000-08-24 2005-12-27 Microsoft Corporation Partial migration of an object to another storage location in a computer system
CN100474261C (en) * 2006-08-09 2009-04-01 英业达股份有限公司 Data customization backup and restoration method for trans-storage facilities
US7721063B2 (en) * 2006-12-05 2010-05-18 International Business Machines Corporation System, method and program for configuring a data mirror
CN101201796B (en) * 2006-12-14 2010-05-19 英业达股份有限公司 Method for self-regulating write-in synchronous copy diskette space size of snap equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102457387A (en) * 2010-10-22 2012-05-16 英业达集团(天津)电子技术有限公司 Method for receiving multicast packets
CN102457387B (en) * 2010-10-22 2014-05-28 英业达集团(天津)电子技术有限公司 Method for receiving multicast packets
CN107239227A (en) * 2016-03-28 2017-10-10 慧荣科技股份有限公司 Image file making method of data storage device
CN107239227B (en) * 2016-03-28 2020-09-11 慧荣科技股份有限公司 Image file making method of data storage device
CN111835993A (en) * 2020-09-16 2020-10-27 深圳市阿达视高新技术有限公司 Damage-proof video storage method, device, equipment and medium

Also Published As

Publication number Publication date
CN101739308B (en) 2011-11-09

Similar Documents

Publication Publication Date Title
CN109791520B (en) Physical media aware spatially coupled logging and replay
CN102929750B (en) Nonvolatile media dirty region tracking
US9880762B1 (en) Compressing metadata blocks prior to writing the metadata blocks out to secondary storage
US7958331B2 (en) Storage device with opportunistic address space
CN103136074B (en) Data storage method and data storage system of multiple disk array systems
CN102033786B (en) Method for repairing consistency of copies in object storage system
CN101916173B (en) RAID (Redundant Array of Independent Disks) based data reading and writing method and system thereof
CN103246478B (en) A kind of based on the disc array system of software PLC support without packet type overall situation HotSpare disk
CN102024044A (en) Distributed file system
EP3054626B1 (en) Data processing method and device for storage unit
US10503620B1 (en) Parity log with delta bitmap
CN110147203B (en) File management method and device, electronic equipment and storage medium
CN102479118A (en) Incremental backup method for data blocks
CN113885809B (en) Data management system and method
CN101739308B (en) Method for generating image file and storage system for image file
US20140164697A1 (en) Mainframe Storage Apparatus That Utilizes Thin Provisioning
US10852997B1 (en) Relocation target selection
US9235352B2 (en) Datastore for non-overwriting storage devices
CN109582497B (en) Rapid emergency starting method based on dynamic data increment
US11989457B2 (en) System and method for performing data read-write operations in zoned storage devices
US20090185762A1 (en) Data structure for image file
US10664346B2 (en) Parity log with by-pass
CN101441638A (en) Data structure of mapping file
US11645333B1 (en) Garbage collection integrated with physical file verification
US20040064658A1 (en) Access control method and apparatus for a raid storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant