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

Document rendering method and device and electronic equipment Download PDF

Info

Publication number
CN111259636A
CN111259636A CN202010083580.0A CN202010083580A CN111259636A CN 111259636 A CN111259636 A CN 111259636A CN 202010083580 A CN202010083580 A CN 202010083580A CN 111259636 A CN111259636 A CN 111259636A
Authority
CN
China
Prior art keywords
rendering
target
target queue
subtask
processing task
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.)
Granted
Application number
CN202010083580.0A
Other languages
Chinese (zh)
Other versions
CN111259636B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure discloses a document rendering method and device and electronic equipment. One embodiment of the method comprises: when the execution of the target rendering subtasks in the target queue is finished, determining whether to continue executing the first processing task of the target queue, wherein the target queue is established by the following method: dividing rendering tasks of a to-be-displayed document 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 to the target queue, a rendering subtask of a next order of the target rendering subtask is obtained from the target queue, and the obtained rendering subtask is executed. According to the embodiment, the rendering of the document to be displayed is realized 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 present disclosure relates to the field of internet technologies, and in particular, to a document rendering method and apparatus, and an electronic device.
Background
In some instances, a user needs 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 (PDF).
To meet the needs of the user, the associated client application supports the 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 page jamming, which affects the viewing efficiency of a user on the file.
Disclosure of Invention
This disclosure is provided 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 document rendering device and electronic equipment, which realize the rendering of a document to be displayed on the basis that a 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, where the method includes: when the execution of the target rendering subtasks in the target queue is finished, determining whether to continue executing the first processing task of the target queue, wherein the target queue is established by the following method: dividing rendering tasks of a to-be-displayed document 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 to the target queue, a rendering subtask of a next order of the target rendering subtask is obtained from the target queue, and the obtained rendering subtask is executed.
In a second aspect, an embodiment of the present disclosure provides a document rendering apparatus, including: the determining unit is used for determining whether to continue executing the first processing task of the target queue when the target rendering subtask in the target queue is executed, wherein the target queue is established by the following method: dividing rendering tasks of a to-be-displayed document 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 of continuing to execute the first processing task of the target queue, acquiring a rendering subtask of the next level 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; 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 of the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, 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 device provided by the embodiment of the disclosure, when the execution of the target rendering subtask in the target queue is finished, whether to continue to execute the first processing task of the target queue can be determined, and further, if it is determined to continue to execute the first processing task of the target queue, the rendering subtask of the next order of the target rendering subtask can be obtained from the target queue, and the obtained rendering subtask can be 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 various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of one embodiment of a document rendering method according to the present disclosure;
FIG. 2 is a schematic diagram of one application scenario of a document rendering method according to the present disclosure;
FIG. 3 is a flow diagram of yet another embodiment of a document rendering method according to the present disclosure;
FIG. 4 is a schematic block diagram of one embodiment of a document rendering apparatus according to the present disclosure;
FIG. 5 is an exemplary system architecture to which the 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 are shown in the 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 rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the 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. Moreover, 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 "include" and variations thereof as used herein are 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". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to FIG. 1, a flow diagram 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 subtask in the target queue is finished, determining whether to continue executing the first processing task of the target queue.
In the present embodiment, an electronic device that executes a document rendering method may execute a target rendering subtask in a target queue.
The above-described target queue may be established in the following manner. Firstly, the rendering tasks of the to-be-displayed document in the portable document format can be divided to obtain a plurality of rendering subtasks. The resulting plurality of rendering subtasks may then be used as queue elements to establish a target queue. It should be noted that the target queue may be pre-established by the electronic device executing the document rendering method, or may be pre-established by a server in communication connection with the electronic device executing 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 subtask may correspond to a rendering task of a plurality of pages in the document to be displayed, that is, the rendering subtask may be a task of rendering the plurality of pages in the document to be displayed. At this time, by executing a certain rendering subtask, rendering of multiple pages in the document to be displayed can be realized. Optionally, the rendering sub-task may correspond to a task of rendering a single page in the document to be displayed, that is, the rendering sub-task may be a task of rendering a single page in the document to be displayed. At this time, by executing a certain rendering subtask, the rendering of a single page in the document to be displayed can be realized.
The target rendering subtask may be a pre-specified rendering subtask in the target queue, or may be any rendering subtask in the target queue.
It is appreciated that by executing the target rendering subtask, the electronic device executing the document rendering method may complete rendering of the page indicated by the target rendering subtask.
In the present embodiment, when the execution of the target rendering subtask 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 rendering subtasks in the target queue.
In some application scenarios, if there are rendering subtasks that have not been executed in the target queue, when the execution of the target rendering subtasks is finished, the electronic device that executes the document rendering method may determine to continue to execute the first processing task of the target queue. If there is no unexecuted rendering subtask in the target queue, when the execution of the target rendering subtask is finished, the electronic device executing the document rendering method may determine to terminate the execution of the first processing task of the target queue.
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 the end of executing the target rendering subtask, or may determine whether to continue to execute the first processing task of the target queue during the execution of the target rendering subtask.
Step 102, in response to determining to continue executing the first processing task to the target queue, obtaining a rendering subtask of a next level of the target rendering subtask from the target queue, and executing the obtained rendering subtask.
In this embodiment, in response to determining to continue to execute the first processing task to the target queue, the electronic device executing the document rendering method may acquire a rendering subtask of a next order of the target rendering subtask from the target queue and execute the acquired rendering subtask.
In practice, the rendering subtasks in the target queue may be arranged according to the indicated page's rank in the document to be displayed. For example, page A has a rank of 2 in the document to be displayed, and then the rendering subtask for page A has a rank of 2 in the target queue.
It should be appreciated that by executing the rendering subtask of the next order, the electronic device executing the document rendering method may complete the rendering of the page indicated by the rendering subtask of the next order.
Referring to fig. 2, an application scenario of a document rendering method according to an embodiment of the present disclosure is shown. As shown in fig. 2, when executing the target rendering subtask 2021 in the target queue 202 ends, the terminal device 201 may determine whether there is an unexecuted rendering subtask in the target queue 202. If there are rendering subtasks in the target queue 202 that have not been executed, the terminal device 201 may determine to continue executing the first processing task for the target queue 202. Further, the terminal device 201 may acquire the rendering subtask 2022 of the next order of the target rendering subtask 2021 from the target queue 202, and execute the rendering subtask 2022.
In this embodiment, when the execution of the target rendering subtasks in the target queue is finished, it may be determined whether to continue to execute the first processing task of the target queue, and on the premise that it is determined that the execution of the first processing task of the target queue is continued, a rendering subtask of a next level of the target rendering subtask is selected from the target queue, and the obtained rendering subtask is executed, thereby improving the rendering flexibility of the document to be displayed. 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 and rendering the document to be displayed.
Continuing to refer to FIG. 3, a flow diagram 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, when the execution of the target rendering subtask in the execution target queue is finished, determining whether a second processing task exists.
In the present embodiment, when the execution of the target rendering subtask in the target queue ends, the electronic device executing the document rendering method may determine whether the second processing task exists.
The second processing task may be a task for processing an operation performed by the user. Thus, by executing the second processing task, processing of the operation performed by the user can be realized.
The first processing task of the target queue is a target priority. The priority of the second processing task is higher 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 exists, determining to suspend execution of the first processing task to the target queue and executing the second processing task, step 302.
In the present 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 is understood that after the execution of the target rendering subtask is finished, if there is a task for processing an operation executed by a user, the electronic device executing the document rendering method may stop executing the rendering subtask in the target queue, and may process the operation executed by the user instead.
Step 303, in response to determining to continue executing the first processing task to the target queue, obtaining a rendering subtask of a next level of the target rendering subtask from the target queue, and executing the obtained rendering subtask.
The above step 303 may be performed in a manner similar to that of the step 102 in the embodiment shown in fig. 1, and the above description for the step 102 also applies to the step 303, which is not described herein again.
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 optional implementations, the predefined operation may include at least one of: a copy operation, a page zoom operation, and a page flip operation.
The copy operation may be an operation in which the user copies content from the document to be displayed.
The page zoom operation described above may be an operation in which the user enlarges or reduces the page size of the document to be displayed.
The page to be stopped in the page turning operation may be a page to be finally stopped when the user turns 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 optional implementations, the electronic device executing the document rendering method may update the content of the rendering subtasks in the target queue according to a scaling factor of the page scaling operation.
In practice, the rendered size of the indicated page may be included in the render subtask. Here, the rendering size may be a size at which the page is rendered.
Specifically, the electronic device executing the document rendering method may determine the rendering size of the document to be displayed after zooming according to the zooming coefficient of the zooming 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 executing 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 optional implementation manners, after the content of the rendering subtask in the target queue is updated, the page 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 optional implementations, the electronic device executing the document rendering method may adjust an order of the rendering subtasks in the target queue according to a stop page of the page turning operation.
Specifically, after determining the stop page of the page turning operation, the electronic device executing the document rendering method may adjust the rendering subtasks of the stop page to the order of priority execution in the target queue.
In practice, after the user performs the page turning operation, the electronic device executing the document rendering method may determine to terminate the first processing task of the target queue, and further adjust the order of the rendering subtasks in the target queue.
In these optional implementation manners, after the rendering subtasks of the stop pages are adjusted to the order of preferential execution, the rendering subtasks of the stop pages can be preferentially executed, and then the preferential rendering of the stop pages is realized.
In this embodiment, the priority of the second processing task is higher than the priority of the first processing task. On a precondition that the second processing task is determined to exist, execution of the first processing task to the target queue is suspended, and the second processing task is executed instead. That is, when there is a task of processing an operation performed by the user, rendering of the document to be displayed may be suspended, and the operation performed by the user may be preferentially processed. On one hand, compared with the method that the operation executed by the user is processed after the rendering of the document to be displayed is completed, the time for responding to the operation executed by the user can be shortened. On the other hand, compared with the method that the operation executed by the user is processed while the document to be displayed is rendered, the jam caused by excessive tasks being processed at the same time can be avoided.
With further reference to fig. 4, as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of a document rendering apparatus, which corresponds to the embodiment of the method 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 determination unit 401 and an execution unit 402. Wherein the determining unit 401 may be configured to: when the execution of the target rendering subtasks in the target queue ends, it is determined whether to continue executing the first processing task to the target queue. The target queue is built up by: the method comprises the steps of dividing rendering tasks of a to-be-displayed document in a portable document format to obtain a plurality of rendering subtasks, and establishing a target queue by taking the rendering subtasks as queue elements. The execution unit 402 may be to: in response to determining to continue executing the first processing task to the target queue, a rendering subtask of a next order of the target rendering subtask is obtained from the target queue, and the obtained rendering subtask is executed.
In this embodiment, the specific processing of the determining unit 401 and the executing unit 402 of the document rendering apparatus and the technical effects thereof can refer to the related descriptions of step 101 and step 102 in the corresponding embodiment of fig. 1, which are not repeated herein.
In some alternative implementations, the first processing task of the queue is a target priority. The determining unit 401 may be further configured to: determining whether a second processing task exists, wherein the second processing task has a priority higher than the target priority; in response to determining that the second processing task exists, 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 optional implementations, the predefined operation includes at least one of: a copy operation, a page zoom operation, and a page flip operation.
In some optional 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 subtask in the target queue according to the scaling coefficient of the page scaling operation.
In some optional 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 the rendering subtasks in the target queue according to the stop 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 to 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. Network 503 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 501, 502 may interact with a server 504 via a network 503 to receive or send messages or the like. The terminal devices 501 and 502 may have various client applications installed thereon, such as a web browser application and a document display application. The client applications in the terminal devices 501 and 5023 may obtain the target queue from the server 504, and then perform processing on the rendering subtasks in the target queue to render the document to be displayed.
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 smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal devices 501 and 502 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 504 may be a server that provides 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 locally. At this point, the server 504 may not be present in the system architecture shown in fig. 5.
The server 504 may be hardware or software. When the server 504 is hardware, it can be implemented as a distributed server cluster composed of a plurality of servers, or as a single server. When the server 504 is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the document rendering method provided by the embodiment of the present disclosure may be executed by the terminal devices 501 and 502, and accordingly, the document rendering apparatus may be disposed in the terminal devices 501 and 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, shown is a schematic diagram of an electronic device (e.g., the terminal device of fig. 5) suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
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 necessary 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 via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, 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 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, 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 communications 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 network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled 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 executing the first processing task of the target queue; in response to determining to continue executing the first processing task to the target queue, a rendering subtask of a next order of the target rendering subtask is obtained from the target queue, and the obtained rendering subtask is executed.
Computer program code for carrying out operations for the present disclosure may be written in any combination of 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation on the unit itself, for example, the determination unit may also be described as a unit that determines whether to continue executing the first processing task of the target queue when executing the target rendering subtask in the target queue ends.
The functions described herein above 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: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), 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. A 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 exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while 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. Under 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 limitations on the scope of the 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 disclosed as example forms of implementing the claims.

Claims (10)

1. A method of document rendering, comprising:
when the execution of a target rendering subtask in a target queue is finished, determining whether to continue executing a first processing task of the target queue, wherein the target queue is established by: dividing rendering tasks of a to-be-displayed document in a portable document format to obtain a plurality of rendering subtasks, and establishing the target queue by taking the rendering subtasks as queue elements;
in response to determining to continue executing the first processing task to the target queue, obtaining, from the target queue, a rendering subtask of a next order of the target rendering subtask, and executing the obtained rendering subtask.
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 comprises:
determining whether a second processing task exists, wherein the second processing task has a priority higher than the target priority;
in response to determining that the second processing task exists, determining to suspend execution of the first processing task to the target queue and executing the second processing task.
3. The method according to claim 2, characterized in that the second processing task is established in response to detecting a predefined operation.
4. The method of claim 3, wherein the predefined operation comprises at least one of: a copy operation, a page zoom operation, and a page flip operation.
5. The method according to any one of claims 1-4, further comprising:
and updating the content of the rendering subtask 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 the rendering subtasks in the target queue according to the stop page of the page turning operation.
7. The method of any of claims 1-4, wherein a render subtask corresponds to a task that renders a single page.
8. A document rendering apparatus, comprising:
the device comprises a determining unit and a processing unit, wherein the determining unit is used for determining whether to continue to execute a first processing task of a target queue when a target rendering subtask in the target queue is executed, and the target queue is established by the following steps: dividing rendering tasks of a to-be-displayed document in a portable document format to obtain a plurality of rendering subtasks, and establishing the target queue by taking the rendering subtasks as queue elements;
and the execution unit is used for responding to the determination of continuing to execute the first processing task of the target queue, acquiring a rendering subtask of the next level of the target rendering subtask from the target queue, and executing the acquired rendering subtask.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
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 true CN111259636A (en) 2020-06-09
CN111259636B 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)

Cited By (3)

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

Citations (10)

* 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
US20160148082A1 (en) * 2014-11-24 2016-05-26 Canon Kabushiki Kaisha Method, system and apparatus for rendering a document
CN105959238A (en) * 2016-06-28 2016-09-21 深圳市彬讯科技有限公司 Dispatching method and system for multi-priority rendering resources based on message queues
US20170039169A1 (en) * 2015-08-04 2017-02-09 Google Inc. Systems and methods for interactively presenting a visible portion of a rendering surface on a user device
US20170039170A1 (en) * 2015-08-04 2017-02-09 Google Inc. Systems and methods for interactively presenting a visible portion of a rendering surface on a user device
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
US20190303500A1 (en) * 2018-03-27 2019-10-03 Capital One Services, Llc Systems and methods for single page application server side renderer
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

Patent Citations (10)

* 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
US20160148082A1 (en) * 2014-11-24 2016-05-26 Canon Kabushiki Kaisha Method, system and apparatus for rendering a document
US20170039169A1 (en) * 2015-08-04 2017-02-09 Google Inc. Systems and methods for interactively presenting a visible portion of a rendering surface on a user device
US20170039170A1 (en) * 2015-08-04 2017-02-09 Google Inc. Systems and methods for interactively presenting a visible portion of a rendering surface on a user device
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
US20190303500A1 (en) * 2018-03-27 2019-10-03 Capital One Services, Llc Systems and methods for single page application server side renderer
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

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506581A (en) * 2020-12-17 2021-03-16 北京百度网讯科技有限公司 Method and device for rendering small program, electronic equipment and readable storage medium
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
CN116594718A (en) * 2023-07-18 2023-08-15 禾多科技(北京)有限公司 Element rendering method, device, equipment and readable medium for simulation test
CN116594718B (en) * 2023-07-18 2023-09-19 禾多科技(北京)有限公司 Element rendering method, device, equipment and readable medium for simulation test

Also Published As

Publication number Publication date
CN111259636B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN112256223B (en) Method and device for adjusting display fluency and electronic equipment
CN111399956A (en) Content display method and device applied to display equipment and electronic equipment
CN111259636B (en) Document rendering method and device and electronic equipment
CN111459364B (en) Icon updating method and device and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN112256231B (en) Volume control method, device, terminal and storage medium
CN110633126B (en) Information display method and device and electronic equipment
CN111754600B (en) Poster image generation method and device and electronic equipment
CN111259291B (en) View display method and device and electronic equipment
CN111338827B (en) Method and device for pasting form data and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111273884A (en) Image display method and device and electronic equipment
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN111324405A (en) Character display method and device and electronic equipment
CN111596823A (en) Page display method and device and electronic equipment
CN111290692B (en) Picture display method and device, electronic equipment and computer readable medium
CN116266206A (en) Page display method and device and electronic equipment
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN111399730A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN110865810A (en) Resource multiplexing method and device, electronic equipment and computer readable storage medium
CN112148417A (en) Page adjusting method and device, electronic equipment and computer readable medium
CN111459893B (en) File processing method and device and electronic equipment
CN112215774B (en) Model training and image defogging methods, apparatus, devices and computer readable media
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN111489286B (en) Picture processing method, device, equipment and medium

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