CN107943915A - The method and device of OFD file Real time displayings based on HTML5 - Google Patents

The method and device of OFD file Real time displayings based on HTML5 Download PDF

Info

Publication number
CN107943915A
CN107943915A CN201711159886.4A CN201711159886A CN107943915A CN 107943915 A CN107943915 A CN 107943915A CN 201711159886 A CN201711159886 A CN 201711159886A CN 107943915 A CN107943915 A CN 107943915A
Authority
CN
China
Prior art keywords
file
ofd
html5
document
xml
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711159886.4A
Other languages
Chinese (zh)
Other versions
CN107943915B (en
Inventor
陈雪萍
杨迪
倪时龙
林振天
陈又咏
黄敬林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
State Grid Shanghai Electric Power Co Ltd
Fujian Yirong Information Technology Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
State Grid Shanghai Electric Power Co Ltd
Fujian Yirong Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Information and Telecommunication Co Ltd, State Grid Shanghai Electric Power Co Ltd, Fujian Yirong Information Technology Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201711159886.4A priority Critical patent/CN107943915B/en
Publication of CN107943915A publication Critical patent/CN107943915A/en
Application granted granted Critical
Publication of CN107943915B publication Critical patent/CN107943915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of method of the OFD file Real time displayings based on HTML5;Server end is decompressed OFD compressing file bags, and by the URL of the OFD file catalogues structure mapping obtained after decompression to HTML5 clients;URI is obtained according to URL;HTML5 clients by URI parse needed for XML file, obtain the information content of the XML file;The information content is converted into corresponding content according to OFD file standards is included on interface;The present invention also provides a kind of device of the OFD file Real time displayings based on HTML5, the task terminal of not depending on can OFD files normal display, greatly improve the compatibility of the display of OFD files.

Description

The method and device of OFD file Real time displayings based on HTML5
Technical field
The present invention relates to a kind of method and device of the OFD file Real time displayings based on HTML5.
Background technology
OFD is a characteristics of format document form is one of basic standard of e-file, consolidates version due to it, all kinds of texts All this standard can be used to carry for the curing result of shelves typesetting requirement;Standard is in format document category based on OFD standards Reflect trade management requirement, there is provided enough autgmentabilities, are parallel with the standard criterion in sector application.HTML5 ten thousand One tieed up under the kernel language netted, standard generalized markup language applies hypertext markup language.On October 29th, 2014, Wan Wei Net alliance and announce that, by the painstaking efforts close to 8 years, which formulates completion finally.Expandable mark language XML (eXtensibleMarkupLanguage) it is a kind of extensible markup language of the text formatting of simple and flexible, originates from SGML, is that a subset of SGML is closed, that is, a simple version of SGML, is very suitable on Web or other more The exchange of data is carried out between kind data source.
At present OFD files online browse mainly by browser plug-in unit such as:Activex controls are straight in a browser With taking format program browses file or it is embedded directly browse, it is necessary to for different browsers write it is different browse plug-in unit, HTML5 clients need to install OFD readers ability normal browsing, as existing browser constantly proposes plug-in security requirement Rise, stability when being browsed based on plug-in unit mode is more and more lower.
The content of the invention
The technical problem to be solved in the present invention, be to provide a kind of method of the OFD file Real time displayings based on HTML5 with And device, the task terminal of not depending on can OFD files normal display, greatly improve the compatibility of the display of OFD files.
What one of present invention was realized in:A kind of method of the OFD file Real time displayings based on HTML5, including it is as follows Step:
Step 1, server end are decompressed OFD compressing file bags, and the OFD file catalogue structures that will be obtained after decompression Map to the URL of HTML5 clients;
Step 2, according to URL obtain URI;
Step 3, HTML5 clients by URI parse needed for XML file, obtain the information content of the XML file;
Step 4, according to OFD file standards by the information content be converted into corresponding content include on interface.
Further, compressed package obtains file catalogue structure, single page file and list in the step 1 after being decompressed The corresponding XML file of page.
Further, each URI includes an OFD file unique marks.
Further, the step 3 is specially further:
The unique mark for the OFD files that HTML5 clients pass through XML file obtains file and corresponds to main xml document path, and Carry out solution to tear open, obtain the document information of the main xml document;
Catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page;
The corresponding URI routing informations of every page in the document are positioned, carry out the parsing of document every page content;
The information content parsed.
Further, the step 4 is specially further:
It is according to OFD file standards, the different information contents is enterprising by painting canvas of the Canves objects of HTML5 at interface Row plot and display.
What the two of the present invention were realized in:A kind of device of the OFD file Real time displayings based on HTML5, including it is as follows Module:
Module is disassembled, server end is decompressed OFD compressing file bags, and the OFD file catalogues that will be obtained after decompression Structure mapping to HTML5 clients URL;
URI acquisition modules, URI is obtained according to URL;
Obtain parsing content module, HTML5 clients by URI parse needed for XML file, obtain the XML file The information content;
Display module, the information content is converted into corresponding content according to OFD file standards is included on interface.
Further, it is described disassemble obtained after compressed package is decompressed in module file catalogue structure, single page file with And single page corresponds to XML file.
Further, each URI includes an OFD file unique marks.
Further, the parsing content module that obtains is specially further:
The unique mark for the OFD files that HTML5 clients pass through XML file obtains file and corresponds to main xml document path, and Carry out solution to tear open, obtain the document information of the main xml document;
Catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page;
The corresponding URI routing informations of every page in the document are positioned, carry out the parsing of document every page content;
The information content parsed.
Further, the display module is specially further:
It is according to OFD file standards, the different information contents is enterprising by painting canvas of the Canves objects of HTML5 at interface Row plot and display.
The invention has the advantages that:The present invention a kind of method and dress of the OFD file Real time displayings based on HTML5 Put, decompressed OFD compressing file bags by server end, and by the OFD file catalogues structure mapping obtained after decompression extremely The URL of HTML5 clients;URI is obtained according to URL;HTML5 clients by URI parse needed for XML file, obtain the XML The information content of file;The information content is converted into corresponding content according to OFD file standards includes the purpose on interface, from And reach the task terminal of not depending on can OFD files normal display, greatly improve the compatibility of the display of OFD files Property.
Brief description of the drawings
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the method for the present invention execution flow chart.
Fig. 2 is the schematic diagram of the specific embodiment of the invention.
Embodiment
As shown in Figure 1, the method for the OFD file Real time displayings of the invention based on HTML5, includes the following steps:
Step 1, server end are decompressed OFD compressing file bags, and the OFD file catalogue structures that will be obtained after decompression The URL of HTML5 clients is mapped to, the compressed package obtains file catalogue structure, single page file and list after being decompressed The corresponding XML file of page;
Step 2, according to URL obtain URI, and each URI includes an OFD file unique marks;
Step 3, HTML5 clients by URI parse needed for XML file, obtain the information content of the XML file: The unique mark for the OFD files that HTML5 clients pass through XML file obtains file and corresponds to main xml document path, and is solved Tear open, obtain the document information of the main xml document;
Catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page;
The corresponding URI routing informations of every page in the document are positioned, carry out the parsing of document every page content;
The information content parsed;
Step 4, according to OFD file standards, by the different information contents by HTML5 Canves objects interface picture Plot and display is carried out on cloth.
The device of OFD file Real time displayings of the invention based on HTML5, including following module:
Module is disassembled, server end is decompressed OFD compressing file bags, and the OFD file catalogues that will be obtained after decompression Structure mapping to HTML5 clients URL, the compressed package obtained after being decompressed file catalogue structure, single page file with And single page corresponds to XML file;
URI acquisition modules, URI is obtained according to URL, and each URI includes an OFD file unique marks;
Obtain parsing content module, HTML5 clients by URI parse needed for XML file, obtain the XML file The information content:The unique mark for the OFD files that HTML5 clients pass through XML file obtains file and corresponds to main xml document path, And carry out solution and tear open, obtain the document information of the main xml document;
Catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page;
The corresponding URI routing informations of every page in the document are positioned, carry out the parsing of document every page content;
The information content parsed;
Display module, according to OFD file standards, by the different information contents by the Canves objects of HTML5 at interface Painting canvas on carry out plot and display.
A kind of embodiment of the present invention:
It is respectively server end OFD file declusterings, based on HTML5 clients that it is poly-, which to be broadly divided into three steps, for embodiment Parsing, the parsing of document content interface of file render the parsing completed to OFD files and realized with the service that browses.
1. server end OFD file declusterings:By being divided into file decompression, document mesh to disassembling for OFD compressing file bags Directory structures, single page file, single page correspond to four layers of bibliographic structure of XML file, and this patent is used real by the application of server end Now the bibliographic structure is mapped to the URL of HTML5 clients, and HTML5 can realize corresponding OFD by obtaining server end URL The analytical capabilities of file content.
By analyzing OFD hierarchical structure of directories the corresponding HTML5 clients URL of OFD File Mappings, obtained according to URL To URI, URI forms are defined as follows:Ofd master files URI:/ ofd files unique mark/OFD.xml;
Ofd document contents:/ ofd files unique mark/Doc_n/Document.xml;
Ofd document contents:/ ofd files unique mark/Doc_n/PublicRes.xml;
Resource content accesses catalogue:/ ofd files unique mark/Res/ resource file names;
Single page content:/ ofd files unique mark/Doc_n/Pages/Page_n/Content.xml;
2. the parsing of the file based on HTML5 clients
2.1.HTML5 client parsing XML orders homepage obtains text by the ID (i.e. the unique mark of OFD files) of file Part corresponds to main OFD.xml file paths and carries out solution and tears open, obtains the information of this document document.
2.2. catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page.
2.3. the corresponding URI routing informations of every page in the document are positioned, the parsing of document every page content is carried out and shows Show.
2.4. the rest may be inferred display other pages of documents the information content.
3. the parsing of document content interface renders
As shown in Fig. 2, parsing xml document by javascript encapsulates OFD interfaces document object, Pages objects, Page The object informations such as object, Template, PageRes, Content, Actions, for different objects by HTML5's Canves objects carry out plot and display on the painting canvas at interface.Parsing is carried out according to OFD file standards and is converted into corresponding content It is shown on interface.
Although the foregoing describing the embodiment of the present invention, those familiar with the art should manage Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, are familiar with this The equivalent modification and change that the technical staff in field is made in the spirit according to the present invention, should all cover the present invention's In scope of the claimed protection.

Claims (10)

  1. A kind of 1. method of the OFD file Real time displayings based on HTML5, it is characterised in that:Include the following steps:
    Step 1, server end are decompressed OFD compressing file bags, and the OFD file catalogue structure mappings that will be obtained after decompression To the URL of HTML5 clients;
    Step 2, according to URL obtain URI;
    Step 3, HTML5 clients by URI parse needed for XML file, obtain the information content of the XML file;
    Step 4, according to OFD file standards by the information content be converted into corresponding content include on interface.
  2. A kind of 2. method of the OFD file Real time displayings based on HTML5 as claimed in claim 1, it is characterised in that:The step Compressed package obtains file catalogue structure, single page file and single page and corresponds to XML file in rapid 1 after being decompressed.
  3. A kind of 3. method of the OFD file Real time displayings based on HTML5 as claimed in claim 1, it is characterised in that:Each institute Stating URI includes an OFD file unique marks.
  4. A kind of 4. method of the OFD file Real time displayings based on HTML5 as claimed in claim 3, it is characterised in that:The step Rapid 3 are specially further:
    The unique mark for the OFD files that HTML5 clients pass through XML file obtains file and corresponds to main xml document path, and carries out Solution is torn open, obtains the document information of the main xml document;
    Catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page;
    The corresponding URI routing informations of every page in the document are positioned, carry out the parsing of document every page content;
    The information content parsed.
  5. A kind of 5. method of the OFD file Real time displayings based on HTML5 as claimed in claim 1, it is characterised in that:The step Rapid 4 are specially further:
    According to OFD file standards, the different information contents is painted by the Canves objects of HTML5 on the painting canvas at interface Figure is shown.
  6. A kind of 6. device of the OFD file Real time displayings based on HTML5, it is characterised in that:Including following module:
    Module is disassembled, server end is decompressed OFD compressing file bags, and the OFD file catalogue structures that will be obtained after decompression Map to the URL of HTML5 clients;
    URI acquisition modules, URI is obtained according to URL;
    Obtain parsing content module, HTML5 clients by URI parse needed for XML file, obtain the information of the XML file Content;
    Display module, the information content is converted into corresponding content according to OFD file standards is included on interface.
  7. A kind of 7. device of the OFD file Real time displayings based on HTML5 as claimed in claim 6, it is characterised in that:It is described to tear open Compressed package obtains file catalogue structure, single page file and single page after being decompressed and corresponds to XML file in solution module.
  8. A kind of 8. device of the OFD file Real time displayings based on HTML5 as claimed in claim 6, it is characterised in that:Each institute Stating URI includes an OFD file unique marks.
  9. A kind of 9. device of the OFD file Real time displayings based on HTML5 as claimed in claim 8, it is characterised in that:It is described to obtain Take parsing content module be specially further:
    The unique mark for the OFD files that HTML5 clients pass through XML file obtains file and corresponds to main xml document path, and carries out Solution is torn open, obtains the document information of the main xml document;
    Catalogue where document is got according to the document information of acquisition, and parse the Document.xml under catalogue and The page information of PublicRes.xml file acquisition the document calls external resource information with every page;
    The corresponding URI routing informations of every page in the document are positioned, carry out the parsing of document every page content;
    The information content parsed.
  10. A kind of 10. device of the OFD file Real time displayings based on HTML5 as claimed in claim 6, it is characterised in that:It is described Display module is specially further:
    According to OFD file standards, the different information contents is painted by the Canves objects of HTML5 on the painting canvas at interface Figure is shown.
CN201711159886.4A 2017-11-20 2017-11-20 Method and device for OFD (office file) online display based on HTML5 Active CN107943915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711159886.4A CN107943915B (en) 2017-11-20 2017-11-20 Method and device for OFD (office file) online display based on HTML5

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711159886.4A CN107943915B (en) 2017-11-20 2017-11-20 Method and device for OFD (office file) online display based on HTML5

Publications (2)

Publication Number Publication Date
CN107943915A true CN107943915A (en) 2018-04-20
CN107943915B CN107943915B (en) 2020-05-08

Family

ID=61930395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711159886.4A Active CN107943915B (en) 2017-11-20 2017-11-20 Method and device for OFD (office file) online display based on HTML5

Country Status (1)

Country Link
CN (1) CN107943915B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110717127A (en) * 2019-10-14 2020-01-21 北京华宇信息技术有限公司 Method and device for on-line analysis and browsing of OFD (office file)
CN110765385A (en) * 2019-10-24 2020-02-07 北京华宇信息技术有限公司 Method and system for browsing OFD document webpage end
CN111753499A (en) * 2020-07-07 2020-10-09 江苏中威科技软件系统有限公司 Method for merging and displaying electronic form and OFD format file and generating directory
CN111753502A (en) * 2020-07-07 2020-10-09 江苏中威科技软件系统有限公司 OFD file merging display and directory generation method
CN111767491A (en) * 2020-06-30 2020-10-13 杭州天谷信息科技有限公司 OFD document analysis display method and system based on browser
CN112131183A (en) * 2020-09-07 2020-12-25 百望股份有限公司 Linear access method of OFD electronic file
CN112597422A (en) * 2020-12-30 2021-04-02 深圳市世强元件网络有限公司 PDF file segmentation method and PDF file loading method in webpage
CN115776587A (en) * 2021-09-06 2023-03-10 中移物联网有限公司 Information synchronization method, device and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156742A (en) * 2011-04-19 2011-08-17 北京神州数码思特奇信息技术股份有限公司 Method and middleware for supporting structured document display with own browser of mobile phone
US20130028514A1 (en) * 2011-07-28 2013-01-31 DeNA Co., Ltd. Non-transitory computer-readable storage medium containing html file, file conversion method, and non-transitory computer-readable storage medium containing file conversion program
CN104346322A (en) * 2013-08-08 2015-02-11 北大方正集团有限公司 Document format processing device and document format processing method
CN105630459A (en) * 2014-10-25 2016-06-01 上海未达数码科技有限公司 Method for converting PPT document to HTML page

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156742A (en) * 2011-04-19 2011-08-17 北京神州数码思特奇信息技术股份有限公司 Method and middleware for supporting structured document display with own browser of mobile phone
US20130028514A1 (en) * 2011-07-28 2013-01-31 DeNA Co., Ltd. Non-transitory computer-readable storage medium containing html file, file conversion method, and non-transitory computer-readable storage medium containing file conversion program
CN104346322A (en) * 2013-08-08 2015-02-11 北大方正集团有限公司 Document format processing device and document format processing method
CN105630459A (en) * 2014-10-25 2016-06-01 上海未达数码科技有限公司 Method for converting PPT document to HTML page

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110717127A (en) * 2019-10-14 2020-01-21 北京华宇信息技术有限公司 Method and device for on-line analysis and browsing of OFD (office file)
CN110765385A (en) * 2019-10-24 2020-02-07 北京华宇信息技术有限公司 Method and system for browsing OFD document webpage end
CN110765385B (en) * 2019-10-24 2021-03-26 北京华宇信息技术有限公司 Method and system for browsing OFD document webpage end
CN111767491A (en) * 2020-06-30 2020-10-13 杭州天谷信息科技有限公司 OFD document analysis display method and system based on browser
CN111753499A (en) * 2020-07-07 2020-10-09 江苏中威科技软件系统有限公司 Method for merging and displaying electronic form and OFD format file and generating directory
CN111753502A (en) * 2020-07-07 2020-10-09 江苏中威科技软件系统有限公司 OFD file merging display and directory generation method
CN111753499B (en) * 2020-07-07 2021-02-05 江苏中威科技软件系统有限公司 Method for merging and displaying electronic form and OFD format file and generating directory
CN112131183A (en) * 2020-09-07 2020-12-25 百望股份有限公司 Linear access method of OFD electronic file
CN112597422A (en) * 2020-12-30 2021-04-02 深圳市世强元件网络有限公司 PDF file segmentation method and PDF file loading method in webpage
CN115776587A (en) * 2021-09-06 2023-03-10 中移物联网有限公司 Information synchronization method, device and related equipment
CN115776587B (en) * 2021-09-06 2024-05-24 中移物联网有限公司 Information synchronization method and device and related equipment

Also Published As

Publication number Publication date
CN107943915B (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN107943915A (en) The method and device of OFD file Real time displayings based on HTML5
CN107451296B (en) A kind of Website Module rendering intent component-based
US8407585B2 (en) Context-aware content conversion and interpretation-specific views
CN100565524C (en) A kind of system, method and browser of preserving web page contents
CN104217036B (en) A kind of webpage content extracting method and equipment
US20060156220A1 (en) System and method for managing dynamic content assembly
US20080028302A1 (en) Method and apparatus for incrementally updating a web page
CN104699714B (en) Book version formatted file is converted to the method and device of EPUB formatted files
CN108073435B (en) Multi-information integrated display method and system
JP2014514629A5 (en)
CN101937427A (en) Browser-based system and method for content edition and issue
CN102360274A (en) Variable-data printing template realization device and application method for same
CN104020984A (en) Method and device for generating static page
CN103970750A (en) Method and device for generating HTML (Hypertext Markup Language) web pages
CN106886551A (en) A kind of method and device of utilization markup language display image
CN102902673A (en) Method and device for dynamically generating web pages
Dominici An overview of Pandoc
CN106776800A (en) The page generation method of AngularJS frameworks, apparatus and system
US20020147847A1 (en) System and method for remotely collecting and displaying data
Harper et al. Sadie: Structural semantics for accessibility and device independence
CN103034496A (en) Locally-static portal generation method based on template
IL192265A (en) Automatic package conformance validation
CN109101520A (en) A kind of display methods of electronic documentation and electronic documentation
CN104715060A (en) Picture display method and device based on web pages
CN115309476A (en) Browser-based ofd file display and editing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant