A page intelligent typesetting method for books

Through the intelligent layout method, the data analysis module is used to divide the page area according to the horizontal variance and average value of the characteristic points, and intelligent layout adjustment is carried out, which solves the problems of low layout efficiency and high cost caused by manual inspection, and realizes efficient layout quality inspection.

CN118446180BActive Publication Date: 2024-11-12GINKGO (BEIJING) BOOK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410614096.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-11-12
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

In the prior art, due to the use of manual inspection of typesetting, the layout efficiency is low and the labor cost is high, making it difficult to effectively improve the layout quality inspection efficiency of e-books.

Method used

By obtaining the elements to be typed on the page, generating a layout template, and using the data analysis module to divide the page into multiple areas, and making judgments based on the horizontal variance and average value of the feature points, intelligent layout adjustments are performed to avoid manual inspections and improve layout efficiency.

Benefits of technology

It improves the control accuracy and analysis accuracy of page layout, reduces labor costs, significantly improves layout efficiency, and avoids the dependence of manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118446180B_ABST
    Figure CN118446180B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electronic equipment, and in particular to a page intelligent typesetting method for books, comprising: obtaining elements to be typeset on a page and generating a typesetting template; importing elements into the typesetting template; dividing regions and determining whether the arrangement of elements in a single region is qualified; making a comprehensive determination on whether the typesetting of the page is qualified based on the rating of each region; completing typesetting; a data analysis module divides the page into a plurality of regions, and determines whether the typesetting of a single region is qualified according to the variance of the horizontal coordinates of individual feature points in the single region, or determines the reason for unqualified typesetting according to the average value of the horizontal coordinates of each feature point, and analyzes the overall typesetting of the page when the typesetting analysis of a single region is completed, thereby improving the control precision of the typesetting of the page, improving the accuracy of the analysis of the typesetting of the page, avoiding manual inspection, reducing labor costs, and improving typesetting efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic equipment, and in particular to an intelligent page typesetting method for books. Background Art

[0002] Typesetting refers to the process of adjusting the position and size of visual information elements such as text, pictures, graphics and tables on the layout to make the layout organized. During typesetting, text processing is an important link that affects the quality of typesetting and work efficiency. Whether the text can be processed flexibly is very critical. The existing technology obtains the text typesetting problems of electronic book pages through electronic devices, and sends the problems to the server to conduct quality inspection of the typesetting problems, thereby improving the efficiency of book quality inspection. During the text typesetting process, unreasonable typesetting is prone to occur due to the insertion of pictures and tables, and manual inspection is mostly used, resulting in low typesetting efficiency.

[0003] Chinese patent application number: CN202310186543.6 discloses a method for quality inspection of electronic books, the method comprising: an electronic device obtains a first electronic book; an electronic device obtains a first typesetting verification standard; the electronic device performs quality inspection on pages in the first electronic book based on the first typesetting verification standard; the electronic device obtains a first text typesetting problem existing in a page of the first electronic book, and / or a first image typesetting problem existing in a page of the first electronic book; the electronic device sends the first text typesetting problem and / or the first image typesetting problem to a server. Through this method, automated quality inspection of text typesetting problems and image typesetting problems in electronic books is achieved, thereby improving the quality inspection efficiency of electronic books. It can be seen that the electronic book quality inspection method has the following problems: due to the use of manual inspection of typesetting conditions, the typesetting efficiency is low and the labor cost is high. Summary of the invention

[0004] To this end, the present invention provides a page intelligent typesetting method for books, so as to overcome the problems of low typesetting efficiency and high labor cost caused by manual typesetting inspection in the prior art.

[0005] To achieve the above-mentioned purpose, the present invention provides a method for intelligent page layout of books. The method comprises:

[0006] Step S1, obtaining elements to be typeset on a page, and determining typesetting parameters based on the obtained elements to be typeset to generate a typesetting template;

[0007] Step S2, importing the acquired elements to be typeset into the typeset template;

[0008] Step S3, the data analysis module divides the page of the typesetting template into several areas, and determines whether the element arrangement of a single area is qualified. When the data analysis module determines that the typesetting of a single area is unqualified, the data analysis module performs a secondary determination on whether the typesetting of the area is qualified according to the variance of the horizontal coordinates of each feature point in the area, or determines the reason for the unqualified typesetting according to the average value of the horizontal coordinates of each feature point;

[0009] Step S4: After the data analysis module has completed the determination of each individual area, it makes a comprehensive determination on whether the layout of the page is qualified based on the rating of each area;

[0010] Step S5: The data analysis module completes the intelligent typesetting of the book after comprehensively determining whether the typesetting of the page is qualified.

[0011] Further, the data analysis module obtains the position of the right edge of the single area in each row of feature points, and counts the number of unqualified feature points whose horizontal coordinates do not reach a preset value and the total number of feature points in the area. The data analysis module records the ratio of the number of unqualified feature points to the total number of feature points in the area as a primary ratio, and determines whether the typesetting of the area is qualified according to the primary ratio, and records the area as a primary area when the typesetting of the single area is preliminarily determined to be qualified.

[0012] When the data analysis module preliminarily determines that the typesetting of a single area is unqualified, it makes a secondary judgment on whether the typesetting of the area is qualified based on the variance of the horizontal coordinates of each feature point in the area, or calculates the average value of the horizontal coordinates of the unqualified feature points to determine the reason for the unqualified typesetting based on the average value.

[0013] Furthermore, the data analysis module performs a secondary determination on whether the layout of a single region is qualified based on the variance of the horizontal coordinates of each feature point of the single region, and when the layout of a single region is determined to be qualified, the region is recorded as a secondary region;

[0014] When determining that the layout of a single area is unqualified, the data analysis module determines the reason for the unqualified layout according to the average value of the horizontal coordinates of the unqualified feature points.

[0015] Furthermore, when determining the reason for the unqualified typesetting according to the average value, the data analysis module records the difference between the average value and the preset average value preset in the data analysis module as a primary difference, and determines the reason for the unqualified typesetting of the single area according to the primary difference, or determines to detect the left edge of the single area, obtains the starting feature point, and obtains the paragraph head feature point from the starting feature point;

[0016] When the data analysis module determines that the reason why the typesetting of a single area is unqualified is that there is a text line with unqualified typesetting, the area is recorded as a third-level area, and the data analysis module determines to perform a dispersed alignment process on the unqualified text line;

[0017] When the data analysis module determines that the reason why the typesetting of a single area is unqualified is that the element to be typeset is a picture, the area is recorded as a level five area.

[0018] Furthermore, the data analysis module counts the number of paragraph head feature points when determining to obtain paragraph head feature points from the starting feature points, and determines the reason why the typesetting of a single area is unqualified according to the number of paragraph head feature points, and,

[0019] When the data analysis module determines that the reason for the typesetting failure of a single area is that the number of paragraphs exceeds the preset standard, resulting in multiple paragraph end lines that do not reach the preset length, the area is recorded as a fourth-level area, or,

[0020] When it is determined that the reason for the unqualified typesetting of a single area is the existence of text lines with unqualified typesetting, the area is recorded as a third-level area, and the data analysis module determines to perform dispersed alignment processing on the unqualified text lines.

[0021] Furthermore, when the data analysis module completes the distributed alignment processing of the unqualified text lines in the third-level area, it detects the spacing between the characters in the unqualified text lines and cancels the distributed alignment processing of the unqualified text lines whose spacing is greater than a preset value.

[0022] Furthermore, when the data analysis module completes marking of each area, it counts the number of areas at each level in the page, and determines whether the typesetting of the page is qualified based on the number of areas at each level, and when it is determined that the typesetting of the page is unqualified, it determines to adjust the font size of the page, or adjust the number of words in each line of the page.

[0023] Further, when determining to adjust the font size of the page, the data analysis module calculates a comprehensive quantity ratio S according to the secondary area quantity ratio A and the tertiary area quantity ratio B, and sets the comprehensive quantity ratio S=a×A / A0+b×B / B0, wherein a is the secondary area weight coefficient, b is the tertiary area weight coefficient, a+b=1, A0 is a preset secondary area quantity ratio preset in the data analysis module, and B0 is a preset tertiary area quantity ratio preset in the data analysis module;

[0024] The data analysis module is provided with a plurality of adjustment methods for the font size of the page based on the comprehensive quantity ratio, and the adjustment range of the font size in each adjustment method is different.

[0025] Furthermore, the data analysis module counts the average number of words in each paragraph of the element to be typeset when determining whether to adjust the number of words in each line of the page, and provides a number of correction methods for the number of words in each line of the page based on the average number of words, and each correction method has a different correction range for the number of words in each line.

[0026] Compared with the prior art, the beneficial effect of the present invention lies in that the data analysis module described in the present invention divides the page into several areas, and determines whether the typesetting of a single area is qualified according to the variance of the horizontal coordinates of each feature point of the single area, or determines the reason for unqualified typesetting according to the average value of the horizontal coordinates of each feature point. When the typesetting situation of a single area is analyzed, the overall typesetting situation of the page is analyzed, which improves the control accuracy of the typesetting situation of the page, improves the accuracy of the analysis of the typesetting situation of the page, avoids manual inspection, reduces labor costs, and improves typesetting efficiency.

[0027] Furthermore, the data analysis module in the present invention marks the feature points according to the positions of the feature points on the right edge of the single area in each row, and determines whether the typesetting of the single area is qualified according to the number of unqualified feature points, and marks the area when the typesetting of the area is determined to be qualified, and performs a secondary determination on whether it is qualified based on the variance of the horizontal coordinates of each feature point when the typesetting of the area is determined to be unqualified, thereby further improving the accuracy of the analysis of the typesetting situation and further improving the typesetting efficiency.

[0028] Furthermore, the data analysis module in the present invention determines whether the typesetting of a single area is qualified based on the variance of the horizontal coordinates of the feature points, and marks the area when the typesetting of a single area is determined to be qualified, thereby further improving the accuracy of the analysis of the typesetting situation of a single area and further improving the typesetting efficiency.

[0029] Furthermore, the data analysis module in the present invention determines the reason for the unqualified typesetting of a single area based on the difference between the average value of the horizontal coordinates of each feature point and a preset average value, and when it is determined that the reason for the unqualified typesetting of the area is the existence of text lines with unqualified typesetting, the area is recorded as a third-level area, and the unqualified text is subjected to dispersed alignment processing, thereby further improving the typesetting efficiency.

[0030] Furthermore, the data analysis module in the present invention records the area as a fourth-level area when it determines that the reason for the unqualified typesetting of a single area is that the number of paragraphs exceeds the preset standard, resulting in multiple paragraph end lines that do not reach the preset length, or records the area as a third-level area when the reason for the unqualified typesetting is the existence of text lines with unqualified typesetting, thereby further improving the accuracy of the analysis of the typesetting situation of a single area and further improving the typesetting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1It is a flow chart of the method for intelligent typesetting of pages of books according to the present invention;

[0032] Figure 2 This is a flow chart for the present invention for preliminarily determining whether the typesetting of a single area is qualified;

[0033] Figure 3 This is a flow chart of the present invention for determining whether the typesetting of a single area is qualified;

[0034] Figure 4 The present invention is a flow chart for determining the reasons why the typesetting of a single area is unqualified. DETAILED DESCRIPTION

[0035] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0036] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0037] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0038] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0039] See also Figure 1 As shown, it is a flow chart of the method for intelligent page typesetting of books according to the present invention.

[0040] The present invention provides a page intelligent typesetting method for a book, comprising:

[0041] Step S1, obtaining elements to be typeset on a page, and determining typesetting parameters based on the obtained elements to be typeset to generate a typesetting template;

[0042] Step S2, importing the acquired elements to be typeset into the typeset template;

[0043] Step S3, the data analysis module divides the page of the typesetting template into several areas, and determines whether the element arrangement of a single area is qualified. When the data analysis module determines that the typesetting of a single area is unqualified, the data analysis module performs a secondary determination on whether the typesetting of the area is qualified according to the variance of the horizontal coordinates of each feature point in the area, or determines the reason for the unqualified typesetting according to the average value of the horizontal coordinates of each feature point;

[0044] Step S4: After the data analysis module has completed the determination of each individual area, it makes a comprehensive determination on whether the layout of the page is qualified based on the rating of each area;

[0045] Step S5: The data analysis module completes the intelligent typesetting of the book after comprehensively determining whether the typesetting of the page is qualified.

[0046] In an embodiment of the present invention, a coordinate system is established in the page, the horizontal positioning lines of each row are obtained, the intersection points of each horizontal positioning line and the features of the elements to be typeset are recorded respectively, and the coordinates of the points with the largest horizontal coordinates in each horizontal positioning line are marked as the feature points of the corresponding positioning line.

[0047] The data analysis module described in the present invention divides a page into several areas, and determines whether the typesetting of a single area is qualified according to the variance of the horizontal coordinates of each feature point of the single area, or determines the reason for unqualified typesetting according to the average value of the horizontal coordinates of each feature point. When the typesetting analysis of a single area is completed, the overall typesetting of the page is analyzed, which improves the control accuracy of the typesetting of the page, improves the accuracy of the analysis of the typesetting of the page, avoids manual inspection, reduces labor costs, and improves typesetting efficiency.

[0048] See also Figure 2 As shown, it is a flow chart of the present invention for preliminarily determining whether the typesetting of a single area is qualified.

[0049] Specifically, the data analysis module obtains the position of the feature point of the right edge of a single area in each row, and counts the number of unqualified feature points whose horizontal coordinates do not reach the preset value and the total number of feature points in the area. The data analysis module records the ratio of the number of unqualified feature points to the total number of feature points in the area as a primary ratio, and determines a preliminary determination method for whether the typesetting of the area is qualified based on the primary ratio, wherein:

[0050] The first preliminary determination method is that the data analysis module preliminarily determines that the typesetting of a single area is qualified, and records the area as a first-level area; the first determination method satisfies that the first-level ratio is greater than or equal to the first preset first-level ratio preset in the data analysis module;

[0051] The second preliminary determination method is that the data analysis module preliminarily determines that the typesetting of a single area is unqualified, and performs a secondary determination on whether the typesetting of the area is qualified based on the variance of the horizontal coordinates of each feature point in the area; the second preliminary determination method satisfies that the first-level ratio is less than the first preset first-level ratio and is greater than or equal to the second preset first-level ratio preset in the data analysis module;

[0052] The third preliminary judgment method is that the data analysis module preliminarily judges that the layout of a single area is unqualified, and calculates the average value of the horizontal coordinates of the unqualified feature points to determine the reason for the unqualified layout based on the average value; the third preliminary judgment method satisfies that the first-level ratio is less than the second preset first-level ratio.

[0053] In the embodiment of the present invention, the preset value of the horizontal axis is 15 cm, the first preset primary ratio is 0.08, and the second preset primary ratio is 0.12.

[0054] The data analysis module in the present invention marks the feature points according to the positions of the feature points on the right edge of the single area in each row, and determines whether the typesetting of the single area is qualified according to the number of unqualified feature points, and marks the area when it is determined to be qualified, and makes a secondary determination on whether it is qualified according to the variance of the horizontal coordinates of each feature point when the typesetting of the area is determined to be unqualified, thereby further improving the accuracy of the analysis of the typesetting situation and further improving the typesetting efficiency.

[0055] See also Figure 3 As shown, it is a flow chart of the present invention for determining whether the typesetting of a single area is qualified.

[0056] Specifically, the data analysis module determines a determination method for determining whether the typesetting of a single area is qualified according to the variance under the second preliminary determination method, wherein:

[0057] The first determination method is that the data analysis module determines that the typesetting of a single area is qualified, and records the area as a secondary area; the first determination method satisfies that the variance is less than or equal to the preset variance preset in the data analysis module;

[0058] The second determination method is that the data analysis module determines that the layout of a single area is unqualified, and determines the reason for the unqualified layout based on the average value; the second determination method satisfies that the variance is greater than the preset variance.

[0059] In the embodiment of the present invention, the preset variance is 15.2.

[0060] The data analysis module in the present invention determines whether the typesetting of a single area is qualified based on the variance of the horizontal coordinates of the feature points, and marks the area when the typesetting of a single area is determined to be qualified, thereby further improving the analysis accuracy of the typesetting situation of a single area and further improving the typesetting efficiency.

[0061] See also Figure 4 As shown, it is a flow chart for determining the reasons why the typesetting of a single area is unqualified.

[0062] Specifically, the data analysis module records the difference between the average value and the preset average value preset in the data analysis module as a primary difference under the first preset condition, and determines the reason determination method for the typesetting failure of the single area according to the primary difference, wherein:

[0063] The first reason determination method is that the data analysis module determines that the reason for the typesetting failure of a single area is that there is a text line with unqualified typesetting, and the area is recorded as a third-level area, and the data analysis module determines to perform a dispersed alignment process on the unqualified text line; the first reason determination method satisfies that the first-level difference is less than or equal to the first preset first-level difference preset in the data analysis module;

[0064] The second cause determination method is that the data analysis module determines to detect the left edge of a single area, obtains the starting feature point, and obtains the segment head feature point from the starting feature point; the second cause determination method satisfies that the first-level difference is greater than the first preset first-level difference and is less than or equal to the second preset first-level difference preset in the data analysis module;

[0065] The third reason determination method is that the data analysis module determines that the element to be typeset in the single area is a picture, and records the area as a level 5 area; the third reason determination method satisfies that the level 1 difference is greater than the second preset level 1 difference;

[0066] The first preset condition is the reason why the data analysis module determines that the typesetting is unqualified based on the average value.

[0067] In the embodiment of the present invention, the preset average value is 13.2, the first preset first-level difference value is 0.8, and the second preset first-level difference value is 1.1.

[0068] The data analysis module in the present invention determines the reason for the unqualified typesetting of a single area based on the difference between the average value of the horizontal coordinates of each feature point and the preset average value, and when it is determined that the reason for the unqualified typesetting of the area is the existence of text lines with unqualified typesetting, the area is recorded as a third-level area, and the unqualified text is subjected to dispersed alignment processing, thereby further improving the typesetting efficiency.

[0069] Specifically, the data analysis module counts the number of paragraph head feature points under the second cause determination method, and determines the cause determination method for the typesetting failure of the single region according to the number of paragraph head feature points, wherein:

[0070] The first reason determination method is that the data analysis module determines that the reason for the typesetting failure of a single area is that the number of paragraphs exceeds the preset standard, resulting in multiple paragraph end lines that do not reach the preset length, and the area is recorded as a fourth-level area; the first reason determination method satisfies that the number of paragraph head feature points is greater than or equal to the preset number of paragraph head feature points preset in the data analysis module;

[0071] The second reason determination method is that the data analysis module determines that the reason for the unqualified typesetting of a single area is the existence of text lines with unqualified typesetting, and the area is recorded as a third-level area, and the data analysis module determines to perform dispersed alignment processing on the unqualified text lines; the second reason determination method satisfies that the number of paragraph beginning feature points is less than the preset number of paragraph beginning feature points.

[0072] In the embodiment of the present invention, the number of segment head feature points is preset to 2.

[0073] The data analysis module in the present invention records the area as a fourth-level area when it determines that the reason for the unqualified typesetting of a single area is that the number of paragraphs exceeds the preset standard, resulting in multiple paragraph end lines that do not reach the preset length, or records the area as a third-level area when the reason for the unqualified typesetting is the existence of text lines with unqualified typesetting, thereby further improving the accuracy of the analysis of the typesetting situation of a single area and further improving the typesetting efficiency.

[0074] Specifically, when the data analysis module completes the distributed alignment processing of the unqualified text lines in the third-level area, it detects the spacing between the characters in the unqualified text lines and cancels the distributed alignment processing of the unqualified text lines whose spacing is greater than a preset value.

[0075] Specifically, when the data analysis module completes marking of each region, it counts the number of regions at each level in the page, and determines whether the layout of the page is qualified according to the number of regions at each level, wherein:

[0076] The first determination method is that the data analysis module determines that the layout of the page is qualified; the first determination method satisfies that the number of the first-level areas accounts for the highest proportion in the page;

[0077] The second determination method is that the data analysis module determines to adjust the font size of the page; the second determination method satisfies that the number of the secondary areas accounts for the highest proportion in the page or the number of the tertiary areas accounts for the highest proportion in the page;

[0078] The third determination method is that the data analysis module determines to adjust the number of words in each line of the page; the third determination method satisfies that the number of the second-level areas of the fourth-level areas accounts for the highest proportion in the page.

[0079] Specifically, the data analysis module calculates the comprehensive quantity proportion S according to the secondary area quantity proportion A and the tertiary area quantity proportion B under the second determination mode, and sets the comprehensive quantity proportion S=a×A / A0+b×B / B0, wherein a is the secondary area weight coefficient, b is the tertiary area weight coefficient, a+b=1, A0 is the preset secondary area quantity proportion preset in the data analysis module, and B0 is the preset tertiary area quantity proportion preset in the data analysis module;

[0080] The data analysis module determines a method for adjusting the font size of the page according to the comprehensive quantity ratio, wherein:

[0081] The first adjustment method is that the data analysis module selects the first adjustment coefficient α1 to adjust the font size K of the page to a corresponding value, and sets the adjusted font size K'=α1×K0, where K0 is the initial font size before adjustment; the first adjustment method satisfies that the comprehensive quantity ratio is less than or equal to the preset comprehensive quantity ratio preset in the data analysis module;

[0082] The second adjustment method is that the data analysis module selects the second adjustment coefficient α2 to adjust the font size K of the page to a corresponding value, and sets the adjusted font size K'=α2×K0; the second adjustment method satisfies that the comprehensive quantity ratio is greater than the preset comprehensive quantity ratio.

[0083] In the embodiment of the present invention, the secondary region weight coefficient is 0.4, the tertiary region weight coefficient is 0.6, the preset secondary region quantity accounts for 0.3, the preset tertiary region quantity accounts for 0.4, the first adjustment coefficient α1 is 0.8, the second adjustment coefficient α2 is 0.7, and the preset comprehensive quantity accounts for 1.12.

[0084] Specifically, the data analysis module counts the average number of words in each paragraph of the element to be typeset under the third determination method, and determines a correction method for the number of words in each line of the page based on the average number of words, wherein:

[0085] The first correction method is that the data analysis module selects the first correction coefficient β1 to correct the number of words per line G to a corresponding value, and sets the corrected number of words per line G'=β1×G0, where G0 is the initial number of words per line before correction; the first correction method satisfies that the average number of words is less than or equal to the preset number of words per line preset in the data analysis module;

[0086] The second correction method is that the data analysis module selects the second correction coefficient β2 to correct the number of words per line G to a corresponding value, and sets the corrected number of words per line G'=β2×G0; the second correction method satisfies that the average number of words is greater than the preset number of words per line.

[0087] In the embodiment of the present invention, the first correction coefficient β1 is 1.12, the second correction coefficient β2 is 1.24, and the preset number of characters per line is 28.

[0088] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for intelligent page layout of a book, characterized in that: include: Step S1, obtaining elements to be typeset on a page, and determining typesetting parameters based on the obtained elements to be typeset to generate a typesetting template; Step S2, importing the acquired elements to be typeset into the typeset template; Step S3, the data analysis module divides the page of the typesetting template into several areas, and determines whether the element arrangement of a single area is qualified. When the data analysis module determines that the typesetting of a single area is unqualified, the data analysis module performs a secondary determination on whether the typesetting of the area is qualified according to the variance of the horizontal coordinates of each feature point in the area, or determines the reason for the unqualified typesetting according to the average value of the horizontal coordinates of each feature point; Step S4: After the data analysis module has completed the determination of each individual area, it makes a comprehensive determination on whether the layout of the page is qualified based on the rating of each area; Step S5, the data analysis module completes intelligent typesetting for the book when the comprehensive determination of whether the typesetting of the page is qualified is completed; The data analysis module obtains the position of the feature points of the right edge of a single area in each row, and counts the number of unqualified feature points whose horizontal coordinates do not reach a preset value and the total number of feature points in the area. The data analysis module records the ratio of the number of unqualified feature points to the total number of feature points in the area as a first-level ratio, and determines whether the typesetting of the area is qualified based on the first-level ratio, and when the typesetting of the single area is preliminarily determined to be qualified, the area is recorded as a first-level area.

2. The intelligent page layout method for books according to claim 1, characterized in that: The data analysis module performs secondary determination on whether the layout of a single region is qualified according to the variance of the horizontal coordinates of each feature point of the single region, and when the layout of a single region is determined to be qualified, the region is recorded as a secondary region; When determining that the layout of a single area is unqualified, the data analysis module determines the reason for the unqualified layout according to the average value of the horizontal coordinates of the unqualified feature points.

3. The intelligent page layout method for books according to claim 2, characterized in that: When determining the reason for the unqualified typesetting according to the average value, the data analysis module records the difference between the average value and the preset average value preset in the data analysis module as a primary difference value, and determines the reason for the unqualified typesetting of the single area according to the primary difference value, or determines to detect the left edge of the single area, obtains the starting feature point, and obtains the paragraph head feature point from the starting feature point; When the data analysis module determines that the reason why the typesetting of a single area is unqualified is that there is a text line with unqualified typesetting, the area is recorded as a third-level area, and the data analysis module determines to perform a dispersed alignment process on the unqualified text line; When the data analysis module determines that the reason why the typesetting of a single area is unqualified is that the element to be typeset is a picture, the area is recorded as a level five area.

4. The intelligent page layout method for books according to claim 3, characterized in that: The data analysis module counts the number of paragraph head feature points when determining to obtain paragraph head feature points from the starting feature points, and determines the reason why the typesetting of a single area is unqualified according to the number of paragraph head feature points, and, When the data analysis module determines that the reason for the typesetting failure of a single area is that the number of paragraphs exceeds the preset standard, resulting in multiple paragraph end lines that do not reach the preset length, the area is recorded as a fourth-level area, or, When it is determined that the reason for the unqualified typesetting of a single area is the existence of text lines with unqualified typesetting, the area is recorded as a third-level area, and the data analysis module determines to perform dispersed alignment processing on the unqualified text lines.

5. The intelligent page layout method for books according to claim 4, characterized in that: When the data analysis module completes the scattered alignment processing of the unqualified text lines in the third-level area, it detects the spacing between the characters in the unqualified text lines and cancels the scattered alignment processing of the unqualified text lines whose spacing is greater than a preset value.

6. The intelligent page layout method for books according to claim 5, characterized in that: When the data analysis module completes marking of each area, it counts the number of areas at each level in the page, and determines whether the layout of the page is qualified based on the number of areas at each level. When it is determined that the layout of the page is unqualified, it determines to adjust the font size of the page, or adjust the number of words per line of the page.

7. The intelligent page layout method for books according to claim 6, characterized in that: When determining to adjust the font size of the page, the data analysis module calculates the comprehensive quantity ratio S according to the secondary area quantity ratio A and the tertiary area quantity ratio B, and sets the comprehensive quantity ratio S=a×A / A0+b×B / B0, wherein a is the secondary area weight coefficient, b is the tertiary area weight coefficient, a+b=1, A0 is the preset secondary area quantity ratio preset in the data analysis module, and B0 is the preset tertiary area quantity ratio preset in the data analysis module; The data analysis module is provided with a plurality of adjustment methods for the font size of the page based on the comprehensive quantity ratio, and the adjustment range of the font size in each adjustment method is different.

8. The intelligent page layout method for books according to claim 7, characterized in that: When determining whether to adjust the number of words per line of the page, the data analysis module counts the average number of words in each paragraph of the element to be typeset, and provides several correction methods for the number of words per line of the page based on the average number of words, and each correction method has a different correction range for the number of words per line.