Method for displaying local files in electronic book client, client and storage medium

CN113590541BActive Publication Date: 2025-04-22ZHANGYUE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110977176.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2025-04-22
Estimated Expiration
2041-08-24

Smart Images

  • Figure CN113590541B_ABST
    Figure CN113590541B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for displaying local files in an e-book client, a client, and a storage medium. The display method includes: sending file information of an e-book format file to a file processing plug-in client, so that the file processing plug-in client obtains the e-book format file according to the file information; obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein a display page is divided into a plurality of page blocks; and a display page is generated according to the block images corresponding to each page block. This solution can realize the display of e-book format files in an e-book client without jumping to a third-party application, thereby improving user experience and the display efficiency of local files in the e-book client; and this solution loads in units of block images, thereby avoiding memory overflow and thread jamming, and further improving the display efficiency of local files in the e-book client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic books, and in particular to a method for displaying local files in an electronic book client, a client and a storage medium. Background Art

[0002] With the continuous development of science and technology and society, readers' reading habits have changed. More and more readers prefer to read books through e-book clients in electronic devices. Readers can directly read books in the bookstore provided by the e-book client, and can also import local files (such as PDF files, etc.) in electronic devices into the e-book client.

[0003] Due to the format restrictions of local files, e-book clients cannot directly display local files. For example, e-book clients in the prior art cannot directly display PDF files, but need to jump to a third-party application (such as jumping to a WPS client, etc.) to display the PDF file in the third-party application. However, this method will greatly reduce the reading experience of readers and reduce the display efficiency of local files. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a method for displaying local files in an e-book client, a client and a storage medium that overcome the above problems or at least partially solve the above problems.

[0005] According to a first aspect of the present invention, a method for processing local files in an e-book client is provided, comprising:

[0006] Acquire the e-book format file according to the file information of the e-book format file sent by the host program client;

[0007] Parsing the electronic book format file to obtain a parsing result;

[0008] According to the page segmentation parameters, determine the multiple page blocks into which the display page is divided;

[0009] Based on the analysis results, generate block images corresponding to each page block;

[0010] The generated block images are transmitted to the host program client, so that the host program client generates a display page according to the block images corresponding to each page block.

[0011] According to a second aspect of the present invention, a method for displaying local files in an e-book client is provided, comprising:

[0012] Sending file information of the electronic book format file to the file processing plug-in client, so that the file processing plug-in client obtains the electronic book format file according to the file information;

[0013] Obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein each block image corresponds to a page block, and a display page is divided into a plurality of page blocks;

[0014] Generate a display page based on the block images corresponding to each page block.

[0015] According to a third aspect of the present invention, there is provided a file processing plug-in client, the file processing plug-in client comprising at least one executable instruction, the executable instruction being used to cause a processor to perform the following operations:

[0016] Acquire the e-book format file according to the file information of the e-book format file sent by the host program client;

[0017] Parsing the electronic book format file to obtain a parsing result;

[0018] According to the page segmentation parameters, determine the multiple page blocks into which the display page is divided;

[0019] Based on the analysis results, generate block images corresponding to each page block;

[0020] The generated block images are transmitted to the host program client, so that the host program client generates a display page according to the block images corresponding to each page block.

[0021] According to a fourth aspect of the present invention, a host program client is provided, wherein the host program client includes at least one executable instruction, and the executable instruction enables a processor to perform the following operations:

[0022] Sending file information of the electronic book format file to the file processing plug-in client, so that the file processing plug-in client obtains the electronic book format file according to the file information;

[0023] Obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein each block image corresponds to a page block, and a display page is divided into a plurality of page blocks;

[0024] Generate a display page based on the block images corresponding to each page block.

[0025] According to a fifth aspect of the present invention, there is provided an electronic book client, comprising: the above-mentioned file processing plug-in client, and the above-mentioned host program client.

[0026] According to a sixth aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0027] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned method for processing local files in the e-book client;

[0028] And / or, the executable instructions enable the processor to execute operations corresponding to the method for displaying local files in the above-mentioned e-book client.

[0029] According to a seventh aspect of the present invention, there is provided a computer storage medium, wherein the storage medium stores at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned method for processing local files in an e-book client;

[0030] And / or, the executable instructions enable the processor to execute operations corresponding to the method for displaying local files in the above-mentioned e-book client.

[0031] By adopting this solution, e-book format files can be displayed in the e-book client without jumping to a third-party application, thereby improving the user experience and the display efficiency of local files in the e-book client; in addition, this solution loads block images as units to avoid memory overflow and thread jams, further improving the display efficiency of local files in the e-book client.

[0032] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0034] Figure 1 A schematic flow chart of a method for processing local files in an e-book client provided in the first embodiment of the present invention is shown;

[0035] Figure 2 A schematic flow chart of a method for processing local files in an e-book client provided in a second embodiment of the present invention is shown;

[0036] Figure 3 A schematic diagram showing a flow chart of a method for displaying local files in an e-book client provided in a third embodiment of the present invention;

[0037] Figure 4 A schematic flow chart of a method for displaying local files in an e-book client provided by a fourth embodiment of the present invention is shown;

[0038] Figure 5 A schematic diagram of information interaction between a host program client and a file processing plug-in client provided in a fifth embodiment of the present invention is shown;

[0039] Figure 6 A schematic diagram showing the structure of an e-book client provided by Embodiment 8 of the present invention is shown;

[0040] Figure 7 A schematic structural diagram of an electronic device provided in Embodiment 9 of the present invention is shown. DETAILED DESCRIPTION

[0041] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0042] Embodiment 1

[0043] Figure 1 The flowchart of a method for processing local files in an e-book client provided by the first embodiment of the present invention is shown. The processing method provided by this embodiment can be executed by a file processing plug-in client in the e-book client.

[0044] like Figure 1 As shown, the method comprises the following steps:

[0045] Step S110, obtaining the electronic book format file according to the file information of the electronic book format file sent by the host program client.

[0046] The user can import the corresponding local file through the local file import entry provided by the host program client of the e-book client. The local file may include an e-book format file and a media format file. Among them, the e-book format file is specifically a PDF file; the media format file may include at least one of the following files: a picture file, an audio file, and a video file. The embodiment of the present invention will perform subsequent optimization processing on the local file of the e-book format file.

[0047] Specifically, before displaying the locally imported e-book format file, the host program client needs to send the file information of the e-book format file to the file processing plug-in client. The file processing plug-in client obtains the e-book format file according to the file information of the e-book format file sent by the host program client.

[0048] In an optional implementation, the file information of the e-book format file sent by the host program client may be the e-book format file itself, so that the file processing plug-in client directly performs subsequent parsing operations according to the received e-book format file.

[0049] In another optional implementation, the file information of the e-book format file is specifically the storage path of the e-book format file, and the file processing plug-in client loads the e-book format file from the storage location corresponding to the storage path. This method can save transmission costs and improve the efficiency of obtaining e-book format files.

[0050] Step S120, parsing the electronic book format file to obtain a parsing result.

[0051] For e-book format files that cannot be directly displayed by the host program client, the embodiment of the present invention generates corresponding images by parsing such e-book format files through the file processing plug-in client, and provides the generated images for the host program client to display, thereby realizing the display of such e-book format files in the host program client without jumping to a third-party application and without the need for front-end personnel to compile web pages.

[0052] In an optional embodiment, at least one code package corresponding to an e-book format is integrated in the file processing plug-in client, and the code packages corresponding to different e-book formats are different. When parsing an e-book format file, the file processing plug-in client specifically determines the e-book format to which the e-book format file belongs, and calls the code package corresponding to the e-book format to parse the e-book format file. For example, an SO package is generated in advance by compiling a PDF source code library, and the SO package is integrated into the file processing plug-in client. When the e-book format file is a PDF file, the SO package corresponding to the PDF is called to parse the e-book format file. In this way, not only can e-book format files of different e-book formats be parsed, but also the parsing process of e-book format files of different e-book formats is decoupled, thereby improving the scalability of the file processing plug-in client.

[0053] Step S130, determining a plurality of page blocks into which the display page is divided according to the page segmentation parameters.

[0054] After obtaining the parsing result of the e-book format file in step S120, if the corresponding page image is directly generated (one page image corresponds to a display page, and the page image is consistent with the display page size), when the page image occupies a large space or the processing power of the electronic device is weak, the host program client directly loads the entire page image, resulting in memory overflow or thread jamming, thereby causing the page image loading failure or loading time being too long.

[0055] To avoid the technical drawbacks, the embodiment of the present invention further performs segmentation processing on the display page, and segments the display page into multiple page blocks. A block image corresponding to each page block is generated, so that the host program client loads the block image as a loading unit, thereby avoiding the drawbacks of thread jamming and memory overflow.

[0056] It should be understood that the segmentation of the display page in the embodiment of the present invention is not equivalent to the paging processing of the electronic book format file. The embodiment of the present invention is to segment a display page in an electronic device into multiple page blocks, and the multiple page blocks constitute a complete display page. The paging processing of the electronic book format file is to split the electronic format file into multiple pages, each page corresponding to a display page.

[0057] Specifically, when splitting the display page, the multiple page blocks included in the display page are determined according to the page segmentation parameters, wherein the page segmentation parameters may include the number of page blocks of the display page, the size of the page blocks and / or the page segmentation method, etc.

[0058] In an optional implementation, in order to ensure the accuracy of the display page segmentation result, the page size parameter sent by the host program client may be further received, and the multiple page blocks contained in the display page may be determined according to the page segmentation parameter and the page size parameter. For example, the page segmentation parameter may be "page segmentation method: 8*4", and the page size parameter may be "1080*1920", then the display page may be segmented in a segmentation method of 8 rows and 4 columns to obtain 32 page blocks of size "270*240".

[0059] In another optional implementation, the electronic device processing capacity parameter can be obtained, and the page segmentation parameter can be determined according to the electronic device processing capacity parameter. Among them, the number of page blocks contained in the display page after division is negatively correlated with the electronic device processing capacity, that is, the stronger the electronic device processing capacity, the fewer the number of page blocks contained in the display page after division. In this way, the number of page blocks of the display page can be adapted to the processing capacity of the electronic device, and the number of page blocks contained in the display page can be reduced while ensuring that memory overflow and thread jams are avoided, thereby improving the overall execution efficiency of the method.

[0060] Step S140: generating a block image corresponding to each page block based on the analysis result.

[0061] According to the analysis result, the e-book format file can be converted into a picture. The embodiment of the present invention does not limit the specific format of the picture, for example, the converted picture can be in jpg, png, webp and other formats. Specifically, for each page block in the display page, a block picture corresponding to each page block is generated, that is, one page block corresponds to one block picture.

[0062] Step S150 , transmitting the generated block images to the host program client, so that the host program client can generate a display page according to the block images corresponding to each page block.

[0063] The host program client loads the images in units of block images, and finally generates a complete display page according to the block images corresponding to each page block in the display page.

[0064] It can be seen that the present embodiment parses and processes the e-book format files that cannot be directly displayed by the host program client of the e-book client, and obtains the block image corresponding to the display page according to the parsing result, so as to display the block image in the host program client, thereby realizing the display of the e-book format files in the e-book client without jumping to a third-party application, improving the user experience, and improving the display efficiency of local files in the e-book client; and, the present embodiment splits the display page into multiple page blocks according to the page segmentation parameters, generates the block image corresponding to each page block, and loads them in units of block images, avoiding the phenomenon of memory overflow and thread jamming, and further improving the display efficiency of local files in the e-book client.

[0065] Embodiment 2

[0066] Figure 2 The flowchart of a method for processing local files in an e-book client provided by the second embodiment of the present invention is shown. The processing method provided by this embodiment can be executed by a file processing plug-in client in the e-book client.

[0067] like Figure 2 As shown, the method comprises the following steps:

[0068] Step S210, acquiring the electronic book format file according to the file information of the electronic book format file sent by the host program client, and parsing the electronic book format file to obtain a parsing result.

[0069] Step S220: generating a global image corresponding to the display page based on the analysis result, and transmitting the generated global image to the host program client.

[0070] Among them, the global image is consistent with the display page size, and the resolution of the global image is smaller than the resolution of the block image. Due to the low resolution of the global image, the host program client is not prone to memory overflow and thread jamming when loading the global image. Passing the global image with a lower resolution to the host program client allows the host program client to display the display page generated based on the global image when the block image fails to load, thereby avoiding the situation where the user cannot view the electronic format file and improving the user experience.

[0071] In a specific implementation, the host program client pre-creates a blank bitmap corresponding to the display page, the blank bitmap is consistent with the size of the display page, and sends the blank bitmap to the file processing plug-in client. The file processing plug-in client receives the blank bitmap corresponding to the display page sent by the host program client, renders the global image in the blank bitmap to generate a global bitmap, and transmits the generated global bitmap to the host program client.

[0072] Step S230, determining a plurality of page blocks into which the display page is divided according to the page segmentation parameters, generating a block image corresponding to each page block based on the analysis result, and transmitting the generated block image to the host program client.

[0073] Among them, step S220 and step S230 can be executed sequentially or concurrently.

[0074] It can be seen that in addition to generating block images corresponding to page blocks, this embodiment further generates a global image corresponding to the display page, and transmits the generated global image to the host program client, so that the host program client can display the display page generated based on the global image when the block image fails to be loaded, thereby avoiding the situation where the user cannot view the e-book format file and improving the user experience.

[0075] Embodiment 3

[0076] Figure 3 The flowchart of a method for displaying local files in an e-book client provided by the third embodiment of the present invention is shown. The processing method provided by this embodiment can be executed by a host program client in the e-book client.

[0077] like Figure 3 As shown, the method comprises the following steps:

[0078] Step S310: sending the file information of the electronic book format file to the file processing plug-in client, so that the file processing plug-in client can obtain the electronic book format file according to the file information.

[0079] The host program client determines the e-book format file corresponding to the user's viewing operation of the e-book format file in response to the user's viewing operation, then initializes the file processing plug-in client, and sends the file information of the e-book format file corresponding to the viewing operation to the file processing plug-in client. Optionally, the file information of the e-book format file can be a storage path of the e-book format file.

[0080] Step S320, obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file.

[0081] After the host program client sends the file information of the e-book format file to the file processing plug-in client, the file processing plug-in client obtains the e-book format file according to the file information, and parses the e-book format file to obtain the parsing result. And according to the page segmentation parameters, it determines the multiple page blocks divided into the display page, and generates the block images corresponding to each page block. That is, each block image corresponds to a page block, and a display page is divided into multiple page blocks.

[0082] Each time the file processing plug-in client generates a block image, the host program client obtains the generated block image.

[0083] Step S330 , generating a display page according to the block images corresponding to each page block.

[0084] The host program client integrates all the block images corresponding to the loaded display page to generate a display page, and displays the display page.

[0085] It can be seen that this embodiment converts the e-book format file into an image, so that the e-book format file can be displayed in the e-book client without jumping to a third-party application, thereby improving the user experience and improving the display efficiency of local files in the e-book client; and, this embodiment loads the image in units of block images, avoiding memory overflow and thread jamming, and further improving the display efficiency of local files in the e-book client.

[0086] Embodiment 4

[0087] Figure 4 The flowchart of a method for displaying local files in an e-book client provided by the fourth embodiment of the present invention is shown. The processing method provided by this embodiment can be executed by a host program client in the e-book client.

[0088] like Figure 4 As shown, the method comprises the following steps:

[0089] Step S410: sending the file information of the electronic book format file to the file processing plug-in client.

[0090] In an optional implementation, after sending the file information of the e-book format file to the file processing plug-in client, the host program client creates a corresponding thread to monitor the processing dynamics of the file processing plug-in client.

[0091] Step S420: obtaining, through the first execution queue, a block image generated by the file processing plug-in client according to the parsing result of the e-book format file.

[0092] The host program client creates a first execution queue, and after monitoring that the file processing plug-in client generates a block image, obtains the generated block image through the first execution queue.

[0093] Step S430: Acquire the global picture generated by the file processing plug-in client through the second execution queue.

[0094] Specifically, after monitoring the file processing plug-in client parsing the e-book format file, the host program client sets the relevant parameters of the display page, including: zoom ratio, page number, horizontal and vertical version attributes, etc., and generates a blank bitmap corresponding to the display page number, and sends the blank bitmap to the file processing plug-in client.

[0095] The file processing plug-in client generates a global image based on the parsing result of the e-book format file, and renders the global image in a blank bitmap to generate a global bitmap. The resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the display page size. The global bitmap is further loaded through the second execution queue created by the host program client, thereby obtaining the global image generated by the file processing plug-in client.

[0096] Step S440, determine whether there is a block image loading failure; if so, execute step S450; otherwise, execute step S460.

[0097] Specifically, if a block image loading error message is received, or if all block images corresponding to the display page cannot be received within a preset time, it is determined that a block image loading failure exists, and step S450 is executed; otherwise, step S460 is executed.

[0098] Step S450, generating a display page according to the global image, and displaying the display page.

[0099] If it is determined that the block image fails to load, a display page is generated according to the global image, and the global image is displayed to the user, thereby avoiding the disadvantage that the e-book format file cannot be viewed.

[0100] Step S460 , generating a display page according to the position parameters of each page block and the block images corresponding to each page block.

[0101] Specifically, the host program client records the position parameters of each page block. If the page block is a rectangle, the position parameters of the page block include the position coordinates of a pair of diagonal vertices in the rectangle. According to the position parameters of each page block, the block image corresponding to the page block can be displayed in the page position corresponding to the position parameter, thereby improving the display accuracy of the displayed page.

[0102] In addition, in an optional implementation, after obtaining the global image, the host program client draws the global image on the bottom layer of the page of the host program client; and sets another layer on the bottom layer of the page, and draws the block image in the other layer after each block image is obtained. If it is determined that there is a block image loading failure, the attribute of the other layer is set to transparent, or the other layer is deleted to quickly display the display page composed of the global image; if it is determined that there is no block image loading failure, all the block images in the other layer completely cover the layer where the global image is located, so as to display the display page composed of the block images.

[0103] In another optional implementation, after the global image is acquired and before all the block images corresponding to the display page are acquired, the global image can be displayed to generate a display page, so that the user can preview the e-book format file based on the low-resolution global image to improve the user experience. After all the block images corresponding to the display page are successfully acquired, the display page composed of the block images is displayed.

[0104] It can be seen that, when it is determined that there is a block image loading failure, the embodiment of the present invention displays a display page generated according to the global image, thereby avoiding the situation where the user cannot view the e-book format file, thereby improving the user experience; and in the embodiment of the present invention, the acquisition of block images and global images is executed through different execution queues, which on the one hand improves the image loading efficiency, and on the other hand isolates the global image acquisition process from the block image acquisition process to avoid mutual interference and improve loading accuracy.

[0105] Embodiment 5

[0106] Figure 5 A schematic diagram of information interaction between a host program client and a file processing plug-in client provided in a fifth embodiment of the present invention is shown.

[0107] Specifically,

[0108] Step S510: the host program client sends the file information of the electronic book format file to the file processing plug-in client.

[0109] Step S520: the file processing plug-in client obtains the e-book format file according to the file information of the e-book format file sent by the host program client.

[0110] Step S530, the file processing plug-in client parses the e-book format file to obtain a parsing result; determines a plurality of page blocks into which the display page is divided according to the page segmentation parameter, and generates a block image corresponding to each page block based on the parsing result.

[0111] Step S540: the host program client loads the block image.

[0112] Step S550 : the host program client generates a display page according to the block images corresponding to each page block.

[0113] The specific implementation process of this embodiment can refer to the description of the corresponding parts in other method embodiments, which will not be repeated here.

[0114] Embodiment 6

[0115] A file processing plug-in client is provided in a sixth embodiment of the present invention. The file processing plug-in client includes at least one executable instruction. The executable instruction is used to enable a processor to perform the following operations:

[0116] Acquire the e-book format file according to the file information of the e-book format file sent by the host program client;

[0117] Parsing the electronic book format file to obtain a parsing result;

[0118] According to the page segmentation parameters, determine the multiple page blocks into which the display page is divided;

[0119] Based on the analysis results, generate block images corresponding to each page block;

[0120] The generated block images are transmitted to the host program client, so that the host program client generates a display page according to the block images corresponding to each page block.

[0121] In an optional embodiment, the executable instructions are used to cause the processor to perform the following operations: after obtaining the parsing results, based on the parsing results, generate a global image corresponding to the display page; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; and pass the generated global image to the host program client.

[0122] In an optional embodiment, the executable instructions are used to cause the processor to perform the following operations: receive a blank bitmap corresponding to the display page sent by the host program client, and render the global image in the blank bitmap to generate a global bitmap; and pass the generated global bitmap to the host program client.

[0123] In an optional implementation, the executable instructions are used to enable the processor to perform the following operations: receiving a page size parameter sent by a host program client; and determining a plurality of page blocks included in a display page according to the page segmentation parameter and the page size parameter.

[0124] In an optional implementation, the executable instructions are used to enable the processor to perform the following operations: obtaining a processing capability parameter of the electronic device, and determining a page segmentation parameter according to the processing capability parameter of the electronic device.

[0125] In an optional implementation manner, the file information of the electronic book format file specifically includes: a storage path of the electronic book format file.

[0126] In an optional implementation, the electronic book format file is specifically a PDF file.

[0127] The specific implementation process of this embodiment can refer to the description of the corresponding parts in Embodiment 1 and / or Embodiment 2, and will not be repeated here.

[0128] Embodiment 7

[0129] A host program client is provided in a seventh embodiment of the present invention. The host program client includes at least one executable instruction. The executable instruction is used to cause a processor to perform the following operations:

[0130] Send the file information of the e-book format file to the file processing plug-in client, so that the file processing plug-in client obtains the e-book format file according to the file information; obtain the block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein each block image corresponds to a page block, and a display page is divided into multiple page blocks; generate a display page according to the block images corresponding to each page block.

[0131] In an optional implementation, the executable instructions are used to enable the processor to perform the following operations: generating a display page according to position parameters of each page block and a block image corresponding to each page block.

[0132] In an optional embodiment, the executable instructions are used to cause the processor to perform the following operations: obtain a global image generated by a file processing plug-in client; wherein a resolution of the global image is smaller than a resolution of the block image, and a size of the global image is consistent with a size of the display page.

[0133] In an optional implementation, the executable instructions are used to cause the processor to perform the following operations: if the block image fails to load, generate a display page according to the global image, and display the display page.

[0134] In an optional embodiment, the executable instructions are used to cause the processor to perform the following operations: obtain a block image generated by the file processing plug-in client according to the parsing result of the e-book format file through the first execution queue; obtain a global image generated by the file processing plug-in client through the second execution queue.

[0135] The specific implementation process of this embodiment can refer to the description of the corresponding parts in Embodiment 3 and / or Embodiment 4, and will not be repeated here.

[0136] Embodiment 8

[0137] Figure 6 FIG. 8 is a schematic diagram showing the structure of an e-book client provided by Embodiment 8 of the present invention. Figure 6 As shown, the electronic book client 600 includes: a file processing plug-in client 610 and a host program client 620 .

[0138] The specific structures of the file processing plug-in client 610 and the host program client 620 may refer to the description of the corresponding parts of the sixth and seventh embodiments, and the embodiments of the present invention will not be described in detail here.

[0139] Embodiment 9

[0140] Figure 7 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by Embodiment 9 of the present invention. Figure 7 As shown, the electronic device may include: a processor (processor) 702 , a communication interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .

[0141] Wherein: the processor 702, the communication interface 704, and the memory 706 communicate with each other through the communication bus 708. The communication interface 704 is used to communicate with other devices such as a client or a network element of another server. The processor 702 is used to execute the program 710, which can specifically execute the operations corresponding to the processing method of the local file in the above-mentioned e-book client; and / or, the executable instructions enable the processor to execute the operations corresponding to the display method of the local file in the above-mentioned e-book client.

[0142] Specifically, the program 710 may include program codes, which include computer operation instructions.

[0143] The processor 702 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0144] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0145] Program 710 can be specifically used to enable processor 702 to perform the following operations: obtain the e-book format file according to the file information of the e-book format file sent by the host program client; parse the e-book format file to obtain a parsing result; determine the multiple page blocks into which the display page is divided according to the page segmentation parameters; generate a block image corresponding to each page block based on the parsing result; and pass the generated block image to the host program client so that the host program client can generate a display page according to the block image corresponding to each page block.

[0146] In an optional embodiment, program 710 can be specifically used to enable processor 702 to perform the following operations: after obtaining the parsing result, generate a global image corresponding to the display page based on the parsing result; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; and pass the generated global image to the host program client.

[0147] In an optional embodiment, program 710 can be specifically used to enable processor 702 to perform the following operations: receive a blank bitmap corresponding to the display page sent by the host program client, and render the global image in the blank bitmap to generate a global bitmap; and pass the generated global bitmap to the host program client.

[0148] In an optional implementation, the program 710 may be specifically used to enable the processor 702 to perform the following operations: receiving a page size parameter sent by the host program client; and determining a plurality of page blocks included in the display page according to the page segmentation parameter and the page size parameter.

[0149] In an optional implementation, the program 710 may be specifically configured to enable the processor 702 to perform the following operations: obtaining a processing capability parameter of the electronic device, and determining a page segmentation parameter according to the processing capability parameter of the electronic device.

[0150] In an optional implementation manner, the file information of the electronic book format file is specifically a storage path of the electronic book format file.

[0151] In an optional implementation, the electronic book format file is specifically a PDF file.

[0152] In an optional implementation, program 710 can be specifically used to enable processor 702 to perform the following operations: send file information of an e-book format file to a file processing plug-in client, so that the file processing plug-in client obtains the e-book format file according to the file information; obtain a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein each block image corresponds to a page block, and a display page is divided into multiple page blocks; and generate a display page according to the block images corresponding to each page block.

[0153] In an optional implementation, the program 710 may be specifically used to enable the processor 702 to perform the following operations: generating a display page according to the position parameters of each page block and the block images corresponding to each page block.

[0154] In an optional embodiment, the executable instructions cause the processor to perform the following operations: obtain a global image generated by a file processing plug-in client; wherein a resolution of the global image is smaller than a resolution of the block image, and a size of the global image is consistent with a size of the display page.

[0155] In an optional implementation, the program 710 may be specifically configured to enable the processor 702 to perform the following operations: if the block image fails to load, a display page is generated according to the global image, and the display page is displayed.

[0156] In an optional implementation, program 710 may be specifically used to enable processor 702 to perform the following operations: obtain a block image generated by a file processing plug-in client according to the parsing result of the e-book format file through a first execution queue; and obtain a global image generated by a file processing plug-in client through a second execution queue.

[0157] The specific implementation process of this embodiment can refer to the description of the corresponding parts in other method embodiments, which will not be repeated here.

[0158] Embodiment 10

[0159] Embodiment 10 of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for processing local files in an e-book client and / or the method for displaying local files in an e-book client in any of the above method embodiments.

[0160] The executable instructions can be specifically used to enable the processor to perform the following operations: obtain the e-book format file according to the file information of the e-book format file sent by the host program client; parse the e-book format file to obtain a parsing result; determine the multiple page blocks into which the display page is divided according to the page segmentation parameters; based on the parsing result, generate a block image corresponding to each page block; and pass the generated block image to the host program client so that the host program client can generate a display page according to the block image corresponding to each page block.

[0161] In an optional embodiment, the executable instructions can be specifically used to cause the processor to perform the following operations: after obtaining the parsing result, generating a global image corresponding to the display page based on the parsing result; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; and passing the generated global image to the host program client.

[0162] In an optional implementation, the executable instruction causes the processor to perform the following operations:

[0163] A blank bitmap corresponding to the display page sent by the host program client is received, and the global image is rendered in the blank bitmap to generate a global bitmap; and the generated global bitmap is transmitted to the host program client.

[0164] In an optional implementation, the executable instructions cause the processor to perform the following operations: receiving a page size parameter sent by a host program client; and determining a plurality of page blocks included in a display page according to the page segmentation parameter and the page size parameter.

[0165] In an optional implementation, the executable instructions cause the processor to perform the following operations: obtaining a processing capability parameter of the electronic device, and determining a page segmentation parameter according to the processing capability parameter of the electronic device.

[0166] In an optional implementation manner, the file information of the electronic book format file is specifically a storage path of the electronic book format file.

[0167] In an optional implementation, the electronic book format file is specifically a PDF file.

[0168] In an optional embodiment, the executable instructions cause the processor to perform the following operations: sending file information of an e-book format file to a file processing plug-in client, so that the file processing plug-in client obtains the e-book format file according to the file information; obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein each block image corresponds to a page block, and a display page is divided into multiple page blocks; and generating a display page according to the block images corresponding to each page block.

[0169] In an optional implementation, the executable instructions cause the processor to perform the following operations: generating a display page according to position parameters of each page block and a block image corresponding to each page block.

[0170] In an optional embodiment, the executable instructions cause the processor to perform the following operations: obtain a global image generated by a file processing plug-in client; wherein a resolution of the global image is smaller than a resolution of the block image, and a size of the global image is consistent with a size of the display page.

[0171] In an optional implementation, the executable instructions cause the processor to perform the following operations: if the block image fails to load, generate a display page according to the global image, and display the display page.

[0172] In an optional implementation, the executable instructions cause the processor to perform the following operations: obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file through a first execution queue; and obtaining a global image generated by the file processing plug-in client through a second execution queue.

[0173] The specific implementation process of this embodiment can refer to the description of the corresponding parts in other method embodiments, which will not be repeated here.

[0174] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description made to specific languages ​​above is for disclosing the best mode of the present invention.

[0175] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0176] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0177] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0178] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0179] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0180] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A method for processing local files in an e-book client, comprising: Acquire the e-book format file according to the file information of the e-book format file sent by the host program client; Parsing the electronic book format file to obtain a parsing result; According to the page segmentation parameters, determine the multiple page blocks into which the display page is divided; Based on the analysis result, a block image corresponding to each page block and a global image corresponding to the display page are generated; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; The generated block image and the global image are transmitted to the host program client, so that the global image is drawn on the bottom layer of the page of the host program client, and another layer is set on the bottom layer of the page, and the block image is drawn in the another layer after each block image is obtained; If it is determined that there is a block image loading failure, the property of the other layer is set to transparent or the other layer is deleted to display the display page composed of the global image; if it is determined that there is no block image loading failure, all block images in the other layer completely cover the layer where the global image is located, and the display page composed of block images is displayed.

2. The method according to claim 1, wherein: The generating of the global picture corresponding to the display page further comprises: Receiving a blank bitmap corresponding to the display page sent by the host program client, and rendering the global image in the blank bitmap to generate a global bitmap; Then transmitting the generated global image to the host program client further includes: transmitting the generated global bitmap to the host program client.

3. The method according to claim 1, wherein: The method further includes: receiving a page size parameter sent by a host program client; Then, determining the multiple page blocks into which the display page is divided according to the page segmentation parameters further includes: determining the multiple page blocks into which the display page is divided according to the page segmentation parameters and the page size parameters.

4. The method according to any one of claims 1 to 3, wherein: The method further includes: acquiring a processing capability parameter of an electronic device, and determining a page segmentation parameter according to the processing capability parameter of the electronic device.

5. The method according to any one of claims 1 to 3, wherein: The file information of the electronic book format file specifically includes: a storage path of the electronic book format file.

6. The method according to any one of claims 1 to 3, wherein: The electronic book format file is specifically a PDF file.

7. A method for displaying local files in an e-book client, comprising: Sending file information of the electronic book format file to the file processing plug-in client, so that the file processing plug-in client obtains the electronic book format file according to the file information; Obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein each block image corresponds to a page block, and a display page is divided into a plurality of page blocks; Obtain a global image generated by the file processing plug-in client; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; The global image is drawn at the bottom layer of the page of the host program client, and another layer is set on the bottom layer of the page. After each block image is obtained, the block image is drawn in the other layer; if it is determined that there is a block image loading failure, the attribute of the other layer is set to transparent or the other layer is deleted to display the display page composed of the global image; if it is determined that there is no block image loading failure, all the block images in the other layer completely cover the layer where the global image is located, and the display page composed of the block images is displayed.

8. The method according to claim 7, wherein: The display page composed of block images further includes: A display page is generated according to the position parameters of each page block and the block images corresponding to each page block.

9. The method according to claim 7 or 8, wherein: The obtaining of the block image generated by the file processing plug-in client according to the parsing result of the e-book format file further comprises: obtaining the block image generated by the file processing plug-in client according to the parsing result of the e-book format file through the first execution queue; The obtaining of the global picture generated by the file processing plug-in client further includes: obtaining the global picture generated by the file processing plug-in client through the second execution queue.

10. A file processing plug-in client, the file processing plug-in client comprising at least one executable instruction, the executable instruction causing a processor to perform the following operations: Acquire the e-book format file according to the file information of the e-book format file sent by the host program client; Parsing the electronic book format file to obtain a parsing result; According to the page segmentation parameters, determine the multiple page blocks into which the display page is divided; Based on the analysis result, a block image corresponding to each page block and a global image corresponding to the display page are generated; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; The generated block image and the global image are transmitted to the host program client, so that the global image is drawn on the bottom layer of the page of the host program client, and another layer is set on the bottom layer of the page, and the block image is drawn in the another layer after each block image is obtained; If it is determined that there is a block image loading failure, the property of the other layer is set to transparent or the other layer is deleted to display the display page composed of the global image; if it is determined that there is no block image loading failure, all block images in the other layer completely cover the layer where the global image is located, and the display page composed of block images is displayed.

11. The file processing plug-in client according to claim 10, wherein: The executable instructions cause the processor to perform the following operations: Receiving a blank bitmap corresponding to the display page sent by the host program client, and rendering the global image in the blank bitmap to generate a global bitmap; The generated global bitmap is transmitted to the host program client.

12. The file processing plug-in client according to claim 10, wherein: The executable instructions cause the processor to perform the following operations: Receive the page size parameter sent by the host program client; A plurality of page blocks into which the display page is divided are determined according to the page segmentation parameter and the page size parameter.

13. The file processing plug-in client according to any one of claims 10 to 12, wherein: The executable instructions cause the processor to perform the following operations: The electronic device processing capability parameter is obtained, and the page segmentation parameter is determined according to the electronic device processing capability parameter.

14. The file processing plug-in client according to any one of claims 10 to 12, wherein: The file information of the electronic book format file specifically includes: a storage path of the electronic book format file.

15. The file processing plug-in client according to any one of claims 10 to 12, wherein: The electronic book format file is specifically a PDF file.

16. A host program client, the host program client comprising at least one executable instruction, the executable instruction causing a processor to perform the following operations: Sending file information of the electronic book format file to the file processing plug-in client, so that the file processing plug-in client obtains the electronic book format file according to the file information; Obtaining a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; wherein, Each block image corresponds to a page block, and a display page is divided into multiple page blocks; Obtain a global image generated by the file processing plug-in client; wherein the resolution of the global image is smaller than the resolution of the block image, and the size of the global image is consistent with the size of the display page; Draw the global image on the bottom layer of the page of the host program client, and set another layer on the bottom layer of the page, and draw the block image in the other layer after each block image is obtained; If it is determined that there is a block image loading failure, the property of the other layer is set to transparent or the other layer is deleted to display the display page composed of the global image; if it is determined that there is no block image loading failure, all block images in the other layer completely cover the layer where the global image is located, and the display page composed of block images is displayed.

17. The host program client according to claim 16, wherein: The executable instructions cause the processor to perform the following operations: A display page is generated according to the position parameters of each page block and the block images corresponding to each page block.

18. The host program client according to claim 16 or 17, wherein: The executable instructions cause the processor to perform the following operations: Acquire, through the first execution queue, a block image generated by the file processing plug-in client according to the parsing result of the e-book format file; The global picture generated by the file processing plug-in client is obtained through the second execution queue.

19. An electronic book client, comprising: A file processing plug-in client as described in any one of claims 10-15, and a host program client as described in any one of claims 16-18.

20. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method for processing a local file in an e-book client according to any one of claims 1 to 6; And / or, the executable instructions enable the processor to execute operations corresponding to the method for displaying local files in the e-book client according to any one of claims 7 to 9.

21. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, wherein the executable instruction enables a processor to perform operations corresponding to the method for processing local files in an e-book client according to any one of claims 1 to 6; And / or, the executable instructions enable the processor to execute operations corresponding to the method for displaying local files in the e-book client according to any one of claims 7 to 9.

Citation Information

Patent Citations

  • Method and system for displaying PDF (Portable Document Format) document adaptively to window size and mobile terminal

    CN102331982A

  • Method and system for displaying and processing electronic document

    CN103902512A