Method and system for automatically generating typesetting design file

By extracting and correcting the layout data, combining the adaptive filling and visual analysis of image elements, designing the layout iterative training and self-learning mechanism, the problems of unclear visual effects and low intelligence in traditional typesetting methods are solved, and more efficient and intelligent typesetting design is achieved.

CN119720962AInactive Publication Date: 2025-03-28SHENZHEN JINGYI RUILAN PRINTING CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411702686.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional method of automatically generating typesetting design files has problems such as unclear visual effects of typesetting and low intelligence in typesetting.

Method used

By obtaining the data of the page to be typed, the layout outline format extraction and offset correction are performed, the image element adaptive filling and visual supplement hierarchical analysis is designed, layout iterative training and self-learning mechanisms are finally realized, and the automated logical firmware design is realized.

Benefits of technology

It improves the clarity and intelligence of the visual effects of typesetting, and improves the efficiency and user experience of typesetting work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720962A_ABST
    Figure CN119720962A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of typesetting design, in particular to a method and system for automatically generating a typesetting design file. The method comprises the following steps: performing typesetting contour format extraction on page data to be typeset to obtain typesetting contour format data; performing contour format offset correction on the typesetting contour format data to obtain to-be-typeset page contour correction data; carrying out image element adaptive filling on the typesetting page contour correction data, and carrying out image visual supplementation hierarchical analysis to obtain image visual supplementation hierarchical data; designing a typesetting self-learning mechanism according to the image visual supplementary hierarchical data to obtain a page layout typesetting self-learning mechanism; and performing automatic logic firmware design on the page layout and typesetting self-learning mechanism to obtain typesetting and layout automatic logic firmware. According to the invention, the typesetting design technology is optimized, so that the typesetting design technology is more perfect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of typesetting design, and in particular to a method and system for automatically generating typesetting design files. Background Art

[0002] The method of automatically generating typesetting design files is based on a series of advanced algorithms and tools. By inputting specific content and design parameters, the system can automatically analyze the characteristics of text, images and other elements to generate typesetting files that meet design specifications. The advantage of this method is that it can quickly respond to different design needs, support the processing of large-scale content, and adapt to diverse design styles. For example, in the publishing industry, facing a large number of books, magazines and advertising materials, designers often need to repeat similar typesetting work. The method of automatically generating typesetting design files can greatly reduce this repetitive work and improve work efficiency. In addition, automatic typesetting design technology can also combine artificial intelligence and machine learning technology to analyze historical design data, identify successful typesetting patterns and design trends, and continuously optimize the generation effect. This not only provides a reference for designers, but also helps novice designers get started quickly and reduce the learning curve. At the same time, the method can also automatically adjust the design parameters according to different output media (such as paper publishing, digital media, etc.) to ensure that good visual effects can be maintained in different environments. However, a traditional method of automatically generating typesetting design files has the problems of unclear typesetting visual effects and low typesetting intelligence. Summary of the invention

[0003] Based on this, it is necessary to provide a method and system for automatically generating typesetting design files to solve at least one of the above technical problems.

[0004] To achieve the above object, a method for automatically generating a typesetting design file is provided, the method comprising the following steps:

[0005] Step S1: acquiring data of a page to be typeset; extracting the typesetting outline format of the page to be typeset to obtain typesetting outline format data; performing outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset;

[0006] Step S2: performing page structure layout hierarchical arrangement on the typeset page contour correction data to obtain page content layout hierarchical arrangement data; performing image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; performing image visual supplementary hierarchical analysis based on the image element adaptive filling data to obtain image visual supplementary hierarchical data;

[0007] Step S3: Perform layout iterative training on the page data to be typeset according to the image visual supplementary hierarchical data to obtain page layout iterative training data; perform typesetting self-learning mechanism design on the page layout iterative training data to obtain a page layout typesetting self-learning mechanism;

[0008] Step S4: Automated logic firmware design is performed on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

[0009] The present invention first obtains the data of the page to be typeset, and this process usually involves extracting text, images and other elements from the source file. Next, the obtained data is subjected to typeset outline format extraction, mainly to identify and record the preliminary layout and typeset features of each element on the page. The key to this stage is to ensure that the extracted data can accurately reflect the page design intention and information hierarchy. After the preliminary extraction is completed, the typeset outline format data needs to be offset corrected to correct the deviation caused by format conversion or other factors. This correction process is intended to improve the accuracy and availability of the data, thereby obtaining the contour correction data of the page to be typeset, laying the foundation for subsequent typesetting processing. This series of operations not only improves the integrity of the page data, but also ensures that the subsequent steps can be carried out on an accurate basis, effectively reducing errors and inconsistencies in the typesetting process. The typeset page contour correction data is processed for structured layout. First, the page content is hierarchically arranged, and this process involves rationally organizing and grouping elements such as text and images according to logic and visual effects, so that users can more clearly understand the relationship and importance of information when browsing. Through the design of this layout hierarchy, the user's line of sight can be effectively guided to focus more on important content. After completing the layout, the next step is to perform adaptive filling of image elements. This process aims to automatically adjust the size and position of the image according to the page design requirements and content characteristics to achieve the best visual effect and coordination. In addition, based on the adaptive filling data of image elements, visual supplementary hierarchical analysis can help further optimize the role of images in the overall design and ensure the harmony and hierarchy between visual elements. The goal of this stage is to enhance the visual appeal and information transmission effect of the page, thereby enhancing the user experience. First, the layout of the typesetting page data is iteratively trained according to the image visual supplementary hierarchical data. This process involves optimizing the page layout through multiple iterations using the analyzed visual data. This training not only considers the visual effect of each element, but also the logical flow of information and user experience. By continuously adjusting the layout, the system can learn which element combinations and positions can maximize the efficiency and aesthetics of information transmission, thereby generating page layout iterative training data. This data lays a solid foundation for subsequent automated typesetting. Then, based on these iterative training data, a page layout typesetting self-learning mechanism is designed. This mechanism can automatically adjust the layout strategy according to user feedback and interactive behavior to adapt to different content and user needs. This self-learning mechanism can continuously improve and optimize the layout effect, thereby improving user satisfaction and usage efficiency. The previous self-learning mechanism is transformed into an implementable technical solution, specifically the design of automated logic firmware. This process involves solidifying the layout self-learning mechanism into logic firmware in the form of an algorithm, so that it can run stably in different environments and platforms.By designing automated logic firmware, the system can automatically call the self-learning mechanism to optimize the layout when receiving new content or user instructions without manual intervention. This automated typesetting process not only improves efficiency, but also ensures the consistency and quality of page design. In addition, the automated logic firmware can also integrate a variety of typesetting standards and user preferences, making the system more flexible and adaptable. Finally, through this step, the system realizes comprehensive automation from data analysis to practical application, greatly improving the efficiency and intelligence level of typesetting work, allowing users to focus more on the content itself without worrying about complex typesetting details. Therefore, the present invention is an optimization process made to a traditional method of automatically generating typesetting design files, which solves the problems of unclear typesetting visual effects and low typesetting intelligence in a traditional method of automatically generating typesetting design files, improves the clarity of typesetting visual effects, and improves the typesetting intelligence.

[0010] Preferably, step S1 comprises the following steps:

[0011] Step S11: Obtaining the page data to be typeset;

[0012] Step S12: marking the page coordinate position of the page data to be typeset to obtain page coordinate position data;

[0013] Step S13: extracting the typesetting outline format of the page data to be typeset to obtain typesetting outline format data;

[0014] Step S14: performing contour format offset correction on the typesetting contour format data according to the page coordinate orientation data to obtain contour correction data of the page to be typeset.

[0015] The present invention first needs to obtain the data of the page to be typeset, and this process is the basis of the entire typesetting process. The data of the page to be typeset can come from a variety of sources, such as text files, images, PDF documents, etc. By accurately obtaining these data, it is ensured that the subsequent processing can be based on complete and accurate information. The key to this link is not only to extract the text content, but also to retain the information of multiple elements such as images, tables, and graphics, and ensure that the relative relationship and importance of each element in the page are properly reflected. High-quality data acquisition will directly affect the effect of typesetting, so in this step, it is crucial to use efficient tools and technologies to extract data, which lays a solid foundation for the subsequent typesetting process. Marking the page coordinate orientation of the page data to be typeset is to set an accurate spatial position for each page element. By marking the coordinates of each element, the system can clearly identify the exact position and orientation of the text, image and other content in the page. This process not only helps to maintain the relative relationship between elements, but also provides necessary spatial information for subsequent format extraction and correction. The accuracy of the coordinate marking directly affects the quality of the subsequent typesetting effect, ensuring that the layout of the page content meets the design intent and the user's reading experience is smoother. Through this step, the page structure is clearer and the information hierarchy is straightened out, providing data support for subsequent typesetting optimization. Perform typesetting outline format extraction, which is a process of converting the marked page data into a more structured typesetting format. By analyzing the page coordinate orientation data, the system can identify and extract the typesetting features of each element, including font style, size, color, line spacing and other typesetting attributes. The goal of this stage is to convert the visual design of the page into an operational typesetting format so that subsequent corrections and layout adjustments can be made within a clear framework. The extraction of the typesetting outline format also includes the grouping and hierarchical division of each element. This operation helps to ensure the logical and visual unity of the page content, lays a solid foundation for subsequent processing, and improves the efficiency of typesetting work. Perform outline format offset correction on the typesetting outline format data based on the page coordinate orientation data. The purpose of this correction process is to correct the element offset and dislocation caused by factors such as format conversion and differences in typesetting tools. Through this step, the system can ensure that the position and arrangement of each element on the page meet the expected design requirements. This correction not only improves the overall aesthetics of the page, but also enhances the readability of the information, ensuring that users will not be confused by the misalignment of elements when browsing. The offset correction of the outline format provides a reliable basis for subsequent page layout adjustment and design optimization, ensuring that subsequent steps can be carried out in an accurate and consistent environment, thereby improving typesetting efficiency and quality.

[0016] Preferably, step S2 comprises the following steps:

[0017] Step S21: extracting page content from the layout page data to obtain content data of the page to be layout;

[0018] Step S22: Arranging the page structure layout hierarchical data for the typesetting page contour correction data according to the content data of the page to be typeset, to obtain page content layout hierarchical arrangement data;

[0019] Step S23: adaptively filling the page content data to be typeset with image elements according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data;

[0020] Step S24: performing image visual supplementary hierarchical analysis on the page content layout hierarchical arrangement data based on the image element adaptive filling data to obtain image visual supplementary hierarchical data.

[0021] In step S21, the present invention extracts the page content of the typeset page data. The main goal of this process is to extract valuable information from the acquired page data to form the content data of the page to be typeset. By analyzing and identifying the text, images and other multimedia elements in the page, the system can build the overall information framework of the page. Effective content extraction not only ensures that key information is retained, but also lays the foundation for subsequent layout and typesetting. The importance of this step is that it helps the system understand the core content and structure of the page, so that subsequent processing can be based on accurate information, greatly improving the accuracy and efficiency of typesetting. In step S22, according to the content data of the page to be typeset, the page structure layout hierarchy is arranged for the typesetting page contour correction data. This process involves organizing the extracted content according to logic and importance to form a clear visual hierarchy. By analyzing the relationship between the content, the system can determine which elements need to be displayed first and which can be displayed secondarily. This hierarchical arrangement not only improves the readability of the information, but also helps users quickly find the required information when browsing. The effective execution of this step helps to create a page layout that is both beautiful and in line with user habits, providing a good foundation for subsequent image filling and visual analysis. In step S23, according to the page content layout hierarchical arrangement data, the image element adaptive filling is performed on the page content data to be typeset. The main goal of this process is to ensure that all images and visual elements are reasonably displayed in the layout. By automatically adjusting the size, position and proportion of the image according to the page structure, the system can achieve harmony and consistency between elements. This adaptive filling not only enhances the visual appeal of the page, but also ensures the effective communication of information. Through accurate image filling, the user's visual experience is enhanced, and the overall aesthetics and information transmission effect of the page are optimized, laying the foundation for subsequent visual supplementary analysis. In step S24, based on the image element adaptive filling data, the page content layout hierarchical arrangement data is analyzed for image visual supplementary hierarchy. This process aims to deeply analyze the visual effects and hierarchical relationships of each image element on the page in the overall layout. By evaluating the complementarity and hierarchy of different visual elements, the system can identify which images or elements can better enhance the communication and visual appeal of information. This analysis not only helps to further optimize the page design, but also provides users with a richer visual experience. Finally, through an in-depth understanding and analysis of the visual supplementary hierarchy, the visual coordination and aesthetics of the page content and design are ensured, and the overall user experience is improved.

[0022] Preferably, step S22 includes the following steps:

[0023] Step S221: performing content master-slave hierarchy analysis on the content data of the page to be typeset to obtain content master-slave hierarchy data;

[0024] Step S222: performing content font size level matching on the typesetting page outline correction data according to the content master-slave level data to obtain content font size level matching data;

[0025] Step S223: performing paragraph geometric spacing analysis based on the content font size level matching data and the typesetting page outline correction data to obtain paragraph geometric spacing data;

[0026] Step S224: performing content visual stretchability analysis on the typesetting page outline correction data according to the content font size level matching data and the paragraph geometric spacing data to obtain page content visual stretchability data;

[0027] Step S225: Arrange the page structure layout hierarchically according to the content font size level matching data, the paragraph geometry spacing data and the page content visual stretchability data to obtain page content layout hierarchical arrangement data.

[0028] In step S221, the present invention performs a content master-slave hierarchical analysis on the content data of the typesetting page, aiming to identify the primary and secondary relationship in the page content. By analyzing the theme, importance and function of the text, the system can divide the content into primary information and secondary information, thereby constructing a clear hierarchical structure. This analysis process helps designers to clarify which information should be highlighted and which can be appropriately simplified or hidden. By forming the content master-slave hierarchical data, the subsequent typesetting and layout will be more in line with the user's reading habits, improve the information communication effect, and make the entire page layout more logical and easy to understand. In step S222, the typesetting page contour correction data is matched with the content font size level according to the content master-slave hierarchical data. This process makes the main information more eye-catching by using appropriate font sizes for different levels of content, while the secondary information is presented in a smaller font size to maintain a visual sense of balance. This font size level matching not only improves the readability of the information, but also effectively guides the user's attention so that it naturally focuses on key information. By scientifically selecting the font size, the typesetting effect is optimized, ensuring that users can quickly grasp the core content of the page when browsing, and enhancing the overall reading experience. In step S223, paragraph geometric spacing analysis is performed based on the content font size level matching data and the typesetting page contour correction data. This analysis aims to optimize the spatial relationship between paragraphs and ensure that the visual separation between different paragraphs is both clear and comfortable. By calculating the upper and lower spacing of paragraphs, the system can achieve a reasonable arrangement of text so that users will not feel crowded or uncomfortable when reading. The effective execution of this step can significantly improve the overall aesthetics of the page, enhance the orderliness and logic of information, create a more pleasant reading environment for users, and further improve the attractiveness of the page content. In step S224, the typesetting page contour correction data is analyzed for content visual stretchability based on the content font size level matching data and the paragraph geometric spacing data. The core of this analysis is to evaluate the visual stretchability of the page content and ensure that the distribution of text on the page is both uniform and has a certain breathing space. Through this visual stretchability analysis, the system can identify the existing visual oppression and discomfort, and adjust the layout in time to achieve the best visual effect. This not only improves the readability of the information, but also makes the page more attractive, allowing users to obtain information in a comfortable environment, thereby improving the overall user experience. In step S225, the page structure layout is arranged hierarchically according to the content font size level matching data, paragraph geometry spacing data, and page content visual stretch data. This process integrates the data extracted in the previous steps to form the final page layout. By combining different levels of content with appropriate spacing, the system can create a page structure that is both beautiful and functional. This layout not only improves the readability of the information, but also ensures that the user's attention can be focused on important content, forming a good reading experience.Ultimately, this comprehensive layout design makes the page more logical and hierarchical, providing users with clear and effective information display.

[0029] Preferably, step S224 includes the following steps:

[0030] Calculate the average font size difference of different contents on the content font size level matching data to obtain the content font size average difference data;

[0031] Perform font size morphological perception fluency analysis on the typesetting page outline correction data according to the paragraph geometric spacing data and the content font size average difference data to obtain font size morphological perception fluency data;

[0032] According to the font size and shape perception fluency data, the page margin white space effect is perceived on the typesetting page contour correction data to obtain the page margin white space effect data;

[0033] Based on the font size and shape perception fluency data and the page margin white space effect data, the visual stretchability analysis of the content is performed to obtain the visual stretchability data of the page content.

[0034] In the first sub-step of step S224 of the present invention, the font size mean difference data of different contents is calculated by performing font size mean difference calculation on the content font size level matching data. This process aims to measure the change range of font sizes between different contents and analyze their consistency and difference. The calculation of font size mean difference provides an important basis for subsequent typesetting and helps to identify the existing font size imbalance problem. The effective execution of this step can ensure that a reasonable sense of hierarchy is formed visually between different contents in the page, improve the overall readability, avoid visual fatigue caused by uneven font sizes, and thus create a more comfortable reading experience for users. In this sub-step, the typesetting page contour correction data is analyzed for font size morphological perception fluency based on the paragraph geometric spacing data and the content font size mean difference data. The main purpose of this analysis is to evaluate the presentation effect of different font sizes on the page and its impact on reading fluency. By comprehensively considering the size, shape and geometric spacing between paragraphs of the font size, the system can identify visual impairments and fluency problems. This analysis not only helps designers adjust the font size and paragraph spacing to make the visual experience of the page smoother, but also effectively improves the efficiency of information transmission, ensuring that users will not be troubled by visual factors when reading, thereby optimizing the overall reading process. Based on the font size morphological perception fluency data, the page margin white space effect perception is performed on the typesetting page contour correction data. This process aims to analyze the page white space effect, that is, the spatial relationship between the content and the edge of the page. Good white space can not only improve the aesthetics of the page, but also enhance the prominence of the content. Through effective margin settings, users can get a better visual experience when reading and avoid reading difficulties caused by overcrowding of information. The successful implementation of this step ensures proper use of space in typesetting, making the overall layout more harmonious and enhancing the clarity and readability of information. Content visual stretch analysis is performed based on font size morphological perception fluency data and page margin white space effect data. This analysis combines the fluency of font size and white space effect to evaluate the visual stretch of the entire page content. By comparing the spacing, layout and relationship between different elements and the surrounding space, the system can determine whether the page provides users with enough "breathing space". Effective visual stretch not only enhances the user's reading comfort, but also increases the attractiveness of information. The results of this analysis provide guidance for the final page design, making the overall layout not only beautiful but also clear in function, which helps to improve the user's overall reading experience.

[0035] Preferably, step S23 includes the following steps:

[0036] Step S231: extracting the required definition of image content display from the content data of the page to be typeset, and obtaining the required definition of the image content;

[0037] Step S232: calculating the image space ratio of the content data of the page to be typeset according to the required definition of the image content, and obtaining image space ratio data;

[0038] Step S233: performing image content color loss analysis on the content data of the page to be typeset according to the required clarity of the image content and the image space ratio data, to obtain image content color loss data;

[0039] Step S234: performing typesetting background color compensation based on the image content color loss data to obtain image color loss background color compensation data;

[0040] Step S235: Adaptively fill the image elements of the page content data to be typeset according to the image space proportion data and the image color loss background color compensation data to obtain image element adaptive filling data.

[0041] The present invention extracts the required clarity of image content display from the content data of the page to be typeset, and the system can clearly identify the optimal clarity of image display. This process ensures that the image can maintain the best visual effect and detail presentation under different display conditions. Extracting the required clarity provides a basis for subsequent image processing, helps to optimize image quality, and reduces blur and distortion. This not only improves the user's visual experience, but also ensures the accurate transmission of information, thereby enhancing the professionalism and attractiveness of the overall page. According to the required clarity of the image content, the image space ratio of the content data of the page to be typeset is calculated. The core of this step is to evaluate the space ratio of the image in the page to ensure the balance between the image and the text and other elements. By reasonably calculating the image space ratio, the designer can optimize the page layout so that the image can not only effectively convey information, but also form a good visual coordination with other content. This process helps to improve the overall aesthetics and readability of the page, ensuring that users do not feel that the information is too crowded or chaotic when browsing. Based on the required clarity of the image content and the image space ratio data, the image content color loss analysis is performed. This analysis is intended to evaluate the color distortion and information loss that occur in the image during the typesetting process, thereby ensuring the authenticity and visual appeal of the image. By quantifying the color loss, designers can identify the colors and elements that need to be adjusted to achieve a more realistic and vivid visual effect. The effective execution of this step helps to ensure that the images on the page meet the expected color performance, enhance the user's visual experience, and improve the accuracy of information transmission. Compensate the background color of the layout based on the color loss data of the image content. This process aims to offset the loss of color display of the image by adjusting the background color of the layout background. By compensating the background color, designers can improve the contrast and color saturation of the image, making the image more prominent and natural in the overall layout. This not only improves the visual effect of the image, but also enhances the overall harmonious beauty of the page, ensuring that users have a more pleasant visual experience during browsing. Based on the image space ratio data and the image color loss background color compensation data, the image elements are adaptively filled for the layout page content data. This process aims to ensure that the image elements can be reasonably filled and adjusted according to their space ratio and color requirements. Through adaptive filling, the system can optimize the presentation of the image so that it occupies the appropriate space on the page while maintaining good color and clarity. This not only enhances the visual appeal of the page, but also ensures the integrity and accurate communication of the information, thereby improving the user's overall reading experience.

[0042] Preferably, step S234 includes the following steps:

[0043] Perform highlight / shadow range segmentation on the image content color loss data to obtain the image highlight / shadow range data;

[0044] Performing color channel distortion analysis on the image content color loss data according to the image highlight / shadow range data to obtain the image color channel distortion data;

[0045] Performing color channel cross disorder analysis on the image color channel distortion data to obtain color channel cross disorder data;

[0046] Performing band-shaped pseudo-color deviation analysis on the image color channel distortion data according to the color channel cross disorder data to obtain band-shaped pseudo-color deviation data;

[0047] Based on the color channel cross disorder data and the banded pseudo color cast data, the image highlight / shadow range data is typeset with background color compensation to obtain image color loss background color compensation data.

[0048] The present invention performs highlight and shadow range segmentation on the image content color loss data, and the system can effectively identify the distribution of light and dark areas in the image. This process provides an important basis for subsequent color adjustment, ensuring that both highlight and shadow parts can receive reasonable attention and processing. Accurate range segmentation helps to improve the performance of the image in light and dark changes, making the image appear more three-dimensional and realistic in typesetting. The successful implementation of this process not only improves the visual quality of the image, but also lays a good foundation for optimizing the overall page design. Next, based on the image highlight / shadow range data, the image content color loss data is subjected to color channel distortion analysis. The purpose of this step is to evaluate the performance of each color channel (such as red, green, and blue) of the image in the highlight and shadow areas, and identify the existing color distortion phenomenon. By quantifying these distortions, designers can more clearly understand which colors deviate in specific areas, thereby providing data support for subsequent color correction. This analysis can ensure that the image still maintains color accuracy and vividness under various lighting conditions, and improve the user's visual experience. The image color channel distortion data is subjected to color channel cross-disorder analysis. This analysis focuses on the interaction between different color channels and evaluates their coordination and consistency in the image. By identifying the cross-disorder of color channels, designers can find the root cause of color deviation and make targeted adjustments. This process helps maintain the color stability of the image, making the color performance more natural and improving the user's visual experience. Effective cross-analysis ensures that the color coordination and beauty of the image are fully reflected when the image is laid out. Based on the color channel cross-disorder data, the image color channel distortion data is analyzed for banding pseudo-color deviation. This analysis aims to identify the banding pseudo-color phenomenon in the image, that is, the visual inconsistency caused by color distortion in certain areas. By analyzing these banding deviations in detail, designers can take corresponding corrective measures to make the color distribution of the image more uniform and natural. This process not only optimizes the overall performance of the image, but also helps ensure the accuracy of information communication and improves the user's visual enjoyment when browsing. Based on the color channel cross-disorder data and the banding pseudo-color deviation data, the image highlight / shadow range data is compensated for the layout background color. This step aims to compensate for the loss of color performance in the image by adjusting the background color, ensuring that the highlights and shadows can be harmoniously integrated into the overall design. Through precise compensation, the color performance of the image is more vivid and natural, thereby enhancing the visual appeal. This process not only improves the overall quality of the image, but also ensures the unity and aesthetics of the page design, ultimately creating a more pleasant reading experience for users.

[0049] Preferably, step S3 comprises the following steps:

[0050] Step S31: normalizing the image visual supplementary hierarchical data to obtain image visual supplementary normalized data;

[0051] Step S32: performing layout iteration training on the page data to be typeset according to the image visual supplement normalization data and the page content layout hierarchy arrangement data to obtain page layout iteration training data;

[0052] Step S33: Design a typesetting self-learning mechanism for the page layout iterative training data to obtain a page layout typesetting self-learning mechanism.

[0053] The present invention normalizes the hierarchical data of visual supplementation of images, and the system can convert data of different sources and scales into a unified standard format. This process ensures the consistency of data, so that subsequent processing and analysis can be carried out on the same basis. Normalization not only improves the comparability of data, but also effectively reduces the error caused by data deviation, thereby enhancing the accuracy of the model. This lays a good foundation for subsequent steps, so that the visual supplement effect of images can be more effectively improved, and finally provides users with a better visual experience. According to the normalized data of visual supplementation of images and the hierarchical arrangement data of page content layout, layout iteration training is performed on the data of typesetting pages. The core of this process is to optimize the page layout through continuous iteration to ensure the coordination and beauty between different elements. Using normalized data, the system can identify the best arrangement of elements, and then adjust the position and proportion of each component. This dynamic training mechanism not only improves the aesthetics of the page, but also ensures the clear communication of information, so that users can feel a more fluent and pleasant experience when browsing. Through repeated iterative optimization, the page layout finally generated will have higher user-friendliness. A typesetting self-learning mechanism is designed for the iterative training data of page layout. The introduction of this mechanism enables the system to perform intelligent learning based on historical layout data and user interaction feedback, thereby realizing an automated optimization process. Through self-learning, the system can identify which layout forms are most popular with users, and continuously adjust and improve future layout plans accordingly. This adaptive learning not only improves the efficiency of typesetting, but also enables page design to dynamically match user needs, further improving user experience. Ultimately, the self-learning mechanism of page layout will achieve higher flexibility and intelligence, and promote the advancement of typesetting design.

[0054] Preferably, step S33 includes the following steps:

[0055] Step S331: collecting page layout errors on the page layout iteration training data to obtain page layout error data;

[0056] Step S332: extracting error multi-dimensional features from the page layout error data to obtain error multi-dimensional feature data;

[0057] Step S333: using a decision tree algorithm to summarize the error nonlinear relationship of the error multidimensional feature data to obtain error nonlinear relationship summary data;

[0058] Step S334: performing error correction processing on the page layout iteration training data according to the error nonlinear relationship summary data to obtain page layout iteration error correction data;

[0059] Step S335: Design a typesetting self-learning mechanism for the page layout iteration error correction data to obtain a page layout typesetting self-learning mechanism.

[0060] The present invention is crucial in the process of collecting page layout errors for page layout iterative training data. By systematically collecting various types of layout errors, the design team can gain a comprehensive insight into the current layout effect. These error data can not only reflect the feedback of users during use, but also reveal potential design defects and inconsistencies. By quantifying and classifying these errors, subsequent analysis and optimization work will be more accurate, thus laying a solid foundation for improving the quality of page layout and user experience. Error multidimensional feature extraction is performed on the collected page layout error data. The key to this step is to identify and extract multidimensional features related to layout errors, such as position deviation, element proportion imbalance and visual inconsistency. By systematically organizing these features, designers can have a deeper understanding of the various factors that affect the page layout effect. This feature extraction not only provides rich data dimensions for subsequent analysis, but also enhances the pertinence of error correction, so that the adjustment plan can more effectively solve practical problems. The decision tree algorithm is used to summarize the error nonlinear relationship of the error multidimensional feature data. This process can deeply explore the complex relationship between different error features, especially the nonlinear relationship. By building a decision tree model, the system can effectively identify how each feature affects each other and summarize the key factors that affect the layout quality. Such analysis not only improves the understanding of the causes of errors, but also provides a scientific basis for subsequent correction solutions. This data-driven approach ensures the accuracy and effectiveness of the optimization process, thereby promoting the improvement of the overall design. According to the nonlinear relationship of the error, the data is summarized and the error correction processing is performed on the iterative training data of the page layout. The goal of this step is to eliminate the layout errors found in the previous iterations through scientific adjustments. Using the previously collected and analyzed data, the design team can make targeted corrections to ensure the reasonable distribution and visual coordination of page elements. After this treatment, the overall quality of the page layout is improved, and the user experience is smoother when browsing. In addition, the corrected data will provide a more accurate basis for subsequent iterations, making the entire optimization process form a virtuous circle. Based on the iterative error correction data of the page layout, the typesetting self-learning mechanism is designed. By building such a self-learning mechanism, the system can continuously improve itself based on the historical layout optimization experience. This mechanism allows the system to make intelligent adjustments based on the new data collected, and gradually form a "knowledge base" of the best typesetting solution. Over time, this mechanism can automatically identify changes in user preferences and trends, and improve the flexibility and adaptability of the layout. This self-learning ability not only improves typesetting efficiency, but also ensures the forward-looking nature of the design, allowing the user experience to be continuously optimized.

[0061] Preferably, the present invention also provides a system for automatically generating typesetting design files, which is used to execute the method for automatically generating typesetting design files as described above, and the system for automatically generating typesetting design files comprises:

[0062] The outline format offset correction module is used to obtain the data of the page to be typeset; extract the typesetting outline format of the page to be typeset to obtain the typesetting outline format data; perform outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset;

[0063] The image visual supplement hierarchical analysis module is used to perform page structure layout hierarchical arrangement on the typesetting page contour correction data to obtain page content layout hierarchical arrangement data; perform image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; perform image visual supplement hierarchical analysis based on the image element adaptive filling data to obtain image visual supplement hierarchical data;

[0064] The typesetting self-learning mechanism design module is used to perform layout iterative training on the typesetting page data according to the image visual supplementary hierarchical data to obtain the page layout iterative training data; the typesetting self-learning mechanism is designed on the page layout iterative training data to obtain the page layout typesetting self-learning mechanism;

[0065] The automated logic firmware design module is used to perform automated logic firmware design on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

[0066] The beneficial effects of the present invention are: BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A schematic diagram of the steps of a method for automatically generating a typesetting design file;

[0068] Figure 2 for Figure 1 Detailed implementation steps of step S2 in FIG.

[0069] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0070] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0071] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0072] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0073] To achieve this, please refer to Figure 1 to Figure 2 , a method for automatically generating a typesetting design file, the method comprising the following steps:

[0074] Step S1: acquiring data of a page to be typeset; extracting the typesetting outline format of the page to be typeset to obtain typesetting outline format data; performing outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset;

[0075] Step S2: performing page structure layout hierarchical arrangement on the typeset page contour correction data to obtain page content layout hierarchical arrangement data; performing image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; performing image visual supplementary hierarchical analysis based on the image element adaptive filling data to obtain image visual supplementary hierarchical data;

[0076] Step S3: Perform layout iterative training on the page data to be typeset according to the image visual supplementary hierarchical data to obtain page layout iterative training data; perform typesetting self-learning mechanism design on the page layout iterative training data to obtain a page layout typesetting self-learning mechanism;

[0077] Step S4: Automated logic firmware design is performed on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

[0078] In the embodiment of the present invention, reference Figure 1 The above is a schematic flow chart of the steps of a method for automatically generating a typesetting design file according to the present invention. In this example, the method for automatically generating a typesetting design file includes the following steps:

[0079] Step S1: acquiring data of a page to be typeset; extracting the typesetting outline format of the page to be typeset to obtain typesetting outline format data; performing outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset;

[0080] In an embodiment of the present invention, the data of the page to be typeset is first obtained, which mainly comes from the text and image information uploaded by the user. By setting a dedicated data receiving interface, the page content is accurately captured using a data extraction algorithm. This process includes OCR (optical character recognition) processing of the text to convert the scanned text into an editable format. Next, the typeset outline format extraction is implemented. The outline of the page is extracted using an edge detection algorithm (such as the Canny algorithm) to form typeset outline format data. This data contains the position information and size of each element (such as a title, paragraph, image). Finally, the outline format offset correction is performed, and the extracted outline is ensured to be consistent with the actual structure of the page through geometric transformation (such as affine transformation), and finally the outline correction data of the page to be typeset is generated.

[0081] Step S2: performing page structure layout hierarchical arrangement on the typeset page contour correction data to obtain page content layout hierarchical arrangement data; performing image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; performing image visual supplementary hierarchical analysis based on the image element adaptive filling data to obtain image visual supplementary hierarchical data;

[0082] In an embodiment of the present invention, the typeset page contour correction data is deeply analyzed. First, a tree structure algorithm is used to arrange the page structure layout hierarchically according to the hierarchical relationship of the elements. The algorithm classifies the elements according to the logical structure and visual hierarchy of the text to form a clear hierarchical relationship. Next, based on the page content layout hierarchical arrangement data, adaptive filling of image elements is implemented. By using content-aware filling technology, the missing parts are filled with image elements that are coordinated with the surrounding content according to the style and color of the surrounding elements. This process involves a regional growing algorithm in image processing to ensure the continuity of the filled area with the original content. Finally, an image visual supplementary hierarchical analysis is performed, and an image segmentation algorithm (such as K-means clustering) is used to analyze the elements of each visual level, and finally generate image visual supplementary hierarchical data.

[0083] Step S3: Perform layout iterative training on the page data to be typeset according to the image visual supplementary hierarchical data to obtain page layout iterative training data; perform typesetting self-learning mechanism design on the page layout iterative training data to obtain a page layout typesetting self-learning mechanism;

[0084] In an embodiment of the present invention, layout iterative training is performed on the data for typeset pages based on image visual supplementary hierarchical data. In the specific implementation process, the layout target is first defined, and multiple layout schemes are generated by establishing an optimization model based on a genetic algorithm. This process combines operations such as crossover and mutation to gradually optimize the layout to achieve the best visual effect. After iterative training, page layout iterative training data is obtained. Subsequently, a self-learning mechanism is applied to design a typesetting self-learning mechanism. By inputting feedback data, the algorithm parameters are continuously adjusted so that it can self-optimize in multiple iterations to improve the typesetting effect. The mechanism finally formed has the ability to automatically adapt to different page types, and generates a page layout typesetting self-learning mechanism.

[0085] Step S4: Automated logic firmware design is performed on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

[0086] In an embodiment of the present invention, the design of the page layout typesetting self-learning mechanism realizes the automation logic firmware. First, the functional requirements of the firmware are defined, including the specific parameters of input, processing and output. Next, a modular design method is adopted to independently develop the different functional modules of the mechanism. For example, the input module is responsible for receiving the data to be typeset, the processing module is responsible for executing the self-learning mechanism and generating the layout plan, and the output module converts the result into the final typesetting design file. Each module uses a programmable logic controller (PLC) for logic control to ensure the coordinated operation of each part. Finally, the stability and efficiency of the firmware are verified through integrated testing, and the typesetting layout automation logic firmware is finally obtained. This firmware can quickly and accurately generate typesetting files that meet the design requirements in practical applications.

[0087] Preferably, step S1 comprises the following steps:

[0088] Step S11: Obtaining the page data to be typeset;

[0089] Step S12: marking the page coordinate position of the page data to be typeset to obtain page coordinate position data;

[0090] Step S13: extracting the typesetting outline format of the page data to be typeset to obtain typesetting outline format data;

[0091] Step S14: performing contour format offset correction on the typesetting contour format data according to the page coordinate orientation data to obtain contour correction data of the page to be typeset.

[0092] In an embodiment of the present invention, the acquisition of the data of the page to be typeset is implemented. First, a data receiving interface is set to support input in multiple formats, such as PDF, JPG, and DOCX. For each format, a special parsing algorithm is used to extract data. For image format, optical character recognition (OCR) technology is used to convert text information in the image into editable text. OCR technology improves recognition accuracy through preprocessing steps (such as image denoising and binarization). For text format, a text parsing algorithm is applied to directly extract text content, and relevant format information (such as font, size, and style) is obtained at the same time. In this process, it is ensured that all data is saved in a structured manner for subsequent processing and analysis. The data of the page to be typeset that is finally generated will include text content, image elements and their attributes. According to the data of the page to be typeset, the coordinates and orientations of each element are marked. Image processing technology is used, combined with an edge detection algorithm (such as the Canny algorithm), to identify the boundaries of each element in the page. Through the extracted contour, the coordinate position of each element is obtained using a geometric calculation method (such as polar coordinate conversion). In this process, the text and image elements are marked as different coordinate points for subsequent layout design. During the marking process, page coordinate orientation data is formed to record the specific coordinates of each element and their relative relationship, laying the foundation for subsequent layout planning. The final generated page coordinate orientation data will be saved in a structured format to facilitate calling in subsequent steps. Extract the layout outline format of the page data to be typed. First, apply image segmentation technology to identify and classify the various visual elements in the page to be typed. Using a region-based segmentation algorithm, the page is first divided into multiple small areas, and then each area is analyzed to extract the outlines of text boxes, image boxes and other elements. Next, morphological operations (such as expansion and corrosion) are used to further clarify the outline so that the boundaries of each element are clearer. After the outline extraction is completed, the generated layout outline format data will include the outline coordinates and size information of each element, and will be stored in a vector graphics format to facilitate subsequent processing and use. According to the page coordinate orientation data, the layout outline format data is corrected for outline format offset. First, the page coordinate orientation data and the layout outline format data are compared to identify the offset elements. Use geometric transformation methods (such as affine transformation) to correct these offset elements to ensure that their positions are consistent with the predetermined layout. By calculating the offset of each element, applying operations such as translation, rotation, and scaling, the position and angle of each element are gradually adjusted. In this process, interpolation algorithms (such as bilinear interpolation) are applied to smooth the corrected elements to ensure a natural and smooth visual effect. Ultimately, the generated outline correction data of the page to be typeset will contain the precise position and format information of all elements, laying a solid foundation for subsequent typesetting design.

[0093] Preferably, step S2 comprises the following steps:

[0094] Step S21: extracting page content from the layout page data to obtain content data of the page to be layout;

[0095] Step S22: Arranging the page structure layout hierarchical data for the typesetting page contour correction data according to the content data of the page to be typeset, to obtain page content layout hierarchical arrangement data;

[0096] Step S23: adaptively filling the page content data to be typeset with image elements according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data;

[0097] Step S24: performing image visual supplementary hierarchical analysis on the page content layout hierarchical arrangement data based on the image element adaptive filling data to obtain image visual supplementary hierarchical data.

[0098] As an example of the present invention, refer to Figure 2 As shown, in this example, step S2 includes:

[0099] Step S21: extracting page content from the layout page data to obtain content data of the page to be layout;

[0100] In an embodiment of the present invention, firstly, a comprehensive content extraction is performed on the typeset page data. Using text recognition technology, each text block and image area is identified by segmenting the marked page elements. For the text part, a rule-based parsing method is adopted to analyze the structure and attributes (such as font, size and color) of the text. During the parsing process, regular expression matching and document structure analysis are applied to ensure the integrity and accuracy of the text content. For image elements, image processing technology (such as edge detection and contour extraction) is used to extract the features of the image. Finally, after sorting, the generated content data of the page to be typeset will include all the identified text and image information, and will be saved in a structured manner for use in subsequent steps.

[0101] Step S22: Arranging the page structure layout hierarchical data for the typesetting page contour correction data according to the content data of the page to be typeset, to obtain page content layout hierarchical arrangement data;

[0102] In an embodiment of the present invention, the layout level of the layout page contour correction data is arranged according to the content data of the page to be typeset. First, based on the extracted content data, a hierarchical structure of elements is established, and the content is classified using a tree structure algorithm. In this process, the page elements are divided according to logical and visual levels, for example, titles, subtitles, paragraphs, and images. Then, the layout algorithm in graphics (such as the intensity balance layout algorithm) is used to achieve the spatial allocation of elements to ensure that the proportions and contrasts between different levels are clear. After the hierarchical arrangement, the page content layout hierarchical arrangement data is generated, and the specific position and relative relationship of each element in the page are recorded, laying the foundation for subsequent filling and visual analysis.

[0103] Step S23: adaptively filling the page content data to be typeset with image elements according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data;

[0104] In an embodiment of the present invention, adaptive filling of image elements is performed on the content data of the page to be typeset according to the page content layout hierarchical arrangement data. The content-aware filling technology is used to analyze the surrounding environment of each element in the layout data to ensure that the filling element is consistent with the style, color and texture of the surrounding content. In the specific implementation process, the blank area to be filled is first identified, and the boundary of the filling area is determined using an image processing algorithm based on region growth. Subsequently, suitable image elements are generated through texture synthesis technology to ensure that they are visually harmoniously matched with the original content. Finally, the image element adaptive filling data obtained will contain all the element information after filling to ensure a complete visual effect in the layout.

[0105] Step S24: performing image visual supplementary hierarchical analysis on the page content layout hierarchical arrangement data based on the image element adaptive filling data to obtain image visual supplementary hierarchical data.

[0106] In an embodiment of the present invention, an image visual supplementary hierarchical analysis is performed on the page content layout hierarchical arrangement data based on the image element adaptive filling data. First, the image segmentation technology is applied to re-analyze the filled image elements to identify their visual weight in the overall layout. The visual characteristics of each element and its relative position in the page are analyzed through image feature extraction technology (such as HOG features and SIFT features). Then, the visual elements are grouped using a clustering algorithm (such as K-means clustering) to form visual effects at different levels. Finally, the generated image visual supplementary hierarchical data will record the importance of each element in the visual hierarchy and its corresponding layout adjustment suggestions to provide guidance for subsequent typesetting.

[0107] Preferably, step S22 includes the following steps:

[0108] Step S221: performing content master-slave hierarchy analysis on the content data of the page to be typeset to obtain content master-slave hierarchy data;

[0109] Step S222: performing content font size level matching on the typesetting page outline correction data according to the content master-slave level data to obtain content font size level matching data;

[0110] Step S223: performing paragraph geometric spacing analysis based on the content font size level matching data and the typesetting page outline correction data to obtain paragraph geometric spacing data;

[0111] Step S224: performing content visual stretchability analysis on the typesetting page outline correction data according to the content font size level matching data and the paragraph geometric spacing data to obtain page content visual stretchability data;

[0112] Step S225: Arrange the page structure layout hierarchically according to the content font size level matching data, the paragraph geometry spacing data and the page content visual stretchability data to obtain page content layout hierarchical arrangement data.

[0113] In the embodiment of the present invention, the content data of the page to be typeset is subjected to content master-slave hierarchical analysis. The analysis method based on the text structure is adopted to identify the main information and the secondary information in the content. First, the text is segmented by using the word segmentation algorithm through natural language processing technology to divide it into different phrases. Then, the frequency of occurrence of each phrase is calculated by using the frequency analysis method to determine its importance in the overall content. By constructing a master-slave relationship graph, the main content node is connected with the subordinate content node by using the concepts of nodes and edges in graph theory to form a hierarchical structure. The content master-slave hierarchical data finally generated will be saved in a tree structure to clarify the master-slave relationship, providing a basis for subsequent font size matching and paragraph typesetting. The content font size hierarchical matching is performed on the typesetting page outline correction data according to the content master-slave hierarchical data. First, the content master-slave hierarchical data is parsed to extract the hierarchical information of each content node. Then, the font size standard of each hierarchical content is set by using the font size normalization rule. For example, for the main title, a larger font size is set; for the subtitle and paragraph, a relatively small font size is used. Next, the extracted hierarchical information is compared with the typesetting page contour correction data, and the appropriate font size is applied to the corresponding content node by using the direct mapping method. In this process, the normalization method is used to ensure that the font size differences between different content levels are reasonable and consistent. The final generated content font size hierarchical matching data will contain the specific font size information of each content node, laying the foundation for the geometric spacing analysis of paragraphs. First, paragraph geometric spacing analysis is performed based on the content font size hierarchical matching data and the typesetting page contour correction data. Using geometric measurement technology, each paragraph and its interval are analyzed. First, the coordinate position and height information of each paragraph are extracted. Then, the geometric spacing between each paragraph is calculated, and the spacing between adjacent paragraphs is determined using the difference formula, and the influence of font size on the spacing is considered. The least squares method is used to fit the optimal spacing of paragraphs with different font sizes, so as to obtain the recommended spacing for each paragraph. By generating paragraph geometric spacing data, the reasonable visual distribution of paragraphs is ensured, providing a quantitative basis for the subsequent visual stretch analysis. Based on the content font size hierarchical matching data and paragraph geometric spacing data, the typesetting page contour correction data is analyzed for content visual stretch. First, a content stretch model is constructed, combining font size, spacing, and element position, and the visual stretch of each element is determined through a weighted algorithm. In the specific implementation process, principal component analysis (PCA) is used to map the visual features of each element to a low-dimensional space to quantify its visual stretch. Next, for the overall layout of the typeset page, the visual crowding and comfort of the content elements are evaluated, and the corresponding visual stretch score is generated. The final page content visual stretch data will contain the visual stretch index of each element, providing a reference for the subsequent layout hierarchy arrangement. The page structure layout hierarchy is arranged according to the content font size hierarchy matching data, paragraph geometry spacing data, and page content visual stretch data.First, integrate the above three data to build a comprehensive layout model. Through the weighted aggregation method, the font size, paragraph spacing and visual stretch indicators are comprehensively evaluated to determine the final layout position of each element. In the specific operation, the priority sorting algorithm is applied to arrange the elements in a hierarchy according to the comprehensive score. Ensure that the main content is displayed first, and the secondary content is placed appropriately to maintain a good visual balance. The generated page content layout hierarchy arrangement data will record the specific position, hierarchical relationship and corresponding attribute information of each element in the final layout, providing a complete basis for automatically generating typesetting design files.

[0114] Preferably, step S224 includes the following steps:

[0115] Calculate the average font size difference of different contents on the content font size level matching data to obtain the content font size average difference data;

[0116] Perform font size morphological perception fluency analysis on the typesetting page outline correction data according to the paragraph geometric spacing data and the content font size average difference data to obtain font size morphological perception fluency data;

[0117] According to the font size and shape perception fluency data, the page margin white space effect is perceived on the typesetting page contour correction data to obtain the page margin white space effect data;

[0118] Based on the font size and shape perception fluency data and the page margin white space effect data, the visual stretchability analysis of the content is performed to obtain the visual stretchability data of the page content.

[0119] In an embodiment of the present invention, the content font size level matching data is analyzed to calculate the average font size difference of different contents. The specific method includes statistically analyzing the font sizes of the contents at each level, first collecting the font size value of each content element and constructing a data set. Then, the average font size of each content level is calculated using the mean and variance calculation method. Next, the difference between each content level and the overall average font size is calculated, and the font size average difference data of each content level is obtained using the formula: average difference = |font size-average font size|. Through this process, the font size change amplitude of each content level can be clearly identified, which is convenient for subsequent morphological perception and fluency analysis. Finally, the formed content font size average difference data will be recorded in a structured form for use in subsequent steps. Based on the paragraph geometric spacing data and the content font size average difference data, the typesetting page outline correction data is analyzed for font size morphological perception fluency. First, for each paragraph of the typesetting page, the relationship between the paragraph spacing and the font size average difference is calculated. The specific method is: the geometric spacing of each paragraph is paired with the corresponding font size average difference to construct a data set. Subsequently, the fluency analysis algorithm is used to quantify the visual coherence between paragraphs, and the paragraph spacing and the average font size difference are combined by the weighted average method to form a fluency score. The scoring formula is: Fluency = paragraph spacing / (average font size difference+1) to avoid zero division errors. The font size morphological perception fluency data finally generated will reflect the visual fluency of each paragraph in the overall layout, providing a basis for the subsequent perception of the blank effect. Using the font size morphological perception fluency data, the page margin blank effect is perceived for the typesetting page contour correction data. First, the margin information of the typesetting page is extracted, and the specific values ​​of each margin are determined. Then, combined with the font size morphological perception fluency data, the relative position relationship between the margin and the content is analyzed, and the margin blank effect is calculated by the proportional analysis method. The specific method is to define the scoring criteria for the blank effect, and the formula is: Blank effect = Margin width / (font size morphological perception fluency+1). This formula ensures that when the fluency is high, the weight of the blank effect is enhanced, thereby better reflecting the overall visual effect of the page. Finally, the page margin white space effect data obtained will record the visual effect score of each margin in detail, providing necessary information for the subsequent visual stretch analysis. Based on the font size and morphology perception fluency data and the page margin white space effect data, the content visual stretch analysis is performed. First, a comprehensive evaluation model is constructed to integrate the font size and morphology perception fluency with the margin white space effect to determine the visual stretch of each content element. The specific method includes using a weighted synthesis method to define the weight of each indicator, for example, fluency and white space effect each account for 50% of the weight. The formula: visual stretch = (fluency × weighted fluency) + (white space effect × weighted white space effect) is used to achieve the fusion calculation of indicators. Subsequently, all content elements are scored and sorted according to the scoring results to determine the most stretchable content elements.The final generated visual stretch data of the page content will provide a quantitative basis for the optimization of the layout, ensuring that the content presents an ideal visual stretch state.

[0120] Preferably, step S23 includes the following steps:

[0121] Step S231: extracting the required definition of image content display from the content data of the page to be typeset, and obtaining the required definition of the image content;

[0122] Step S232: calculating the image space ratio of the content data of the page to be typeset according to the required definition of the image content, and obtaining image space ratio data;

[0123] Step S233: performing image content color loss analysis on the content data of the page to be typeset according to the required clarity of the image content and the image space ratio data, to obtain image content color loss data;

[0124] Step S234: performing typesetting background color compensation based on the image content color loss data to obtain image color loss background color compensation data;

[0125] Step S235: Adaptively fill the image elements of the page content data to be typeset according to the image space proportion data and the image color loss background color compensation data to obtain image element adaptive filling data.

[0126] In the embodiment of the present invention, the clarity required for displaying the image content is first extracted from the content data of the page to be typeset. The specific operation includes analyzing the visual requirements and detail performance of each image content, and evaluating it according to the clarity standard. The clarity standard is composed of multiple factors such as resolution, contrast and detail sharpness. Through the image processing algorithm, the resolution of the image is first calculated, wherein the detail intensity can be obtained by extracting the edge information of the image by the Laplace operator. Then, in combination with the contrast analysis, the histogram equalization method is used to enhance the contrast of the image to ensure that the required clarity can be achieved under different display conditions. Finally, the required clarity data of the extracted image content will provide an important basis for the subsequent steps. According to the required clarity of the image content, the image space proportion is calculated for the content data of the page to be typeset. First, the actual occupied space of each image element in the typesetting page is determined, which can be calculated by measuring the height and width of each image element to obtain the area occupied by it. Then, the space proportion formula is used to calculate the proportion of each image element in the page. At the same time, in combination with the required clarity of the image content, the evaluation of the space proportion is further adjusted to ensure that the image with too small a proportion can be appropriately enlarged in the clarity requirement. Finally, the generated image space ratio data will provide the necessary basis for the subsequent color loss analysis. According to the required clarity of the image content and the image space ratio data, the image content color loss analysis is performed on the content data of the typesetting page. First, based on the extracted clarity and ratio data, the color saturation of each image element is evaluated, and the image is converted from the RGB space to the HSV color space using the color space conversion method to more clearly identify the color saturation. Subsequently, the color loss calculation formula is used to quantitatively analyze the color loss of each image element. In this process, for image elements with high definition requirements, their sensitivity to color loss needs to be considered and adjusted in time. The image content color loss data finally obtained will provide key support for the subsequent background color compensation. Based on the image content color loss data, the background color of the typesetting background is compensated. First, the background color of the typesetting page is analyzed, and the hue, saturation and brightness of the background color are classified using the color analysis algorithm. Combined with the image content color loss data, the required background color compensation amount is determined. The compensation process uses the weighted average method to calculate the various components of the compensation color through the formula: compensation color = background color + (color loss × weight), and the weight is set according to the importance of the content and the visual effect. Subsequently, the compensation color is applied to the page background and superimposed through image processing technology to correct the color distortion. The final image color loss background color compensation data will provide an optimization basis for the next step of adaptive filling of image elements. Combining the image space ratio data and the image color loss background color compensation data, the image elements are adaptively filled for the content data of the typesetting page. First, for each image element, calculate the color it needs to fill, and adjust its filling ratio according to the space ratio to ensure that the filled image element can be harmonious and unified with the background.The filling algorithm detects the edges of image elements and uses bilinear interpolation to perform smooth transition filling to avoid color abruptness. Then, combined with the background color compensation data, the filling color is fine-tuned to ensure that the filled color can both make up for the color loss and meet the visual aesthetics. The final adaptive filling data of image elements will provide a guarantee for the final layout effect of the page.

[0127] Preferably, step S234 includes the following steps:

[0128] Perform highlight / shadow range segmentation on the image content color loss data to obtain the image highlight / shadow range data;

[0129] Performing color channel distortion analysis on the image content color loss data according to the image highlight / shadow range data to obtain the image color channel distortion data;

[0130] Performing color channel cross disorder analysis on the image color channel distortion data to obtain color channel cross disorder data;

[0131] Performing band-shaped pseudo-color deviation analysis on the image color channel distortion data according to the color channel cross disorder data to obtain band-shaped pseudo-color deviation data;

[0132] Based on the color channel cross disorder data and the banded pseudo color cast data, the image highlight / shadow range data is typeset with background color compensation to obtain image color loss background color compensation data.

[0133] In an embodiment of the present invention, the image content color loss data is first segmented into highlight and shadow ranges. A color space conversion method is used to convert the image from the RGB space to the HLS (hue, brightness, saturation) space so that the brightness information can be processed more intuitively. The brightness thresholds of the highlights and shadows are set by the threshold segmentation algorithm, and the highlight range is defined as pixels with brightness values ​​higher than a specific threshold, and the shadow range is defined as pixels with brightness values ​​lower than another specific threshold. This process uses a histogram analysis method to count the pixel brightness distribution and identify the local maximum and minimum values ​​of the brightness to accurately divide the highlight and shadow areas. The image highlight / shadow range data finally generated provides a basis for subsequent color distortion analysis. Based on the image highlight / shadow range data, the image content color loss data is subjected to color channel distortion analysis. First, for the highlight and shadow areas, the mean and standard deviation of each color channel (red, green, and blue) are calculated respectively. The distortion degree formula is used to evaluate the degree of distortion of each channel in the highlight and shadow areas. By comparing the distortion degrees of different channels, the channel with the most severe distortion is identified, and the relevant data is recorded. This step aims to quantify the color distortion of the image in the highlights and shadows, and provide a quantitative basis for the subsequent cross-disorder analysis. The color channel cross-disorder analysis is performed on the image color channel distortion data. This process uses multivariate statistical analysis methods to calculate the correlation coefficient between color channels and evaluate the degree of mutual influence between different color channels. By constructing the covariance matrix of the color channel, the correlation between the distortion of different channels and other channels is analyzed to identify the characteristics of cross-distortion. The principal component analysis method is used to reduce the dimension of the color channel data and extract the main distortion features. The color channel cross-disorder data finally generated will provide an important information basis for the subsequent banded pseudo-color deviation analysis. Based on the color channel cross-disorder data, the image color channel distortion data is subjected to banded pseudo-color deviation analysis. First, the color channel distortion data is smoothed by a band filter. The filter design needs to set the bandwidth according to the distortion characteristics to reduce the interference of noise. Subsequently, the frequency domain characteristics of the color channel are analyzed by Fourier transform to identify the pseudo-color deviation in the frequency domain. According to the results of frequency domain analysis, the distorted image is restored by inverse Fourier transform, the intensity of banded pseudo-color deviation is calculated, and deviation data is generated. This step aims to quantify the impact of pseudo-color effect on image color distortion. Combining color channel cross-disorder data and banded pseudo-color deviation data, the image highlight / shadow range data is typeset background color compensation. First, the color performance of the highlight and shadow areas is evaluated, and the background color is adjusted according to the cross-disorder data to balance the color distortion of the highlight and shadow parts. Using the color space conversion algorithm, the compensated color is carefully adjusted to ensure that the compensated background color can effectively set off the foreground content. Subsequently, the weighted average method is applied to mix the compensated color with the original background color to generate the final image color loss background color compensation data.The resulting compensation data will provide the necessary basis for the subsequent adaptive filling of image elements.

[0134] Preferably, step S3 comprises the following steps:

[0135] Step S31: normalizing the image visual supplementary hierarchical data to obtain image visual supplementary normalized data;

[0136] Step S32: performing layout iteration training on the page data to be typeset according to the image visual supplement normalization data and the page content layout hierarchy arrangement data to obtain page layout iteration training data;

[0137] Step S33: Design a typesetting self-learning mechanism for the page layout iterative training data to obtain a page layout typesetting self-learning mechanism.

[0138] In an embodiment of the present invention, the image visual supplementary hierarchical data is first normalized to eliminate the dimensional differences between the data. The minimum-maximum normalization method is used to linearly map all data values ​​to the interval of [0, 1]. In the specific implementation, the minimum and maximum values ​​of the data are first calculated. In this process, the characteristics of the original data are ensured to be retained, and the comparability between different characteristics is enhanced. The normalized image visual supplementary normalized data will provide standardized input for subsequent layout iterative training, which is convenient for effective comparison and analysis. According to the image visual supplementary normalized data and the page content layout hierarchical arrangement data, the layout iterative training is performed on the typesetting page data. First, a training framework is established, and an iterative optimization algorithm, such as a gradient descent method, is used to optimize the page layout. In the specific implementation, a loss function is defined, which is evaluated according to the layout consistency, visual balance and other characteristics of the page content. By calculating the gradient, the position and size of the page content in the typesetting page are dynamically adjusted to gradually reduce the loss value. After each iterative update, the visual effect of the current layout is re-evaluated, and the result is fed back to the training process to form a closed-loop feedback mechanism. The page layout iterative training data finally generated will provide the basis for the subsequent self-learning mechanism. Design the typesetting self-learning mechanism based on the page layout iterative training data. First, analyze the obtained layout iterative training data to extract key features, such as the effectiveness of content arrangement, visual aesthetics, and user interaction feedback. Use clustering algorithms, such as K-means clustering, to classify the features of similar layouts and identify efficient typesetting patterns. Subsequently, build a self-learning mechanism and design a feedback loop to allow the system to automatically adjust the layout strategy based on new input data and user feedback. Each user's evaluation of the generated layout will be recorded and incorporated into the learning process, thereby continuously optimizing the typesetting plan. The final page layout typesetting self-learning mechanism will have the ability to self-optimize and improve the efficiency and quality of typesetting design.

[0139] Preferably, step S33 includes the following steps:

[0140] Step S331: collecting page layout errors on the page layout iteration training data to obtain page layout error data;

[0141] Step S332: extracting error multi-dimensional features from the page layout error data to obtain error multi-dimensional feature data;

[0142] Step S333: using a decision tree algorithm to summarize the error nonlinear relationship of the error multidimensional feature data to obtain error nonlinear relationship summary data;

[0143] Step S334: performing error correction processing on the page layout iteration training data according to the error nonlinear relationship summary data to obtain page layout iteration error correction data;

[0144] Step S335: Design a typesetting self-learning mechanism for the page layout iteration error correction data to obtain a page layout typesetting self-learning mechanism.

[0145] In an embodiment of the present invention, the page layout iterative training data is subjected to error collection to obtain the deviation between each layout scheme and the expected target. First, multiple evaluation indicators are set, such as visual symmetry, content compactness, and user feedback score. Then, by analyzing each layout scheme, the difference between the actual layout and the target layout is calculated. In the specific implementation, the data recording and comparison method is adopted to quantify the indicators of each layout sample to form page layout error data. The data will contain all the collected error information, providing a basis for subsequent error analysis and correction. Multidimensional feature extraction is performed on the collected page layout error data to facilitate subsequent analysis. First, feature extraction rules are defined to extract key features from the error data, such as the distribution characteristics of the error, the error type (such as position deviation, size deviation, etc.), and the scope of the error impact. Then, the dimensionality reduction technology such as principal component analysis (PCA) is used to optimize the extracted features to reduce redundant information and focus on the features that have the greatest impact on the layout effect. The error multidimensional feature data finally generated will provide detailed information for subsequent error induction. The error multidimensional feature data is analyzed using a decision tree algorithm to identify the nonlinear relationship between errors. First, a decision tree model is constructed to identify the relationship between different features by taking the error multidimensional feature data as input. The decision tree recursively splits the data set into multiple subsets to discover the complex relationship between error features and the actual layout effect. Through layer-by-layer decomposition, the decision tree can effectively capture the nonlinear pattern of the error, and the generated error nonlinear relationship summary data will provide in-depth error understanding and analysis. The page layout iterative training data is error corrected based on the error nonlinear relationship summary data. In the specific implementation, the summarized data is first analyzed to identify the error pattern related to the layout effect. Then, correction rules are formulated to adjust specific types of errors, such as adjusting the size, position or spacing of the content. In this process, the errors in the iterative training data are gradually corrected through the back propagation method to make it more in line with the target layout requirements. The final page layout iterative error correction data will provide updated basic data for the self-learning mechanism. The typesetting self-learning mechanism is designed for the error-corrected data to form a dynamically optimized system. First, the corrected layout data is analyzed to extract effective typesetting strategies and rules. Subsequently, we use the reinforcement learning method to build a feedback mechanism, taking the user's evaluation of each generated layout as training data to optimize the layout selection. After each new layout is generated, the learning strategy will be continuously adjusted based on user feedback to achieve continuous improvement. The resulting page layout self-learning mechanism will have dynamic adaptability and can generate higher-quality layout design files in different scenarios.

[0146] Preferably, the present invention also provides a system for automatically generating typesetting design files, which is used to execute the method for automatically generating typesetting design files as described above, and the system for automatically generating typesetting design files comprises:

[0147] The outline format offset correction module is used to obtain the data of the page to be typeset; extract the typesetting outline format of the page to be typeset to obtain the typesetting outline format data; perform outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset;

[0148] The image visual supplement hierarchical analysis module is used to perform page structure layout hierarchical arrangement on the typesetting page contour correction data to obtain page content layout hierarchical arrangement data; perform image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; perform image visual supplement hierarchical analysis based on the image element adaptive filling data to obtain image visual supplement hierarchical data;

[0149] The typesetting self-learning mechanism design module is used to perform layout iterative training on the typesetting page data according to the image visual supplementary hierarchical data to obtain the page layout iterative training data; the typesetting self-learning mechanism is designed on the page layout iterative training data to obtain the page layout typesetting self-learning mechanism;

[0150] The automated logic firmware design module is used to perform automated logic firmware design on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

[0151] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0152] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for automatically generating a typesetting design file, characterized in that: The following steps are involved: Step S1: acquiring data of a page to be typeset; extracting the typesetting outline format of the page to be typeset to obtain typesetting outline format data; performing outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset; Step S2: performing page structure layout hierarchical arrangement on the typeset page contour correction data to obtain page content layout hierarchical arrangement data; performing image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; performing image visual supplementary hierarchical analysis based on the image element adaptive filling data to obtain image visual supplementary hierarchical data; Step S3: Perform layout iterative training on the page data to be typeset according to the image visual supplementary hierarchical data to obtain page layout iterative training data; perform typesetting self-learning mechanism design on the page layout iterative training data to obtain a page layout typesetting self-learning mechanism; Step S4: Automated logic firmware design is performed on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

2. The method for automatically generating a typesetting design file according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Obtaining data of the page to be typeset; Step S12: marking the page coordinate position of the page data to be typeset to obtain page coordinate position data; Step S13: extracting the typesetting outline format of the page data to be typeset to obtain typesetting outline format data; Step S14: performing contour format offset correction on the typesetting contour format data according to the page coordinate orientation data to obtain contour correction data of the page to be typeset.

3. The method for automatically generating a typesetting design file according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: extracting page content from the layout page data to obtain content data of the page to be layout; Step S22: Arranging the page structure layout hierarchical data for the typesetting page contour correction data according to the content data of the page to be typeset, to obtain page content layout hierarchical arrangement data; Step S23: adaptively filling the page content data to be typeset with image elements according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; Step S24: performing image visual supplementary hierarchical analysis on the page content layout hierarchical arrangement data based on the image element adaptive filling data to obtain image visual supplementary hierarchical data.

4. The method for automatically generating a typesetting design file according to claim 3, characterized in that: Step S22 includes the following steps: Step S221: performing content master-slave hierarchy analysis on the content data of the page to be typeset to obtain content master-slave hierarchy data; Step S222: performing content font size level matching on the typesetting page outline correction data according to the content master-slave level data to obtain content font size level matching data; Step S223: performing paragraph geometric spacing analysis based on the content font size level matching data and the typesetting page outline correction data to obtain paragraph geometric spacing data; Step S224: performing content visual stretchability analysis on the typesetting page outline correction data according to the content font size level matching data and the paragraph geometric spacing data to obtain page content visual stretchability data; Step S225: Arrange the page structure layout hierarchically according to the content font size level matching data, the paragraph geometry spacing data and the page content visual stretchability data to obtain page content layout hierarchical arrangement data.

5. The method for automatically generating a typesetting design file according to claim 4, characterized in that: Step S224 includes the following steps: Calculate the average font size difference of different contents on the content font size level matching data to obtain the content font size average difference data; Perform font size morphological perception fluency analysis on the typesetting page outline correction data according to the paragraph geometric spacing data and the content font size average difference data to obtain font size morphological perception fluency data; According to the font size and shape perception fluency data, the page margin white space effect is perceived on the typesetting page contour correction data to obtain the page margin white space effect data; Based on the font size and shape perception fluency data and the page margin white space effect data, the visual stretchability analysis of the content is performed to obtain the visual stretchability data of the page content.

6. The method for automatically generating a typesetting design file according to claim 3, characterized in that: Step S23 includes the following steps: Step S231: extracting the required definition of image content display from the content data of the page to be typeset, and obtaining the required definition of the image content; Step S232: calculating the image space ratio of the content data of the page to be typeset according to the required definition of the image content, and obtaining image space ratio data; Step S233: performing image content color loss analysis on the content data of the page to be typeset according to the required clarity of the image content and the image space ratio data, to obtain image content color loss data; Step S234: performing typesetting background color compensation based on the image content color loss data to obtain image color loss background color compensation data; Step S235: Adaptively fill the image elements of the page content data to be typeset according to the image space proportion data and the image color loss background color compensation data to obtain image element adaptive filling data.

7. The method for automatically generating a typesetting design file according to claim 6, characterized in that: Step S234 includes the following steps: Perform highlight / shadow range segmentation on the image content color loss data to obtain the image highlight / shadow range data; Performing color channel distortion analysis on the image content color loss data according to the image highlight / shadow range data to obtain the image color channel distortion data; Performing color channel cross disorder analysis on the image color channel distortion data to obtain color channel cross disorder data; Performing band-shaped pseudo-color deviation analysis on the image color channel distortion data according to the color channel cross disorder data to obtain band-shaped pseudo-color deviation data; Based on the color channel cross disorder data and the banded pseudo color cast data, the image highlight / shadow range data is typeset with background color compensation to obtain image color loss background color compensation data.

8. The method for automatically generating a typesetting design file according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: normalizing the image visual supplementary hierarchical data to obtain image visual supplementary normalized data; Step S32: performing layout iteration training on the page data to be typeset according to the image visual supplement normalization data and the page content layout hierarchy arrangement data to obtain page layout iteration training data; Step S33: Design a typesetting self-learning mechanism for the page layout iterative training data to obtain a page layout typesetting self-learning mechanism.

9. The method for automatically generating a typesetting design file according to claim 8, characterized in that: Step S33 includes the following steps: Step S331: collecting page layout errors on the page layout iteration training data to obtain page layout error data; Step S332: extracting error multi-dimensional features from the page layout error data to obtain error multi-dimensional feature data; Step S333: using a decision tree algorithm to summarize the error nonlinear relationship of the error multidimensional feature data to obtain error nonlinear relationship summary data; Step S334: performing error correction processing on the page layout iteration training data according to the error nonlinear relationship summary data to obtain page layout iteration error correction data; Step S335: Design a typesetting self-learning mechanism for the page layout iteration error correction data to obtain a page layout typesetting self-learning mechanism.

10. A system for automatically generating typesetting design files, characterized in that: A method for automatically generating a typesetting design file according to claim 1, wherein the system for automatically generating a typesetting design file comprises: The outline format offset correction module is used to obtain the data of the page to be typeset; extract the typesetting outline format of the page to be typeset to obtain the typesetting outline format data; perform outline format offset correction on the typesetting outline format data to obtain outline correction data of the page to be typeset; The image visual supplement hierarchical analysis module is used to perform page structure layout hierarchical arrangement on the typesetting page contour correction data to obtain page content layout hierarchical arrangement data; perform image element adaptive filling according to the page content layout hierarchical arrangement data to obtain image element adaptive filling data; perform image visual supplement hierarchical analysis based on the image element adaptive filling data to obtain image visual supplement hierarchical data; The typesetting self-learning mechanism design module is used to perform layout iterative training on the typesetting page data according to the image visual supplementary hierarchical data to obtain the page layout iterative training data; the typesetting self-learning mechanism is designed on the page layout iterative training data to obtain the page layout typesetting self-learning mechanism; The automated logic firmware design module is used to perform automated logic firmware design on the page layout and typesetting self-learning mechanism to obtain automated logic firmware for typesetting and typesetting.

Citation Information

Cited By

  • Symmetrical overlapping and splicing method and system for self-adaptive printing makeup

    CN119962255A