CN111259636B - Document rendering method and device and electronic equipment - Google Patents

Document rendering method and device and electronic equipment Download PDF

Info

Publication number
CN111259636B
CN111259636B CN202010083580.0A CN202010083580A CN111259636B CN 111259636 B CN111259636 B CN 111259636B CN 202010083580 A CN202010083580 A CN 202010083580A CN 111259636 B CN111259636 B CN 111259636B
Authority
CN
China
Prior art keywords
rendering
target
task
target queue
document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010083580.0A
Other languages
Chinese (zh)
Other versions
CN111259636A (en
Inventor
宋易现
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010083580.0A priority Critical patent/CN111259636B/en
Publication of CN111259636A publication Critical patent/CN111259636A/en
Application granted granted Critical
Publication of CN111259636B publication Critical patent/CN111259636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a document rendering method, a document rendering device and electronic equipment. One embodiment of the method comprises the following steps: when executing the target rendering sub-task in the target queue ends, determining whether to continue executing the first processing task to the target queue, wherein the target queue is established by: dividing rendering tasks of a document to be displayed in a portable document format to obtain a plurality of rendering subtasks, and establishing a target queue by taking the plurality of rendering subtasks as queue elements; in response to determining to continue executing the first processing task on the target queue, a next rendering sub-task of the target rendering sub-task is obtained from the target queue, and the obtained rendering sub-task is executed. According to the method, the rendering of the document to be displayed is achieved on the basis that the rendering task of the document to be displayed is divided into a plurality of rendering subtasks.

Description

Document rendering method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of internet, and in particular relates to a document rendering method, a document rendering device and electronic equipment.
Background
In some instances, a user may need to view an electronic document. In practice, electronic documents may have a wide variety of document formats. For example, the electronic document may be in a portable document format (Portable Document Format, PDF).
To meet the needs of the user, the relevant client application supports rendering of electronic documents. After the electronic document is rendered, the user may view the electronic document.
In the related art, when a PDF file is large, rendering may cause a page to be blocked, which affects the efficiency of viewing the file by a user.
Disclosure of Invention
This disclosure is provided in part to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a document rendering method, a device and electronic equipment, which are used for realizing the rendering of a document to be displayed on the basis that the rendering task of the document to be displayed is divided into a plurality of rendering subtasks.
In a first aspect, an embodiment of the present disclosure provides a document rendering method, including: when executing the target rendering sub-task in the target queue ends, determining whether to continue executing the first processing task to the target queue, wherein the target queue is established by: dividing rendering tasks of a document to be displayed in a portable document format to obtain a plurality of rendering subtasks, and establishing a target queue by taking the plurality of rendering subtasks as queue elements; in response to determining to continue executing the first processing task on the target queue, a next rendering sub-task of the target rendering sub-task is obtained from the target queue, and the obtained rendering sub-task is executed.
In a second aspect, an embodiment of the present disclosure provides a document rendering apparatus, including: a determining unit configured to determine, when execution of a target rendering sub-task in a target queue ends, whether to continue execution of a first processing task to the target queue, wherein the target queue is established by: dividing rendering tasks of a document to be displayed in a portable document format to obtain a plurality of rendering subtasks, and establishing a target queue by taking the plurality of rendering subtasks as queue elements; and the execution unit is used for responding to the determination that the first processing task of the target queue is continuously executed, acquiring the next rendering subtask of the target rendering subtask from the target queue and executing the acquired rendering subtask.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the document rendering method as described in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the steps of the document rendering method according to the first aspect.
According to the document rendering method, the document rendering device and the electronic equipment, when the execution of the target rendering subtask in the target queue is finished, whether the first processing task of the target queue is continuously executed or not can be determined, further, if the first processing task of the target queue is continuously executed, the rendering subtask of the next order of the target rendering subtask can be obtained from the target queue, and the obtained rendering subtask is executed. Therefore, the rendering of the document to be displayed can be realized on the basis that the rendering task of the document to be displayed is divided into a plurality of rendering subtasks.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of one embodiment of a document rendering method according to the present disclosure;
FIG. 2 is a schematic illustration of one application scenario of a document rendering method according to the present disclosure;
FIG. 3 is a flow chart of yet another embodiment of a document rendering method according to the present disclosure;
FIG. 4 is a schematic structural view of one embodiment of a document rendering device according to the present disclosure;
FIG. 5 is an exemplary system architecture in which a document rendering method of one embodiment of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Referring to FIG. 1, a flow of one embodiment of a document rendering method according to the present disclosure is shown. The document rendering method as shown in fig. 1 includes the steps of:
step 101, when the execution of the target rendering sub-task in the target queue is finished, it is determined whether to continue to execute the first processing task to the target queue.
In this embodiment, the electronic device executing the document rendering method may execute the target rendering sub-task in the target queue.
The above-described target queue may be established in the following manner. Firstly, the rendering tasks of the document to be displayed in the portable document format can be divided, so that a plurality of rendering subtasks are obtained. The resulting plurality of rendering sub-tasks may then be used as queue elements to build a target queue. The target queue may be pre-established by the electronic device that performs the document rendering method, or may be pre-established by a server that is communicatively connected to the electronic device that performs the document rendering method.
The rendering task of the document to be displayed may be a task of rendering the document to be displayed.
The rendering sub-task may correspond to a rendering task of a plurality of pages in the document to be displayed, i.e., the rendering sub-task may be a task of rendering a plurality of pages in the document to be displayed. At this time, by executing a certain rendering sub-task, rendering of a plurality of pages in the document to be displayed can be achieved. Alternatively, the rendering subtask may correspond to a task of rendering a single page in the document to be displayed, i.e., the rendering subtask may be a task of rendering a single page in the document to be displayed. At this time, by executing a certain rendering sub-task, rendering of a single page in the document to be displayed can be achieved.
The target rendering subtask may be a rendering subtask specified in advance in the target queue, or may be any rendering subtask in the target queue.
It will be appreciated that by executing the target rendering sub-task, the electronic device executing the document rendering method may complete rendering of the page indicated by the target rendering sub-task.
In this embodiment, when the execution of the target rendering sub-task ends, the electronic device executing the document rendering method may determine whether to continue to execute the first processing task of the target queue.
The first processing task may be a task that processes a rendering sub-task in the target queue.
In some application scenarios, if there is an unexecuted rendering sub-task in the target queue, when the execution of the target rendering sub-task ends, the electronic device executing the document rendering method may determine to continue to execute the first processing task of the target queue. If the target queue does not have any unexecuted rendering subtasks, the electronic device executing the document rendering method may determine to terminate executing the first processing task of the target queue when executing the target rendering subtask is ended.
In practice, the electronic device executing the document rendering method may further determine whether to continue to execute the first processing task of the target queue after executing the target rendering subtask is finished, or may determine whether to continue to execute the first processing task of the target queue in the process of executing the target rendering subtask.
Step 102, in response to determining to continue executing the first processing task on the target queue, obtaining a next-order rendering sub-task of the target rendering sub-task from the target queue, and executing the obtained rendering sub-task.
In this embodiment, in response to determining to continue to execute the first processing task on the target queue, the electronic device executing the document rendering method may acquire a rendering sub-task of a next order of the target rendering sub-task from the target queue, and execute the acquired rendering sub-task.
In practice, rendering sub-tasks in the target queue may be arranged according to the rank of the indicated page in the document to be displayed. For example, page A has a rank of 2 in the document to be displayed, then the rendering sub-task of page A has a rank of 2 in the target queue.
It should be appreciated that by executing the next-order rendering sub-task, the electronic device executing the document rendering method may complete the rendering of the page indicated by the next-order rendering sub-task.
Referring to fig. 2, there is shown one application scenario of a document rendering method according to an embodiment of the present disclosure. As shown in fig. 2, when the execution of the target rendering sub-task 2021 in the target queue 202 ends, the terminal device 201 may determine whether there is an unexecuted rendering sub-task in the target queue 202. If there are unexecuted rendering sub-tasks in the target queue 202, the terminal device 201 may determine to continue to execute the first processing task to the target queue 202. Further, the terminal apparatus 201 may acquire a rendering sub-task 2022 of the next bit of the target rendering sub-task 2021 from the target queue 202, and execute the rendering sub-task 2022.
In this embodiment, when the execution of the target rendering subtask in the target queue is ended, it may be determined whether to continue to execute the first processing task on the target queue, and on the premise of determining to continue to execute the first processing task on the target queue, a rendering subtask of a next order of the target rendering subtask is selected from the target queue, and the acquired rendering subtask is executed, so that the rendering flexibility of the document to be displayed is improved. In addition, the rendering of the document to be displayed can be realized on the basis that the rendering task of the document to be displayed is divided into a plurality of rendering subtasks by executing the rendering subtasks in the target queue.
With continued reference to fig. 3, a flow of yet another embodiment of a document rendering method according to the present disclosure is shown. As shown in fig. 3, the document rendering method includes the steps of:
step 301, determining whether a second processing task exists when execution of the target rendering sub-task in the execution target queue is ended.
In this embodiment, when the execution of the target rendering sub-task in the target queue ends, the electronic device executing the document rendering method may determine whether or not the second processing task exists.
The second processing task may be a task that processes an operation performed by the user. Thus, by executing the second processing task, processing of the operation performed by the user can be achieved.
The first processing task of the target queue is a target priority. The second processing task has a higher priority than the target priority. That is, the priority of the second processing task is higher than the priority of the first processing task.
In response to determining that the second processing task is present, it is determined to abort execution of the first processing task on the target queue and execute the second processing task, step 302.
In this embodiment, in response to determining that the second processing task exists, the electronic device executing the document rendering method may determine to suspend execution of the first processing task to the target queue and execute the second processing task.
It will be understood that, after the execution of the target rendering sub-task ends, if there is a task that processes an operation performed by the user, the electronic device that executes the document rendering method may suspend execution of the rendering sub-task in the target queue, and then process the operation performed by the user.
Step 303, in response to determining to continue executing the first processing task on the target queue, obtaining a rendering sub-task of a next order of the target rendering sub-task from the target queue, and executing the obtained rendering sub-task.
The above step 303 may be performed in a similar manner to the step 102 in the embodiment shown in fig. 1, and the above description of the step 102 also applies to the step 303, which is not repeated herein.
In some alternative implementations, the second processing task is established in response to detecting the predefined operation. That is, after the predefined operation is detected, the second processing task is re-established.
In some alternative implementations, the predefined operations described above may include at least one of: copy operation, page zoom operation, and page flip operation.
The above-described copy operation may be an operation in which the user copies content from a document to be displayed.
The above page scaling operation may be an operation in which the user enlarges or reduces the page size of the document to be displayed.
The stay page of the above page turning operation may be a page that the user finally stays when turning the document to be displayed. In general, a stay page of a page turning operation may be regarded as a page that a user wants to view preferentially. .
In some alternative implementations, the electronic device executing the document rendering method may update the content of the rendering subtasks in the target queue according to the scaling factor of the page scaling operation.
In practice, the rendering subtask may contain the rendering size of the indicated page. Here, the rendering size may be a size that renders the page.
Specifically, the electronic device executing the document rendering method may determine a rendering size of the document to be displayed after scaling according to the scaling coefficient of the scaling operation, and further may update the rendering size included in the rendering subtask in the target queue.
In practice, after the user performs the zoom operation, the electronic device performing the document rendering method may further update the content of the rendering subtask in the target queue after determining to suspend the first processing task to the target queue.
In these alternative implementations, after updating the content of the rendering subtask in the target queue, the pages in the document to be displayed may be rendered according to the scaled rendering size by further executing the rendering subtask in the target queue.
In some alternative implementations, the electronic device executing the document rendering method may adjust the order of rendering sub-tasks in the target queue according to the stay page of the page turning operation.
Specifically, after determining a stay page of a page turning operation, an electronic device executing the document rendering method may adjust rendering sub-tasks of the stay page to an order of priority execution in a target queue.
In practice, after the user performs the page turning operation, the electronic device performing the document rendering method may determine to suspend the first processing task on the target queue, and further adjust the order of the rendering subtasks in the target queue.
In these alternative implementations, after the rendering sub-tasks of the stay pages are adjusted to the order of priority execution, priority execution of the rendering sub-tasks of the stay pages may be achieved, thereby achieving priority rendering of the stay pages.
In this embodiment, the priority of the second processing task is higher than the priority of the first processing task. On the premise that the second processing task is determined to exist, the execution of the first processing task on the target queue is stopped, and the second processing task is executed. That is, when there is a task to process an operation performed by the user, rendering of the document to be displayed may be suspended, and the operation performed by the user is preferentially processed. On the one hand, compared with the case that the operation executed by the user is processed after the document to be displayed is rendered, the time for responding to the operation executed by the user can be shortened. On the other hand, compared with the process of the operation executed by the user while rendering the document to be displayed, the method can avoid the clamping caused by simultaneously processing too many tasks.
With further reference to fig. 4, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a document rendering apparatus, which corresponds to the method embodiment shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 4, the document rendering apparatus of the present embodiment includes: a determining unit 401 and an executing unit 402. Wherein the determining unit 401 may be configured to: when the execution of the target rendering sub-task in the target queue ends, it is determined whether to continue to execute the first processing task to the target queue. The target queue is established by: dividing rendering tasks of a document to be displayed in a portable document format to obtain a plurality of rendering subtasks, and establishing a target queue by taking the plurality of rendering subtasks as queue elements. The execution unit 402 may be configured to: in response to determining to continue executing the first processing task on the target queue, a next rendering sub-task of the target rendering sub-task is obtained from the target queue, and the obtained rendering sub-task is executed.
In this embodiment, the specific processes of the determining unit 401 and the executing unit 402 of the document rendering device and the technical effects brought by them may refer to the descriptions related to the steps 101 and 102 in the corresponding embodiment of fig. 1, and are not repeated here.
In some alternative implementations, the first processing task of the target queue is the target priority. The determining unit 401 may further be configured to: determining whether a second processing task exists, wherein the priority of the second processing task is higher than the target priority; in response to determining that the second processing task is present, determining to suspend execution of the first processing task to the target queue, and executing the second processing task.
In some alternative implementations, the second processing task is established in response to detecting the predefined operation.
In some alternative implementations, the predefined operation includes at least one of: copy operation, page zoom operation, and page flip operation.
In some alternative implementations, the document rendering apparatus may further include a first processing unit (not shown in the figure). Wherein the first processing unit may be configured to: and updating the content of the rendering subtasks in the target queue according to the scaling coefficient of the page scaling operation.
In some alternative implementations, the document rendering apparatus may further include a second processing unit (not shown in the figure). Wherein the second processing unit may be configured to: and adjusting the sequence of rendering subtasks in the target queue according to the stay page of the page turning operation.
In some alternative implementations, the render subtasks correspond to tasks that render a single page.
With further reference to fig. 5, fig. 5 illustrates an exemplary system architecture in which the document rendering method of one embodiment of the present disclosure may be applied.
As shown in fig. 5, the system architecture may include terminal devices 501, 502, a network 503, and a server 504. The network 503 is the medium used to provide communication links between the terminal devices 501, 502 and the server 504. The network 503 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 501, 502 may interact with the server 504 via the network 503 to receive or send messages or the like. Various client applications, such as a web browser application, a document display class application, may be installed on the terminal devices 501, 502. The client application in the terminal device 501, 5023 may acquire the target queue from the server 504, and then implement rendering of the document to be displayed by processing the rendering subtasks in the target queue.
The terminal devices 501 and 502 may be hardware or software. When the terminal devices 501, 502 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 501, 502 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 504 may be a server providing various services. For example, the server 504 may provide the terminal devices 501, 502 with a target queue and documents to be displayed.
In some application scenarios, the terminal device 501, 502 may obtain the target queue and the document to be displayed from local. At this time, the server 504 may not exist in the system architecture shown in fig. 5.
The server 504 may be hardware or software. When the server 504 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 504 is software, it may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
Note that, the document rendering method provided by the embodiment of the present disclosure may be performed by the terminal devices 501, 502, and accordingly, the document rendering apparatus may be provided in the terminal devices 501, 502.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 6, a schematic diagram of a configuration of an electronic device (e.g., the terminal device of fig. 5) suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: when the execution of the target rendering subtask is finished, determining whether to continue to execute the first processing task on the target queue; in response to determining to continue executing the first processing task on the target queue, a next rendering sub-task of the target rendering sub-task is obtained from the target queue, and the obtained rendering sub-task is executed.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the name of the unit does not constitute a limitation of the unit itself in some cases, for example, the determining unit may also be described as a unit that "determines whether to continue to execute the first processing task to the target queue when executing the target rendering sub-task in the target queue ends".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (9)

1. A document rendering method, comprising:
when executing a target rendering sub-task in a target queue ends, determining whether to continue executing a first processing task to the target queue, wherein the target queue is established by: dividing rendering tasks of a document to be displayed in a portable document format to obtain a plurality of rendering subtasks, and establishing the target queue by taking the plurality of rendering subtasks as queue elements; the rendering subtasks correspond to the tasks of rendering the single page;
in response to determining to continue executing the first processing task on the target queue, retrieving a next-order rendering sub-task of the target rendering sub-task from the target queue, and executing the retrieved rendering sub-task.
2. The method of claim 1, wherein the first processing task of the target queue is a target priority; and
the determining whether to continue executing the first processing task to the target queue includes:
determining whether a second processing task exists, wherein the second processing task has a higher priority than the target priority;
responsive to determining that the second processing task is present, determining to abort execution of the first processing task to the target queue, and executing the second processing task.
3. The method of claim 2, wherein the second processing task is established in response to detecting a predefined operation.
4. A method according to claim 3, wherein the predefined operation comprises at least one of: copy operation, page zoom operation, and page flip operation.
5. The method according to any one of claims 1-4, further comprising:
and updating the content of the rendering subtasks in the target queue according to the scaling coefficient of the page scaling operation.
6. The method according to any one of claims 1-4, further comprising:
and adjusting the sequence of rendering subtasks in the target queue according to the stay page of the page turning operation.
7. A document rendering apparatus, comprising:
a determining unit, configured to determine, when execution of a target rendering sub-task in a target queue ends, whether to continue execution of a first processing task to the target queue, where the target queue is established by: dividing rendering tasks of a document to be displayed in a portable document format to obtain a plurality of rendering subtasks, and establishing the target queue by taking the plurality of rendering subtasks as queue elements; the rendering subtasks correspond to the tasks of rendering the single page;
and the execution unit is used for responding to the determination that the first processing task of the target queue is continuously executed, acquiring the next rendering subtask of the target rendering subtask from the target queue, and executing the acquired rendering subtask.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
9. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202010083580.0A 2020-02-07 2020-02-07 Document rendering method and device and electronic equipment Active CN111259636B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010083580.0A CN111259636B (en) 2020-02-07 2020-02-07 Document rendering method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010083580.0A CN111259636B (en) 2020-02-07 2020-02-07 Document rendering method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111259636A CN111259636A (en) 2020-06-09
CN111259636B true CN111259636B (en) 2023-10-13

Family

ID=70951057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010083580.0A Active CN111259636B (en) 2020-02-07 2020-02-07 Document rendering method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111259636B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506581B (en) * 2020-12-17 2024-03-22 北京百度网讯科技有限公司 Method, apparatus, electronic device and readable storage medium for rendering applet
CN113792240A (en) * 2021-09-23 2021-12-14 上海淇玥信息技术有限公司 Page loading method and device and electronic equipment
CN116594718B (en) * 2023-07-18 2023-09-19 禾多科技(北京)有限公司 Element rendering method, device, equipment and readable medium for simulation test

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819521A (en) * 2011-06-08 2012-12-12 深圳市万兴软件有限公司 Portable electronic device for reading multi-page document and rendering method thereof
CN105959238A (en) * 2016-06-28 2016-09-21 深圳市彬讯科技有限公司 Dispatching method and system for multi-priority rendering resources based on message queues
CN106775225A (en) * 2016-12-02 2017-05-31 西安电子科技大学 The method that across document seamless roam browses PDF maps
CN110110260A (en) * 2019-04-12 2019-08-09 北京奇艺世纪科技有限公司 A kind of page rendering method, apparatus and electronic equipment
CN110442811A (en) * 2019-08-14 2019-11-12 广州虎牙科技有限公司 A kind of processing method of the page, device, computer equipment and storage medium
CN110647699A (en) * 2019-08-13 2020-01-03 平安普惠企业管理有限公司 Web page rendering method and device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2014265139A1 (en) * 2014-11-24 2016-06-09 Canon Kabushiki Kaisha Method, system and apparatus for rendering a document
US10452750B2 (en) * 2015-08-04 2019-10-22 Google Llc Systems and methods for interactively presenting a visible portion of a rendering surface on a user device
US10990258B2 (en) * 2015-08-04 2021-04-27 Google Llc Interactively presenting a visible portion of a rendering surface on a user device
US10747828B2 (en) * 2018-03-27 2020-08-18 Capital One Services, Llc Systems and methods for single page application server side renderer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819521A (en) * 2011-06-08 2012-12-12 深圳市万兴软件有限公司 Portable electronic device for reading multi-page document and rendering method thereof
CN105959238A (en) * 2016-06-28 2016-09-21 深圳市彬讯科技有限公司 Dispatching method and system for multi-priority rendering resources based on message queues
CN106775225A (en) * 2016-12-02 2017-05-31 西安电子科技大学 The method that across document seamless roam browses PDF maps
CN110110260A (en) * 2019-04-12 2019-08-09 北京奇艺世纪科技有限公司 A kind of page rendering method, apparatus and electronic equipment
CN110647699A (en) * 2019-08-13 2020-01-03 平安普惠企业管理有限公司 Web page rendering method and device, computer equipment and storage medium
CN110442811A (en) * 2019-08-14 2019-11-12 广州虎牙科技有限公司 A kind of processing method of the page, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111259636A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN111259636B (en) Document rendering method and device and electronic equipment
CN112256223B (en) Method and device for adjusting display fluency and electronic equipment
CN110633126B (en) Information display method and device and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN111459364B (en) Icon updating method and device and electronic equipment
CN111324834B (en) Method, device, electronic equipment and computer readable medium for image-text mixed arrangement
CN111258736B (en) Information processing method and device and electronic equipment
CN111259291B (en) View display method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111273884A (en) Image display method and device and electronic equipment
CN111754600A (en) Poster image generation method and device and electronic equipment
CN116302271A (en) Page display method and device and electronic equipment
CN111459893B (en) File processing method and device and electronic equipment
CN111338827B (en) Method and device for pasting form data and electronic equipment
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN111290692B (en) Picture display method and device, electronic equipment and computer readable medium
CN113656128A (en) Page generation method and device and electronic equipment
CN110865810A (en) Resource multiplexing method and device, electronic equipment and computer readable storage medium
CN111399730A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN111324405A (en) Character display method and device and electronic equipment
CN113283436B (en) Picture processing method and device and electronic equipment
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN111783390B (en) Dimension label adjusting method and device and electronic equipment
CN111489286B (en) Picture processing method, device, equipment and medium
CN111596987B (en) Page display method and device and electronic equipment

Legal Events

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