A kind of digital reading form is to the conversion method of digital various dimensions multimedia (DMM) form
Technical field
The invention belongs to mobile digital reading field, relate to a kind of digital reading form conversion method to another digital reading form.
Background technology
Owing to the existing digital reading form such as WORD, PDF, EPUB is to design for conventional internet, do not account for the interactive experience feature of mobile Internet terminal, touch gestures feature and moving characteristic, when being therefore grafted directly to mobile Internet, just have ways of presentation more single, the shortcomings such as user-interaction experience is unfriendly, its ability significantly cannot meet people in mobile Internet field for multimedia, Interactive Experience, multiple dimension logic further demand.
For existing formatted drawbacks described above such as WORD, PDF, EPUB, applicant develops a kind of new digital reading form--DMM (DigitalizedMultidimensionalMultimedia numeral various dimensions multimedia) form.DMM form is based on the basis of conventional internet content format, increases the characteristic of mobile Internet and the document format that produces, in order to content is carried out various dimensions, logically, intelligentized interactive presentation, it is possible to provide more friendly mutual reading experience for terminal.
DMM digital reading form is a kind of digital various dimensions multimedia form independent of hardware, software, operating system and various portable set.At present, DMM digital reading form has adapted to the operating system of main flow, including IOS, Android, Windows etc., panel computer (Pad), smart mobile phone (Phone), intelligent television (TV) under each operating system item, can be separated again.Only need to produce once, it is possible to multiple operating system multiple terminals is carried out all standing.
The document of DMM digital reading form can realize paper media's inconvenience originally or the new media service that cannot provide, carry out and content interaction while accepting information, select self required information, what bring to user is instinct type, personalization, interactive reading simultaneously, to the intuition reading experience that reader is brand-new.
The multidimensional of information is expressed and is referred to the limitation being crossed over space by DMM digital reading form, information carries out omnibearing multidimensional spatially and expresses.Information can be expressed by three dimensions, represents solid space with X/Y/Z axle, it is possible to by information from upper and lower, left and right, the form of vertical five dimensions be presented to reader, that has expanded original single dimension represents form, brings new reading experience to reader.
At present, there have been many mobile digital publishing media (including Newspaper Media, magazine media etc.) to adopt DMM form as the reading form of mobile Digital Media, achieved good reading experience effect.
Fig. 1 gives the basic fundamental Organization Chart of DMM file structure.DMM file structure includes multiple part, is made up of many levels, the content format such as including XML, OPF (OpenPackagingFormat), OCF (OpenContainerFormat).
a)XML
Due to the form that XML is non-proprietary, it is with good expansibility and portable;But also be prone to read and write so that XML becomes the desired format at different application swapping datas.DMM adopts XML technology to describe format structure and document data, it is achieved that the structuring of data, it is possible to be easy to carry out data exchange, parsing, editor, reading with other system.
b)OPF
Open parcel form (OpenPackagingFormat, OPF) 2.0, definition .opf file structure based on XML;DMM adopts OPF form to define the description information of DMM document and the logical structure information of the page.
c)OCF
OEBPS holds form (OEBPSContainerFormat, OCF) 1.0, being collected to ZIP archive file by all associated documents, DMM adopts OCF to carry out the storage format that resource is .dmm suffix of organizational integration DMM page format and document data information and use.
D) digital copyright protecting DRM
Digital copyright protecting supported by DMM document.DRM protection mainly has three kinds of modes: digital signature, DRM encryption and third party's encryption.User identity and document content should be able to be verified by digital signature, for preserving information and the signed content state at that time of signer.Meanwhile, the support of DMM form by being encrypted the safety ensureing document to document, it is prevented that unauthorized user's browsing document.Additionally, third party's DRM scheme also supported by DMM document.
In the page of DMM digital reading form, basic element includes text (Text), figure (Graph), image (Image), audio frequency and video (Audio, Video) etc..The focus (Focus) of DMM digital reading form mainly completes redirect or open text, picture, the webpage etc. of the page and operates.
Summary of the invention
For digital reading forms such as PDF, EPUB of currently existing, how quickly the currently used document that there is form can be converted to the document of DMM digital reading form and to keep the layout structure of original digital reading form to become publishing house and periodical publisher's technical issues that need to address.
In order to solve this technical problem, the invention provides a kind of already present digital reading form conversion method to DMM digital reading form, described conversion method includes:
A. defining according to the form of former digital reading form and parse format information and the space of a whole page content element of former digital reading form, it is one or more that described space of a whole page content element includes in background element, picture element, text element and video elementary;
B. the space of a whole page content element of former digital reading form is converted to DMM form corresponding content format.
Wherein, the format information of former digital reading form comprises the size information of the space of a whole page.
Further, the picture element of space of a whole page content element converting the picture profile of DMM form to, described picture profile includes display region information and the picture resource file of picture;The text element of space of a whole page content element converts to the text profile of DMM form, and described text profile includes the display region information of text, the content of text and the format information of text;Or the video elementary of space of a whole page content element is converted to the Video Profile of DMM form, described Video Profile includes display region information and the video resource file of video.
Further, the picture profile that the picture element of space of a whole page content element converts to DMM form specifically includes:
C1 reads the layout information corresponding to picture of former digital reading form, and layout information converts to the display region information of the picture profile of DMM form;
C2 transfers the picture resource file of former digital reading format picture element the picture resource file of DMM format picture profile to;
C3 increase action on DMM format picture resource file, ejects the enlarged drawing of this picture when user clicks the viewing area of DMM format picture resource file.
Further, the text profile that the text element of space of a whole page content element converts to DMM form specifically includes:
D1 reads the layout information that former digital reading format text is corresponding, and layout information is converted to the display region information of DMM format text profile;
D2 reads content and the text formatting information of the text of former digital reading format text element, is converted to the content of the text of text profile and corresponding form;
D3, in the viewing area increase action of DMM format text, ejects the text amplified when user clicks this region.
Further, the Video Profile that the video elementary of space of a whole page content element converts to DMM form specifically includes:
E1 reads the layout information that former digital reading format video is corresponding, and layout information is converted to the display region information of DMM format video profile;
E2 reads the video resource file of the video elementary of former digital reading form, is converted to the video resource file of the Video Profile of DMM form;
E3, in the viewing area increase action of DMM format video, ejects the video amplified when user clicks this region.
Further, if former digital reading form overlay unit have the setting of viewing area, then the area size of DMM form overlay is formed according to certain proportional zoom former digital reading form viewing area;The DMM form overlay otherwise formed will be full page region.
Further, the document of the DMM form of formation also can being compressed to the suitably sized page thumbnails forming DMM form, user can quickly can be read document by the thumbnail list of the page when browsing DMM document.When user is by terminal browsing pages thumbnail, namely can amplify, by gesture, the information that page thumbnails checks the master size of DMM format file, it is also possible to click corresponding text or picture region popup web page ejects details.
By the method for the present invention, common at present digital publishing form (such as: WORD, TXT, HTML, PDF, EPUB, CEBX-M etc.) can be directly changed into DMM form by those skilled in the art.DMM form after conversion both can directly be issued by editorial staff, it is also possible to increases more rich content in secondary operations, the basis of form after conversion and then issues again.
Accompanying drawing explanation
Fig. 1 is the basic fundamental Organization Chart of DMM file structure
Fig. 2 is the holistic approach of digital reading form conversion
Fig. 3 is the method for background element conversion
Fig. 4 is the method for picture element conversion
Fig. 5 is the method for text element conversion
Fig. 6 is the method for video elementary conversion
Detailed description of the invention
Below in conjunction with accompanying drawing, technical scheme provided by the invention is further described in detail.
The method of DMM form is converted to as shown in Figure 2 by former digital reading form.
Define according to the form of former digital reading form and resolve former form, obtain format information and the space of a whole page content element of former digital reading form.Format information mainly comprises the size of the space of a whole page, and space of a whole page content element includes 0 or background element, 0 or multiple text element, 0 or multiple picture element, 0 or a multiple video elementary.
Described text element includes layout information, the content of text and the format information of text, and described picture element includes layout information and picture resource file, and described video elementary includes layout information and video resource file.
The format information of former digital reading form comprises the size information of the space of a whole page.
If former digital reading form exists format information, then extract the format information of former digital reading form, and the space of a whole page size of former digital reading form and the space of a whole page size of DMM form are carried out computing, obtain the value of zoom factor S;Otherwise S=1.
S=MIN (DMM form appearing/former digital reading form appearing, DMM form space of a whole page width/former digital reading form space of a whole page width) such as, the space of a whole page size that will convert DMM form to is defined as 1024*768, and the space of a whole page of former digital reading form is sized to:
<space of a whole page Gao>14784</space of a whole page Gao>,<space of a whole page Kuan>10396</space of a whole page Kuan>
Then S is the minima of 1024/14784 (0.0693) and 768/10396 (0.0739), i.e. S=0.0693.
If there is background element in former digital reading form, then background element is converted to the background profile of DMM form, otherwise adopts the relevant information (such as default background colour or Background or the both have) background as DMM form of default background element;Without presetting, then do not increase the background of DMM form.
Resolve the elements such as the text in former form, picture, video, and form tabular array V according to the order in former form.From array V, take out element according to this, then judge the type of element, if text element then converts the text profile of DMM form to;If picture element then converts the picture profile of DMM form to;If video elementary then converts the Video Profile of DMM form to.Until complete for all of element conversion in array V.
Described background profile includes display region information and the background information of background, and described background information is one or more in background picture and background color;Described text profile includes the display region information of text, the content of text and the format information of text;Described picture profile includes display region information and the picture resource file of picture;Described Video Profile includes display region information and the video resource file of video.
Background after conversion, picture, text and video are shown on screen form an image according to its definition, by this compression of images to the suitably sized page thumbnails forming DMM form, user can quickly can be read document by the thumbnail list of the page when browsing the document of DMM form.
When user browses this page by terminal, namely can amplify the page by gesture and check the document master information of DMM form, it is also possible to click corresponding text, picture or video area popup web page and eject details.
Fig. 3 describes the method that the background element of former digital reading form converts DMM form overlay profile to.
If former digital reading form overlay unit have the setting of viewing area, then form the viewing area size of DMM form overlay according to zoom factor S convergent-divergent former digital reading form viewing area;The DMM form overlay viewing area otherwise formed will be full page region.
Reading the background element of former digital reading form, if former digital reading form exists background information, described background information is one or more in background picture and background color, then use the background information background information as DMM form of former digital reading form;Otherwise, use the background picture of systemic presupposition or background color as the page layout background of DMM form.
Such as, if body element in the xhtml page in EPUB form<bodybg=”#ff0000”>then use background color ff0000 (namely red) as the background color of DMM form overlay, if body element does not have background color or background picture, if and now systemic presupposition default background color is black, then the background color using black to be DMM form page layout background.
Fig. 4 describes the method that the picture element of former digital reading form converts DMM format picture profile to.
If the picture element of former digital reading form exists layout information (namely picture element is definitely show position in the display position that former digital reading form defines), then the layout information of picture element is converted to according to zoom factor S the display region information of DMM format picture profile: the display region information of DMM format picture profile includes top left co-ordinate, width and height.If former digital reading form is absent from layout information, then arrange width and the height of DMM format picture viewing area according to the resolution of former digital reading format picture, the lower left corner of this picture element previous element in data list V is then the upper left corner of DMM format picture viewing area.
Such as, in former digital reading form, the layout information definition of picture element is as follows:<space of a whole page figure figure><ding Dian>30.49%, 50.10%</Ding Dian><ding Dian>56.11%, 50.10%</Ding Dian><ding Dian>56.11%, 70.10%</Ding Dian><ding Dian>30.49%, 70.10%</Ding Dian><space of a whole page figure figure>.
Wherein S=1024, then after conversion, the display region information of DMM format picture is: top left co-ordinate is (1024*30.49%, 1024*50.10%) it is (312,513), width is 1024* (56.11%-30.49%)=262, is highly 1024* (70.10%-50.10%)=205.
In former digital reading form, picture element does not have layout information to define for another example, and the lower left corner of its previous elemental areas in data list V is (0,300), the resolution of picture resource file is 300*400, then converting the region of DMM format picture to be the upper left corner is (0,300), width is 300, is highly 400.
By former digital reading format picture element picture resource file be stored as the picture resource file of DMM format picture profile.If what former digital reading form adopted is this definition quoting external resource title of XML format, directly the resource file quoted in XML definition is saved as the picture resource file of DMM format picture;If what former form adopted is the definition of binary form, then binary memory block corresponding for the picture resource file in the definition of former digital reading form is extracted, then system can produce a resource file and dump in new resource file by binary file memory block, and the picture resource file giving DMM format picture profile quoted by the file in resource file new by this.Text below, video etc. are similar to the processing method of resource file.
Focus is increased in the viewing area of DMM format picture.The viewing area of picture is the hot spot region of focus.If the picture element of former digital reading form defines high definition figure, then the ejection of focus is high definition figure, is otherwise artwork sheet resource file.
The major function of focus is an action to be defined above in some region (being referred to as hot spot region) of the page, is equivalent to when user touches this region with finger trigger and ejects a pictures, text or eject the action behavior of the functions such as full screen video.Specifically it is referred in DMM agreement the definition about focus.
Such as, if former digital reading form adopts XML format definition, the part about picture element defines as follows:
<picture>
<wen Jianming>6001_b.jpg</Wen Jianming><-resolution is 200*500-->
</Tu Pian>
<high definition figure>
<wen Jianming>6001_b.GIF</Wen Jianming><-resolution is 600*1500-->
</high definition Tu>
Then when increasing focus, owing to tif file format is not supported by terminal, therefore become png file format firstly the need of by tif file unloading.Being 6001_b.png file by 6001_b.GIF file unloading, the picture resource that then focus ejects is 6001_b.png high definition image resource file;If there is no high definition Figure 60 01_b.GIF, then the picture resource that focus ejects is 6001_b.jPg resource file
Fig. 5 describes the method that the text element of former digital reading form converts DMM format text profile to.
The content of text of text element of former digital reading form or the quoting resource of text are the content of text of DMM format text profile or the quoting resource of text.
If the text element of former digital reading form exists layout information, (namely text element is definitely show position in the display position that former digital reading form defines, identical with the definition method of the definitely display position of picture element), then layout information is converted to according to zoom factor the display region information of DMM format picture profile: namely the display region information of DMM format text profile includes top left co-ordinate, width and height.If the text element of former digital reading form is absent from layout information, the upper left corner of DMM format text is the lower left corner of its previous element in data list V, the width of viewing area is the width of DMM full page, highly then needs the height needed according to content of text and property calculation thereof.
If the text element of former digital reading form exists the attributes such as font, font size, background colour, color, then these attributes are converted to the DMM corresponding format information of format text profile;Otherwise use default default attribute that the DMM corresponding format information of text profile is set.
Increase focus in the viewing area of text, the viewing area of text is the hot spot region of focus, and action is open text to carry out the display of whole screen text.
Fig. 6 describes the method that the video elementary of former digital reading form converts DMM format video profile to.
The video resource file of former digital reading format video element is stored as the video resource file of DMM format video profile, support if the form of the video resource file of former video elementary is not terminal, then need that former video resource file is called video format converse routine and change into the form that terminal is supported.The video resource file of such as former form is mpeg2 form, owing to mpeg2 form overwhelming majority terminal is not supported, it is necessary to by the video resource file that video resource file unloading is mpeg4 form of mpeg2 form.
If there is layout information in the video elementary of former digital reading form, then layout information (namely video elementary is in the display position that former digital reading form defines for definitely showing position, defines method with the definitely display position of picture element identical) is converted to according to zoom factor the display region information of DMM format video.If there is no layout information, then be sized to width and the height of DMM video display area according to video resource file, and the lower left corner of its previous element in data list V is then the upper left corner of DMM format video viewing area.
Increase focus in the viewing area of video, the viewing area of video is the hot spot region of focus, and action plays out for opening amplification (such as, full frame) video.
The present embodiment is that a page for former digital reading form carries out DMM form conversion, when multiple page is existed for former digital reading form, for each page in multiple pages therein, the conversion of DMM form can be carried out according to the method for the present embodiment.