CN113535647A - OFD file paging rendering method and system - Google Patents

OFD file paging rendering method and system Download PDF

Info

Publication number
CN113535647A
CN113535647A CN202110733270.3A CN202110733270A CN113535647A CN 113535647 A CN113535647 A CN 113535647A CN 202110733270 A CN202110733270 A CN 202110733270A CN 113535647 A CN113535647 A CN 113535647A
Authority
CN
China
Prior art keywords
file
ofd
page
rendering
request
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
CN202110733270.3A
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.)
Fuxin Kunpeng Beijing Information Technology Co ltd
Original Assignee
Fuxin Kunpeng Beijing 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 Fuxin Kunpeng Beijing Information Technology Co ltd filed Critical Fuxin Kunpeng Beijing Information Technology Co ltd
Priority to CN202110733270.3A priority Critical patent/CN113535647A/en
Publication of CN113535647A publication Critical patent/CN113535647A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata

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)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a paging rendering method and system for OFD files, and relates to the field of OFD file reading. The method comprises the following steps: analyzing an entry file of a preset OFD file according to a reading request of the preset OFD file initiated by a user side to obtain a first analysis result; entering a preset OFD file according to the first analysis result; reading the ith page and the first analysis result according to a request in the reading request, and finding target data corresponding to the ith page in a preset OFD file; analyzing the target data to obtain a second analysis result; and rendering according to the second analysis result and the first analysis result, and presenting the rendering result of the ith page to the client. Each page is used as the granularity of transmission, decompression, analysis and rendering tasks, so that after the data transmission of one page is finished, the client can start decompression, analysis and rendering, and the display process of requesting to browse the page by a user is accelerated because the client does not need to start decompression, analysis and rendering after the data of other pages are downloaded.

Description

OFD file paging rendering method and system
Technical Field
The invention relates to the field of OFD file reading, in particular to a paging rendering method and system for OFD files.
Background
The short-hand writing of OFD and Open Fixed layout Document is an electronic file format Document format which is independently controllable in China, and the corresponding international standard is PDF. The OFD format file is obtained by fixed layout, no layout run and what you see is, and can be regarded as 'digital paper' in the computer age; with the development and the improvement of a cloud platform, more and more OFD documents are stored in a cloud end and are downloaded from a cloud end server to a client end to be read and processed as required.
Currently, reading and processing OFD documents stored in a cloud server is performed by downloading and transmitting the entire OFD document from the server to a client, and then decompressing, parsing and rendering the OFD document. The advantage of this approach is that the implementation is straightforward, consistent with the way the OFD files are processed locally. However, there are the following problems: when an OFD file, especially a large file, is opened, a certain time is required for transferring the file, and the time from the initiation of the request to the completion of rendering of the top page may be long, which affects the user experience. When a user only needs to browse certain pages in the OFD file, it may not be necessary to transfer the entire file, resulting in unnecessary CPU and network bandwidth consumption.
Disclosure of Invention
The invention aims to solve the technical problem of the prior art and provides a paging rendering method and system for OFD files.
The technical scheme for solving the technical problems is as follows:
an OFD file paging rendering method comprises the following steps:
s1, analyzing an entry file of a preset OFD file according to a reading request of the preset OFD file initiated by a user side to obtain a first analysis result;
s2, entering the preset OFD file according to the first analysis result;
s3, reading the ith page and the first analysis result according to the request in the reading request, and finding the target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1;
s4, analyzing the target data to obtain a second analysis result;
and S5, rendering the target data corresponding to the ith page according to the second analysis result and the first analysis result, and displaying the rendering result of the ith page at the user side.
The invention has the beneficial effects that: according to the invention, the tasks of transmission, decompression, analysis and rendering of the file data in the OFD file compression packet are processed in parallel between the server and the client, and each page is used as the granularity of the tasks of transmission, decompression, analysis and rendering, so that after the data transmission of one page is finished, the client can start decompression, analysis and rendering, and the display process of a user requesting to browse the page is accelerated without waiting for the data downloading of other pages to start decompression, analysis and rendering, and thus, better responsiveness can be obtained when the user opens and switches the page.
Meanwhile, the data used by the client is original OFD data, namely non-rendered OFD files, vector rendering on the client is supported, and semantic-based operation and editing are supported, so that the pressure of the server is reduced.
Further, the S1 further includes:
when the entry file locally stored with the preset OFD file is queried, directly executing step S1;
when the entry file is not stored locally, initiating a request for downloading the entry file to a server;
reading a central directory structure of a data packet of the preset OFD file according to the request;
establishing a memory map of the data packet and a central directory structure;
and obtaining the entry file according to the central directory structure after the memory image is established.
The beneficial effect of adopting the further scheme is that: according to the scheme, the relation between the OFD file data and the central directory structure is established by constructing the memory mapping, when a user requests to read other pages for the second time, the entry file information corresponding to the OFD file data does not need to be searched and analyzed, and the target data corresponding to the request page can be found according to the existing entry file.
Further, the S3 is preceded by:
when the target data is locally stored, the step S3 is directly performed.
When the target data is not stored locally, downloading the request of the target data to a server;
and receiving the target data sent by the server, executing the step S3.
Further, still include: when the client side has page switching, modifying i into a target switching page number, and executing the steps S3-S5.
The beneficial effect of adopting the further scheme is that: according to the scheme, when the user has page switching, after data transmission of the corresponding request page is completed, decompression, analysis and rendering can be started at the client, and the decompression, analysis and rendering can be started without waiting for data downloading of other pages, so that the display process of the user requesting to browse the page is accelerated, and better responsiveness can be obtained when the user opens and switches the page.
Further, still include: while the user browses the single page OFD file, other data of the OFD file is downloaded in parallel.
The beneficial effect of adopting the further scheme is that: according to the scheme, the data are downloaded in parallel in the browsing process, so that the parallelism is improved. Meanwhile, the zip compressed packet of the whole OFD document is prevented from being transmitted on the network under an unnecessary condition, and the CPU and bandwidth consumption are reduced.
Another technical solution of the present invention for solving the above technical problems is as follows:
an OFD file paging rendering system, comprising: the system comprises an entrance analysis module, an entry module, a target data searching module, an analysis module and a rendering module;
the entry analysis module is used for analyzing an entry file of a preset OFD file according to a reading request of the preset OFD file initiated by a user side to obtain a first analysis result;
the entry module is used for entering the preset OFD file according to the first analysis result;
the target data searching module is used for reading an ith page and the first analysis result according to a request in the reading request, and finding target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1;
the analysis module is used for analyzing the target data to obtain a second analysis result;
the rendering module is used for rendering the target data corresponding to the ith page according to the second analysis result and the first analysis result, and displaying the rendering result of the ith page on the user side.
The invention has the beneficial effects that: according to the invention, the tasks of transmission, decompression, analysis and rendering of the file data in the OFD file compression packet are processed in parallel between the server and the client, and each page is used as the granularity of the tasks of transmission, decompression, analysis and rendering, so that after the data transmission of one page is finished, the client can start decompression, analysis and rendering, and the display process of a user requesting to browse the page is accelerated without waiting for the data downloading of other pages to start decompression, analysis and rendering, and thus, better responsiveness can be obtained when the user opens and switches the page.
Meanwhile, the data used by the client is original OFD data, namely non-rendered OFD files, vector rendering on the client is supported, and semantic-based operation and editing are supported, so that the pressure of the server is reduced.
Further, still include: a memory mapping construction module, configured to directly execute step S1 when the entry file locally storing the preset OFD file is queried;
when the entry file is not stored locally, initiating a request for downloading the entry file to a server;
reading a central directory structure of a data packet of the preset OFD file according to the request;
establishing a memory map of the data packet and a central directory structure;
and obtaining the entry file according to the central directory structure after the memory image is established.
The beneficial effect of adopting the further scheme is that: according to the scheme, the relation between the OFD file data and the central directory structure is established by constructing the memory mapping, when a user requests to read other pages for the second time, the entry file information corresponding to the OFD file data does not need to be searched and analyzed, and the target data corresponding to the request page can be found according to the existing entry file.
Further, still include: a data request module, configured to, when the target data is locally stored, read an ith page and the first parsing result according to a request in the reading request, and find the target data corresponding to the ith page in the preset OFD file;
when the target data is not stored locally, downloading the request of the target data to a server;
and if the target data sent by the server is received, reading the ith page and the first analysis result according to the request in the reading request, and finding the target data corresponding to the ith page in the preset OFD file.
Further, still include: the page switching module is used for modifying i into a target switching page number when a client side is subjected to page switching, reading the ith page and the first analysis result according to a request in the reading request, and finding target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1;
analyzing the target data to obtain a second analysis result;
and rendering according to the second analysis result and the first analysis result, and presenting the rendering result of the ith page to a client.
The beneficial effect of adopting the further scheme is that: according to the scheme, when the user has page switching, after data transmission of the corresponding request page is completed, decompression, analysis and rendering can be started at the client, and the decompression, analysis and rendering can be started without waiting for data downloading of other pages, so that the display process of the user requesting to browse the page is accelerated, and better responsiveness can be obtained when the user opens and switches the page.
Further, still include: and the parallel downloading module is used for downloading the data of the OFD file in parallel while the user browses the single-page OFD file.
The beneficial effect of adopting the further scheme is that: according to the scheme, the data are downloaded in parallel in the browsing process, so that the parallelism is improved. Meanwhile, the zip compressed packet of the whole OFD document is prevented from being transmitted on the network under an unnecessary condition, and the CPU and bandwidth consumption are reduced.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a schematic flowchart of an OFD file paging rendering method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a system for paging and rendering OFD files according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a hierarchy of zip files for OFDs according to another embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an overall structure of a zip file according to another embodiment of the present invention;
fig. 5 is a schematic diagram of a hierarchical structure of OFD file contents according to another embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
As shown in fig. 1, a method for page rendering an OFD file according to an embodiment of the present invention includes: in one embodiment, the OFD file implements data organization of multiple files by using ZIP packages, and the hierarchical organization structure of the ZIP packages in the OFD file is shown in fig. 3.
In another embodiment, each OFD file is a ZIP package, and the ZIP file format consists of three major parts: the overall structure of the zip file is shown in FIG. 4, where the file data area, the central directory structure, and the central directory end section has a field holding the offset of the central directory structure. The central directory structure is located behind the file data area and is used to store path information for all files and offsets of corresponding file data in the files. The file data area records the content information of all files compressed, and each compressed source file/directory in the data area is a record.
The method comprises the following steps:
s1, analyzing the entry file of the preset OFD file according to the reading request of the preset OFD file initiated by the user side to obtain a first analysis result; wherein the entry file may be an ofd.xml file in the preset OFD file. The preset OFD file can be a file stored by various servers and readable by the user.
S2, entering a preset OFD file according to the first analysis result;
s3, reading the ith page and the first analysis result according to the request in the reading request, and finding out the target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1, i is 1-N, and N represents the total page number of the OFD file; wherein the target data may include: xml file data of Doc _0\ document in the OFD file, and Doc _0\ Pages \ Page _1\ content in the OFD file.
S4, analyzing the target data to obtain a second analysis result; wherein the second parsing result comprises: the ith page corresponds to the corresponding address of the data, and the OFD file display specification, format and the like. The first analysis result comprises the address of the target data and the format requirement of OFD file display.
And S5, rendering the target data corresponding to the ith page according to the second analysis result and the first analysis result, and displaying the rendering result of the ith page at the user side.
In one embodiment, based on the format of the OFD file hierarchy diagram and the zip file, when the user requests the OFD file from the client for the first time, the whole rendering process may be as follows:
step 1, when a user tries to read a certain OFD file at a client, the client acquires the file name of the OFD file which the user needs to read, and sends a request for opening the OFD file to a server.
Step 2: after receiving the request for opening the OFD file, the server reads the central directory structure of the OFD file to be opened to obtain the information of all files in the zip file packet, and establishes the memory structure of all file information of one zip file packet to construct a memory image.
And step 3: and the server reads the compressed data of the OFD.xml in the zip compressed packet according to the information of the central directory area structure, and transmits the compressed data to the client.
And 4, step 4: the client receives the compressed data of the ofd.xml file, decompresses the ofd.xml file and caches the file at the client.
And 5: and the client requests the server for compressed data of other files in other required zip compressed packages according to the file analysis result of the ofd.xml, the page information requested to be read by the user and the OFD standard specification.
Step 6: and the server reads and transmits the compressed data of the file required by the client to the client according to the structure information of the central directory area.
And 7, decompressing and buffering the received compressed data by the client, analyzing the decompressed file, and rendering.
And 8: when the client side has page switching, the client side requests the server side for new compressed data. Step 6 is performed at the server side.
In another embodiment, a sample OFD file content hierarchy is shown in FIG. 5, where the OFD file is a zip compressed file containing the above file structure, and its binary image is shown in Table 1:
Figure BDA0003138208940000081
Figure BDA0003138208940000091
Figure BDA0003138208940000101
when the user needs to read a certain page of the above-mentioned document from the client, here taking the second page as an example, the executing steps may include the following steps:
step 1, inquiring whether the local has the cache of the ofd.xml in the OFD file, and if the cache of the ofd.xml is directly analyzed; xml which if not sends a request to the server to download the OFD file. Where local means local to the client.
Step 2: after the server receives the request for the download,
1. if the OFD file is opened for the first time, the server reads the central directory structure of the zip packet of the OFD file first, and a memory image of the central directory structure of the OFD file is established. And finding out the compressed data of the corresponding file according to the central directory structure, and sending the compressed data to the client.
2. If the memory image of the central directory structure of the OFD file is established, the compressed data of the corresponding file is directly found according to the central directory structure and is sent to the client.
And step 3: xml's compressed data is received by the client, and the file is decompressed, cached and analyzed. According to the analysis result, Doc _0\ document. xml needs to be further requested. Xml data packets include: the existing published national standard, electronic document storage and interchange Format document, provides. Such as the author of the document, the date of creation, etc. Document root in the parsing result of the ofd.xml packet is document.xml, so that Doc _0\ document.xml needs to be further requested.
And 4, step 4: the client checks whether the cache of the Doc _0\ document.xml exists or not, and if the cache of the Doc _0\ document.xml exists, the cache of the Doc _0\ document.xml is directly analyzed; and if not, sending a request to the server to download Doc _0\ document.
And 5: and the server receives the request and sends the compressed data of Doc _0\ document.xml to the client according to the second step. The document.xml data packet includes the data specified in the existing published national standard electronic file storage and interchange format document. Such as the layout size of the document, the xml file name corresponding to each page, etc.
Step 6: the client receives the compressed data of Doc _0\ document.xml, decompresses, caches and analyzes the data according to the analysis result, and further requests Doc _0\ Pages \ Page _1\ content.xml. The parsing result of the document xml data packet may include an xml file corresponding to the page several.
And 7: the client side checks whether cache of Doc _0\ Pages \ Page _1\ content.xml exists or not, and if the cache of Doc _0\ Pages \ Page _1\ content.xml exists, the cache of Doc _1\ Page _1\ content.xml is directly analyzed; and if not, sending a request to the server to download Doc _0\ Pages \ Page _1\ content. xml of the OFD file. Xml data package can be defined by the existing published national standard "electronic document storage and interchange format document" and includes ofd various elements in the file, such as characters, paths, etc.
And 8: and the server receives the request and sends the compressed data of Doc _0\ Pages \ Page _1\ content.xml to the client according to the second step.
And step 9: and the client receives the compressed data of Doc _0\ Pages \ Page _1\ content. xml, decompresses, caches and analyzes the file. According to the parsing result, the currently obtained data can render the second page without further requesting the server to send compressed data of other files in the zip file package of the OFD. The currently obtained data may include, among others: xml, the content.xml analysis result is combined with document.xml analysis result. The parsing result of the content.xml packet may be a definition of a path, for example:
<ofd:PathObject ID="75"Boundary="25 100 160 40"DrawParam="80"DashPattern="20 5"LineWidth="2"Fill="true">
<ofd:FillColor>
<ofd:Color Value="0 0 255"/>
</ofd:FillColor>
<ofd:AbbreviatedData>M 5 5 L 155 5 L 155 35 L 5 35 C</ofd:AbbreviatedData>
</ofd:PathObject>
step 10: and the client renders the second page of the OFD file according to the obtained file data and presents the second page to the user.
According to the invention, the tasks of transmission, decompression, analysis and rendering of the file data in the OFD file compression packet are processed in parallel between the server and the client, and each page is used as the granularity of the tasks of transmission, decompression, analysis and rendering, so that after the data transmission of one page is finished, the client can start decompression, analysis and rendering, and the display process of a user requesting to browse the page is accelerated without waiting for the data downloading of other pages to start decompression, analysis and rendering, and thus, better responsiveness can be obtained when the user opens and switches the page.
Meanwhile, the data used by the client is original OFD data, namely non-rendered OFD files, vector rendering on the client is supported, and semantic-based operation and editing are supported, so that the pressure of the server is reduced.
Preferably, in any of the above embodiments, S1 further includes:
when the entry file of the preset OFD file is locally saved is queried, the step S1 is directly executed;
when the entry file is not stored locally, a request for downloading the entry file is initiated to the server;
reading a central directory structure of a data packet of a preset OFD file according to a request;
establishing a memory map of a data packet and a central directory structure;
and obtaining an entry file according to the central directory structure after the memory mapping is established.
According to the scheme, the relation between the OFD file data and the central directory structure is established by constructing the memory mapping, when a user requests to read other pages for the second time, the entry file information corresponding to the OFD file data does not need to be searched and analyzed, and the target data corresponding to the request page can be found according to the existing entry file.
Preferably, in any of the above embodiments, S3 may be preceded by:
when the target data is locally stored, the step S3 is directly executed.
When the target data is not stored locally, downloading a request of the target data to a server;
receiving the target data sent by the server, step S3 is executed.
Preferably, in any of the above embodiments, further comprising: when the client side has page switching, i is modified to the target switching page number, and the steps S3-S5 are executed.
According to the scheme, when the user has page switching, after data transmission of the corresponding request page is completed, decompression, analysis and rendering can be started at the client, and the decompression, analysis and rendering can be started without waiting for data downloading of other pages, so that the display process of the user requesting to browse the page is accelerated, and better responsiveness can be obtained when the user opens and switches the page.
Preferably, in any of the above embodiments, further comprising: while the user browses the single page OFD file, other data of the OFD file is downloaded in parallel.
According to the scheme, the data are downloaded in parallel in the browsing process, so that the parallelism is improved. Meanwhile, the zip compressed packet of the whole OFD document is prevented from being transmitted on the network under an unnecessary condition, and the CPU and bandwidth consumption are reduced.
In one embodiment, as shown in fig. 2, an OFD file paging rendering system includes: a portal parsing module 1001, an entry module 1002, a target data lookup module 1003, a parsing module 1004, and a rendering module 1005;
the entry parsing module 1001 is configured to parse an entry file of a preset OFD file according to a reading request initiated by a user side for the preset OFD file, so as to obtain a first parsing result;
the entry module 1002 is configured to enter a preset OFD file according to the first parsing result;
the target data searching module 1003 is configured to read the ith page and the first parsing result according to a request in the reading request, and find target data corresponding to the ith page in a preset OFD file; wherein i is more than or equal to 1;
the analyzing module 1004 is configured to analyze the target data to obtain a second analysis result;
the rendering module 1005 is configured to render the target data corresponding to the ith page according to the second parsing result in combination with the first parsing result, and display the rendering result of the ith page at the user side.
According to the invention, the tasks of transmission, decompression, analysis and rendering of the file data in the OFD file compression packet are processed in parallel between the server and the client, and each page is used as the granularity of the tasks of transmission, decompression, analysis and rendering, so that after the data transmission of one page is finished, the client can start decompression, analysis and rendering, and the display process of a user requesting to browse the page is accelerated without waiting for the data downloading of other pages to start decompression, analysis and rendering, and thus, better responsiveness can be obtained when the user opens and switches the page.
Meanwhile, the data used by the client is original OFD data, namely non-rendered OFD files, vector rendering on the client is supported, and semantic-based operation and editing are supported, so that the pressure of the server is reduced.
Preferably, in any of the above embodiments, further comprising: the memory mapping construction module is used for directly executing the step S1 when the entry file of the preset OFD file is locally stored in the memory mapping construction module;
when the entry file is not stored locally, a request for downloading the entry file is initiated to the server;
reading a central directory structure of a data packet of a preset OFD file according to a request;
establishing a memory map of a data packet and a central directory structure;
and obtaining an entry file according to the central directory structure after the memory mapping is established.
According to the scheme, the relation between the OFD file data and the central directory structure is established by constructing the memory mapping, when a user requests to read other pages for the second time, the entry file information corresponding to the OFD file data does not need to be searched and analyzed, and the target data corresponding to the request page can be found according to the existing entry file.
Preferably, in any of the above embodiments, further comprising: the data request module is used for reading the ith page and the first analysis result according to a request in the reading request and finding out the target data corresponding to the ith page in the preset OFD file when the target data is locally stored;
when the target data is not stored locally, downloading a request of the target data to a server;
and when target data sent by the server is received, reading the ith page and the first analysis result according to a request in the reading request, and finding the target data corresponding to the ith page in the preset OFD file.
Preferably, in any of the above embodiments, further comprising: the page switching module is used for modifying the i into a target switching page number when the client side is subjected to page switching, reading the ith page and a first analysis result according to a request in the reading request, and finding target data corresponding to the ith page in a preset OFD file; wherein i is more than or equal to 1;
analyzing the target data to obtain a second analysis result;
and rendering according to the second analysis result and the first analysis result, and presenting the rendering result of the ith page to the client.
According to the scheme, when the user has page switching, after data transmission of the corresponding request page is completed, decompression, analysis and rendering can be started at the client, and the decompression, analysis and rendering can be started without waiting for data downloading of other pages, so that the display process of the user requesting to browse the page is accelerated, and better responsiveness can be obtained when the user opens and switches the page.
Preferably, in any of the above embodiments, further comprising: and the parallel downloading module is used for downloading the data of the OFD file in parallel while the user browses the single-page OFD file.
According to the scheme, the data are downloaded in parallel in the browsing process, so that the parallelism is improved. Meanwhile, the zip compressed packet of the whole OFD document is prevented from being transmitted on the network under an unnecessary condition, and the CPU and bandwidth consumption are reduced.
It is understood that some or all of the alternative embodiments described above may be included in some embodiments.
It should be noted that the above embodiments are product embodiments corresponding to the previous method embodiments, and for the description of each optional implementation in the product embodiments, reference may be made to corresponding descriptions in the above method embodiments, and details are not described here again.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An OFD file paging rendering method is characterized by comprising the following steps:
s1, analyzing an entry file of a preset OFD file according to a reading request of the preset OFD file initiated by a user side to obtain a first analysis result;
s2, entering the preset OFD file according to the first analysis result;
s3, reading the ith page and the first analysis result according to the request in the reading request, and finding the target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1;
s4, analyzing the target data to obtain a second analysis result;
and S5, rendering the target data corresponding to the ith page according to the second analysis result and the first analysis result, and displaying the rendering result of the ith page at the user side.
2. The OFD file paging rendering method according to claim 1, wherein the S1 further includes:
when the entry file locally stored with the preset OFD file is queried, directly executing step S1;
when the entry file is not stored locally, initiating a request for downloading the entry file to a server;
reading a central directory structure of a data packet of the preset OFD file according to the request;
establishing a memory map of the data packet and a central directory structure;
and obtaining the entry file according to the central directory structure after the memory image is established.
3. The OFD file paging rendering method according to claim 1, wherein the S3 is preceded by:
when the target data is locally stored, directly executing the step S3;
when the target data is not stored locally, downloading the request of the target data to a server;
and receiving the target data sent by the server, executing the step S3.
4. The OFD file paging rendering method of claim 1, further comprising: when the client side has page switching, modifying i into a target switching page number, and executing the steps S3-S5.
5. The OFD file paging rendering method according to any one of claims 1 to 4, further comprising: and simultaneously downloading the data of the OFD file in parallel while browsing the single-page OFD file by the user.
6. An OFD file paging rendering system, comprising: the system comprises an entrance analysis module, an entry module, a target data searching module, an analysis module and a rendering module;
the entry analysis module is used for analyzing an entry file of a preset OFD file according to a reading request of the preset OFD file initiated by a user side to obtain a first analysis result;
the entry module is used for entering the preset OFD file according to the first analysis result;
the target data searching module is used for reading an ith page and the first analysis result according to a request in the reading request, and finding target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1;
the analysis module is used for analyzing the target data to obtain a second analysis result;
the rendering module is used for rendering the target data corresponding to the ith page according to the second analysis result and the first analysis result, and displaying the rendering result of the ith page on the user side.
7. The OFD file paging rendering system of claim 6, further comprising: a memory mapping construction module, configured to directly execute step S1 when the entry file locally storing the preset OFD file is queried;
when the entry file is not stored locally, initiating a request for downloading the entry file to a server;
reading a central directory structure of a data packet of the preset OFD file according to the request;
establishing a memory map of the data packet and a central directory structure;
and obtaining the entry file according to the central directory structure after the memory image is established.
8. The OFD file paging rendering system of claim 6, further comprising: a data request module, configured to, when the target data is locally stored, read an ith page and the first parsing result according to a request in the reading request, and find the target data corresponding to the ith page in the preset OFD file;
when the target data is not stored locally, downloading the request of the target data to a server;
and if the target data sent by the server is received, reading the ith page and the first analysis result according to the request in the reading request, and finding the target data corresponding to the ith page in the preset OFD file.
9. The OFD file paging rendering system of claim 6, further comprising: the page switching module is used for modifying i into a target switching page number when a client side is subjected to page switching, reading the ith page and the first analysis result according to a request in the reading request, and finding target data corresponding to the ith page in the preset OFD file; wherein i is more than or equal to 1;
analyzing the target data to obtain a second analysis result;
and rendering according to the second analysis result and the first analysis result, and presenting the rendering result of the ith page to a client.
10. The OFD file paging rendering system according to any one of claims 6 to 9, further comprising: and the parallel downloading module is used for downloading the data of the OFD file in parallel while the user browses the single-page OFD file.
CN202110733270.3A 2021-06-29 2021-06-29 OFD file paging rendering method and system Pending CN113535647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110733270.3A CN113535647A (en) 2021-06-29 2021-06-29 OFD file paging rendering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110733270.3A CN113535647A (en) 2021-06-29 2021-06-29 OFD file paging rendering method and system

Publications (1)

Publication Number Publication Date
CN113535647A true CN113535647A (en) 2021-10-22

Family

ID=78126283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110733270.3A Pending CN113535647A (en) 2021-06-29 2021-06-29 OFD file paging rendering method and system

Country Status (1)

Country Link
CN (1) CN113535647A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048174A (en) * 2022-01-13 2022-02-15 泰山信息科技有限公司 OFD document processing method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048174A (en) * 2022-01-13 2022-02-15 泰山信息科技有限公司 OFD document processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US20130268843A1 (en) Method, Apparatus And System For Rendering Web Page
CA2416839C (en) Cache system and method for generating uncached objects from cached and stored object components
US9448974B2 (en) Method and apparatus for processing XML for display on a mobile device
US8045510B2 (en) Method for paginating a document structure of a document for viewing on a mobile communication device
US8117238B2 (en) Method of delivering an electronic document to a remote electronic device
CN110765385B (en) Method and system for browsing OFD document webpage end
US20100218077A1 (en) Modifying a markup language document which includes a clickable image
US20030011631A1 (en) System and method for document division
US20010042081A1 (en) Markup language paring for documents
CN112559927B (en) Webpage loading method and device
US20130174016A1 (en) Cache Management in HTML eReading Application
US20070153319A1 (en) Image forming apparatus and method to search for and print images on network
CA2701930A1 (en) Methods, apparatus, and systems for providing local and online data services
CN111680005A (en) File online preview method, device, system, equipment and storage medium
US10783412B1 (en) Smart page encoding system including linearization for viewing and printing
US20180239834A1 (en) Data transmission method and device
US9667696B2 (en) Low latency web-based DICOM viewer system
US20060047729A1 (en) Method for viewing document information on a mobile communication device
CN113535647A (en) OFD file paging rendering method and system
US20010056497A1 (en) Apparatus and method of providing instant information service for various devices
EP1658570A1 (en) Method of caching data assets
CN109284428A (en) Data processing method, device and storage medium
US11087188B2 (en) Smart page decoding system including linearization for viewing and printing
JP4308448B2 (en) Content generation according to the output device
WO2015154678A1 (en) File processing method, device, and network system

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