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 and read the field, relate to a kind of digital reading form to the conversion method of another digital reading form.
Background technology
Because the existing digital reading forms such as WORD, PDF, EPUB are to design for conventional internet, do not consider interactive experience feature, touch gestures feature and the moving characteristic of mobile Internet terminal, when therefore being grafted directly to mobile Internet, just have ways of presentation more single, the shortcomings such as user-interaction experience is unfriendly, its ability significantly can't satisfy people in the mobile Internet field the further demand for multimedia, Interactive Experience, multiple dimension logic.
For WORD, PDF, the existing formatted defects such as EPUB, the applicant has developed a kind of new digital reading form--DMM (Digitalized Multidimensional Multimedia numeral various dimensions multimedia) form.The DMM form is based on the basis of conventional internet content format, the document format that increases the characteristic of mobile Internet and produce, in order to content is carried out various dimensions, logic, intelligentized interactive presentation, can provide more friendly mutual reading experience for terminal.
DMM digital reading form is a kind of digital various dimensions multimedia form that is independent of hardware, software, operating system and various portable sets.At present, DMM digital reading form has adapted to the operating system of main flow, comprise IOS, Android, Windows etc., can tell again panel computer (Pad), smart mobile phone (Phone), intelligent television (TV) under each operating system item.Only need produce once, just all standing can be carried out in the multiple operating system multiple terminals.
Paper media's inconvenience originally or the new media service that can't provide can be provided the document of DMM digital reading form, carry out and content interaction when receiving information, select self needed information, what bring to the user simultaneously is instinct type, personalization, interactive reading, gives the brand-new intuition reading experience of reader.
The multidimensional of information is expressed the limitation that refers to cross over by DMM digital reading form the space, and the omnibearing multidimensional that information is carried out on the space is expressed.Information can be expressed by three dimensions, represents solid space with the X/Y/Z axle, can be with information from the up and down, the form of left and right, vertical five dimensions represents to the reader, expanded the form that represents of original single dimension, brought new reading experience to the reader.
At present, there have been many mobile digital publishing media (comprising Newspaper Media, magazine media etc.) to adopt the DMM form as the reading form of mobile digital media, obtained good reading experience effect.
Fig. 1 has provided the basic fundamental Organization Chart of DMM file structure.The DMM file structure comprises a plurality of parts, is comprised of many levels, comprises XML, OPF (Open Packaging Format), the content formats such as OCF (Open Container Format).
a)XML
Due to the proprietary form of XML right and wrong, be with good expansibility and portability; But also be easy to read and write, make XML become desirable form at different application swapping datas.DMM adopts the XML technology to describe format structure and document data, has realized the structuring of data, can be easy to carry out exchanges data, parsing, editor, reading with other system.
b)OPF
Open parcel form (Open Packaging Format, OPF) 2.0, definition is take the .opf file structure of XML as the basis; DMM adopts the OPF form to define the descriptor of DMM document and the logical structure information of the page.
c)OCF
OEBPS holds form (OEBPS Container Format, OCF) 1.0, all associated documents are collected among the ZIP archive file, and DMM adopts OCF to come organizational integration DMM page format and document data information and the resource used is the storage format of .dmm suffix.
D) digital copyright protecting DRM
The DMM document is supported digital copyright protecting.The DRM protection mainly contains three kinds of modes: digital signature, DRM encrypt and the third party encrypts.Digital signature should be able to be verified user identity and document content, is used for preserving information and the signed content state at that time of signer.Simultaneously, the support of DMM form prevents uncommitted user's browsing document by document being encrypted to guarantee the safety of document.In addition, the DMM document is also supported third party DRM scheme.
In the page of DMM digital reading form, fundamental element comprises text (Text), figure (Graph), image (Image), audio frequency and video (Audio, Video) etc.The focus (Focus) of DMM digital reading form is mainly completed the redirect of the page or is opened the operations such as text, picture, webpage.
Summary of the invention
How the digital reading forms such as PDF, EPUB for having existed at present can exist present use the document of form to convert the document of DMM digital reading form to fast and 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 matters, the invention provides a kind of already present digital reading form to the conversion method of DMM digital reading form, described conversion method comprises:
A. parse format information and the space of a whole page content element of former digital reading form according to the formal definition of former digital reading form, described space of a whole page content element comprises one or more in background element, picture element, text element and video elementary;
B. the space of a whole page content element with former digital reading form converts the corresponding content format of DMM form to.
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 is converted to the picture profile of DMM form, described picture profile comprises display region information and the picture resource file of picture; The text element of space of a whole page content element is converted to the text profile of DMM form, described text profile comprises 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 being converted to the video profile of DMM form, described video profile comprises 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 is converted to the DMM form specifically comprises:
C1 reads the layout information corresponding to picture of former digital reading form, layout information is converted 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 to the picture resource file of DMM format picture profile;
C3 increases action on DMM format picture resource file, eject the enlarged drawing of this picture when the 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 is converted to the DMM form specifically comprises:
D1 reads layout information corresponding to former digital reading format text, 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 content and the corresponding form of the text of text profile;
D3 increases action in the viewing area of DMM format text, ejects the text that amplifies when the user clicks this zone.
Further, the video profile that the video elementary of space of a whole page content element is converted to the DMM form specifically comprises:
E1 reads layout information corresponding to former digital reading format video, 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 increases action in the viewing area of DMM format video, ejects the video that amplifies when the user clicks this zone.
Further, if former digital reading form overlay unit have the setting of viewing area, form the area size of DMM form overlay according to the former digital reading form of certain proportional zoom viewing area; Otherwise the DMM form overlay that forms will be the full page zone.
Further, also the document of the DMM form that forms can be compressed to the page thumbnails that suitable size forms the DMM form, the user can be by the thumbnail list of the page document of can reading fast when browsing the DMM document.When the user passes through terminal browsing pages thumbnail, namely can amplify the information that page thumbnails is checked the master size of DMM format file by gesture, also can click corresponding text or picture region popup web page and eject details.
By method of the present invention, those skilled in the art can be directly changed into the DMM form with present common digital publishing form (for example: WORD, TXT, HTML, PDF, EPUB, CEBX-M etc.).The editorial staff both can directly issue the DMM form after conversion, also can pass through secondary processing, increased abundanter content and then issue on the basis of the form after conversion.
Description of drawings
Fig. 1 is the basic fundamental Organization Chart of DMM file structure
Fig. 2 is the holistic approach of digital reading format 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
Embodiment
Below in conjunction with accompanying drawing, technical scheme provided by the invention further is described in detail.
The method that becomes the DMM form by former digital reading format conversion as shown in Figure 2.
Formal definition according to former digital reading form is resolved former form, obtains 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 comprises 0 or background element, 0 or a plurality of text element, 0 or a plurality of picture element, 0 or a plurality of video elementary.
Described text element comprises layout information, and the content of text and the format information of text, described picture element comprise layout information and picture resource file, and described video elementary comprises 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 there is format information in former digital reading form, extract the format information of former digital reading form, and the space of a whole page size of former digital reading form is carried out computing with the space of a whole page size of DMM form, 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) for example, the space of a whole page size definition that will convert the DMM form to is 1024*768, and the space of a whole page size of former digital reading form is:
<the space of a whole page is high〉14784</space of a whole page is high 〉,<space of a whole page is wide〉10396</space of a whole page is wide 〉
S is 1024/14784 (0.0693) and 768/10396 (0.0739) minimum value, i.e. S=0.0693.
If there is background element in former digital reading form, background element is converted to the background profile of DMM form, otherwise adopts the relevant information (such as default background colour or Background or both have) of default background element as the background of DMM form; If Non-precondition does not increase the background of DMM form.
Resolve the elements such as text in former form, picture, video, and form tabular array V according to the order in former form.Take out according to this element from array V, then judge the type of element, if text element converts the text profile of DMM form to; If picture element converts the picture profile of DMM form to; If video elementary converts the video profile of DMM form to.Until complete element conversions all in array V.
Described background profile comprises 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 comprises the display region information of text, the content of text and the format information of text; Described picture profile comprises display region information and the picture resource file of picture; Described video profile comprises display region information and the video resource file of video.
Background, picture, text and video after conversion are presented at according to its definition form an image on screen, this compression of images is formed the page thumbnails of DMM form to suitable size, the user can be by the thumbnail list of the page document of can reading fast when browsing the document of DMM form.
When the user browses this page by terminal, namely can amplify the document master information that the page is checked the DMM form by gesture, also can click corresponding text, picture or video area popup web page and eject details.
The background element that Fig. 3 has described former digital reading form converts the method for DMM form overlay profile to.
If former digital reading form overlay unit have the setting of viewing area, form the viewing area size of DMM form overlay according to the former digital reading form of zoom factor S convergent-divergent viewing area; Otherwise the DMM form overlay viewing area that forms will be the full page zone.
Read the background element of former digital reading form, if there is background information in former digital reading form, described background information is one or more in background picture and background color, uses the background information of former digital reading form as the background information of DMM form; Otherwise the background picture of use systemic presupposition or background color are as the page layout background of DMM form.
For example, if in the EPUB form in the xhtml page body element<body bg=" #ff0000 " use background color ff0000 (namely red) as the background color of DMM form overlay, if the body element does not have background color or background picture, if and the default background color of systemic presupposition this moment is black, use black to be the background color of DMM form page layout background.
The picture element that Fig. 4 has described former digital reading form converts the method for DMM format picture profile to.
If there is layout information (being that picture element is absolute display position at the display position of former digital reading formal definition) in the picture element of former digital reading form, the layout information with picture element is converted to the display region information of DMM format picture profile according to zoom factor S: the display region information of DMM format picture profile comprises upper left corner coordinate, width and height.If there is not layout information in former digital reading form, width and the height of DMM format picture viewing area are set according to the resolution of former digital reading format picture, and the lower left corner of the previous element of this picture element in data list V is the upper left corner of DMM format picture viewing area.
For example, in former digital reading form, the layout information of picture element is defined as follows:<space of a whole page figure mapping〉<summit〉30.49%, 50.10%</summit〉<summit〉56.11%, 50.10%</summit〉<summit〉56.11%, 70.10%</summit〉<summit〉30.49%, 70.10%</summit〉<space of a whole page figure mapping 〉.
S=1024 wherein, after the conversion, the display region information of DMM format picture is: upper left corner coordinate is (1024*30.49%, 1024*50.10%) be (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 the layout information definition 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, the zone that converts the DMM format picture to is that the upper left corner is (0,300), width is 300, is highly 400.
With former digital reading format picture element the 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 of quoting the external resource title of XML form, directly the resource file of quoting in the XML definition is saved as the picture resource file of DMM format picture; If what former form adopted is binary formal definition, binary memory block corresponding to picture resource file in former digital reading formal definition extracted, then system can produce a resource file and the binary file storage block is dumped in new resource file, and the file in the resource file that this is new is quoted the picture resource file of giving DMM format picture profile.Below text, video etc. to the disposal route of resource file similarly.
Viewing area at the DMM format picture increases focus.The viewing area of picture is the hot spot region of focus.If the picture element of former digital reading form has defined high definition figure, the ejection of focus is high definition figure, otherwise is former picture resource file.
The major function of focus is action of definition on some zones of the page (being referred to as the hot spot region), when the user has been equivalent to trigger with finger touch this when zone the action behavior that ejects the functions such as a pictures, text or ejection full screen video.Specifically can with reference in the DMM agreement about the definition of focus.
For example, if former digital reading form adopts the XML formal definition, shown in being defined as follows about the part of picture element:
<picture 〉
<filename〉6001_b.jpg</filename〉<!-resolution is 200*500--〉
</picture 〉
<high definition figure 〉
<filename〉6001_b.GIF</filename〉<!-resolution is 600*1500--〉
</high definition figure 〉
When increasing focus, because the tif file layout is not supported by terminal, therefore at first need the unloading of tif file is become the png file layout.Be the 6001_b.png file with the unloading of 6001_b.GIF file, then the picture resource of focus ejection is 6001_b.png high definition image resource file; If there is no high definition Figure 60 01_b.GIF, the picture resource that ejects of focus is the 6001_b.jPg resource file
The text element that Fig. 5 has described former digital reading form converts the method for DMM format text profile to.
The content of text of the 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 it (is that text element is absolute display position at the display position of former digital reading formal definition that there is layout information in the text element of former digital reading form, identical with the define method of the absolute display position of picture element), layout information is converted to the display region information of DMM format picture profile according to zoom factor: namely the display region information of DMM format text profile comprises upper left corner coordinate, width and height.If there is not layout information in the text element of former digital reading form, 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 needs the height according to content of text and property calculation needs thereof.
If when there are the attributes such as font, font size, background colour, color in the text element of former digital reading form, these attributes are converted to the corresponding format information of DMM format text profile; Otherwise use default default attribute that the corresponding format information of DMM text profile is set.
Increase focus in the viewing area of text, the viewing area of text is the hot spot region of focus, moves the demonstration of carrying out whole screen text for opening text.
The video elementary that Fig. 6 has described former digital reading form converts the method for 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, if the form of the video resource file of former video elementary is not terminal support, needs that former video resource file is called the video format conversion program and change into the form that terminal is supported.Such as the video resource file of former form is the mpeg2 form, because the most terminals of mpeg2 form are not supported, need to be the video resource file of mpeg4 form with the video resource file unloading of mpeg2 form.
If there is layout information in the video elementary of former digital reading form, layout information (being that video elementary is absolute display position at the display position of former digital reading formal definition, identical with the absolute display position define method of picture element) is converted to the display region information of DMM format video according to zoom factor.If there is no layout information is set to width and the height of DMM video display area according to the size of video resource file, the lower left corner of its previous element in data list V is the upper left corner of DMM format video viewing area.
Viewing area at video increases focus, and the viewing area of video is the hot spot region of focus, moves and plays for opening amplification (for example, full frame) video.
The present embodiment is that a page for former digital reading form carries out the DMM format conversion, when having a plurality of page for former digital reading form, for each page in a plurality of pages wherein, can carry out according to the method for the present embodiment the conversion of DMM form.