Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of interpolation, reading device of interpolation, read method and corresponding multimedia note of the multimedia note that overcomes the problems referred to above or address the above problem at least in part are provided.
According to an aspect of the present invention, provide a kind of adding method of multimedia note, having comprised:
At least one note son file is merged, obtain the note master file;
The division center zone of location compressed file, record is positioned at the redundant information after the described division center zone;
After described redundant information, in compressed file, add the note head that comprises flag information;
After described note head, in compressed file, add described note master file;
After described note master file, in compressed file, write described redundant information.
Alternatively, described note son file is picture file, audio file, video file, animation file or hyperlinked information file.
Alternatively, described note master file comprises master file head, described at least one note son file and master file tail; In the following information one or more have been stored in described master file head and/or the master file tail: the quantity of described note son file, the author information of described note master file, version information, date and time information, check information and signature flag information.
Alternatively, described note son file comprises record-header, note son file content and record tail; One or more in the following information stored in the tail in described record-header and/or record: note son file name information, positional information, length information, flag information, check information and encrypted message.
Alternatively, before the division center zone of described location compressed file, also comprise: check whether described compressed file has note, if any, with existing note deletion.
According to a further aspect in the invention, provide a kind of read method of multimedia note, having comprised:
Redundant information is read in the ending of location compressed file;
Locate the division center zone of described compressed file, travel through the information between described division center zone and the described redundant information, according to the flag information that comprises in the note head, obtain described note head and note master file;
Described note head and described note master file are exported in the disk file;
Read at least one note son file that described note master file comprises, note son file content is loaded into forms shows.
Alternatively, described note son file is picture file, audio file, video file, animation file or hyperlinked information file.
Alternatively, described note master file comprises master file head, described at least one note son file and master file tail; In the following information one or more have been stored in described master file head and/or the master file tail: the quantity of described note son file, the author information of described note master file, version information, date and time information, check information and signature flag information.
Alternatively, described note son file comprises record-header, note son file content and record tail; One or more in the following information stored in the tail in described record-header and/or record: note son file name information, positional information, length information, flag information, check information and encrypted message.
Alternatively, if described record-header and/or record have been stored check information in the tail, also comprise before showing at described forms that note son file content is loaded into: according to described check information described note son file is carried out verification; After verification was passed through, execution was loaded into forms with note son file content and shows.
Alternatively, if described record-header and/or record have been stored encrypted message in the tail, also comprise before showing at described forms that note son file content is loaded into: the encrypted message of storing and the encrypted message that the user inputs are verified in described record-header and/or record tail; If checking is consistent, execution is loaded into forms with note son file content and shows.
According to another aspect of the invention, provide a kind of adding set of multimedia note, having comprised:
Merge module, be used at least one note son file is merged, obtain the note master file;
Logging modle, the division center that is used for the location compressed file is regional, and record is positioned at the redundant information after the described division center zone;
First adds module, is used for after described redundant information, adds the note head that comprises flag information in compressed file;
Second adds module, is used for after described note head, adds described note master file in compressed file;
Writing module is used for writing described redundant information in compressed file after described note master file.
Alternatively, described device also comprises:
Checking module is used for checking whether described compressed file has note;
Removing module is used for checking out in the annotated situation of described compressed file at described checking module, with existing note deletion.
In accordance with a further aspect of the present invention, provide a kind of reading device of multimedia note, having comprised:
Read module is used for the ending of location compressed file, reads redundant information;
Spider module, the division center zone for locating described compressed file travels through the information between described division center zone and the described redundant information, according to the flag information that comprises in the note head, obtains described note head and note master file;
Derive module, be used for described note head and described note master file are exported to disk file;
Display module is used for reading at least one note son file that described note master file comprises, note son file content is loaded into forms shows.
Alternatively, described note son file comprises record-header, note son file content and record tail; Stored check information in described record-header and/or the record tail;
Described device also comprises: correction verification module is used for according to described check information described note son file being carried out verification;
Described display module specifically is used for reading at least one note son file that described note master file comprises, after described correction verification module is upchecked, note son file content is loaded into forms shows.
Alternatively, described note son file comprises record-header, note son file content and record tail; Stored encrypted message in described record-header and/or the record tail;
Described device also comprises: authentication module is used for described record-header and/or record the tail encrypted message of storing and the encrypted message that the user inputs are verified;
Described display module specifically is used for reading at least one note son file that described note master file comprises, when described authentication module verifies out that the encrypted message of storing in described record-header and/or the record tail is consistent with the encrypted message of user's input, note son file content is loaded into forms shows.
According to technical scheme provided by the invention, when carrying out compressing file, notes content can be added in the compressed file in the lump, and be after original compressed file, add successively note head, note master file and redundant information; Corresponding, when carrying out the file decompression, obtain simultaneously to be added on original compressed file notes content afterwards, then be loaded into forms and show.Among the present invention, note master file big or small unrestricted, the notes content of any size can add and be read, and comprises picture file, audio file, video file, animation file or hyperlinked information file, can satisfy people to the requirement of the audio-visual elements such as vision or the sense of hearing.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
For with prior art in the note of plain text distinguish, in following embodiments of the invention, the note that will comprise the audio-visual elements such as vision or the sense of hearing is referred to as super note.The content of super note is to be present on certain position of compressed package with binary form.
For different tools of compression, for example: the winzip tool of compression, the winrar tool of compression, 7-zip tool of compression etc., it is multiple that the compressed format corresponding with tool of compression also has, such as: rar form, zip form, 7z form, cab form etc.The advantage of zip form is to use extensively, and compression speed is fast, but compresses smaller; The rar form usually ratio of compression than zip form is high, but compression speed is slower, and the winrar tool of compression can executive routine compression special optimization algorithm on 32 and 64 Intel (Intel) microprocessor for text, sound and image, has further improved ratio of compression; The 7z form is usually high than all than zip form and rar format compression, and compression time is also all long than zip form and rar form simultaneously.
In following examples of the present invention, specifically be introduced as example as the carrier of super note take the zip form.Because the zip form is increased income, its file data storage format is known, and division center is the distinctive storage organization of zip form, and this structure is the core texture of zip file, it has stored bibliographic structure, can travel through all son files in the zip file by it.Fig. 1 shows the synoptic diagram of data memory format of the compressed file of common zip form.As shown in Figure 1, the structure of zip form is relatively simple, and n compressed file is positioned at before the division center zone, be redundant information after the division center zone, it supports backward traversal and forward direction traversal, can allow compressed software reasonably find any information, data access is very flexible, and it is less to revise difficulty.Zip form fault-tolerance is stronger, if revise partial data, can not affect the integrality of compressed package.The division center zone of zip form is at the end of compressed file, and the data volume of adding the note redundancy is little, and mobile data volume is limited, and this is so that the efficient of interpolation, deletion and modification note is higher.
Fig. 2 shows the according to an embodiment of the invention process flow diagram of the adding method of multimedia note.As shown in Figure 2, the method comprises the steps:
Step 101, at least one super note son file is merged, obtain super note master file.
The super note son file of present embodiment is the file that comprises audio-visual elements, and it includes but not limited to picture file, audio file, video file, animation file or hyperlinked information file.Several super note son files are merged into a super note master file, can be so that when reading, locate accurately whole super note master file.
Fig. 3 shows the synoptic diagram of data memory format of the super note son file of the embodiment of the invention.As shown in Figure 3, each super note son file comprises record-header, super note son file content and record tail.One or more in the following information stored in the tail in record-header and/or record: super note son file name information, positional information, length information, check information, flag information and encrypted message.Preferably, the name information of super note son file, positional information, length information and encrypted message are stored in the record-header, and the check information of super note son file and flag information are stored in the record tail.Wherein, check information can be to adopt md5(Message Digest Algorithm 5, Message Digest 5 the 5th edition) obtain, encrypted message can be that the input according to the user obtains.
N super note son file shown in Figure 3 merged, obtain a complete super note master file.Fig. 4 shows the synoptic diagram of data memory format of the super note master file of the embodiment of the invention.As shown in Figure 4, super note master file comprises master file head, a n super note son file and master file tail.In the following information one or more have been stored in master file head and/or the master file tail: the author information of the quantity of super note son file and super note master file, version information, date and time information, check information and signature flag information.Preferably, author information, version information, the date and time information of the quantity of super note son file and super note master file is stored in the master file head, and the check information of super note master file and signature flag information are stored in the master file tail.Wherein, check information can adopt md5 to obtain, and the signature flag information can be used for checking whether the integrality of super note master file is destroyed, can also be used to mark and is about to traverse super note son file.
The division center zone of step 102, location compressed file, record is positioned at the redundant information after the division center zone.
In the compressed file of zip form, the division center zone is a very important concept, and it is equivalent to the nervous centralis of a compressed file, in case this zone is destroyed, whole compressed file is also just damaged.As shown in Figure 1, three segment informations are redundant informations behind the compressed file of zip form, comprise 64 endings, 63 ending indicators and ordinary file ending.After navigating to the division center zone of compressed file, record is positioned at the redundant information after the division center zone.
Step 103, after redundant information, add the note head that comprises flag information in the compressed file.
Fig. 5 shows the synoptic diagram of data memory format of the compressed file of the embodiment of the invention.As shown in Figure 5, be the super comment field of compressed file after redundant information, this super comment field canned data is note head and notes content.Preferably, the length of note head is 32 bytes, and wherein flag information takies 20 bytes, and this flag information is used for the beginning of the super comment field of mark.And then flag information is the note length information, takies 8 bytes, is used for showing the total length of notes content.4 last bytes are reserved field.
Step 104, after the note head, add the note master file in the compressed file.
After the note head, in compressed file, add notes content, i.e. above-mentioned note master file.
Step 105, after the note master file, in compressed file, write redundant information.
See Fig. 5, after the note master file, write redundant information in compressed file, i.e. the redundant information of above-mentioned steps 102 record comprises 64 endings, 63 ending indicators and ordinary file totally three segment informations that end up.Writing herein redundant information is that i.e. ending from compressed file can find the division center zone, again from the division center regional search to compressed file for compatible forward direction traversal.
Further, before above-mentioned steps 102, the method that present embodiment provides can also comprise:
Whether step 101a, inspection compressed file have note, if, execution in step 101b; Otherwise, execution in step 102.
Step 101b, with the deletion of existing note, execution in step 102.
Come the technical scheme of present embodiment is done further introduction below by a concrete example.
Suppose and two super note son file 1.jpg and update.txt will be added in the compressed file that table 1 shows the details of these two super note son files.
The information of the super note son file of table 1.
Source file |
Skew |
Length |
Encrypted message |
1.jpg |
89001 |
327038 bytes |
0x8080 |
update.txt |
1024 |
87632 bytes |
0x55aa |
Wherein 1.jpg is a picture file, and its length is 327038 bytes, and corresponding encrypted message is 0x8080.Update.txt is a text, and its length is 87632 bytes, and corresponding encrypted message is 0x55aa.
Above-mentioned two super note son files are merged into a super note master file text.comment.Fig. 6 shows the synoptic diagram of the data memory format of super note master file in concrete example of the present invention.As shown in Figure 6, the length that merges the super note master file obtain is (1024+267+87632+78+267+327038+78+78) byte=416462 bytes.Wherein, skew refers to that the starting position of each storage unit is with respect to the deflected length of the starting position of master file.The md5 proof test value of super note master file text.comment is AE14DC8E3B4907807125616185B55862, and this proof test value can be used for verifying the integrality of super note master file.
Suppose and super note master file text.comment will be added among the compressed file 1.zip.The details of compressed file before table 2 shows super note master file and adds note.
The super note master file of table 2. and the information of adding front compressed file
Source file |
Skew |
Length |
1.zip |
0 |
6063 |
test.comment |
6095 |
416462 |
Fig. 7 shows in concrete example of the present invention the synoptic diagram that adds the data memory format of compressed file behind the note.As shown in Figure 7, added note head, notes content and redundant information after common zip data, the length of the compressed file that obtains is (6063+32+416462+22) byte=422579 bytes.
The adding method of the multimedia note that provides by present embodiment when carrying out compressing file, can add super notes content in the compressed file in the lump.Owing to be after original compressed file, add successively note head, note master file and redundant information, note master file big or small unrestricted, the notes content of any size can add, comprise picture file, audio file, video file, animation file or hyperlinked information file, can satisfy people to the requirement of the audio-visual elements such as vision or the sense of hearing.
Fig. 8 shows the process flow diagram of the read method of multimedia note according to an embodiment of the invention.As shown in Figure 8, the method comprises the steps:
Redundant information is read in the ending of step 201, location compressed file.
Take compressed file shown in Figure 5 as example, when reading, at first locate the ending of compressed file, read redundant information, this redundant information comprises 64 endings, 63 ending indicators and ordinary file ending totally three segment informations.
The division center zone of step 202, location compressed file, the information between traversal division center zone and the redundant information according to the flag information that comprises in the note head, obtains note head and super note master file.
After navigating to redundant information, centre of location structural region by the information of traversal acquisition between division center zone and redundant information, comprises being arranged in division center zone redundant information and super comment field canned data afterwards.Find do not have other information between division center zone and the redundant information if traverse end-of-file (EOF) from the division center zone always, show that then this compressed file does not have super notes content.Otherwise, by finding the flag information in the note head, navigate to super comment field, thereby obtain note head and super note master file.
Preferably, the length of note head is 32 bytes, and wherein flag information takies 20 bytes, and this flag information is used for the beginning of the super comment field of mark.And then flag information is the note length information, takies 8 bytes, is used for showing the total length of notes content.4 last bytes are reserved field.
The data memory format of super note master file can be referring to Fig. 4.Super note master file comprises master file head, a n super note son file and master file tail.In the following information one or more have been stored in master file head and/or the master file tail: the author information of the quantity of super note son file and super note master file, version information, date and time information, check information and signature flag information.Preferably, author information, version information, the date and time information of the quantity of super note son file and super note master file is stored in the master file head, and the check information of super note master file and signature flag information are stored in the master file tail.Wherein, check information can adopt md5 to obtain, and the signature flag information can be used for checking whether the integrality of super note master file is destroyed, can also be used to mark and is about to traverse super note son file.
Step 203, note head and super note master file are exported in the disk file.
Step 204, read at least one super note son file that super note master file comprises, super note son file content is loaded into forms shows.
The super note son file of present embodiment is the file that comprises audio-visual elements, and it includes but not limited to picture file, audio file, video file, animation file or hyperlinked information file.The data memory format of super note son file can be referring to Fig. 3.Each super note son file comprises record-header, super note son file content and record tail.One or more in the following information stored in the tail in record-header and/or record: super note son file name information, positional information, length information, check information, flag information and encrypted message.Preferably, the name information of super note son file, positional information, length information and encrypted message are stored in the record-header, and the check information of super note son file and flag information are stored in the record tail.
If record-header and/or record have been stored check information in the tail, also comprise before showing note son file content being loaded into forms: according to check information the note son file is carried out verification.After verification is passed through, again note son file content is loaded into forms and shows.
If record-header and/or record have been stored encrypted message in the tail, also comprise before showing note son file content being loaded into forms: the encrypted message of storing and the encrypted message that the user inputs are verified in record-header and/or record tail.If checking is consistent, again note son file content is loaded into forms and shows.
As preferred a kind of embodiment, the above-mentioned process that reads comprises: at first check the signature flag information in master file head and the master file tail, if the flag information of should signing is illegal, then read failure; Flag information was legal if should sign, then the check information of verification master file; If verification is not passed through, then read failure; If verification is passed through, continue to read n super note son file; Then, the check information of each son file of difference verification; If wherein some son file verification is not passed through, then read those son file failures; If wherein some son file verification is passed through, whether the encrypted message that then continues these son files of checking is identical with the encrypted message of user's input, if different, then reads this son file failure; If identical, then corresponding son file be loaded into forms and show.
The read method of the multimedia note that provides by present embodiment is carrying out file when decompressing, and can obtain simultaneously the super notes content that comprises in the compressed file, and is loaded into forms and shows.Because super notes content is to be added on after original compressed file, super note master file big or small unrestricted, the notes content of any size can add and be read, comprise picture file, audio file, video file, animation file or hyperlinked information file, can satisfy people to the requirement of the audio-visual elements such as vision or the sense of hearing.
Fig. 9 shows the structural representation of the adding set of multimedia note according to an embodiment of the invention.As shown in Figure 9, this device comprises: merge module 10, logging modle 11, the first interpolation module 12, the second interpolation module 13 and writing module 14.Wherein, merge module 10 and be used at least one note son file is merged, obtain the note master file; Logging modle 11 is used for the division center zone of location compressed file, and record is positioned at the redundant information after the described division center zone; First adds module 12 is used for after described redundant information, adds the note head that comprises flag information in compressed file; Second adds module 13 is used for after described note head, adds described note master file in compressed file; Writing module 14 is used for writing described redundant information in compressed file after described note master file.
Described note son file is picture file, audio file, video file, animation file or hyperlinked information file.
Described note master file comprises master file head, described at least one note son file and master file tail; In the following information one or more have been stored in described master file head and/or the master file tail: the quantity of described note son file, the author information of described note master file, version information, date and time information, check information and signature flag information.
Described note son file comprises record-header, note son file content and record tail; One or more in the following information stored in the tail in described record-header and/or record: note son file name information, positional information, length information, flag information, check information and encrypted message.
This device can also comprise: checking module 15 and removing module 16.Wherein, checking module 15 is used for checking whether described compressed file has note; Removing module 16 is used for checking out in the annotated situation of described compressed file at described checking module 15, with existing note deletion.
The adding set of the multimedia note that provides by present embodiment when carrying out compressing file, can add super notes content in the compressed file in the lump.Owing to be after original compressed file, add successively note head, note master file and redundant information, note master file big or small unrestricted, the notes content of any size can add, comprise picture file, audio file, video file, animation file or hyperlinked information file, can satisfy people to the requirement of the audio-visual elements such as vision or the sense of hearing.
Figure 10 shows the structural representation of the reading device of multimedia note according to an embodiment of the invention.As shown in figure 10, this device comprises: read module 20, spider module 21, derivation module 22 and display module 23.Wherein, read module 20 is used for the ending of location compressed file, reads redundant information; Spider module 21 is used for locating the division center zone of described compressed file, travels through the information between described division center zone and the described redundant information, according to the flag information that comprises in the note head, obtains described note head and note master file; Deriving module 22 is used for described note head and described note master file are exported to disk file; Display module 23 is used for reading at least one note son file that described note master file comprises, note son file content is loaded into forms shows.
Described note son file is picture file, audio file, video file, animation file or hyperlinked information file.
Described note master file comprises master file head, described at least one note son file and master file tail; In the following information one or more have been stored in described master file head and/or the master file tail: the quantity of described note son file, the author information of described note master file, version information, date and time information, check information and signature flag information.
Described note son file comprises record-header, note son file content and record tail; One or more in the following information stored in the tail in described record-header and/or record: note son file name information, positional information, length information, flag information, check information and encrypted message.
Described device can also comprise: correction verification module 24 is used for according to described check information described note son file being carried out verification; Described display module 23 specifically is used for reading at least one note son file that described note master file comprises, after described correction verification module 24 is upchecked, note son file content is loaded into forms shows.
Described device can also comprise: authentication module 25 is used for described record-header and/or record the tail encrypted message of storing and the encrypted message that the user inputs are verified; Described display module 23 specifically is used for reading at least one note son file that described note master file comprises, when described authentication module 25 verifies out that the encrypted message of storing in described record-header and/or the record tail is consistent with the encrypted message of user's input, note son file content is loaded into forms shows.
The reading device of the multimedia note that provides by present embodiment is carrying out file when decompressing, and can obtain simultaneously the super notes content that comprises in the compressed file, and is loaded into forms and shows.Because super notes content is to be added on after original compressed file, super note master file big or small unrestricted, the notes content of any size can add and be read, comprise picture file, audio file, video file, animation file or hyperlinked information file, can satisfy people to the requirement of the audio-visual elements such as vision or the sense of hearing.
By the technical scheme that the embodiment of the invention provides, the user can add song, game or video in compressed file, just can limit solution flanging listen song, play games or see video when decompressing like this; The user also can add the Extraordinary picture in compressed file, the background of this picture as the compression interface can be shown when decompressing like this; The user also can add interesting various application in the internet in the compressed file to.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize according to some or all some or repertoire of parts in the device of the embodiment of the invention.The present invention can also be embodied as be used to part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.