Ofd file online reading method and device

By obtaining the OFD file index provided by the remote server, prioritizing the download of necessary public files and downloading page files on demand, the problem of long online reading time for OFD files in existing technologies is solved, and fast high-definition display is achieved.

CN116501702BActive Publication Date: 2026-05-05BEIJING TIANWEI CHENGXIN ELECTRONIC COMMERCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING TIANWEI CHENGXIN ELECTRONIC COMMERCE CO LTD
Filing Date
2023-04-28
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Under current online reading methods, OFD files take a long time to read and cannot be displayed quickly and in high definition.

Method used

By obtaining the OFD file index provided by the remote server, including the size and document number of each page, the first type of links to public files and the second type of download links to page files, the virtual page is rendered on the front-end page. Necessary public files are downloaded first, and page files are downloaded on demand, so as to achieve fast and high-definition display.

Benefits of technology

It enables users to quickly and clearly display OFD file content, improving online reading efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116501702B_ABST
    Figure CN116501702B_ABST
Patent Text Reader

Abstract

This application discloses an online reading method and apparatus for OFD documents. The method includes: obtaining an OFD document index; the OFD document index includes the size and document number information of each page in the OFD document, a first type of link to common files in the OFD document, and a second type of download link corresponding to the page files of each page; rendering a virtual page based on the page number information and page size information in the OFD document; downloading the common files, and then downloading the page files of each page; obtaining the page number of the currently displayed virtual page as the target page number; if the page file corresponding to the target page number does not exist locally on the user's device, immediately downloading the page file corresponding to the target page number through the corresponding second type of download link; and populating the virtual page based on the page file corresponding to the target page number and the common files. This prioritizes downloading files necessary for display, and then prioritizes downloading files corresponding to the target page number as needed, to achieve fast and high-definition display of the user's reading interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of document display, and in particular to a method and apparatus for online reading of OFD documents. Background Technology

[0002] OFD (Open Fixed-layout Document) documents are an open electronic document format. Their layout is fixed and does not change, allowing for easy storage, retrieval, and editing of electronic documents. Electronic contracts and electronic documents are typically stored as OFD files on remote servers. Users can access these contracts or documents remotely and read the stored OFD files online.

[0003] However, existing online reading methods take a long time to read and cannot display the contents of OFD files quickly and in high definition. Summary of the Invention

[0004] The purpose of this application is to provide an online OFD file reading method and apparatus to solve the problem that online reading methods have long reading times and cannot quickly and clearly display the content of OFD files.

[0005] The objective of this application is achieved through the following technical solution:

[0006] Based on the first aspect of this application, a method for online reading of OFD documents is provided, applied to a user terminal, including:

[0007] Obtain the OFD file index provided by the remote server; wherein the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0008] Based on the page number information and page size information in the OFD file, a virtual page is rendered on the front-end page.

[0009] Download the public file based on the first type of link, and then download the page file for each page based on the second type of download link;

[0010] Obtain the page number of the virtual page currently displayed by the user as the target page number; if the page file corresponding to the target page number does not exist locally on the user's terminal, immediately download the page file corresponding to the target page number through the corresponding second type of download link;

[0011] The virtual page is populated based on the page file corresponding to the target page number and the public file.

[0012] In some embodiments, the first type of links includes: download links for the OFD main entry file, download links for the document root node description file, download links for the public resource index file, download links for the document resource index file, and download links for resource files.

[0013] In some embodiments, the page file includes: a page resource file and a page document description file.

[0014] In some embodiments, it also includes:

[0015] The page number of the virtual page to be displayed is estimated as the preferred page number;

[0016] When downloading the page file corresponding to the target page number without downloading the page file corresponding to the preferred page number, download the page file corresponding to the preferred page number first.

[0017] In some embodiments, estimating the page number of the virtual page to be displayed as the preferred page number includes:

[0018] Determine the n pages following the target page number as the preferred page numbers; or,

[0019] Determine the first m page numbers of each document in the OFD file as the preferred page numbers; or,

[0020] The first k pages of each chapter in the document containing the target page number are identified as preferred page numbers;

[0021] Where n is a positive integer; m is a positive integer; and k is a positive integer.

[0022] Based on a second aspect of this application, an OFD document online reading device is provided, applied to a user terminal, comprising:

[0023] The first acquisition module is used to acquire the OFD file index provided by the remote server; wherein the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0024] The rendering module is used to render a virtual page on the front-end page based on the page number information and page size information in the OFD file.

[0025] The download module is used to download the public file based on the first type of link, and then download the page file of each page based on the second type of download link; obtain the page number of the virtual page currently displayed by the user as the target page number; if the page file corresponding to the target page number does not exist locally on the user's terminal, then immediately download the page file corresponding to the target page number through the corresponding second type of download link;

[0026] The filling module is used to fill the virtual page based on the page file corresponding to the target page number and the public file.

[0027] Based on a third aspect of this application, a method for online reading of OFD documents is provided, applied to a remote server, including:

[0028] Obtain the extracted OFD file;

[0029] An OFD file index is generated based on the decompressed OFD file; the OFD file index includes: the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0030] Send the OFD file index to the user terminal;

[0031] The OFD file contains page size and document number information to assist the user in rendering a virtual page on the front-end page; the first type of link assists the user in downloading public files; the second type of download link assists the user in prioritizing the download of page files corresponding to the page currently being displayed on the virtual page; the user fills the virtual page based on the page files and the public files.

[0032] In some embodiments, before sending the OFD file index to the user terminal, the method further includes:

[0033] The OFD file index is encrypted.

[0034] In some embodiments, obtaining the decompressed OFD file includes:

[0035] Obtain the original OFD file, decompress the original OFD file to obtain the decompressed OFD file.

[0036] Based on the fourth aspect of this application, an OFD document online reading device is provided, applied to a remote server, comprising:

[0037] The second acquisition module is used to acquire the decompressed OFD file;

[0038] The generation module is used to generate an OFD file index based on the decompressed OFD file; the OFD file index includes: the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0039] The sending module is used to send the OFD file index to the user terminal;

[0040] The size and document number information of each page in the OFD file are used to assist the user in rendering a virtual page on the front end. The first type of link for the public files in the OFD file is used to assist the user in downloading the public files. The download link corresponding to each page file is used to assist the user in prioritizing the download of the page file corresponding to the page currently being displayed in the virtual page. The user is used to populate the virtual page based on the page files and the public files.

[0041] The above technical solution adopted in this application has the following beneficial effects:

[0042] The solution provided in this application first obtains an OFD file index provided by a remote server; wherein, the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link to the common files in the OFD file, and a second type of download link corresponding to the page files of each page; then, based on the page number information and the page size information in the OFD file, a virtual page is rendered on the front-end page; the common files are downloaded based on the first type of link, and then the page files of each page are downloaded based on the second type of download link; the page number of the virtual page currently displayed by the user is obtained as the target page number; if the page file corresponding to the target page number does not exist locally on the user's end, the page file corresponding to the target page number is immediately downloaded through the corresponding second type of download link; the virtual page is populated based on the page file corresponding to the target page number and the common files. With this setup, the necessary files for display are downloaded first: the page size and document number information in the OFD file, and common files. Then, files are downloaded on demand. That is, when a user is reading a virtual page rendered on the front-end page based on page number information and page size information, the page file corresponding to the reading interface is downloaded first. Then, the virtual page is filled based on the page file and the common files to achieve a fast and high-definition display of the user's reading interface. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart of an online OFD file reading method provided in one embodiment of this application.

[0045] Figure 2 This is a flowchart of an online OFD file reading method provided in another embodiment of this application.

[0046] Figure 3 This is a flowchart of an online OFD file reading method provided in another embodiment of this application.

[0047] Figure 4 This is a structural diagram of an OFD document online reading device provided in another embodiment of this application.

[0048] Figure 5 This is a structural diagram of an OFD document online reading device provided in another embodiment of this application.

[0049] Figure 6 This is a structural diagram of a device provided in another embodiment of this application. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] Figure 1 This is a flowchart illustrating an online OFD file reading method according to an embodiment of this application. Figure 1 As shown, this embodiment provides an online OFD file reading method, applied to a user terminal, which includes at least the following steps:

[0052] Step 11: Obtain the OFD file index provided by the remote server; wherein, the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0053] Specifically, in the solution provided in this application, the OFD file index is pre-generated by the remote server, and its purpose is to provide an index for the user to download files.

[0054] The page size and document number information in the OFD file refers to the page number and size information of each page in the OFD file.

[0055] The public files include: OFD's main entry file, document root node description file, public resource index file, document resource index file, and resource files. The first type of links includes: download links for OFD's main entry file, document root node description file, public resource index file, document resource index file, and resource files.

[0056] The page files include: page resource files and page document description files. The second type of download links includes: multiple download links corresponding to the page resource files for each page, and multiple download links corresponding to the page document description files for each page.

[0057] Step 12: Based on the page number information and page size information in the OFD file, render a virtual page on the front-end page;

[0058] It should be noted that in the solution provided in this application, the user terminal can pre-configure some basic settings for reading OFD files. Using these settings, a virtual page can be rendered on the front-end based on the page number information and page size information in the OFD file. It should also be noted that, due to the lack of a "file representing the actual content inside the virtual page," the virtual page is generally empty at this time.

[0059] Step 13: Download the public file based on the first type of link, and then download the page file for each page based on the second type of download link;

[0060] That is, download the public files first, and then download the page files for each page.

[0061] Step 14: Obtain the page number of the virtual page currently displayed by the user as the target page number; if the page file corresponding to the target page number does not exist locally on the user's terminal, immediately download the page file corresponding to the target page number through the corresponding second type of download link;

[0062] Specifically, for example, if the target page number is the third page, then the page file corresponding to the third page will be downloaded immediately. It should be noted that if the page file corresponding to the third page has already been downloaded, then there is no need to perform the "download the page file corresponding to the third page" step; other files can be downloaded according to other rules.

[0063] In some embodiments, the download logic may be to first download the common file, and then download the page files corresponding to each page sequentially. If a task to download the page file corresponding to the target page number appears during the process of downloading the page files corresponding to each page sequentially, then the page file corresponding to the target page number is downloaded immediately.

[0064] Step 15: Populate the virtual page based on the page file corresponding to the target page number and the public file.

[0065] In the solution provided in this application, the necessary files for display are first downloaded, namely: the page size and document number information of each page in the OFD file and the common files. Then, the files are downloaded on demand. That is, when the user is reading "a virtual page rendered on the front-end page based on page number information and page size information", the page file corresponding to the reading interface is downloaded first. Then, the virtual page is filled based on the page file and the common files to achieve fast and high-definition display of the user's reading interface.

[0066] Furthermore, in practical applications, to better display the target page, it's possible to predict in advance which pages are likely to become target pages, and then prioritize downloading the files corresponding to those pages. Specifically:

[0067] The page number of the virtual page to be displayed is estimated as the preferred page number; when the page file corresponding to the target page number is not downloaded, the page file corresponding to the preferred page number is downloaded first.

[0068] The virtual page to be displayed is the page that may become the target page. Specific estimation strategies may include: determining the n pages following the target page as preferred pages; or, determining the first m pages of each document in the OFD file as preferred pages; or, determining the first k pages of each chapter in the document containing the target page as preferred pages; where n is a positive integer; m is a positive integer; and k is a positive integer.

[0069] It should be noted that the estimation method varies depending on the specific document. The most basic estimation method is to determine the n pages following the target page number as the preferred page numbers. For example, if a user is reading page 3, they might then read page 4 in sequence, followed by page 5. Therefore, the n pages following the target page number can be considered as the preferred page numbers (when n=2, the preferred page numbers are page 4 and page 5).

[0070] Another estimation method is to determine the first m pages of each document in the OFD file as the preferred page numbers. For example, when an OFD file contains multiple documents, users generally start reading from the first page, so the first m pages of each document can be used as the preferred page numbers (when m=2, the selected page numbers are the first and second pages of each document).

[0071] Another estimation method is to determine the first k pages of each chapter in the document containing the target page number as the preferred page numbers. For example, when a document contains multiple chapters, users usually start reading from the first few pages of each chapter. Therefore, the first k pages of each chapter in the current document can be used as the preferred page numbers (when k=2, the selected page numbers are the first and second pages of each chapter in the current document).

[0072] Figure 2 This is a flowchart illustrating an online OFD file reading method according to an embodiment of this application. Figure 2 As shown, the OFD file online reading method provided in this embodiment, applied to a remote server, includes at least the following steps:

[0073] Step 21: Obtain the decompressed OFD file;

[0074] It should be noted that OFD files are in XML format, so they can be opened and viewed directly using compression software. The hierarchical structure of an OFD file mainly includes:

[0075] OFD.XML: The main entry file. Only one OFD.xml file exists within a package, and this filename should not be modified; DOC_N: The folder for the Nth document; Document.xml: The root node of the document; Page_N: The folder for the Nth page; Content.cml: The content description for the Nth page; PageRes.xml: The resource description for the Nth page; Res: The resource folder; PublicRes.xml: The public resource index for the document; DocumentRes.xml: The resource index for the document itself;

[0076] Image_M.png / Font_M.ttf: Resource files; Signs: Digital signature storage directory;

[0077] Singatures.xml: Signature list file; Sign_N: Nth signature / seal; Signature.xml: Signature / seal description file; Seal.esl: Electronic seal file; SignedValue.dat: Signature value file;

[0078] Step 22: Generate an OFD file index based on the decompressed OFD file; the OFD file index includes: the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0079] Specifically, the public files include: the main entry file, the root node of the document, the resource folder, the document's public resource index, the document's own resource index, resource files, the digital signature storage directory, the signature list file, the Nth signature / seal, the signature / seal description file, the electronic seal file, and the signature value file. Specifically, each page's page file includes: a content description and a resource description for each page.

[0080] Step 23: Send the OFD file index to the user terminal.

[0081] The OFD file contains page size and document number information to assist the user in rendering a virtual page on the front-end page; the first type of link assists the user in downloading public files; the second type of download link assists the user in prioritizing the download of page files corresponding to the page currently being displayed on the virtual page; the user fills the virtual page based on the page files and the public files.

[0082] This setup allows the remote server and client to quickly open OFD files. With the assistance of the remote server, the client can first download the necessary files for display: the page size and document number information, and common files from the OFD file. Then, it downloads files as needed. Specifically, when the user is reading a virtual page rendered on the front-end based on page number and page size information, the client prioritizes downloading the page file corresponding to the desired reading interface. The virtual page is then populated based on these page files and common files, resulting in a fast and high-definition display of the user's reading interface.

[0083] In some embodiments, "obtaining the decompressed OFD file" can mean obtaining the original OFD file, decompressing the original OFD file, and obtaining the decompressed OFD file. In this case, the remote server has decompression capabilities, and the decompressed OFD file can be obtained directly from the original OFD file via the remote server. Of course, in practical applications, the remote server can also directly obtain the decompressed OFD file.

[0084] Furthermore, to ensure that data is not leaked, during data interaction, such as when transmitting OFD file indexes, the remote server can encrypt the OFD file index. After the user downloads the encrypted OFD file index, it decrypts it and then performs subsequent steps based on the content within the OFD file index.

[0085] It should be emphasized that, in some embodiments, the user terminal can not only display OFD files with the help of a remote server, but also directly read and display local OFD files based solely on local configuration.

[0086] Specifically, refer to Figure 3The specific integration method between the remote server and the user terminal is as follows:

[0087] Step 31: The remote server decompresses the OFD file to a temporary directory;

[0088] Specifically, (or you can upload, decompress, and store them separately on a remote storage server), they are stored in a temporary directory according to the OFD hierarchical structure and data structure standard.

[0089] Step 32: The remote server generates an OFD file list based on the decompressed OFD file; wherein, the OFD file list includes the size and document number information of each page in the OFD file, a first type of link for the common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0090] In some embodiments, the OFD file manifest contains download links for the decompressed OFD files, and the manifest is in either readable text format or unreadable binary encrypted format.

[0091] The OFD file list includes the OFD file index, which includes the size and document number information for each page in the OFD file, download links for the main file entry, the root node, resource folder, public resource index, internal resource index, resource files, digital signature storage directory, signature list, Nth signature / seal, signature / seal description, electronic seal, and signature value. It also includes download links for the content description and resource description for each page.

[0092] Step 33: The user downloads the OFD file list;

[0093] Specifically, if the OFD file list downloaded by the user is an encrypted file, the user needs to decrypt the OFD file first.

[0094] Step 34: Based on the page size and document number information in the OFD file, the user terminal renders a virtual page on the front-end page, and then downloads the public file;

[0095] Step 35: When the user is reading the OFD file, the page file of each page is downloaded sequentially, and the page number of the virtual page currently displayed by the user is obtained as the target page number; if the page file corresponding to the target page number has not been downloaded, the page file corresponding to the target page number is downloaded immediately.

[0096] Specifically, methods for obtaining the page number of the currently displayed virtual page as the target page number include: determining the target page number through the user's scrolling and page-jumping operations.

[0097] Step 35: The client renders the previously downloaded public resource document and the current page file onto the page according to the OFD document node description specification.

[0098] In this way, based on the above method, the user end and the remote server cooperate with each other to download on demand, prioritizing the download of files that are helpful for immediately reading the OFD document, so that the contents of the OFD document can be displayed quickly and in high definition.

[0099] See Figure 4 , Figure 4 This is a structural diagram of an OFD document online reading device provided in another embodiment of this application.

[0100] like Figure 4 As shown, this embodiment provides an OFD document online reading device, applied to a user terminal, comprising:

[0101] The first acquisition module 41 is used to acquire the OFD file index provided by the remote server; wherein the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link for the common files in the OFD file, and a second type of download link corresponding to the page file of each page respectively;

[0102] Rendering module 42 is used to render a virtual page on the front-end page based on the page number information and page size information in the OFD file;

[0103] Download module 43 is used to download the public file based on the first type of link, and then download the page file of each page based on the second type of download link; obtain the page number of the virtual page currently displayed by the user as the target page number; if the page file corresponding to the target page number does not exist locally on the user's terminal, then immediately download the page file corresponding to the target page number through the corresponding second type of download link;

[0104] The filling module 44 is used to fill the virtual page based on the page file corresponding to the target page number and the public file.

[0105] It should be noted that the specific implementation scheme of the OFD document online reading device provided in this embodiment can be referred to the above. Figure 1 The relevant implementation methods of the described method will not be described in detail here.

[0106] See Figure 5 , Figure 5 This is a structural diagram of an OFD document online reading device provided in another embodiment of this application.

[0107] like Figure 5As shown in the figure, this embodiment provides an OFD document online reading device, applied to a remote server, comprising:

[0108] The second acquisition module 51 is used to acquire the decompressed OFD file;

[0109] The generation module 52 is used to generate an OFD file index based on the decompressed OFD file; the OFD file index includes: the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page;

[0110] Sending module 53 is used to send the OFD file index to the user terminal;

[0111] The size and document number information of each page in the OFD file are used to assist the user in rendering a virtual page on the front end. The first type of link for the public files in the OFD file is used to assist the user in downloading the public files. The download link corresponding to each page file is used to assist the user in prioritizing the download of the page file corresponding to the page currently being displayed in the virtual page. The user is used to populate the virtual page based on the page files and the public files.

[0112] It should be noted that the specific implementation scheme of the OFD document online reading device provided in this embodiment can be referred to the above. Figure 2 The relevant implementation methods of the described method will not be described in detail here.

[0113] See Figure 6 , Figure 6 This is a structural diagram of an electronic device provided in another embodiment of this application.

[0114] like Figure 6 As shown, this embodiment provides an electronic device, including:

[0115] Processor 601, and memory 602 connected to processor 601;

[0116] Memory 602 is used to store computer programs;

[0117] The processor 601 is used to call and execute the computer program in the memory 602 to perform the OFD file online reading method as described in any of the above embodiments.

[0118] The specific implementation scheme of the intelligence data processing device provided in this embodiment can refer to the online reading method of data OFD files described in any of the above examples, and will not be repeated here.

[0119] Another embodiment of this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the various steps of the OFD file online reading method as described in any of the above embodiments.

[0120] The specific implementation scheme of the storage medium provided in this embodiment can be referred to the implementation scheme of the data processing method in any of the above examples, and will not be repeated here.

[0121] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0122] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means at least two.

[0123] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.

[0124] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0125] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0126] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0127] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0128] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0129] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for online reading of OFD documents, characterized in that, Applied to the user end, including: Obtain the OFD file index provided by the remote server; wherein the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page; Based on the page number information and page size information in the OFD file, a virtual page with the same layout as the real page is pre-rendered in the front-end page. The virtual page is a placeholder frame without actual page content. Download the public file based on the first type of link, and then download the page file of each page sequentially based on the second type of download link; The page number of the virtual page currently displayed to the user is obtained as the target page number; if the page file corresponding to the target page number does not exist locally on the user's terminal, the currently ongoing download task is immediately interrupted or suspended, and the page file corresponding to the target page number is immediately downloaded through the corresponding second type of download link; Based on the page file corresponding to the target page number and the public file, the page content is filled into the placeholder frame corresponding to the virtual page to complete the visual display of the page; The first type of links includes: download links for the OFD main entry file, download links for the document root node description file, download links for the public resource index file, download links for the document resource index file, and download links for resource files; The page files include: page resource files and page document description files.

2. The OFD document online reading method according to claim 1, characterized in that, Also includes: The page number of the virtual page to be displayed is estimated as the preferred page number; When downloading the page file corresponding to the target page number without downloading the page file corresponding to the preferred page number, download the page file corresponding to the preferred page number first.

3. The online OFD document reading method according to claim 1, characterized in that, The page numbers of the virtual pages to be displayed are estimated as preferred page numbers, including: Determine the n pages following the target page number as the preferred page numbers; or, Determine the first m page numbers of each document in the OFD file as the preferred page numbers; or, The first k pages of each chapter in the document containing the target page number are identified as preferred page numbers; Where n is a positive integer; m is a positive integer; and k is a positive integer.

4. An OFD document online reading device, characterized in that, Applied to the user end, including: The first acquisition module is used to acquire the OFD file index provided by the remote server; wherein the OFD file index is generated by the remote server based on the OFD file; the OFD file index includes the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page; The rendering module is used to pre-render a virtual page with the same layout as the real page in the front-end page based on the page number information and page size information in the OFD file. The virtual page is a placeholder frame without actual page content. The download module is used to download the public file based on the first type of link, and then download the page file of each page sequentially based on the second type of download link; obtain the page number of the virtual page currently displayed by the user as the target page number; if the page file corresponding to the target page number does not exist locally on the user's terminal, the currently ongoing download task is immediately interrupted or suspended, and the page file corresponding to the target page number is immediately downloaded through the corresponding second type of download link; The filling module is used to fill the page content into the placeholder frame corresponding to the virtual page based on the page file corresponding to the target page number and the public file, so as to complete the visual display of the page; The first type of links includes: download links for the OFD main entry file, download links for the document root node description file, download links for the public resource index file, download links for the document resource index file, and download links for resource files; The page files include: page resource files and page document description files.

5. A method for online reading of OFD documents, characterized in that, Applied to remote servers, including: Obtain the decompressed OFD file; An OFD file index is generated based on the decompressed OFD file; the OFD file index includes: the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page; Send the OFD file index to the user terminal; The OFD file contains page size and document number information to assist the user in rendering a virtual page on the front-end page; the first type of link assists the user in downloading public files; the second type of download link assists the user in prioritizing the download of page files corresponding to the page currently being displayed on the virtual page; the user fills the virtual page based on the page files and the public files. The remote server communicates and interacts with the user terminal that executes the OFD file online reading method according to any one of claims 1 to 3.

6. The OFD document online reading method according to claim 5, characterized in that, Before sending the OFD file index to the user terminal, the following is also included: The OFD file index is encrypted.

7. The OFD document online reading method according to claim 5, characterized in that, Obtain the extracted OFD file, including: Obtain the original OFD file, decompress the original OFD file to obtain the decompressed OFD file.

8. An OFD document online reading device, characterized in that, Applied to remote servers, including: The second acquisition module is used to acquire the decompressed OFD file; The generation module is used to generate an OFD file index based on the decompressed OFD file; the OFD file index includes: the size and document number information of each page in the OFD file, a first type of link for common files in the OFD file, and a second type of download link corresponding to the page file of each page; The sending module is used to send the OFD file index to the user terminal; The size and document number information of each page in the OFD file are used to assist the user in rendering a virtual page on the front-end page; the first type of link for the public files in the OFD file is used to assist the user in downloading the public files; the download link corresponding to each page file is used to assist the user in prioritizing the download of the page file corresponding to the page currently being displayed in the virtual page; the user is used to populate the virtual page based on the page files and the public files. The remote server communicates and interacts with the user terminal that executes the OFD file online reading method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • OFD file paging rendering method and system

    CN113535647A

  • OFD document processing method and device and electronic equipment

    CN114048174A