[go: up one dir, main page]

CN105550339A - Document online previewing method, apparatus and system - Google Patents

Document online previewing method, apparatus and system Download PDF

Info

Publication number
CN105550339A
CN105550339A CN201510981583.5A CN201510981583A CN105550339A CN 105550339 A CN105550339 A CN 105550339A CN 201510981583 A CN201510981583 A CN 201510981583A CN 105550339 A CN105550339 A CN 105550339A
Authority
CN
China
Prior art keywords
document
format
stack
converted
previewing
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.)
Pending
Application number
CN201510981583.5A
Other languages
Chinese (zh)
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.)
Smart Ark Technology Co Ltd
Shenzhen Huaxun Ark Technology Co Ltd
Original Assignee
Smart Ark Technology Co Ltd
Shenzhen Huaxun Ark 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 Smart Ark Technology Co Ltd, Shenzhen Huaxun Ark Technology Co Ltd filed Critical Smart Ark Technology Co Ltd
Priority to CN201510981583.5A priority Critical patent/CN105550339A/en
Publication of CN105550339A publication Critical patent/CN105550339A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • G06F16/1794Details of file format conversion
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/438Presentation of query results
    • G06F16/4387Presentation of query results by the use of playlists
    • G06F16/4393Multimedia presentations, e.g. slide shows, multimedia albums

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a document online previewing method, apparatus and system. The method comprises the steps of taking out a document in a first to-be-converted stack and converting the document into a first-format document; putting the first-format document into a second to-be-converted stack; taking out the first-format document in the first to-be-converted stack and converting the first-format document into a second-format document, wherein the second-format document is a document capable of being directly displayed by a browser; and sending the second-format document to the browser for displaying.

Description

Method, device and system for previewing document online
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, and a system for previewing a document online.
Background
The Office series of Office software from microsoft corporation is the most common Office software, and many documents are edited by the Office series of Office software,. doc/. docx,. xls/. xlsx,. ppt/. pptx,. txt, etc. are the most common document formats. Reading these format documents often requires installation of relevant professional software, which requires high installation environment resources and is expensive. For internet terminals (e.g., netbooks or tablets), hardware resources are limited and cost sensitive; if the professional software is installed completely only for reading the contents of the format documents, the system resources and the economic cost are high.
For the above problems, some solutions adopt a mode of loading a relevant reading plug-in for a Web browser, but different plug-ins need to be loaded for different formats, and the plug-ins often need to be updated, which also brings inconvenience to users.
Disclosure of Invention
The invention provides a method, a device and a system for previewing a document on line, which can show the content of the document to a user under the condition of not installing professional reading software of the document.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a method for previewing a document on line, which comprises the following steps:
taking out the document in the first stack to be converted, and converting the document into a first format document;
putting the first format document into a second stack to be converted;
taking out the first format document in the first stack to be converted, and converting the first format document into a second format document; the second format document is a document which can be directly displayed by a browser;
and sending the second format document to the browser and displaying the second format document by the browser.
In the above scheme, the method further comprises:
and receiving a document to be previewed, and putting the document into the first stack to be converted.
In the above scheme, the method further comprises:
and simultaneously transmitting a plurality of threads to complete the conversion of the document into the document with the first format and/or the document with the second format.
In the above scheme, the method further comprises:
and adding synchronous locking to the first stack to be converted and/or the second stack to be converted, and only allowing one thread to take out the document from the stacks at the same time.
In the above solution, the first format is pdf format; the second format is a.swf format.
The embodiment of the invention also provides a device for previewing the document on line, which comprises: the system comprises a first converter module, an intermediate storage module, a second converter module and a document sending module; wherein,
the first converter module is used for taking out the document in the first stack to be converted and converting the document into a first format document;
the intermediate storage module is used for placing the first format document into a second stack to be converted;
the second converter module is used for taking out the first format document in the first stack to be converted and converting the first format document into a second format document; the second format document is a document which can be directly displayed by a browser;
and the document sending module is used for sending the second format document to the browser and displaying the second format document by the browser.
In the above scheme, the apparatus further comprises:
and the document receiving module is used for receiving the document to be previewed and putting the document into the first stack to be converted.
In the above scheme, the first converter module includes a concurrency unit configured to concurrently send multiple threads to complete conversion of a document into a first format document; and/or
The second converter module comprises a concurrency unit which is used for concurrency of a plurality of threads and converting the document into the second format document.
In the above solution, the first converter module and/or the second converter module comprises:
a synchronous locking unit for adding synchronous locking to the conversion stack and allowing only one thread to take out the document from the stack at the same time
The embodiment of the invention also provides an online document previewing system which comprises a server and a browser, wherein the server comprises any one of the online document previewing devices.
The technical scheme of the invention has the beneficial effects that: the document in each format is converted into the intermediate format document, and then the intermediate format document is converted into the format document which can be directly displayed by a browser, so that the content of the document can be displayed to a user under the condition of not installing professional reading software of the document. Meanwhile, in order to avoid the limitation of the conversion speed, a stack and thread concurrency mechanism is introduced, and the requirement of a user can be better responded.
Drawings
FIG. 1 is a flowchart illustrating an implementation of a method for previewing a document online according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a structure of an apparatus for online previewing a document according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an operation principle of an apparatus for online previewing a document according to embodiment 1 of the present invention.
Detailed Description
In order to more clearly illustrate the embodiments and technical solutions of the present invention, the technical solutions of the present invention will be described in more detail with reference to the accompanying drawings and embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without inventive step, are within the scope of the present invention.
In the embodiments of the present invention, including some terms of art that should be understood by those skilled in the art, the following definitions are to be construed:
stacking: stacks are data structures in which data items are arranged in order, and data items can be inserted and deleted only at one end, called the top of stack (top);
stack (operating system): the release, deposit function parameter values, local variable values, etc. are automatically assigned by the operating system. It operates in a manner similar to a stack in a data structure;
heap (operating system): generally, the release is assigned by the programmer, and if the programmer does not release, the program may be recovered by the OS at the end, and the assignment is similar to a linked list.
The embodiment of the invention provides an online document previewing system, which comprises a server and a browser, wherein when a user needs to preview a document in a doc/. docx,. xls/. xlsx,. ppt/. pptx,. txt or pdf format online by utilizing the browser, the document needs to be uploaded to the server, and the server performs format conversion to convert the document into a document format which can be directly displayed by the browser. In particular, a browser refers to a Web browser. For convenience of understanding, the functional module in the server responsible for document format conversion will be referred to as a converter hereinafter.
The converter is limited by its own conversion capability, and usually cannot guarantee that each document uploaded to the server can be converted in time, so a stack to be converted needs to be arranged in the server for caching the document with the format to be converted uploaded to the server.
Fig. 1 is a schematic flow chart of an implementation of a method for previewing a document online according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, taking out a document in a first stack to be converted, and converting the document into a first format document;
specifically, as described above, a stack to be converted may be set in the server, and therefore, before step 101, the server further receives a document to be previewed, and places the document in the first stack to be converted;
then, the server utilizes a first converter to take out the document in the first stack to be converted and convert the document into a first format document;
in particular, the first format is a pdf format; since Acrobat of Adobe corporation is a very common document reading tool, there exists a converter for converting documents in a plurality of formats into pdf format documents, and a new converter does not need to be developed, so that the implementation cost of the method provided by the invention can be saved;
102, putting the first format document into a second stack to be converted;
specifically, the server puts the first format document after the first format conversion into a second stack to be converted, wherein the second stack to be converted is a different stack from the first stack to be converted;
step 103, taking out the first format document in the first stack to be converted, and converting the first format document into a second format document; the second format document is a document which can be directly displayed by a browser;
specifically, the server uses the second converter to take out the first format document in the first stack to be converted, and converts the first format document into the second format document; the second format document is a document which can be directly displayed by a browser; further, the second format is a.swf format; the swf format document is a document which can be directly displayed by a general Web browser, and the existing converter for converting the pdf format document into the swf document does not need to be developed, so that the implementation cost of the method provided by the invention can be saved;
104, sending the second format document to a browser and displaying the second format document by the browser;
specifically, after the two format conversions, the server sends the second format document to the browser and the second format document is displayed by the browser, so that the requirement of a user for online document preview is met.
Furthermore, in order to provide the efficiency of converting the document by the server, the server can concurrently transmit a plurality of threads to complete the document conversion into the document in the first format and/or the document in the second format; i.e. a plurality of instances of the first converter and/or the second converter are concurrent. Correspondingly, in order to prevent the problem of the document being converted by a plurality of converters in a concurrent manner from being repeated, the server also adds a synchronous lock for the first stack to be converted and/or the second stack to be converted, and only one thread is allowed to take out the document from the stacks at the same time.
By using the method for previewing the document on line provided by the embodiment, the document in each format is converted into the document in the intermediate format, and then the document in the intermediate format is converted into the document in the format which can be directly displayed by the browser, so that the content of the document can be displayed to a user under the condition of not installing professional reading software of the document. Meanwhile, in order to avoid the limitation of the conversion speed, a stack and thread concurrency mechanism is introduced, and the requirement of a user can be better responded.
Fig. 2 is a schematic structural diagram of an apparatus for online previewing a document according to an embodiment of the present invention, and as shown in fig. 2, the apparatus for online previewing a document includes: a first converter module 201, an intermediate storage module 202, a second converter module 203, and a document sending module 204; wherein,
the first converter module 201 is configured to take out a document in a first stack to be converted, and convert the document into a document in a first format;
further, the first converter module 201 includes a concurrency unit, configured to concurrently send multiple threads, and complete conversion of the document into the first format document;
the intermediate storage module 202 is configured to place the first format document in a second stack to be converted;
the second converter module 203 is configured to take out the first format document in the first stack to be converted, and convert the first format document into a second format document; the second format document is a document which can be directly displayed by a browser;
further, the second converter module 203 includes a concurrence unit, configured to concurrently send multiple threads, and complete conversion of the document into a second format document;
the document sending module 204 is configured to send the document in the second format to the browser, and the document is displayed by the browser;
further, the apparatus further comprises:
the document receiving module is used for receiving a document to be previewed and placing the document into the first stack to be converted;
further, the first converter module and/or the second converter module further comprises:
and the synchronous locking unit is used for adding synchronous locking for the conversion stack and only allowing one thread to take out the document from the stack at the same time.
In practical applications, each module and each unit can be implemented by a Central Processing Unit (CPU), a microprocessor unit (MPU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA) in the network management test equipment.
Each module of the device for previewing the document online in the embodiment of the invention correspondingly executes the steps described in the method embodiment for previewing the document online, so that the same beneficial effects are achieved. In addition, it should be understood that the above-described embodiment of the apparatus for online previewing a document is only an exemplary one, and the division of the described modules is only a logical functional division, and other division ways may be available for practical implementation. In addition, the modules may be coupled or communicatively connected to each other through some interfaces, and may also be in an electrical or other form.
The functional modules may or may not be physical blocks, may be located in one place, or may be distributed on multiple network units, and may be implemented in the form of hardware or software functional blocks. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention.
Example 1
FIG. 3 is a schematic diagram illustrating an operation principle of an apparatus for online previewing a document according to embodiment 1 of the present invention; as shown in FIG. 3, in embodiment 1, the device uses the method for previewing documents online provided by the present invention, and the server concurrently uses a plurality of first converters and second converters to meet the needs of users for previewing documents online.
The invention also provides an online document previewing system, which comprises a server and a browser and is characterized in that the server comprises the online document previewing device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that the above-mentioned embodiments are only examples of the present invention, and not intended to limit the scope of the present invention, and all equivalent structures or equivalent flow transformations made by using the contents of the specification and the drawings, such as the combination of technical features between the embodiments, or the direct or indirect application to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for previewing a document online, the method comprising:
taking out the document in the first stack to be converted, and converting the document into a first format document;
putting the first format document into a second stack to be converted;
taking out the first format document in the first stack to be converted, and converting the first format document into a second format document; the second format document is a document which can be directly displayed by a browser;
and sending the second format document to the browser and displaying the second format document by the browser.
2. The method of online previewing a document according to claim 1, further comprising:
and receiving a document to be previewed, and putting the document into the first stack to be converted.
3. The method of online previewing a document according to claim 1 or 2, further comprising:
and simultaneously transmitting a plurality of threads to complete the conversion of the document into the document with the first format and/or the document with the second format.
4. The method of online previewing a document according to claim 3, further comprising:
and adding synchronous locking to the first stack to be converted and/or the second stack to be converted, and only allowing one thread to take out the document from the stacks at the same time.
5. The method for on-line previewing a document according to claim 1, wherein said first format is a.pdf format; the second format is a.swf format.
6. An apparatus for previewing a document online, the apparatus comprising: the system comprises a first converter module, an intermediate storage module, a second converter module and a document sending module; wherein,
the first converter module is used for taking out the document in the first stack to be converted and converting the document into a first format document;
the intermediate storage module is used for placing the first format document into a second stack to be converted;
the second converter module is used for taking out the first format document in the first stack to be converted and converting the first format document into a second format document; the second format document is a document which can be directly displayed by a browser;
and the document sending module is used for sending the second format document to the browser and displaying the second format document by the browser.
7. The apparatus for previewing a document on-line according to claim 6, further comprising:
and the document receiving module is used for receiving the document to be previewed and putting the document into the first stack to be converted.
8. The apparatus for on-line previewing of a document according to claim 6,
the first converter module comprises a concurrency unit which is used for concurrency of a plurality of threads and converting the document into a first format document; and/or
The second converter module comprises a concurrency unit which is used for concurrency of a plurality of threads and converting the document into the second format document.
9. The apparatus for on-line previewing of a document according to claim 8, wherein said first converter module and/or said second converter module comprises:
a synchronous locking unit for adding synchronous locking to the conversion stack and allowing only one thread to take out the document from the stack at the same time
10. An online preview document system comprising a server and a browser, characterized in that said server comprises means for online previewing a document according to any one of claims 6 to 9.
CN201510981583.5A 2015-12-23 2015-12-23 Document online previewing method, apparatus and system Pending CN105550339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510981583.5A CN105550339A (en) 2015-12-23 2015-12-23 Document online previewing method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510981583.5A CN105550339A (en) 2015-12-23 2015-12-23 Document online previewing method, apparatus and system

Publications (1)

Publication Number Publication Date
CN105550339A true CN105550339A (en) 2016-05-04

Family

ID=55829528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510981583.5A Pending CN105550339A (en) 2015-12-23 2015-12-23 Document online previewing method, apparatus and system

Country Status (1)

Country Link
CN (1) CN105550339A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975601A (en) * 2016-05-11 2016-09-28 无锡永中软件有限公司 Webpage document online preview method
CN106776504A (en) * 2016-12-27 2017-05-31 北京致远互联软件股份有限公司 A kind of document format on-line conversion method and system
CN110990345A (en) * 2019-11-28 2020-04-10 中国银行股份有限公司 Method and device for online preview of Excel file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1236453A (en) * 1997-06-30 1999-11-24 太阳微系统有限公司 Method and apparatus for managing a linked-list data structure
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
US20130111326A1 (en) * 2011-10-26 2013-05-02 Kimber Lockhart Enhanced multimedia content preview rendering in a cloud content management system
CN104391827A (en) * 2014-12-10 2015-03-04 深圳中兴网信科技有限公司 Method and device for browsing documents by web pages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1236453A (en) * 1997-06-30 1999-11-24 太阳微系统有限公司 Method and apparatus for managing a linked-list data structure
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
US20130111326A1 (en) * 2011-10-26 2013-05-02 Kimber Lockhart Enhanced multimedia content preview rendering in a cloud content management system
CN104391827A (en) * 2014-12-10 2015-03-04 深圳中兴网信科技有限公司 Method and device for browsing documents by web pages

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975601A (en) * 2016-05-11 2016-09-28 无锡永中软件有限公司 Webpage document online preview method
CN106776504A (en) * 2016-12-27 2017-05-31 北京致远互联软件股份有限公司 A kind of document format on-line conversion method and system
CN110990345A (en) * 2019-11-28 2020-04-10 中国银行股份有限公司 Method and device for online preview of Excel file

Similar Documents

Publication Publication Date Title
US11340803B2 (en) Method for configuring resources, electronic device and computer program product
CN107493310B (en) Cloud resource processing method and cloud management platform
US9456229B2 (en) Parsing single source content for multi-channel publishing
CN111078140B (en) Nuclear power station file uploading management method and device, terminal equipment and medium
CN105045802B (en) A kind of polymorphic type previewing file system of message-driven
WO2020048391A1 (en) Methods and apparatuses for deploying and invoking web services based on multi-tenancy technology
JP5789255B2 (en) How to use server pre-processing to deploy electronic document renditions in computer networks
US20130198211A1 (en) Information processing apparatus, information processing system, and data conversion method
CN107832045A (en) Across the method and apparatus of programming language interface conversion
CN112612467B (en) A method and device for processing a micro front-end architecture based on Qiankun
CN104660635B (en) Message synchronization method, device and system
EP3309695A1 (en) Information processing apparatus, document display method, document display system, and program
CN109933317B (en) Point burying method, device, server and readable storage medium
CN112507005A (en) Method and device for processing message
CN105550339A (en) Document online previewing method, apparatus and system
CN105204964B (en) Data back up method and device based on cloud disk
CN111399786A (en) Method and device for generating print file, terminal equipment and storage medium
US10142389B2 (en) Information processing system, information processing method, communication terminal, server, and control methods and control programs thereof
CN102880689B (en) Method for exhibiting contents of office files in web application quickly and conveniently
US8321484B2 (en) Minimizing bandwidth in file path-centric protocol message
CN110826300A (en) Text file transferring method and device and related equipment
CN115829710A (en) Batch text processing method and device
CN116633913A (en) Method, device, system and medium for transferring job file
CN111797337A (en) Method and device for generating export page
CN105262809A (en) Data backup method and apparatus based on cloud disc

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100097, room 9, No. 1409 West Fourth Ring Road, Haidian District, Beijing

Applicant after: SMART ARK TECHNOLOGY CO., LTD.

Applicant after: Shenzhen Huaxunark Technology Co., Ltd.

Address before: 100097, room 9, No. 1409 West Fourth Ring Road, Haidian District, Beijing

Applicant before: SMART ARK TECHNOLOGY CO., LTD.

Applicant before: Shenzhen City Huaxun Fangzhou Technology Co., Ltd.

COR Change of bibliographic data
RJ01 Rejection of invention patent application after publication

Application publication date: 20160504

RJ01 Rejection of invention patent application after publication