Book sequential typesetting method and device, medium and product

By forming a sub-sequence to be typed in book typesetting and typing according to the layout height, the problem of low layout utilization in the existing technology is solved, and the effect of compact layout and efficient utilization is achieved.

CN119397997APending Publication Date: 2025-02-07GROW UP TOGETHER (SHANGHAI) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411483221.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art cannot achieve compact layout while maintaining the order of user pictures, resulting in low layout utilization and excessive pages.

Method used

By obtaining multiple consecutive user pictures of the same type in the picture sequence, forming a sub-sequence to be typed, first typed according to the layout height, and after the same type of pictures are sorted, then processing adjacent different types of pictures are achieved to achieve compact layout.

Benefits of technology

While maintaining the order of user pictures, the layout utilization rate is improved, the number of pages of the layout page is reduced, and a more compact layout effect is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397997A_ABST
    Figure CN119397997A_ABST
Patent Text Reader

Abstract

The invention discloses a sequential typesetting method and device for books, a medium and a product, and relates to the field of book typeset.The method comprises the steps that multiple continuous user pictures of the same type in a picture sequence are obtained to form a first to-be-typeset sub-sequence, and due to the fact that the multiple continuous user pictures of the same type have the higher layout utilization rate, the typesetting efficiency of the first to-be-typeset sub-sequence is improved; therefore, the user pictures are typeset according to the layout height, and when a plurality of continuous user pictures of the same type are typeset according to the sequence in the sequence, the rest two adjacent pictures with inconsistent picture types are typeset according to the layout height, so that more compact typesetting is realized under the condition of keeping the sequence of the user pictures; the layout utilization rate is improved, and the number of typesetting pages is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of book typesetting, and in particular to a method, device, medium and product for sequential typesetting of books. Background Art

[0002] The existing electronic growth archive technology adopts a fixed, cropped, puzzle template technology solution. However, the pictures provided by users usually contain horizontal and vertical pictures, and the fixed puzzle layout often disrupts the original order of the pictures due to the limitations of the puzzle layout. If the pictures are filled in according to the proportion of the picture puzzle frame, the pictures will lose the narrative function of the time sequence, such as the beginning and end of the activity pictures, the changes from small to large in the character records, etc. If the user pictures are mechanically laid out only in the order of the pictures, it will cause the layout to be chaotic and disorganized. For example, some continuous horizontal or vertical pictures are often separated due to the fixed layout, and the layout is not regular enough, resulting in too many pages. Therefore, the existing automatic layout process for pictures cannot be compactly laid out while maintaining the order of user pictures, and the utilization rate of layout pages is low. Summary of the invention

[0003] The purpose of this application is to provide a method, device, medium and product for sequential typesetting of books, which can achieve more compact typesetting while maintaining the order of user pictures, improve layout utilization, and reduce the number of typesetting pages.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a method for sequential typesetting of a book, the method comprising: obtaining a picture sequence; the picture sequence comprising a plurality of user pictures arranged in an import order; determining the type of each user picture; the type being a horizontal picture or a vertical picture; obtaining a plurality of consecutive user pictures of the same type in the picture sequence to form a first subsequence to be typeset; the first subsequence to be typeset has the first user picture in the picture sequence as the first picture, the type of each user picture in the first subsequence to be typeset is consistent with the type of the first user picture in the picture sequence; typeset the pictures in the first subsequence to be typeset according to the layout height, and removes the typeset user pictures from the first subsequence to be typeset, until the remaining pictures in the first subsequence to be typeset are If the number of pictures in the layout subsequence is 1, proceed to the next step, otherwise return to "obtain multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset"; reorder the picture sequence; obtain the first two user pictures of different types in the reordered picture sequence to form the second subsequence to be typeset; typeset the second subsequence to be typeset according to the layout height, and remove the typeset user pictures from the second subsequence to be typeset until the number of the second subsequence to be typeset is 0; determine whether the number of user pictures in the picture sequence is 0, if so, end the typesetting and obtain a sequentially typeset book, if otherwise return to "obtain multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset".

[0006] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned methods for sequential typesetting of books.

[0007] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for sequential typesetting of books.

[0008] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for sequential typesetting of books.

[0009] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0010] The present application obtains multiple consecutive user pictures of the same type in a picture sequence to form a first subsequence to be typeset. Since multiple consecutive user pictures of the same type have a higher layout utilization rate, they are first typeset according to the layout height. When multiple consecutive user pictures of the same type are arranged in the order of the sequence, the remaining two adjacent pictures of inconsistent types are typeset according to the layout height, thereby achieving a more compact layout while maintaining the order of user pictures, improving layout utilization, and reducing the number of layout pages. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 A flowchart of a method for sequential typesetting of a book provided in an embodiment of the present application.

[0013] Figure 2 This is the layout method of a single user picture provided in an embodiment of the present application.

[0014] Figure 3 This is a layout method for two different types of user pictures provided in an embodiment of the present application.

[0015] Figure 4 The layout method of three different types of user pictures provided in the embodiment of the present application.

[0016] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0019] Embodiment 1, as Figure 1 As shown, a method for sequential typesetting of a book comprises the following steps.

[0020] S1. Obtain a picture sequence; the picture sequence includes multiple user pictures arranged in the order of import.

[0021] Furthermore, the user pictures are all cropped pictures.

[0022] In actual application, the pictures in the picture unit of the automatic book typesetting system are arranged in the order adjusted by the user to meet the needs of story narration before and after the photos. The picture typesetting will not crop the user's pictures to ensure that the character's face will not be cropped, and it is also convenient for users to not make too many adjustments to the layout and cropping later.

[0023] S2. Determine the type of each user's picture; the type is horizontal or vertical.

[0024] Further, the type of each user picture is determined, specifically including: when the aspect ratio of the user picture is greater than 1, the user picture type is a horizontal picture; when the aspect ratio of the user picture is less than or equal to 1, the user picture type is a vertical picture.

[0025] S3. Obtain multiple consecutive user pictures of the same type in the picture sequence to form a first subsequence to be arranged; the first subsequence to be arranged has the first user picture in the picture sequence as the first picture, and the type of each user picture in the first subsequence to be arranged is consistent with the type of the first user picture in the picture sequence.

[0026] S4. Layout the pictures in the first subsequence to be layouted according to the layout height, and remove the layouted user pictures from the first subsequence to be layouted, until the number of remaining pictures in the first subsequence to be layouted is 1, then proceed to the next step, otherwise return to "obtain multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be layouted".

[0027] Furthermore, the images in the first subsequence to be typeset are typeset according to the layout height, and the user images that have been typeset are removed from the first subsequence to be typeset until the number of images remaining in the first subsequence to be typeset is 1, specifically including: determining whether the number of user images in the first subsequence to be typeset is greater than or equal to the maximum number threshold that the current layout can accommodate, and the layout height is less than the remaining page height; if so, typeset the first Q user images in the first subsequence to be typeset, delete the first Q user images in the first subsequence to be typeset, and re-sort the first subsequence to be typeset; if not, reduce the maximum number threshold that the current layout can accommodate by one, re-typeset, and remove the user images that have been typeset from the first subsequence to be typeset until the number of images remaining in the first subsequence to be typeset is 1; the value of Q is 6.

[0028] S5. Reorder the image sequence.

[0029] S6. Obtain the first two user pictures of different types in the reordered picture sequence to form a second subsequence to be arranged.

[0030] S7. Typesetting the second subsequence to be typeset according to the layout height, and removing the typeset user images from the second subsequence to be typeset until the number of the second subsequence to be typeset is 0, specifically including:

[0031] Determine whether the layout height of the first two user pictures in the second subsequence to be typeset is less than the height of the remaining pages. If so, typeset the first two user pictures, remove the first two user pictures from the picture sequence, and return "Get multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset". If not, determine whether the layout height of the first user picture in the second subsequence to be typeset is less than the height of the remaining pages. If so, typeset the first user picture, remove the first user picture from the second subsequence to be typeset, and return "Get multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset". If not, start a new page and return "Get multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset".

[0032] S8. Determine whether the number of user images in the image sequence is 0. If so, end the typesetting and obtain a sequentially typeset book. Otherwise, return to "obtain multiple consecutive user images of the same type in the image sequence to form the first subsequence to be typeset."

[0033] Furthermore, the remaining page height = page height - the page height occupied by the laid out user pictures - the interval height occupied by the laid out user pictures.

[0034] Optionally, during the layout process of user pictures in the second to-be-layout subsequence, the calculation process of the remaining page height is as follows:

[0035] First, a user picture layout can be divided into multiple rows of picture groups, and a row of picture groups may contain 1 user picture and 2 user pictures.

[0036] The height of user A's picture (horizontal picture) is a1 and the width is b1; the height of user B's picture (vertical picture) is a2 and the width is b2.

[0037] If a row of image groups is a user image, the remaining height of the image group is calculated as follows:

[0038]

[0039] Where H is the remaining height and W is the page layout width.

[0040] If a row of image groups consists of two user images of different types, the remaining height of the image group is calculated as follows:

[0041]

[0042] Where R is the upper and lower spacing width between user images.

[0043] Optionally, the horizontal interval width between user images is also R.

[0044] As another optional implementation, the following improvements may be performed after step S2 of the present application.

[0045] Two or more consecutive user pictures of the same type in the picture sequence are obtained to form a third subsequence to be arranged; the third subsequence to be arranged has the first user picture in the picture sequence as the first picture, and the type of each user picture in the third subsequence to be arranged is consistent with the type of the first user picture in the picture sequence.

[0046] The pictures in the third subsequence to be typeset are typeset according to the layout height, and the typeset user pictures are removed from the third subsequence to be typeset, until the number of pictures remaining in the third subsequence to be typeset is less than or equal to 2 and greater than or equal to 1, then proceed to the next step, otherwise return to "obtain two or more consecutive user pictures of the same type in the picture sequence to form the third subsequence to be typeset.

[0047] When the number of pictures in the third subsequence to be typeset is 2, the picture sequence is reordered, and the first three user pictures of different types in the reordered picture sequence are obtained (for example: two consecutive horizontal pictures and one vertical picture, or two vertical pictures and one horizontal picture) to form a fourth subsequence to be typeset; the fourth subsequence to be typeset is typeset according to the layout height, and the typeset user pictures are removed from the fourth subsequence to be typeset until the number of the fourth subsequence to be typeset is 0; determine whether the number of user pictures in the picture sequence is 0, and if so, end the typesetting to obtain a sequentially typeset book, otherwise return to "obtain two or more consecutive user pictures of the same type in the picture sequence to form a third subsequence to be typeset".

[0048] Optional, such as Figure 4 As shown in the figure, if a row of pictures consists of 3 user pictures of different types, among which the picture of user A (horizontal picture) is a1 high and b1 wide; the picture of user B (vertical picture) is a2 high and b2 wide; the picture of user D (vertical picture) is a3 high and b3 wide, then the remaining height of the picture group is calculated as follows:

[0049]

[0050] When the number of pictures in the third subsequence to be typeset is 1, the picture sequence is reordered, and the first two user pictures of different types (for example, a horizontal picture and a vertical picture, or a vertical picture and a horizontal picture) in the reordered picture sequence are obtained to form the fifth subsequence to be typeset; the fifth subsequence to be typeset is typeset according to the layout height, and the typeset user pictures are removed from the fifth subsequence to be typeset until the number of the fifth subsequence to be typeset is 0; it is determined whether the number of user pictures in the picture sequence is 0, and if so, the typesetting is terminated to obtain a sequentially typeset book, and otherwise, the method returns to "obtain multiple consecutive user pictures of the same type in the picture sequence to form the third subsequence to be typeset".

[0051] For the above implementation, the typesetting process in actual application is as follows:

[0052] According to the ratio of the original width and height of the image (user image), the image with an aspect ratio > 1 is a horizontal image, and the image with an aspect ratio ≤ 1 is a vertical image. The image unit contains the following image layouts:

[0053] 1. 6 horizontal pictures.

[0054] 2. 4 vertical pictures.

[0055] 3. 3 vertical pictures.

[0056] 4. 3 horizontal pictures.

[0057] 5. 2 horizontal pictures.

[0058] 6. 2 random pictures (pictures of different types).

[0059] 7. 1 random picture.

[0060] When the system automatically lays out the pictures, the picture unit can be split into multiple picture layouts, and the picture layouts are determined from front to back. The choice of picture layout depends on the picture aspect ratio, order, quantity, and the remaining height of the current page.

[0061] Start detecting image layout types:

[0062] At the beginning of the process, all the images (image sequence) of a record are put into the process of detecting the image layout.

[0063] Step 1: Determine how many images are not typeset:

[0064] If there are 6 or more pictures, go to step 2.

[0065] If it is equal to 5 pictures, go to step 4.

[0066] If it is equal to 4 pictures, go to step 6.

[0067] If it is equal to 3 pictures, go to step 8.

[0068] If it is equal to 2 pictures, go to step 12.

[0069] If it is equal to 1 picture, go to step 15.

[0070] If it is equal to 0 images, stop detection.

[0071] Step 2: Determine whether the first 6 images are 6 consecutive horizontal images:

[0072] If there are 6 consecutive horizontal images, go to step 3.

[0073] If there are not 6 consecutive horizontal images, go to step 4.

[0074] Step 3: Determine whether the remaining height of the page is ≥ the height required for 6 horizontal images:

[0075] If the remaining height of the page is sufficient, the "6 horizontal pictures layout" is triggered, and the remaining pictures proceed to step 1.

[0076] If the height is insufficient, go to step 5.

[0077] Step 4: Determine whether the first five images are five consecutive horizontal images:

[0078] If there are 5 consecutive horizontal images, go to step 5.

[0079] If there are not 5 consecutive horizontal images, go to step 6.

[0080] Step 5: Determine whether the remaining height of the page is ≥ the height required for 5 horizontal images:

[0081] If the remaining height of the page is sufficient, the "5 horizontal pictures layout" is triggered, and the remaining pictures go to step 1. If the height is insufficient, go to step 11.

[0082] Step 6: Determine whether the first 4 images are 4 consecutive vertical images:

[0083] If there are 4 consecutive vertical images, go to step 7.

[0084] If there are not 4 consecutive vertical images, go to step 8.

[0085] Step 7: Determine whether the remaining height of the page is ≥ the height required for 4 vertical images:

[0086] If the remaining height of the page is sufficient, the "4 vertical pictures layout" is triggered, and the remaining pictures go to step 1. If the height is insufficient, go to step 9.

[0087] Step 8: Determine whether the first three images are three consecutive vertical images:

[0088] If there are three consecutive vertical images, go to step 9.

[0089] If there are not three consecutive vertical images, go to step 10.

[0090] Step 9: Determine whether the remaining height of the page is ≥ the required height of 3 vertical images:

[0091] If the remaining height of the page is sufficient, the "3 vertical pictures layout" is triggered, and the remaining pictures go to step 1. If the height is insufficient, go to step 12.

[0092] Step 10: Determine whether the first three images are three consecutive horizontal images and are the last three images of the record: If they are three consecutive horizontal images and are the last three images of the record, proceed to step 11.

[0093] If it is not 3 consecutive horizontal images or it is not the last 3 images of the record, go to step 12.

[0094] Step 11: Determine whether the remaining height of the page is ≥3 required for horizontal layout:

[0095] If the remaining height of the page is sufficient, the "3 horizontal pictures layout" is triggered, and the remaining pictures proceed to step 1.

[0096] If the height is insufficient, go to step 12.

[0097] Step 12: Determine whether the first two images are two consecutive horizontal images and are the first two images of the record:

[0098] If there are 2 consecutive horizontal images and they are the first 2 images of the record, go to step 13.

[0099] If they are not two consecutive horizontal images or are not the first two images of the record, go to step 14.

[0100] Step 13: Determine whether the remaining height of the page is ≥ the height required for 2 horizontal images:

[0101] If the remaining height of the page is sufficient, "2 horizontal pictures layout" is triggered, and the remaining pictures proceed to step 1.

[0102] If the height is insufficient, go to step 15.

[0103] Step 14: Determine whether the remaining height of the page is ≥ the height required for the layout of two arbitrary images:

[0104] If the remaining height of the page is sufficient, the "2 arbitrary pictures layout" is triggered, and the remaining pictures go to step 1.

[0105] If the height is insufficient, go to step 15.

[0106] Step 15: Determine whether the remaining height of the page is ≥ the height required for the layout of one image:

[0107] If the remaining height of the page is sufficient, "1 picture layout" is triggered.

[0108] If the height is insufficient, start a new page and go to step 1.

[0109] Technical effects:

[0110] This application obtains multiple consecutive user pictures of the same type in the picture sequence to form a first subsequence to be typeset. Since multiple consecutive user pictures of the same type have a higher layout utilization rate, they are first typeset according to the layout height. When multiple consecutive user pictures of the same type are arranged in the order in the sequence, the remaining two adjacent pictures of inconsistent types are typeset according to the layout height, thereby achieving a more compact layout while maintaining the order of user pictures, improving layout utilization, and reducing the number of layout pages. This application completely follows the order of pictures when users record them, and can naturally combine into a variety of picture layout effects according to the proportion and order of the pictures.

[0111] In addition, the existing electronic growth archive technology uses a fixed, cropped, puzzle template technical solution. After the system automatically fills in the pictures, the user still needs to manually adjust the photo position on each page to avoid cropping the photos to the head of the person. This is very labor-intensive for the scenario of producing a large number of personalized books at the same time. For example: a teacher needs to produce growth archives for dozens of students in the class in one semester. Since the user pictures imported by this application are all pictures that have been cropped by the user, the process of cropping the picture size is omitted, so the customer pictures can be presented in full without limiting the picture size.

[0112] Embodiment 2, the present application also provides a computer device, which may be a server or a terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store video tag processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for sequential typesetting of a book is implemented.

[0113] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] Embodiment 3: The present application also provides a computer-readable storage medium storing a computer program, which implements the above methods when executed by a processor.

[0115] Embodiment 4: The present application also provides a computer program product, including a computer program, which implements the above methods when executed by a processor.

[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0117] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for sequential typesetting of a book, characterized in that: The sequential typesetting method comprises: Obtaining a picture sequence; the picture sequence includes a plurality of user pictures arranged in an import order; Determine the type of each user's picture; the type is a horizontal picture or a vertical picture; Acquire multiple consecutive user pictures of the same type in the picture sequence to form a first subsequence to be arranged; the first subsequence to be arranged has the first user picture in the picture sequence as the first picture, and the type of each user picture in the first subsequence to be arranged is consistent with the type of the first user picture in the picture sequence; The pictures in the first subsequence to be typeset are typeset according to the layout height, and the typeset user pictures are removed from the first subsequence to be typeset, until the number of pictures remaining in the first subsequence to be typeset is 1, then proceed to the next step, otherwise return to "obtain multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset"; Reorder the image sequence; Obtain the first two user pictures of different types in the reordered picture sequence to form a second subsequence to be arranged; The second subsequence to be typeset is typeset according to the layout height, and the typeset user images are removed from the second subsequence to be typeset, until the number of the second subsequence to be typeset is 0; Determine whether the number of user images in the image sequence is 0. If so, end the typesetting and obtain a sequentially typeset book. Otherwise, return to "obtain multiple consecutive user images of the same type in the image sequence to form the first subsequence to be typeset." 2. The method for sequential typesetting of a book according to claim 1, characterized in that: Determine the type of each user image, including: When the aspect ratio of the user image is greater than 1, the user image type is horizontal; When the aspect ratio of the user image is less than or equal to 1, the user image type is vertical.

3. The method for sequential typesetting of a book according to claim 1, characterized in that: The pictures in the first subsequence to be typeset are typeset according to the layout height, and the typeset user pictures are removed from the first subsequence to be typeset until the number of pictures remaining in the first subsequence to be typeset is 1, specifically including: Determine whether the number of user images in the first subsequence to be typeset is greater than or equal to the maximum number threshold that the current layout can accommodate, and the layout height is less than the remaining page height. If so, typeset the first Q user images in the first subsequence to be typeset, delete the first Q user images in the first subsequence to be typeset, and reorder the first subsequence to be typeset. If not, reduce the maximum number threshold that the current layout can accommodate by one, and re-typeset, and remove the typeset user images from the first subsequence to be typeset, until the number of remaining images in the first subsequence to be typeset is 1.

4. The method for sequential typesetting of a book according to claim 1, characterized in that: The value of Q is 6.

5. The method for sequential typesetting of a book according to claim 1, characterized in that: The second subsequence to be typeset is typeset according to the layout height, and the typeset user images are removed from the second subsequence to be typeset until the number of the second subsequence to be typeset is 0, specifically including: Determine whether the layout height of the first two user pictures in the second subsequence to be typeset is less than the height of the remaining pages. If so, typeset the first two user pictures, remove the first two user pictures from the picture sequence, and return "get multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset". If not, determine whether the layout height of the first user picture in the second subsequence to be typeset is less than the height of the remaining pages. If so, typeset the first user picture, remove the first user picture from the second subsequence to be typeset, and return "get multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset". If not, start a new page and return "get multiple consecutive user pictures of the same type in the picture sequence to form the first subsequence to be typeset".

6. The method for sequential typesetting of a book according to claim 3 or 5, characterized in that: The remaining page height=page height-the page height occupied by the laid out user pictures-the interval height occupied by the laid out user pictures.

7. The method for sequential typesetting of a book according to claim 1, characterized in that: The user pictures are all cropped pictures.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the sequential typesetting method for a book according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for sequential typesetting of a book according to any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for sequential typesetting of a book according to any one of claims 1 to 7 is implemented.