The application is the Microsoft's PCT application that propose on May 17th, 2003, that specify All Countries except the U.S. by the U.S..
DETAILED DESCRIPTION OF THE PREFERRED
The invention provides a kind of with the mechanism of transformation applications in many parts file.This mechanism provides a kind of structure of designated conversion information.This transitional information and translation data exist in same document jointly.Preferably preferentially based on a kind of file layout of a plurality of parts, this form allows the several data stream type to this mechanism of the present invention in a document.The inventor determines that the link of object especially is very suitable for embodiments of the invention with the file layout that embedding (OLE) mixes.Therefore, will use the mixed file form to describe the present invention below.Yet after the description below having read over, one of ordinary skill in the art will recognize that other many parts file layout can be carried out embodiments of the invention, by describing the different modification of mechanism and adapt to these other a plurality of file layouts to following.Therefore, be understandable that embodiments of the invention are not restricted to the description here.
At first, will the present invention be described with reference to the computer environment example that the present invention can implement.Secondly, will describe certain embodiments of the present invention in detail.Optional embodiment also can comprise the specific detail about specific embodiment.
The computer environment that the present invention is exemplary
Fig. 1 is the functional block diagram of the operable computer equipment of the example embodiment of the invention.Fig. 1 shows the typical computer equipment that uses in the exemplary embodiment of the present, and with reference to figure 1, in a configuration the most basic, computer equipment 100 has generally comprised a processor 102 and system storage 104 at least.The precision architecture and the type that depend on computer equipment 100, system storage 104 can be (for example RAM) that easily loses, non-volatile (for example ROM, flash memory or the like) or both combinations.System storage 104 generally comprises operating system 105, one or more program module 106, and can comprise routine data 107.The example of program module 106 comprises a browser application, a finance management application, Word and similar software.Those assemblies in 108 come these basic structures of diagram by a dotted line in Fig. 1.
Computer equipment 100 can have extra characteristics and function.For example, computer equipment 100 also can comprise other data storage device (removable and/or non-removable), for example disk, CD or tape.This extra the storer removable storer 109 as shown in Figure 1 and the storer 110 of non-removable.Computer storage media may can comprise be used for information stores by any way or the easy mistake of technology implementation and non-volatile, removable and medium non-removable, computer readable instructions for example, data structure, program module, perhaps other data.The storer 110 of system storage 104, removable storer 109 and non-removable all is the example of computer storage media may.Computer storage media may is including, but not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital video disc (DVD) or other optical memory, magnetic tape cassette, tape, magnetic disk memory or other magnetic storage apparatus, other any medium that perhaps can be used to store information needed and can be visited by computer equipment 100.Any this computer storage media may is the part of equipment 100.Computer equipment 100 can also have input equipment 112, keyboard for example, and mouse, input pen, voice-input device, touch input devices etc. have also comprised output device 114, for example, display, loudspeaker, printer etc.These equipment all are well known in the art, in this unnecessary detailed discussing.
What computer equipment 100 can also comprise that permission equipment 100 and other computer equipment 118 communicate communicates to connect 116, for example is by a network.Communicating to connect 116 is examples of communication medium.Communication medium generally can comprise computer-readable instruction, data structure, and program module, perhaps with other data of a kind of data-signal form of modulation, for example, carrier wave or other transmission mechanism, and comprise any information transmission media.Term " data-signal of modulation " means a kind of signal with one or more character set own, perhaps changes by this way signal message is encoded.As an example but be not limited to this, communication medium comprises wired media, for example cable network or directly wired connection, and wireless medium, sound for example, RF, infrared ray and other wireless medium.Terminology used here " computer-readable media " had both comprised that medium also comprised communication medium.
The general discussion of assembly
Fig. 2 is the functional flow diagram of the overview of the parts of example embodiment of the invention environment usually.Example be many parts file 202, preferably OLE composite file.The OLE file mode is well known in the art and is thought to comprise a lot of a kind of mechanism of different types of data fully widely in single file.The OLE composite file uses together in conjunction with the content of many embedded type files or other support relevant with single file usually.Each element in the composite file is stored in one way, can handle these elements so that create the application program of this element.Each element is stored as a data stream, for example data stream 204,206 and 208 as shown in Figure 2.As mentioned above, each data stream can be a kind of in the several types.For example, data stream 1 204 can be a word processing file, and data stream 2 206 can be a spreadsheet, and data stream Z 208 can be a graphic file.
In the past, when request was changed on many parts file 202, whole many parts file 202 (being data stream 204-208) all requirement must be continuous and conversion together.Yet according to the present invention, these data stream 204-208 needs not to be continuous.And these data stream 204-208 can be based on section.In the following discussion, refer to the file with a plurality of data blocks based on the file of section, these data are stored and have represented entire stream.A plurality of can be continuous storage, but is not continuous generally speaking.In one embodiment, these pieces are fixed sizes, for example are fixed on 512 bytes.Alternatively, these pieces can be variable sizes within not departing from the scope of the present invention.When these data stream are edited, can create new data block, and store with the discontinuous byte of the data block of other relevant with these data stream.Therefore, allow the light editor of data stream based on the file of section, and do not guarantee that data stream keeps successional expense.
As below describing in detail, the present invention allows to specify data block 240 relevant with a data stream (for example data stream 206) in many parts file 202 to carry out conversion, rather than changes other data stream.Because the present invention allows to specify the data stream that does not rely on other data stream to change, therefore the invention provides the huge dirigibility of protection and control data.For example, Fig. 2 shows a transfer process of data stream 2 206 experience.Data stream 2 206 can represent to comprise an electrical form of the cost relevant with special item.Therefore, need maintain secrecy, so that undelegated user can not check these costs to these cost information.Therefore, be a series of conversion of data stream 2 206 data designated, 240 experience (for example, conversion 220-224).Will be understood that many conversions can make link and these links can be with any order as those of ordinary skill in the art.The order of the specific conversion of link and conversion link has been represented data space 230.General, data space can be specified a conversion or be specified a plurality of conversions.In the above example, the data that last conversion (for example changing 224) will have been changed write the data stream 2 206 that resides in the hard disk (not shown).Describe this mechanism of use in detail with the embodiment of transformation applications below in conjunction with accompanying drawing 4 to many parts file.
The discussion of specific embodiments of the present invention
Fig. 3 illustrates an embodiment of the tree hierarchy of representative metadata about transformation 210 illustrated in fig. 2.General, tree hierarchy can be included in by any way with the compatible mutually many parts file of many parts file in.Following discussion will be described tree hierarchy in conjunction with compound files.Generally speaking, compound files is generally considered to be " file system in the file ".In compound files is the level of " storer " and " data stream ", and " storer " is similar to the catalogue in the file system, and " data stream " is similar to the file in the file system.In Fig. 3, square frame representative of data flow, the oval storer of representing.Before the conversion of describing metadata 210 of the present invention, what should be noted that a bit is by diagram under the root 302 of data stream 204-208 (shown in Fig. 2) in the level of this example.The definition of data stream is an ordinary skill in the compound files form under the root.
The conversion of metadata 210 provided by the invention is discussed now in further detail.Break away from root 302 called after “ $006DataSpaces " 310 specific memory storage metadata about transformation 210.$006DataSpace storer 310 comprises 320, one DataSpaceInfo storeies 330 of a DataSpaceMap data stream and TransformInfo storer 340.In the present embodiment, select to be used as the title “ $006DataSpaces of specific memory " write in the C programming language.Therefore, in the present embodiment, title is with single non-alphanumeric mark beginning, and the value of this mark is 6.General, the title of distributing to this specific memory is arbitrarily, depends on user's enforcement.
Its relevant data space of DataSpaceMap data stream 320 usefulness comes and data stream (for example, data stream 204-208) is shone upon.In one embodiment, DataSpaceMap data stream 320 is the forms with two row: stream index row 322 and DataSpaceName row 324.Content in the stream index row 322 refers to a data stream (for example, data stream 204-208) that is stored in the compound files.Content in the DataSpaceName row refers to specific data space, and this data space has defined the relevant data stream of identification in the stream index row 322.A data space can be associated with many data stream.For example, as shown in Figure 3, being identified as the data space of " DataSpaceNamel " and data stream 1 204 and data stream 2 206 is associated.Yet above-described DataSpaceMap data stream 320 is described as a form with DataSpaceMap data stream 320, and what those having ordinary skill in the art will appreciate that is also to use other data layout to discern and data stream is associated with data space.
DataSpaceInfo storer 330 comprises one or more DataSpaceName data stream (for example, DataSpaceName data stream 332 and 334).In described embodiment, tradition DataSpaceName data stream secundum legem, the compound files short name is named.Each DataSpaceName data stream 332 and 334 has been discerned the conversion of the catalogue 336 relevant with separately DataSpaceName data stream 332 and 334.In one embodiment, each DataSpaceName data stream 332 and 334 can be one group of sequential conversion list that is made of data space.Because the conversion storehouse, the order of catalogue 336 is important.In one embodiment, first conversion 337 in these catalogues 336 is called " bottom " conversion, and meaning these conversions 337 is the positions of approaching in the bottom data stream (for example, data stream 204).Last conversion 339 in these catalogues 336 is called " top " conversion, and meaning these conversions 339 is user and generation person and the producers that approach data (for example, application program).As in conjunction with the accompanying drawings 4 and the detailed description of carrying out hereinafter, the order decision in these catalogues 336 is through the data converted data stream.
TransformInfo storer 340 comprises one or more TransformInstance storer (for example, TransformInstance storer 342,344 and 346).In one embodiment, the title of these quantum memories is exactly the title of these conversions.In each TransformInstance storer 342,344 and 346, has a called after " $006Primary " data stream of 350 at least.$006primary data stream 350 comprises the relevant information of particular conversion, for example TransformClass type 354 and TransformClass title 356.The transform class of a kind of special special conversion of realization of this TransformClass type 354 expressions (for example, the LZ compression, digital rights management (DRM) protection, or the like).In one embodiment, TransformClass title 356 is appointed as a character string (for example, type) of discerning these transform class uniquely.The character string of discerning these classifications can be to realize the item name of these transform class.TransformClass type 354 has been stipulated a kind of type indicator of how explaining the character string of appointment in the TransformClass title 356 of informing.$006Primary data stream 350 may also comprise the data space of Transformlnstance358.TransformInstanceData 358 storage is designated as the information of the specified conversion of TransformClass title 356 and TransformClass type 354.For example, if these conversions are a kind of compressing and converting, TransformInstanceData 358 may comprise a window size and analog.
For certain conversion, TransforraInstanceData 358 can allow enough spaces to store necessary information.Therefore, as further improvement, the present invention allows conversion storing additional information (for example, the TransformInstanceData data stream 370) in the TransformInstanceData data stream.Short of Tong $006primary data stream 350 afoul titles allow.The kind of TransformInstanceData will depend on the type of this conversion and change.
Be used to utilize transitional information to store the embodiment of the file layout of translation data though above-mentioned tree hierarchy has been described one, those skilled in the art under the situation that does not influence the present invention's operation, can change this hierarchy as can be known.Therefore the tree hierarchy and the translation data of any storage transitional information can not break away from the present invention.Accompanying drawing 4 is graphical explanations of transfer process, uses according to mechanism of the present invention, that be used to format the file with translation data in this process.In this illustrative transfer process, application program 400 is attempted many parts file 202 that read and write is described in accompanying drawing 2.In general, each example of transform class as input, outputs to another one IStream interface with (the i.e. conversion) data of encoding with the IStream interface.Conversion (for example, conversion 420 and 422) is registered, and the data space relevant with data stream 206 also specify, for example the application programming interface that provides via the OLE composite file.For example, when at first creating data stream 206, create the application program of the data stream 206 in many parts file 202 and be responsible for specifying which transformation applications in these data.Perhaps, these take place through an argument list, and described each argument is equivalent to a kind of conversion.
These write access are through an OS layer.In the past, write operation flows 2 206 through IStream interface 414 visit datas.Yet according to the present invention, one or more conversion can be inserted into before the IStream interface 414.Each conversion (for example, conversion 420 and 422) gets the IStream interface as input (being respectively IStream interface 410 and 412), and to another IStream interface (being respectively IStream interface 412 and 414) output (that is conversion) data of coding wherein.
Similarly, when application program 400 attempts to read data stream 2 206 in many parts file 202, can insert one or more inverse conversion (for example, inverse conversion 450 and 452).The number of inverse conversion and the number of conversion match, this be for data correctly decoded so that application program is appreciated that data.5 be described in the mode of inserting conversion between application program 400 and the data stream 206 in conjunction with the accompanying drawings now.
Fig. 5 is a width of cloth logical flow chart, is used for usually describing the process that visits the translation data in the compound files according to the present invention.Process 500 starts from starting block 501, the data in the data stream of this application requests visit many parts file.Transitional information 210 has been specified data stream.
In decision box, whether specified data stream is the member of data space.With reference to the accompanying drawings 3, in one embodiment, this is to determine by the stream index 322 of retrieval identification request data stream in DataSpaceMap.If do not have to find the stream index 322 relevant with data stream, conversion and processing that data stream does not then have any definition proceed at last.In this case, application program is with the mode visit data before the present invention.Yet event data stream index 322 is included among the DataSpaceMap, handles in square frame 504 and proceeds.
In square frame 504, obtain the DataSpaceName relevant with stream index.DataSpaceName can be character string or other any form.
In square frame 506, use the DataSpaceName that obtains from square frame 504, retrieval DataSpacelnfo storer is discerned the DataSpaceName data stream relevant with the DataSpaceName that is identified in DataSpaceMap.The DataSpaceName data stream comprises a conversion list relevant with the data space name.
In square frame 508, identification is from the conversion in the catalogue.Write or read according to visit, conversion can be distinguished coded data or decoded data.The DataSpaceName data stream is listed each conversion with the order of appointment.If visit is a kind of writing, order is from the top to the bottom.If visit is a kind of reading, order is from the bottom to the top.
In square frame 510, use the conversion of being discerned.When implementing conversion, use the transform instances data to come correct translation data.If visit is a kind of writing, carry out conversion (coding).If visit is a kind of reading, carry out inverse conversion (decoding).
In decision block 512, whether the specified data space comprises further chained transforms.Whether this can also quote transform instances and be determined by checking catalogue 336.If in data space, implemented last conversion, change output data at last and finish this process.Yet,, handle turning back to square frame 508 and carrying out aforesaid processing, up to having carried out last conversion if also have another conversion list.
In addition, what it will be appreciated by those skilled in the art that is that it can be to realize in a different manner that 300 functions that provided are provided.For example, can there be direct mapping (skipping the use of data space) from the stream name to the conversion list.Therefore, the present invention includes these and other data stream is mapped to the embodiment of its transitional information.Handle 500 and show a such embodiment.
The complete explanation that above-mentioned instructions, embodiment and data provide manufacturing of the present invention and have been used in combination.Owing under the situation that does not break away from the spirit and scope of the present invention, a lot of embodiment can be arranged, therefore the invention belongs to following appending claims.