A method for identifying and arranging graphic design pages

By using the grid system and signature authentication technology in the graphic design system, the problem that the existing system cannot automatically generate a directory and the template is not trustworthy is solved, and an efficient and safe graphic design and typesetting process is realized.

CN117787211BActive Publication Date: 2024-09-03南京研捷网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311543352.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2024-09-03
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

The existing graphic design and typesetting system cannot automatically generate a table of contents in the corresponding format based on the directory level of the book content, which increases the workload of manually writing the table of contents and reduces the speed and accuracy of typesetting. Furthermore, there is no signature authentication for template downloads, and the source is not trustworthy. Security risks.

Method used

Template files and user signature authentication templates are displayed through the grid system. The sorting system generates directories according to the directory hierarchy, classifying and sorting templates to ensure that the source of the templates is trustworthy and to prevent the spread of malicious code.

Benefits of technology

It realizes automatic generation of directories, improves typesetting speed and accuracy, ensures the credibility of template sources, enhances system security, and prevents the spread of unsafe templates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117787211B
    Figure CN117787211B
Patent Text Reader

Abstract

The present invention discloses a method for identifying and typesetting a graphic design page, and relates to the technical field of graphic typesetting. When a user downloads a template locally, a template signature authentication is required. A template library of the arranging system includes built-in templates and user-public templates, and the built-in templates and user-public templates are displayed in the form of thumbnails for writers to select. After the template is selected, the writer needs to import the book content. After the author imports the book content, the imported text part content is detected, and the content filling template receives the title, text, notes and charts output by the book content as input, and then matches the template. The arranging method can automatically generate a directory in a corresponding format according to the directory hierarchy of the book content, reduce the work of manually writing the directory, improve the speed and accuracy of typesetting, ensure the credibility of the source of the downloaded template through template signature authentication, improve the security of the system, and prevent the spread of malicious code or unsafe templates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of graphic typesetting, and in particular to a method for identifying and typesetting a graphic design page. Background Art

[0002] With the rise of digital media, people generate a large amount of graphic content on websites, social media, applications and other platforms. These contents need to attract readers and users, so they need attractive layout and design. However, processing such a large amount of content is a heavy task. Many organizations and individuals do not have enough resources to hire professional designers or editors, or they need to deal with a large amount of similar content, which makes manual layout and design impractical. With the continuous development of computer vision and natural language processing technology, we can use these technologies to create intelligent systems to help designers and editors process graphic content more easily.

[0003] The editing system is a technical system applied in the field of graphic design, which aims to help designers and editors more efficiently create, edit and layout various graphic content, such as print, digital media, websites, application program interfaces, etc. This system integrates image recognition, text analysis, automatic typesetting and other technologies to provide an automated way to process and beautify various graphic materials.

[0004] The prior art has the following deficiencies:

[0005] The existing organization method cannot generate a directory in the corresponding format according to the directory hierarchy of the book content, which increases the work of manually writing the directory and reduces the typesetting speed and accuracy. There is no signature authentication for template downloads, and the credibility of the source of the downloaded template cannot be ensured. The security is poor and it is easy to cause the spread of malicious code or unsafe templates. Summary of the invention

[0006] The purpose of the present invention is to provide a method for identifying and typesetting a graphic design page to solve the deficiencies in the background technology.

[0007] In order to achieve the above object, the present invention provides the following technical solution: a method for identifying and typesetting a graphic design page, the method comprising the following steps:

[0008] S1: The user displays the template file in the grid container component based on the grid system;

[0009] S2: After the typesetter has finished creating the template, he will make it public in the template library of the editing system for writers to use, or as a basic template for other template creators;

[0010] S3: The user downloads the template to the local computer and needs to authenticate the template signature.

[0011] S4: All templates edited by the user are saved in the personal template library, and the personal template library template classifies the user edited templates according to categories;

[0012] S5: The system template library includes built-in templates and user-public templates, which are displayed in the form of thumbnails for writers to choose from. After selecting a template, writers need to import book content.

[0013] S6: After the author imports the book content, the imported text content is detected;

[0014] S7: The content filling template receives the title, text, notes and diagrams of the book content output as input, and then matches the template;

[0015] S8: After the sorting system obtains the text, chart, and style to be displayed, it renders the text, chart, and style into grid item components and displays them in the grid container;

[0016] S9: When the user selects a template, the processing end performs paging calculations on the rasterized JSON object array and generates a directory in a corresponding format according to the directory hierarchy.

[0017] Preferably, in step S5, displaying the built-in templates and the user public templates in the form of thumbnails includes the following steps:

[0018] S5.1: The sorting system categorizes all templates;

[0019] S5.2: After the classification is completed, the templates in each category are sorted.

[0020] Preferably, in step S5.1, the sorting system classifies all templates including the following steps:

[0021] S5.1.1: Collect data about all built-in templates and user-exposed templates, including template name, description, domain, style, design elements, fonts, color themes, paper size, multimedia elements, ratings and feedback, frequency of use, update date, and author information;

[0022] S5.1.2: Clean the collected data;

[0023] S5.1.3: Assign a corresponding value or label to each template based on the parameters to complete the classification.

[0024] Preferably, in step S5.2, sorting the templates in each category comprises the following steps:

[0025] S5.2.1: Obtain the date index, usage parameters, and safety parameters of each template. The usage parameters include application frequency and template missingness. The safety parameters include safety warning frequency.

[0026] S5.2.2: The template coefficient mb is obtained by comprehensively calculating the date index, application frequency, template missing degree and safety warning frequency. x ;

[0027] S5.2.3: All templates belonging to the same category are divided according to the template coefficient mb x Sort from largest to smallest;

[0028] S5.2.4: Set a safety warning frequency threshold for all templates. When the safety warning frequency of a template is greater than the safety warning frequency threshold, the system will delete the template.

[0029] Preferably, the template coefficient mb x The calculation logic is: multiply the application frequency, template deficiency and safety warning frequency by the proportional coefficient respectively. The proportional coefficient is used to represent the weight of the application frequency, template deficiency and safety warning frequency. The application frequency is proportional to the template coefficient, while the template deficiency and safety warning frequency are inversely proportional to the template coefficient. After adjusting the template coefficient by the date index, the date index, application frequency, template deficiency and safety warning frequency are comprehensively calculated to obtain the template coefficient mb. x .

[0030] Preferably, the calculation table logic of the template missing degree is:

[0031] Define the expected structure for each template, including title, body, charts, images, tables, and comments as metadata for the template;

[0032] The user fills in the template to create the final document or design, which includes text, images, and data provided by the user;

[0033] Analyze the differences between the actual filled content and the expected structure of the template, including:

[0034] Some expected content is missing;

[0035] There is additional content added;

[0036] There is content that is not in the expected structure;

[0037] Based on the detected differences, the following logic is used to calculate the template absence:

[0038] Template missing degree bq=number of missing parts of expected content / total number of expected content parts.

[0039] Preferably, in step S7, the content filling template receives the title, text, notes and charts of the book content output as input, and then the matching template includes the following steps:

[0040] S7.1: After the sorting system obtains the text, chart, and style to be displayed, it starts to render the text, chart, and style into grid item components and displays them in the grid container;

[0041] S7.2: Items in a template provide the location, size, and style of the items;

[0042] S7.3: The scanned content replaces the sample content in the template, and then the position and size of the item are recalculated;

[0043] S7.4: Calculate the absolute position after typesetting based on the relative position in the template project, and calculate the absolute position (x0+x,y0+y+maxY+1) based on the lowest point maxY of the content and the relative position (x,y).

[0044] Preferably, in step S3, the user downloads the template to the local computer and needs to perform template signature authentication, which includes the following steps:

[0045] S3.1: The template download page relies on the template signature, which includes the digest algorithm and encryption algorithm;

[0046] S3.2: The digest algorithm performs hash compression on the rasterized JSON data to obtain the message digest;

[0047] S3.3: The encryption algorithm uses the template holder's user private key to encrypt the message digest to form a digital signature;

[0048] S3.4: If the template is a user-generated template, the user will be digitally signed on the template;

[0049] S3.5: If the user chooses to modify the existing template, the original digital signature of the template will be overwritten;

[0050] S3.6: After the user completes the signature and encryption authentication, the template downloading process is started.

[0051] Preferably, in step S2, after the typesetter completes the creation, the template needs to be published to the template library of the sorting system to obtain a signature, which includes the following steps:

[0052] S2.1: The system draws on the HTTPS protocol process and uses digital signatures to associate template files;

[0053] S2.2: Use the user's public key to decrypt the digital signature to obtain message summary A;

[0054] S2.3: Calculate message digest B for the rasterized JSON template using a public digest algorithm;

[0055] S2.4: If message digest A and message digest B are equal, the template belongs to the user; if message digest A and message digest B are not equal, the template does not belong to the user;

[0056] S2.5: After the user completes the signature and encryption authentication, the template upload process is initiated.

[0057] Preferably, in step S1, the user displays the template file in the grid container component based on the grid system, including the following steps:

[0058] S1.1: Receive template files from state management MobX;

[0059] S1.2: The sorting system deserializes the template file into a rasterized JSON object array through file operations;

[0060] S1.3: Submit to MobX management, the template is designed to accept a rasterized JSON object array;

[0061] S1.4: According to the layout and content requirements of the grid container component, the content in the array is calculated, applied to the grid system, and displayed as a grid item component.

[0062] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0063] The present invention displays the template file in the grid container component through the user based on the grid system. After the typesetter completes the creation, the template is made public to the template library of the sorting system for use by the writer or as a basic template for other template creators. The user downloads the template locally and needs to perform template signature authentication. All templates edited by the user are saved in the personal template library. The personal template library template classifies the user edited template according to the category. The sorting system template library includes built-in templates and user public templates. The built-in templates and user public templates are displayed in the form of thumbnails for the writer to choose. After the template is selected, the writer needs to import the book content. After the author imports the book content, the imported text part content is detected. The content filling template receives the title, text, notes and charts produced by the book content as input, and then matches the template. After the sorting system obtains the text, chart and style to be displayed, the text, chart and style are rendered into a grid project component and displayed in the grid container. After the user selects the template, the processing end performs paging calculation on the rasterized JSON object array and generates a directory in a corresponding format according to the directory hierarchy. This organization method can automatically generate a directory in the corresponding format according to the directory hierarchy of the book content, reducing the work of manually writing the directory, improving typesetting speed and accuracy, and ensuring the trustworthiness of the source of the downloaded template through template signature authentication, thereby improving the security of the system and preventing the spread of malicious code or unsafe templates. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0065] Figure 1 The present invention is a flow chart of the method.

[0066] Figure 2 is a system structure diagram of the present invention;

[0067] Figure 3 This is a diagram of the system technology architecture of the present invention. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] Example 1: Please refer to Figure 1 As shown, the present embodiment provides a method for identifying and typesetting a graphic design page, and the method comprises the following steps:

[0070] The template file is displayed in the grid container component based on the grid system. The content in the template file is a string in the rasterized JSON object array format. To display it in the grid container component, it needs to be converted into a grid item component.

[0071] A template file is received from the state management MobX. The system deserializes the template file into a gridded JSON object array through file operations, and then submits it to MobX management. Therefore, it is designed to receive a gridded JSON object array, calculate the content in the array according to the layout and content requirements of the grid container component, apply it to the grid system, and display it as a grid item component to achieve visualization.

[0072] The typesetter can edit the template files in the grid container component. The editing operations include adding items, setting item categories, dragging items to change positions, stretching items to change sizes, modifying item contents, and deleting items. In terms of operation forms, adding, deleting, and setting item categories are completed through function buttons, dragging and stretching are completed by directly operating items, and modifying contents is completed by clicking an item to enter the editing mode.

[0073] In the process of creating templates, you need to edit projects. In addition to the common operations such as adding, deleting, dragging and stretching, there are two more points that need to be designed, namely setting the project category and modifying the project content. In the process of editing templates, the e-book metadata is used to divide the rectangles and design six project categories. The purpose is to set the category of the currently edited project so that it can be matched when the template is used for calculation and typesetting. Specifically, within each category, you can add, delete, drag, stretch, modify the project content, etc.

[0074] It should be noted that the position of the dragged item in the template editing stage is the relative position (x, y) relative to the starting position (x0, y0) of the upper left corner of the same type. The size width w set for the scalable item is constant when the paper size remains unchanged. You can set the width mode for it: fixed width and proportional scaling. The height h is only for illustration. You can set the height mode for the item: fixed height and proportional scaling.

[0075] The system provides two text editing modes, namely Markdown editing mode and rich text editing mode. The two editing modes use the same template file. In the template creation stage, the main purpose of editing is to edit the layout and style of the sample text in the project. When modifying the content, different content needs to be displayed according to different editing modes. Therefore, the rasterized JSON needs to provide two content fields, namely value and origin. At present, considering that the Markdown mode cannot fully display the effect of the rich text mode, the two editing modes are independent of each other.

[0076] In addition to editing text content, when the project type is set to have pictures, picture settings are also required. Picture settings also set its relative position and size.

[0077] When the typesetter has finished creating, the template can be published to the template library of the editing system for use by writers, or as a basic template for other template creators. When the user chooses to publish the template, the system should ensure that the file is signed before the template is published. The difficulty of template publication is how to prove who the template holder is. The editing system draws on the process of the HTTPS protocol and uses digital signatures to associate template files. The proof method is:

[0078] Use the user's public key to decrypt the digital signature into message digest A. Use the public digest algorithm to calculate message digest B for the rasterized JSON template. If A and B are equal, the template belongs to the user. If they are not equal, it proves that the template does not belong to the user.

[0079] Template disclosure involves file upload and ownership confirmation. When a user selects a template file to be disclosed to the automatic typesetting system, it is necessary to verify whether the template has a digital signature. If not, a signature will be generated based on the user information. If yes, the user will be asked whether to overwrite the original signature. The overwriting operation needs to be recorded, and the original template and the holder will be saved. After the user applies for authentication, the system administrator will compare the old and new templates to make a decision.

[0080] The system can only accept rasterized JSON data created on the automatic typesetting system as a template. In theory, the rasterized JSON can be edited manually as long as the edited rasterized JSON data conforms to the field specifications specified by the system, and then encrypted and uploaded to the system. Therefore, the transmission of the template needs to be symmetrically encrypted with the server salt password to prevent malicious template theft.

[0081] Users can download templates to their local computer. Just like making templates public, template download pages rely on template signatures. Template signatures include the application of digest algorithms and encryption algorithms. The digest algorithm performs hash compression on rasterized JSON data to obtain a message digest. The encryption algorithm uses the template holder's user private key to encrypt the message digest to form a digital signature. If the template is an original template created by the user, a digital signature will be signed for the user on the template. If the user chooses to modify an existing template, the original digital signature of the template will be overwritten. The download here is still designed to be encrypted in order to prevent the system from directly interpreting the template file and infringing on user rights. The specific workflow of template download is the same as that of template disclosure, except that after signing and encryption, the upload action is changed to a download action.

[0082] All templates edited by users are saved in their personal template library. Templates in personal template library are classified by category just like templates in public template library. In addition, templates are divided into private and public. Private templates refer to those unpublished templates held by users, and public templates refer to those published templates held by users. In addition, you can also collect your favorite templates into personal template library.

[0083] The public templates in the personal library are part of the system's public template library. The complete function is a regular add, delete, modify and query function of the personal template library. When creating a template, you can choose according to the category set by the administrator, and you can also query according to the category during the query process.

[0084] After the writer logs in to the system, if he wants to automatically typeset the book content, he first needs to select a template. The system's template library includes built-in templates and user-public templates. These templates will be displayed in the form of thumbnails for the writer to choose from. After selecting a template, the writer needs to import the book content, which includes chapter titles, text, and charts. The chapter titles and text can be imported using a text file, or directly pasted and copied. After parsing the directory hierarchy of the book, the user is provided with an interface for importing pictures according to the directory hierarchy, and the pictures are named according to the directory hierarchy and type. The user can also name the pictures as required.

[0085] After the author imports the book content, the imported text part is detected. The content that needs to be detected includes three different types of content: title level and name, main text content, and notes. It should be noted that notes are defined as auxiliary content such as explanations and descriptions that are independent of the main line of text in the design.

[0086] The content filling template will accept the title, text, notes and charts of the book content output as input, and then match one of the six types of templates. After the system obtains the text, chart and style to be displayed, it starts to render them into grid item components and display them in the grid container. The items in the template will provide the position, size and style of the items. The position and size describe the properties of the items, and the style describes the layout of the content in the items. When the content fills the template, the sample content in the template will be replaced with the scanned content, and then the position and size of the items will be recalculated.

[0087] The principle of recalculating project attributes is as follows: For position, the absolute position after typesetting needs to be calculated based on the relative position in the template project. According to the lowest point maxY of the content and the relative position (x, y), it is easy to calculate the absolute position as (x0+x, y0+y+maxY+1). In this way, the lowest point of each column can be maintained. For size, if the paper size remains unchanged, the width will not change. If the paper size changes, all widths are scaled according to the width mode. When the width w is constant, the height y is also calculated according to the content style.

[0088] On the other hand, the image size calculation rules will ignore the size of the uploaded image and will be calculated strictly according to the original width and height and width and height mode of the image. Although this may cause image deformation, this is a compromise made to ensure that the layout is carried out in accordance with the template designer's ideas.

[0089] When the user compares multiple templates and finally selects a satisfactory template, paging is required. The one-click paging function will perform paging calculations on the calculated rasterized JSON object array, and generate a directory in a specified format according to the directory hierarchy. The paging calculation consists of the directory template and the paging algorithm. The paging algorithm is responsible for counting the position and size of each item, and calculating the page numbers of the directories at all levels according to the selected paper size. The directory template will accept the page numbers corresponding to the chapter directory provided by the paging algorithm and fill them into the current template to generate the directory;

[0090] The reason for not performing paging in the content filling stage is that the amount of calculation of the paging algorithm is equivalent to or even greater than that of the content filling. In addition, considering that the paging information will not affect the typesetting of the book content and the template will be switched frequently, the paging calculation is performed separately after the template is selected, which reduces the amount of calculation by at least 50%. In addition to calculating the number of pages corresponding to the chapter directory, paging also requires paging for the entire book. This process is slightly different from the former. The former is a query problem, while the latter is a traversal process.

[0091] To calculate the page numbers of chapters and sections, the system needs to have a set of built-in directory templates, mainly the classic single-column design and double-column design. First, a suitable directory template is generated according to the directory structure of the received book, and then the chapter title position in the book is retrieved. The template is filled with a series of pre-information calculated by the aforementioned content, and the page number of the title is calculated in combination with the paper size, and then the page number is matched to the corresponding title position in the directory template.

[0092] To number each page, the entire book needs to be scanned sequentially, and the paper size and current scanning position information are used to calculate whether the page has changed. If it has changed, it will go to the next page. Otherwise, it will continue to use the current page number.

[0093] After the user completes the paging, he needs to print the typesetting results and call the page printing function provided by the browser. The page printing function provided by the browser will print out all the details of the page as is;

[0094] The system provides a dynamic menu bar and paper effects. The dynamic menu makes it easy for users to operate templates, and the paper effects allow users to feel the page margins and experience a more realistic typesetting effect. When the user chooses to print, the menu bar and paper effects will be closed, leaving only a clean typesetting effect on the page for user preview.

[0095] This application uses the grid system to display the template file in the grid container component. After the typesetter completes the creation, the template is made public to the sorting system template library for use by writers or as a basic template for other template creators. Users download the template locally and need to perform template signature authentication. All templates edited by the user are saved in the personal template library. The personal template library template classifies the user-edited templates according to categories. The sorting system template library includes built-in templates and user-public templates. The built-in templates and user-public templates are displayed in the form of thumbnails for writers to choose from. After the template is selected, the writer needs to import the book content. After the author imports the book content, the imported text content is detected. The content filling template receives the title, text, notes and charts produced by the book content as input, and then matches the template. After the sorting system obtains the text, charts and styles to be displayed, the text, charts and styles are rendered into grid project components and displayed in the grid container. After the user selects the template, the processing end performs paging calculations on the rasterized JSON object array and generates a directory in the corresponding format according to the directory hierarchy. This organization method can automatically generate a directory in the corresponding format according to the directory hierarchy of the book content, reducing the work of manually writing the directory, improving typesetting speed and accuracy, and ensuring the trustworthiness of the source of the downloaded template through template signature authentication, thereby improving the security of the system and preventing the spread of malicious code or unsafe templates.

[0096] The key technologies used in the development of the layout system of this application include the front-end engineering system used in the development of the client: MVVM mode, React framework, MobX state management, webpack construction tool; the grid system, JSON data exchange format and localStorage local storage used in the rectangular packing modeling of the layout problem; finally, the Node.js and Nginx servers required for building the file server are introduced;

[0097] The grid container draws on the grid layout in layout technology. The grid layout divides the rectangular interface into neatly arranged grids. Adjacent grids can be arbitrarily combined to make various layouts. The grid container follows the same idea and divides the container into "rows" and "columns". The intersection of rows and columns generates cells. Each cell can be uniquely represented by the combination of row number and column number. You only need to simply specify the cells occupied by the project to complete the layout. The basic concepts are as follows:

[0098] (1) Containers and items. The entire area that uses a grid layout is called a container, and the sub-elements inside the container that are positioned according to the grid are called items.

[0099] (2) Rows and columns. The horizontal direction in the container is called a row, and the vertical direction is called a column. The growth direction is as shown in the figure. The horizontal dark area is the row, and the growth direction is downward. The vertical dark area is the column, and the growth direction is rightward.

[0100] (3) Cell: The intersection area of ​​rows and columns is called a cell. The intersection of N rows and M columns produces N*M cells.

[0101] react-grid-layout is an excellent grid system implemented with React. Different from the general grid layout, react-grid-layout is responsive, supports breakpoints, and has real-time interactive capabilities such as dynamic addition and deletion of items, dynamic dragging, and resizing of items. In the automatic typesetting system, the grid container is the cornerstone, responsible for visualizing the gridded JSON template data.

[0102] See also Figure 2 As shown in the figure, the system is divided into five layers according to the operation process of the system, starting from the top user layer, and divided into five layers from top to bottom, namely: user layer, business layer, support layer, persistence layer and basic layer;

[0103] 1) Business layer: The business layer belongs to the application-level functions, directly contacting writers, template creators and back-end administrators to provide services to users. In the front-end, according to the results of functional requirements analysis, the business mainly includes three categories: template creation, template management, and one-click typesetting. For the back-end, the business mainly includes template library maintenance, category setting, ownership identification and other operations;

[0104] 2) Support layer: The support layer provides service support for the business layer. The operations performed by users at the business layer are essentially completed by calling a combination of functional modules of several support layers. The support layer provides service support to the business layer and receives UI state model data from the data center platform. It is the backbone of the entire system and is quite important. On the other hand, the data center platform is designed as a layer of middleware to aggregate domain model data and convert it into UI state model data.

[0105] 3) Persistence layer: The persistence layer is the data persistence layer, which is responsible for providing data for the data center platform. The persistence layer obtains data from the database through the orm mapping framework. This data is the domain model data and will be delivered to the data center platform. The data center platform calculates the UI state model data based on the obtained domain model data according to the requirements of the front-end page;

[0106] 4) Basic layer: The basic layer also provides support for the system. The difference from the support layer is that the basic layer provides support in terms of physical resources, while the support layer provides logical support. Taking the image insertion operation in template creation as an example, the basic layer provides a physical hard disk for image insertion to save image data to the file server. The support layer provides logic such as editing and uploading images, and the business layer provides a visual editing component for user convenience. The combination of each layer provides users with image insertion operations.

[0107] See also Figure 3 As shown in the figure, there are three types of data that need to be processed by the business model of the sorting system: user data, template data, and files. User data is standard relational data, and MySQL database is used for persistence. Template data belongs to the structured data type, but the content is unstable, so NoSQL database MongoDB is used for persistence. In addition, pictures are involved in the typesetting process, so a file server needs to be built.

[0108] The domain model data is maintained by the above two databases and a file server, which is also the boundary of the server. The three provide domain model data to the outside through JDBC, Mongoose, and Multer respectively. After the data flows out, it needs to be processed by the BFF layer. BFF means backend-for-frontend. The BFF layer is built with Node.js, mainly considering the excellent concurrency and pressure resistance of Node.js. The most important function of the BFF layer is to convert the domain model data into UI state model data. After passing through the BFF layer, the data is converted into UI state model data that can be used directly on the browser page. On the other hand, BFF exists as middleware, and data can pass through several BFFs. Each BFF processes the data differently. For example, some BFFs are specifically for server-side databases and file servers to block invalid, redundant or illegal requests. These BFFs form a chain, and data passes through each BFF in turn.

[0109] The above-mentioned database, file server and BFF design replace the traditional server-side data processing responsibilities. In order to provide a network call interface to the browser, the system also needs to design web technology. This part is also where the functional modules are located. All functional modules of the entire system are implemented here. The Node.js server is developed using the express framework. Express parses browser requests through body-parser, executes functional module logic, and finally obtains the UI state model data from the BFF layer and returns it to the browser. For the browser, the business logic and interface UI are established through React and MobX. The UI state model data is obtained by calling the express interface. The state is uniformly managed and distributed to the React component through MobX, and finally the interface is re-rendered to complete the response.

[0110] The system services include template creation service, template management service and one-click typesetting service;

[0111] (1) Template creation service

[0112] Template creators use the template creation function to contribute templates to the system. The automatic typesetting system needs to provide template creators with full life cycle services from blank files to template files, including creating and editing blank templates, selecting existing templates for modification, and visually saving and editing in real time.

[0113] (2) Template management service

[0114] Templates are the most important part of the entire automatic typesetting system, and a proper management system needs to be established. The automatic typesetting system provides templates with modules such as downloading to local storage, uploading to the server, and publishing to the system template library. In addition, as part of cultural creation, templates need to protect the rights of creators. The automatic typesetting system binds the creator's information to the template through the template signature module.

[0115] (3) One-click typesetting service

[0116] Writers fully rely on the typesetting function provided by the system. The one-click typesetting service uses the grid container as a carrier and provides a module for displaying and switching templates. Users can choose a satisfactory template for typesetting, including a complete typesetting module for importing book content, filling templates with content, paging calculation, adjustment, and printing.

[0117] Among them, template creation and template management services are used by template creators, and one-click typesetting service is used by writers. Through template creation and management, template creators can create a new template from scratch, sign their own electronic signature and publish it to the system's template library. Through one-click typesetting, writers can select templates, import book content, fill templates with content, adjust, print and other operations. For backend administrators, they need to be provided with the ability to maintain the template library, as well as category settings, ownership identification, etc.

[0118] Embodiment 2: The template library of the arrangement system includes built-in templates and user-public templates, which are displayed in the form of thumbnails for writers to choose from. After selecting a template, writers need to import book content;

[0119] Specific:

[0120] Organizing the system template library includes built-in templates and user-public templates. Displaying built-in templates and user-public templates in the form of thumbnails includes the following steps:

[0121] 1) The system organizes all templates into categories, specifically:

[0122] Data collection: First, we need to collect relevant data of all built-in templates and user-public templates, including template name, description, field, style, design elements, fonts, color theme, paper size, multimedia elements, evaluation and feedback information, usage frequency, update date, author information, etc.

[0123] Data cleaning: Clean the collected data to ensure its accuracy and consistency. It may be necessary to process missing information, standardize naming and classification, etc.

[0124] Parameter definition: According to the aforementioned parameters, assign corresponding values ​​or labels to each template for subsequent sorting and classification. These parameters can be defined according to specific circumstances or filled in by users or administrators;

[0125] 2) After the classification is completed, the templates in each category are sorted as follows:

[0126] Obtain the date index, usage parameters and safety parameters of each template. The usage parameters include application frequency and template missing degree. The safety parameters include safety warning frequency.

[0127] The template coefficient mb is obtained by comprehensively calculating the date index, application frequency, template missing degree and safety warning frequency. x , the calculation expression is:

[0128] Where rq is the date index, yp is the application frequency, bq is the template missing degree, ed is the safety warning frequency, α, β, and γ are the proportional coefficients of the date index, application frequency, template missing degree, and safety warning frequency, respectively, and α, β, and γ are all greater than 0;

[0129] Template coefficient mb x The calculation logic is as follows: the application frequency, template deficiency and safety warning frequency are multiplied by the proportional coefficient respectively. The proportional coefficient is used to represent the weight. The application frequency is directly proportional to the template coefficient, while the template deficiency and safety warning frequency are inversely proportional to the template coefficient. The template coefficient is then adjusted by the date index so that the newly uploaded template can be ranked higher, and finally the template coefficient is obtained.

[0130] By template coefficient mb x From the calculation expression, we can know that the template coefficient mb x The larger the value, the better the comprehensive evaluation of the template. Therefore, all templates belonging to the same category are classified according to the template coefficient mb. x Sort from largest to smallest;

[0131] In addition, a safety warning frequency threshold is set for all templates. When the safety warning frequency of a template is greater than the safety warning frequency threshold, the sorting system deletes the template to ensure the safety of the sorting system.

[0132] The logic of obtaining the date index is as follows: In order to avoid the templates newly uploaded by users being ranked at the back, resulting in insufficient exposure of the templates, we use the date index to adjust the template coefficient mb x Value, so that the newly uploaded template gets a higher ranking within a certain period of time, specifically:

[0133] The sorting system presets a time threshold. When the duration of a user uploading a template to the sorting system template library is ≤ the time threshold, the date index rq=5. When the duration of a user uploading a template to the sorting system template library is > the time threshold, the date index rq=1. This allows the newly uploaded template to be ranked higher and have a period of exposure.

[0134] For example, the time threshold is set to 24 hours. When the duration of a user uploading a template to the template library of the sorting system exceeds 24 hours, the exposure of the template will be reduced.

[0135] The calculation expression of application frequency is: yp = zc / yc;

[0136] In the formula, zc represents the total number of times the template is used, and yc represents the number of all users of the sorting system. The greater the application frequency, the more times the template is used, the more popular it is, and the more it should be promoted;

[0137] The calculation table logic of template missing degree is:

[0138] Template expected structure definition: First, you need to define the expected structure for each template, including the required parts, such as title, body, charts, pictures, tables, comments, etc. This can be used as the metadata of a template;

[0139] The actual filled content: the user fills in the template to create the final document or design. This content can be user-provided text, pictures, data, etc.

[0140] Detecting differences: The system needs to analyze the differences between the actual filled content and the expected structure of the template. The differences can include the following:

[0141] Some expected content is missing;

[0142] There is additional content added;

[0143] There is content that is not in the expected structure;

[0144] Deletion degree calculation: Based on the differences detected above, the following logic can be used to calculate the template deletion degree:

[0145] Template missing degree bq=(the number of missing parts of expected content / the total number of parts of expected content).

[0146] The logic for obtaining the safety warning frequency is:

[0147] Define security alerts: First, you need to define alert events related to template security. These events may include the following:

[0148] Malicious code detection: If malicious code or suspicious files are detected in the template, a warning event will be recorded;

[0149] Unauthorized modification: If someone modifies the template without authorization, a warning event will be recorded;

[0150] Security vulnerabilities or vulnerability reports: If there are known security vulnerabilities or reports, alert events will be recorded;

[0151] Data leakage or sensitive information leakage: If sensitive information in the template is leaked, a warning event will be recorded;

[0152] Real-time monitoring: The system needs to monitor the template library in real time to detect the security warning events defined above. This can be achieved by using malicious code scanning tools, security vulnerability scanning tools, access log monitoring, etc.

[0153] Warning event records: Every time a security warning event occurs, the system should record detailed information about the event, including event type, date and time, template name, related users or authors, etc.

[0154] Calculation frequency: The safety alert frequency can be calculated according to the following formula:

[0155] Safety warning frequency ed = (number of warning events / time period);

[0156] The time period can be hours, days, weeks, months, etc., and can be adjusted as needed. This formula calculates the frequency of security alert events that occur in a specific time period, expressed as a percentage;

[0157] Threshold setting: Set the safety alert frequency threshold. If the safety alert frequency exceeds the safety alert frequency threshold, the system can trigger an alarm or take corresponding safety measures.

[0158] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0159] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.

[0160] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0161] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0162] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0163] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0165] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0168] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for identifying and typesetting a graphic design page, characterized in that: The finishing method comprises the following steps: S1: The user displays the template file in the grid container component based on the grid system; S2: After the typesetter has finished creating the template, he will make it public in the template library of the editing system for writers to use, or as a basic template for other template creators; S3: The user downloads the template to the local computer and needs to authenticate the template signature. S4: All templates edited by the user are saved in the personal template library, and the personal template library template classifies the user edited templates according to categories; S5: The system template library includes built-in templates and user-public templates, which are displayed in the form of thumbnails for writers to choose from. After selecting a template, writers need to import book content. S6: After the author imports the book content, the imported text content is detected; S7: The content filling template accepts the title, text, notes and figures of the book content output as input and then matches the template; S8: After the sorting system obtains the text, chart, and style to be displayed, it renders the text, chart, and style into grid item components and displays them in the grid container; S9: When the user selects a template, the processing end performs paging calculations on the rasterized JSON object array and generates a directory in a corresponding format according to the directory hierarchy; In step S5, the built-in templates and user public templates are displayed in the form of thumbnails, including the following steps: S5.1: The sorting system categorizes all templates; S5.2: After the classification is completed, the templates in each category are sorted; In step S5.1, the sorting system classifies all templates including the following steps: S5.1.1: Collect data about all built-in templates and user-exposed templates, including template name, description, domain, style, design elements, fonts, color themes, paper size, multimedia elements, ratings and feedback, frequency of use, update date, and author information; S5.1.2: Clean the collected data; S5.1.3: Assign corresponding values ​​or labels to each template based on the parameters to complete the classification; In step S5.2, sorting the templates in each category includes the following steps: S5.2.1: Obtain the date index, usage parameters, and safety parameters of each template. The usage parameters include application frequency and template missingness. The safety parameters include safety warning frequency. S5.2.2: The template coefficient mb is obtained by comprehensively calculating the date index, application frequency, template missing degree and safety warning frequency. x ; S5.2.3: All templates belonging to the same category are divided according to the template coefficient mb x Sort from largest to smallest; S5.2.4: Set a safety warning frequency threshold for all templates. When the safety warning frequency of a template is greater than the safety warning frequency threshold, the system will delete the template. The template coefficient mb x The calculation logic is: multiply the application frequency, template deficiency and safety warning frequency by the proportional coefficient respectively. The proportional coefficient is used to represent the weight of the application frequency, template deficiency and safety warning frequency. The application frequency is directly proportional to the template coefficient, while the template deficiency and safety warning frequency are inversely proportional to the template coefficient. After adjusting the template coefficient by the date index, the date index, application frequency, template deficiency and safety warning frequency are comprehensively calculated to obtain the template coefficient mb. x , the calculation expression is: Where rq is the date index, yp is the application frequency, bq is the template missing degree, ed is the safety warning frequency, α, β, and γ are the proportional coefficients of the date index, application frequency, template missing degree, and safety warning frequency, respectively, and α, β, and γ are all greater than 0; The calculation table logic of the template missing degree is: Define the expected structure for each template, including title, body, charts, images, tables, and comments as metadata for the template; The user fills in the template to create the final document or design, which includes text, images, and data provided by the user; Analyze the differences between the actual filled content and the expected structure of the template, including: Some expected content is missing; There is additional content added; There is content that is not in the expected structure; Based on the detected differences, the following logic is used to calculate the template absence: Template missing degree bq=number of missing parts of expected content / total number of expected content parts.

2. A method for identifying and typesetting graphic design pages according to claim 1, characterized in that: In step S7, the content filling template accepts the title, text, notes and charts of the book content output as input, and then the matching template includes the following steps: S7.1: After the sorting system obtains the text, chart, and style to be displayed, it starts to render the text, chart, and style into grid item components and displays them in the grid container; S7.2: Items in a template provide the location, size, and style of the items; S7.3: The scanned content replaces the sample content in the template, and then the position and size of the item are recalculated; S7.4: Calculate the absolute position after typesetting based on the relative position in the template project, and calculate the absolute position (x0+x,y0+y+maxY+1) based on the lowest point maxY of the content and the relative position (x,y).

3. A method for identifying and typesetting graphic design pages according to claim 2, characterized in that: In step S3, the user downloads the template to the local computer and needs to perform template signature authentication, which includes the following steps: S3.1: The template download page relies on the template signature, which includes the digest algorithm and encryption algorithm; S3.2: The digest algorithm performs hash compression on the rasterized JSON data to obtain the message digest; S3.3: The encryption algorithm uses the template holder's user private key to encrypt the message digest to form a digital signature; S3.4: If the template is a user-generated template, the user will be digitally signed on the template; S3.5: If the user chooses to modify the existing template, the original digital signature of the template will be overwritten; S3.6: After the user completes the signature and encryption authentication, the template downloading process is started.

4. A method for identifying and typesetting graphic design pages according to claim 3, characterized in that: In step S2, after the typesetter completes the creation, the template needs to be published to the template library of the editing system to obtain a signature, including the following steps: S2.1: The system draws on the HTTPS protocol process and uses digital signatures to associate template files; S2.2: Use the user's public key to decrypt the digital signature to obtain message summary A; S2.3: Calculate message digest B for the rasterized JSON template using a public digest algorithm; S2.4: If message digest A and message digest B are equal, the template belongs to the user; if message digest A and message digest B are not equal, the template does not belong to the user; S2.5: After the user completes the signature and encryption authentication, the template upload process is initiated.

5. A method for identifying and typesetting graphic design pages according to claim 4, characterized in that: In step S1, the user displays the template file in the grid container component based on the grid system, including the following steps: S1.1: Accept template files from state management MobX; S1.2: The sorting system deserializes the template file into a rasterized JSON object array through file operations; S1.3: Submit to MobX management, the template is designed to accept a rasterized JSON object array; S1.4: According to the layout and content requirements of the grid container component, the content in the array is calculated, applied to the grid system, and displayed as a grid item component.