CN116126435A - Page typesetting method and device, storage medium and client device - Google Patents

Page typesetting method and device, storage medium and client device Download PDF

Info

Publication number
CN116126435A
CN116126435A CN202211555961.XA CN202211555961A CN116126435A CN 116126435 A CN116126435 A CN 116126435A CN 202211555961 A CN202211555961 A CN 202211555961A CN 116126435 A CN116126435 A CN 116126435A
Authority
CN
China
Prior art keywords
page
queue
typesetting
target
target page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211555961.XA
Other languages
Chinese (zh)
Inventor
张冉
梁乃臣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Yueyou Technology Co ltd
Original Assignee
Beijing Yueyou 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 Yueyou Technology Co ltd filed Critical Beijing Yueyou Technology Co ltd
Priority to CN202211555961.XA priority Critical patent/CN116126435A/en
Publication of CN116126435A publication Critical patent/CN116126435A/en
Pending legal-status Critical Current

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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a page typesetting method and device, a storage medium and client equipment, wherein the method repeatedly executes the following processes: acquiring a page identifier of at least one target page, and determining a queue element corresponding to the target page according to the page identifier and the number of the queue elements in a preset annular queue; performing page typesetting on the target page by utilizing a data processing thread corresponding to the queue element, and caching the obtained page typesetting picture to the queue element; responding to a user instruction to display page typesetting pictures of the target page; and updating the target page in response to the user instruction. By the method and the device, the corresponding pages of the page turning operation performed by the user during reading are in the state of being drawn in advance, the user does not need to wait for page loading, waiting time of the user is reduced, reading is smoother, and user experience is greatly improved.

Description

Page typesetting method and device, storage medium and client device
Technical Field
The invention relates to the technical field of computers, in particular to a page typesetting method and device, a storage medium and client equipment.
Background
Electronic books are publications that digitize information content such as text, pictures, sounds, images, etc., using computer technology. With the increasing use of internet technology, traditional paper reading modes have been gradually replaced by electronic books, and people tend to download electronic books for reading through a reading application for reading electronic books by using internet and computer technologies.
In the process of reading an electronic book, the most frequent operation performed by a user is an electronic book page turning operation. In the page turning operation process, the electronic book pages display corresponding page typesetting contents along with the sliding operation of the user, and because parameters such as the screen size, page color, font type, character spacing, font size and the like of the reading equipment used by the user are different, the reading equipment is often required to acquire the reading contents first, and then typesetting and drawing are carried out on the pages according to the reading contents and the parameters. If all pages are drawn and cached before the user starts to read, the processing performance is required to be high, the task processing amount and processing time are greatly increased, and the user can feel obvious delay in reading.
Disclosure of Invention
In view of the above problems, the invention provides a page typesetting method and device, a storage medium and a client device, which realize the typesetting and drawing in advance at a client in a ring queue mode, reduce the waiting time of a user during reading and improve the experience of the user.
According to a first aspect of the present invention, there is provided a page typesetting method, applied to a client, the method comprising repeatedly performing the following processing, the processing comprising:
acquiring a page identifier of at least one target page, and determining a queue element corresponding to the target page according to the page identifier and the number of the queue elements in a preset annular queue;
performing page typesetting on the target page by utilizing a data processing thread corresponding to the queue element, and caching the obtained page typesetting picture to the queue element;
responding to a user instruction to display the page typesetting picture of the target page; and updating the target page in response to the user instruction.
Optionally, the acquiring the page identifier of the at least one target page includes:
and taking the current page as the center, and acquiring page identifications of target pages with the number of queue elements.
Optionally, the determining the queue element corresponding to the target page according to the page identifier and the number of queue elements in the preset ring queue includes:
performing modulo on the number of the queue elements according to the page identification to obtain a modulo value corresponding to each target page, and determining the queue elements corresponding to each target page according to the modulo value;
wherein, each queue element in the preset annular queue is mapped with a corresponding modulo value.
Optionally, before the page typesetting is performed on the target page by using the data processing thread corresponding to the queue element, the method further includes: and determining that typesetting marks do not exist in the queue elements.
Optionally, after the page typesetting picture is cached to the queue element, the method further includes: and adding typesetting marks to the queue elements.
Optionally, the displaying the page typesetting picture of the target page in response to the user instruction includes:
responding to a page sliding instruction of a user to update a current page, reading a queue element corresponding to a target page serving as the current page, and judging whether typesetting marks exist in the queue element;
and if the queue element has the typesetting mark, calling the page typesetting picture corresponding to the target page from the queue element and displaying the page typesetting picture.
Optionally, the updating the target page in response to a user instruction includes:
responding to a page sliding instruction of a user to update a current page;
acquiring new target pages with the number of queue elements by taking the updated current page as a center;
and determining a front target page based on the target page and the new target page, and removing the page typesetting picture and the typesetting mark cached in the queue element corresponding to the front target page.
According to a second aspect of the present invention, there is provided a page typesetting apparatus for implementing the page typesetting method of any one of the first aspects of the present invention.
According to a third aspect of the present invention there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the page layout method according to any of the first aspects of the present invention.
According to a fourth aspect of the present invention there is provided a client device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the page layout method according to any of the first aspects of the present invention when the computer program is executed.
According to the page typesetting method and device, the storage medium and the client device, the page identification of at least one target page is obtained, and the queue element corresponding to the target page is determined according to the page identification and the number of the queue elements in the preset annular queue; performing page typesetting on the target page by utilizing a data processing thread corresponding to the queue element, and caching the obtained page typesetting picture to the queue element; responding to a user instruction to display the page typesetting picture of the target page; and responding to the user instruction to update the target page, and repeating the steps, so that the page typesetting is drawn in advance based on the annular queue, the user does not need to wait for page loading, the reading is smoother, and the reading experience of the user is greatly improved.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
The above, as well as additional objectives, advantages, and features of the present invention will become apparent to those skilled in the art from the following detailed description of a specific embodiment of the present invention when read in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 shows a flow chart of a page typesetting method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an application scenario for page drawing based on a ring queue according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a page typesetting device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a page typesetting device according to another embodiment of the present invention;
fig. 5 shows a schematic physical structure of a client device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The following is a description of some of the terms in this application to facilitate understanding by those skilled in the art:
1) The annular queue is a data structure of FIFO connected end to end, is realized by adopting the linear space of an array, and can quickly judge whether the state of the queue is full or empty, thereby realizing quick access of data. Annular queue principle: when the data arrives at the end of the queue, it will go back to the 0 position for processing. This switch back is performed by a modulo operation. Thus, the ring queue logically connects array element q [0] with q [ MAXN-1] to form a ring space for the store queue. For convenience of reading and writing, an array subscript is also used for indicating the reading and writing position of the queue. Such as a head/tail, where the head points to a readable location and the tail points to a writable location.
2) The queue element refers to an array element for each data access contained in the annular queue, and the size of the array element is customizable, so that in order to adapt to an electronic reading scene, the size of the queue element can be set to be an odd value, for example, 3, 5, 7, etc.
3) Modulo operation refers to calculating the remainder of dividing the two numbers. Because of the huge number of pages and the limited number of queue elements, the queue elements for page drawing processing and data access of each page need to be determined, so that the ordered processing of data is realized.
As before, in the prior art, all pages are drawn and cached before a user starts to read, so that higher requirements on processing performance are provided, task processing capacity and processing time are greatly increased, and a user can feel obvious delay in reading.
In view of this, the present application provides a page typesetting method, by which multiple target pages near a current page read by a user can be selected, and the multiple target pages are typeset and drawn in advance based on a ring queue mode, so that the user does not feel delay in page display when turning pages, and according to the page turning actions of the user, the target pages are updated at any time, and the ring queue performs an update processing task at any time along with the update of the target pages, so that the corresponding pages of the page turning operations performed by the user are in a state of being drawn in advance when reading, thereby reducing the waiting time of the user and greatly improving the reading experience of the user.
After describing the design concept of the embodiment of the present application, the following describes a page typesetting method provided in the embodiment of the present invention, where the method is applied to a client, and as shown in fig. 1, a flowchart of the page typesetting method of an embodiment is shown, and as can be seen from fig. 1, the present application includes repeatedly executing a plurality of processes, where the processes include the following steps S101 to S103:
step S101, obtaining page identification of at least one target page, and determining queue elements corresponding to the target page according to the page identification and the number of the queue elements in a preset annular queue.
The target page refers to a page to be processed, which needs to be drawn, and in the embodiment of the invention, based on the selection of the target page, the target page can be obtained by taking the current page read by a user as the center, and the number of the pages is the number of queue elements. That is, if the current page is the 100 th page and the number of queue elements is 3, taking the current page as the center, and taking the 99 th page, the 100 th page and the 101 th page as target pages respectively; if the current page is 100 th page and the number of queue elements is 5, taking the current page as the center, and taking two pages back and forth respectively, namely taking 98, 99, 100, 101 and 102 pages as target pages.
In order to facilitate the mode-taking operation, the page identifiers of the multiple pages in the embodiment of the invention may be digital identifiers with a sequential relationship, for example, the page identifier of a certain page is N, the page identifier of the previous page of the page is N-1, the page identifier of the next page of the page is n+1, it should be noted that the page identifier is not necessarily the page number, the page identifier configuration may be performed according to the actual situation, and the mode-taking operation is convenient, which is not limited by the invention.
Further, determining queue elements corresponding to the target pages according to the page identifications and the number of the queue elements in the preset annular queue, specifically, performing modulo on the number of the queue elements according to the page identifications to obtain modulo values corresponding to the target pages, and determining the queue elements corresponding to the target pages according to the modulo values.
Fig. 2 shows a schematic diagram of an application scenario for page drawing based on a ring queue, and as can be seen from the figure, the number of queue elements of the ring queue is 3, and the first queue element, the second queue element and the third queue element respectively correspond to modulo values of 0, 1 and 2. If the page identifier of the target page is n=100, determining a queue element corresponding to the target page by using the page identifier and the number of the queue elements, namely calculating the remainder of the page identifier after dividing the number of the queue elements, and obtaining a modulus value of 1, wherein the queue element corresponding to the target page is a second queue element; if the page identifier of the target page is n+1=101, calculating the remainder after the number of queue elements is divided by the page identifier, and obtaining a modulo value of 2, wherein the queue element corresponding to the target page is a third queue element; if the page identifier of the target page is N-1=99, calculating the remainder after dividing the number of queue elements by the page identifier, and obtaining a modulus value of 0, wherein the queue element corresponding to the target page is the first queue element.
Step S102, page typesetting is carried out on the target page by utilizing the data processing thread corresponding to the queue element, and the obtained page typesetting picture is cached to the queue element.
It should be noted that, the queue elements in the ring queue may perform access operation on the data, involving page typesetting processing, and may set corresponding data processing threads for each queue element according to actual requirements, and cache page typesetting pictures obtained by page typesetting according to the data processing threads into the corresponding queue elements. The embodiment of the invention relates to a specific mode of how a data processing thread performs page typesetting based on parameters such as the screen size, page color, character color, font type, character spacing, font size and the like of equipment, and the specific mode can be set according to actual conditions without limitation to comparison.
Before page typesetting is performed on a target page by using a data processing thread of a queue element corresponding to the target page, it is also required to determine that no typesetting mark exists in the queue element. After caching the page typesetting pictures to the queue elements, typesetting marks can be added to the queue elements.
After each time the queue element performs page typesetting on the target page based on the data processing thread, caching the obtained page drawing picture to the queue element, and adding typesetting marks to the queue element so as to determine that the queue element contains the processed page typesetting picture when the queue element is read.
Because the ring queue is an array structure for repeatedly performing data access, the queue elements in the ring queue need to be reused, and in order to ensure the drawing accuracy of the target page, whether the queue elements are in a vacant state or not, namely whether the cache data processed by the last data are deleted or not needs to be determined before the queue elements perform data access. Specifically, before the data processing thread of the queue element performs page typesetting on the target page, it may be determined that no typesetting mark exists in the queue element, that is, the queue element is in a vacant state, and then subsequent operations are executed.
Step S103, displaying page typesetting pictures of the target pages in response to the user instruction; and updating the target page in response to the user instruction.
Specifically, the page typesetting picture of the target page is displayed in response to a user instruction, the current page can be updated in response to a page sliding instruction of the user, a queue element corresponding to the target page serving as the current page is read, and whether typesetting marks exist in the queue element is judged; and if the queue element has the typesetting mark, calling the page typesetting picture corresponding to the target page from the queue element and displaying the page typesetting picture.
After the page typesetting drawing for the target pages is completed, page typesetting pictures of a plurality of target pages are cached in the queue elements. For example, the current page is N pages, and the target page includes N-1 pages, N pages, and N+1 pages. When a user performs page turning operation, for example, the user turns pages backwards, at the moment, the client receives a page sliding instruction from the user for turning pages backwards, the current page is updated to be an n+1 page, and at the moment, page typesetting pictures can be directly called from queue elements corresponding to the n+1 page for display; for another example, the user turns the page forward, at this time, the client receives a page sliding instruction from the user to turn the page forward, the current page is updated to be the N-1 page, and at this time, the page typesetting picture can be directly called from the queue element corresponding to the N-1 page to be displayed.
Meanwhile, the target page is updated in response to the user instruction, which specifically comprises the following steps: responding to a page sliding instruction of a user to update a current page; acquiring new target pages with the number of queue elements by taking the updated current page as a center; and determining a front target page based on the target page and the new target page, and removing page typesetting pictures and typesetting marks cached in queue elements corresponding to the front target page.
In response to a page sliding instruction from a user, the current page is updated, and because the target page is defined based on the current page, the target page is updated in real time along with the update of the current page. The same as the determination method in step S101, the updated current page is still centered, and the new target pages with the number of queue elements are obtained. Taking fig. 2 as an example, the number of queue elements is 3, if the user turns pages backwards, the current page is updated to be n+1 pages, and the updated target page is N pages, n+1 pages and n+2 pages. At this time, the first queue element occupied by the original old target page N-1 needs to reject the original cache data, including the page typesetting picture and typesetting mark of the old target page N-1, so as to obtain a vacant first queue element, the modulo value of the new target page n+2 is opposite to the first queue element, and the vacant first queue element continues to perform data access operation on the target page n+2. For another example, if the user turns forward and the current page is updated to be N-1 pages, the updated target page is N-2 pages, N-1 pages and N pages. At this time, the original buffer data needs to be removed from the third queue element occupied by the n+1 page, including the page typesetting picture and typesetting mark of the n+1 page, so as to obtain a vacant third queue element, and the modulus value of the newly added target page N-2 page is opposite to the third queue element, and the vacant third queue element continues to perform data access operation on the target page N-2 page.
It should be noted that, in the embodiment of the present invention, the "removing the original cached data" is performed by transforming the typesetting mark into the readable blank mark of the annular queue, and the invalidation of the original cached data, that is, the original page typesetting picture in the queue element is cached in the queue element, but the content thereof is invalidated, and only the new page typesetting picture needs to be covered in the following steps. Similarly, typesetting marks are added to the queue elements, and are essentially non-vacancy marks which can be read by transforming typesetting marks into annular queues. Judging whether the typesetting mark exists in the queue element or not, wherein the judgment is that whether the queue element has a blank mark or not is basically carried out, if the queue element has the blank mark, the typesetting mark is considered to be absent in the queue element; and if the non-vacancy mark exists in the queue element, considering that the typesetting mark exists in the queue element. Thereby facilitating orderly data processing by the ring queue.
It can be understood that, therefore, regardless of how the user turns pages forward or backward, the client updates the target page in real time, and matches the corresponding queue element to perform data processing on the target page, that is, continuously updates the target page in response to the page sliding instruction from the user, and repeatedly executes steps S101 to S103, thereby implementing the loop processing for page drawing based on the ring queue.
According to the page typesetting method provided by the invention, the page identification of at least one target page is obtained, and the queue element corresponding to the target page is determined according to the page identification and the number of the queue elements in the preset annular queue; performing page typesetting on the target page by utilizing a data processing thread corresponding to the queue element, and caching the obtained page typesetting picture to the queue element; responding to a user instruction to display page typesetting pictures of the target page; and updating the target page in response to the user instruction, and repeating the steps. According to the method, a plurality of target pages near the current page read by the user can be selected, and the target pages are typeset and drawn in advance based on a ring-shaped queue mode, so that the user does not feel delay in page display when turning the page, the target pages are updated at any time according to the page turning action of the user, the ring-shaped queue updates processing tasks at any time along with the updating of the target pages, the corresponding pages of the page turning operation when the user reads are in a state of being drawn in advance, the user does not need to wait for page loading, the waiting time of the user is reduced, the reading is smoother, and the user experience is greatly improved.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a page typesetting device, as shown in fig. 3, where the device is configured to repeatedly execute a plurality of processes in the foregoing page typesetting method, and the page typesetting device may include: a queue element determination module 310, a typesetting picture caching module 320, a typesetting picture display module 330 and a target page updating module 340.
The queue element determining module 310 may be configured to obtain a page identifier of at least one target page, and determine a queue element corresponding to the target page according to the page identifier and the number of queue elements in a preset ring queue;
the typesetting picture caching module 320 is configured to perform page typesetting on the target page by using a data processing thread corresponding to the queue element, and cache the obtained page typesetting picture to the queue element;
the typesetting picture display module 330 is used for displaying the page typesetting picture of the target page in response to the user instruction;
the target page updating module 340 is configured to update the target page in response to a user instruction.
Optionally, the embodiment of the present invention further provides another page typesetting device, as shown in fig. 4, where the page typesetting device further includes: a layout mark confirmation module 350 and a layout mark addition module 360.
The typesetting mark confirmation module 350 may be configured to determine that no typesetting mark exists in the queue element before performing page typesetting on the target page by using the data processing thread corresponding to the queue element.
The typesetting mark adding module 360 may be configured to add typesetting marks to the queue elements after buffering the page typeset pictures to the queue elements.
Optionally, the queue element determining module 310 may be further configured to obtain, centering on the current page, page identifiers of target pages with the number of queue elements.
Optionally, the queue element determining module 310 may be further configured to modulo the number of queue elements according to the page identifier to obtain a modulo value corresponding to each target page, and determine the queue element corresponding to each target page according to the modulo value; wherein, each queue element in the preset annular queue is mapped with a corresponding modulo value.
Optionally, the typesetting picture display module 330 may be further configured to update the current page in response to a page sliding instruction of the user, read a queue element corresponding to a target page serving as the current page, and determine whether a typesetting mark exists in the queue element; and if the queue element has the typesetting mark, calling the page typesetting picture corresponding to the target page from the queue element and displaying the page typesetting picture.
Optionally, the typesetting picture display module 340 may be further configured to update the current page in response to a page sliding instruction of the user; acquiring new target pages with the number of queue elements by taking the updated current page as a center; and determining a front target page based on the target page and the new target page, and removing page typesetting pictures and typesetting marks cached in queue elements corresponding to the front target page.
It should be noted that, other corresponding descriptions of each functional module related to the page typesetting device provided by the embodiment of the present invention may refer to corresponding descriptions of the method shown in fig. 1, and are not repeated herein.
Based on the above method as shown in fig. 1, correspondingly, the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program implements the steps of the page typesetting method according to any one of the above embodiments when executed by a processor.
Based on the embodiment of the method shown in fig. 1 and the apparatus shown in fig. 4, the embodiment of the invention further provides a physical structure diagram of a client device, and as shown in fig. 5, the client device may include a communication bus, a processor, a memory, a communication interface, and may also include an input/output interface and a display device, where each functional unit may complete communication with each other through the bus. The memory stores a computer program and a processor for executing the program stored in the memory to perform the steps of the page layout method described in the above embodiment.
It will be clear to those skilled in the art that the specific working processes of the above-described systems, devices, modules and units may refer to the corresponding processes in the foregoing method embodiments, and for brevity, the description is omitted here.
In addition, each functional unit in the embodiments of the present invention may be physically independent, two or more functional units may be integrated together, or all functional units may be integrated in one processing unit. The integrated functional units may be implemented in hardware or in software or firmware.
Those of ordinary skill in the art will appreciate that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or in whole or in part in the form of a software product stored in a storage medium, comprising instructions for causing a computing device (e.g., a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, etc.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a personal computer, a server, or a computing device such as a network device) associated with program instructions, where the program instructions may be stored on a computer-readable storage medium, and where the program instructions, when executed by a processor of the computing device, perform all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all technical features thereof can be replaced by others within the spirit and principle of the present invention; such modifications and substitutions do not depart from the scope of the invention.

Claims (10)

1. A method of typesetting a page, characterized in that it is applied to a client, said method comprising repeatedly performing the following processes, said processes comprising:
acquiring a page identifier of at least one target page, and determining a queue element corresponding to the target page according to the page identifier and the number of the queue elements in a preset annular queue;
performing page typesetting on the target page by utilizing a data processing thread corresponding to the queue element, and caching the obtained page typesetting picture to the queue element;
responding to a user instruction to display the page typesetting picture of the target page; and updating the target page in response to the user instruction.
2. The method of claim 1, wherein the obtaining the page identification of the at least one target page comprises:
and taking the current page as the center, and acquiring page identifications of target pages with the number of queue elements.
3. The method of claim 1, wherein the determining the queue element corresponding to the target page according to the page identifier and the number of queue elements in the preset ring queue includes:
performing modulo on the number of the queue elements according to the page identification to obtain a modulo value corresponding to each target page, and determining the queue elements corresponding to each target page according to the modulo value;
wherein, each queue element in the preset annular queue is mapped with a corresponding modulo value.
4. The method according to claim 1, wherein before the page typesetting is performed on the target page by using the data processing thread corresponding to the queue element, the method further comprises: and determining that typesetting marks do not exist in the queue elements.
5. The method of claim 1, wherein after caching the page layout picture to the queue element, the method further comprises: and adding typesetting marks to the queue elements.
6. The method of claim 1, wherein displaying the page layout picture of the target page in response to a user instruction comprises:
responding to a page sliding instruction of a user to update a current page, reading a queue element corresponding to a target page serving as the current page, and judging whether typesetting marks exist in the queue element;
and if the queue element has the typesetting mark, calling the page typesetting picture corresponding to the target page from the queue element and displaying the page typesetting picture.
7. The method of claim 4 or 5, wherein the updating the target page in response to a user instruction comprises:
responding to a page sliding instruction of a user to update a current page;
acquiring new target pages with the number of queue elements by taking the updated current page as a center;
and determining a front target page based on the target page and the new target page, and removing the page typesetting picture and the typesetting mark cached in the queue element corresponding to the front target page.
8. A page typesetting apparatus, characterized in that the apparatus is adapted to implement the page typesetting method of any one of claims 1 to 7.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the page layout method according to any one of claims 1 to 7.
10. A client device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the page composition method of any one of claims 1 to 7 when the computer program is executed.
CN202211555961.XA 2022-12-06 2022-12-06 Page typesetting method and device, storage medium and client device Pending CN116126435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211555961.XA CN116126435A (en) 2022-12-06 2022-12-06 Page typesetting method and device, storage medium and client device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211555961.XA CN116126435A (en) 2022-12-06 2022-12-06 Page typesetting method and device, storage medium and client device

Publications (1)

Publication Number Publication Date
CN116126435A true CN116126435A (en) 2023-05-16

Family

ID=86298261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211555961.XA Pending CN116126435A (en) 2022-12-06 2022-12-06 Page typesetting method and device, storage medium and client device

Country Status (1)

Country Link
CN (1) CN116126435A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118153693A (en) * 2024-05-11 2024-06-07 四川蜀天信息技术有限公司 Method, device and computing equipment for improving large language model reasoning concurrency

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118153693A (en) * 2024-05-11 2024-06-07 四川蜀天信息技术有限公司 Method, device and computing equipment for improving large language model reasoning concurrency

Similar Documents

Publication Publication Date Title
CN108153505B (en) Display methods, electronic equipment and the computer storage medium of handwriting input content
US8549435B1 (en) Displaying thumbnails for one or more files to be imported
CN110705503B (en) Method and device for generating directory structured information
EP2515222A1 (en) Display control apparatus, method for controlling display, and program therefore
CN116126435A (en) Page typesetting method and device, storage medium and client device
CN113703951B (en) Method and device for processing DMA (direct memory Access) and computer readable storage medium
CN111813747A (en) File batch renaming method, electronic equipment and computer readable storage medium
JP2007188440A (en) Method and device for generating database and database generated thereby
JP2002287959A (en) Load store queue
JP5565130B2 (en) Reduced image generation apparatus and program
CN115964192A (en) Request processing method and device, electronic equipment and storage medium
CN112579229B (en) Page data processing method and device in application
CN112114799B (en) Page rendering method, device and equipment
CN114356204A (en) Note processing method, electronic device and computer storage medium
JP6831885B1 (en) Data entry device, data entry method and data entry program
CN110110291B (en) Document display control method, device, equipment and medium
CN113723065A (en) Display method of handwritten annotations, reading equipment and computer storage medium
US9552180B2 (en) Information processing device, method and non-transitory computer-readable medium for selecting communication interface on basis of number of times communication interface request rejected
JP2009199384A (en) Data processing apparatus
CN113268193B (en) Notebook page moving method, electronic equipment and computer storage medium
CN112948485A (en) Question-answer data synchronization method, device, system, server and storage medium
CN104238967A (en) Information processing apparatus, and control method
CN104572620B (en) A kind of method and apparatus for showing chapters and sections content
CN112100998A (en) Content display method, device, terminal and storage medium
JP4350470B2 (en) Image processing apparatus, image processing method, and program

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