A method, device and computer equipment for automatically generating pages of a letter of guarantee management system

Through tree structure and corner positioning technology, the development and design of the guarantee management system page is simplified, the problems of low efficiency and high repetition in the traditional guarantee issuance process are solved, and efficient automation of page generation is achieved.

CN116820461BActive Publication Date: 2025-08-26SHENZHEN MILIAN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310770883.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2025-08-26
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

The process of issuing traditional letter of guarantee is time-consuming and labor-intensive, offline issuance is inefficient, and the development and design of small programs for guarantee issuing letter of guarantee is cumbersome and highly repetitive, resulting in complex page development and design.

Method used

A tree structure is used to establish a hierarchical relationship, determine the area height based on the weight coefficient ratio between levels, and determine the icon position through corner point positioning, automatically arrange the icons, and simplify the page generation process.

Benefits of technology

It reduces the difficulty of page development and design, reduces duplicate work, and improves page generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116820461B_ABST
    Figure CN116820461B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and in particular to a method, device and computer equipment for automatically generating pages for a letter of guarantee management system. The method comprises: establishing a hierarchical relationship and naming text-type pages using a tree structure, dividing regions, and then determining the height of each region according to the weight coefficient ratio between the layers, and adjusting the height of each region according to the spacing size; for icon-type pages, determining the size of the blank display area, the icon size, the page boundary distance and the icon position using corner positioning, and automatically arranging the icons; for mixed-type pages, binding the icons to the text, and dividing the levels using a tree structure, and then performing region division and height adjustment; all generated pages can be translated and adjusted according to the parameters directly changed by the user. The method provided by the present invention realizes the transformation of the development and design of the system page into layout adjustment, reduces the difficulty of development and design work, simplifies the process, reduces duplication of work and improves efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and computer equipment for automatically generating pages in a letter of guarantee management system. Background Art

[0002] In today's society, a letter of guarantee is a certificate issued by a subject with specific qualifications for a company or individual user for credit guarantee. It has the characteristics of specific function, large quantity and high frequency of use.

[0003] Traditional letters of guarantee are basically issued offline, requiring the provision of complex supporting documents, which need to be submitted on-site and wait for approval and issuance. The entire issuance process is time-consuming, labor-intensive, and inefficient, making the applicant experience extremely poor. With the emergence of WeChat mini-programs, the above problems have been solved based on the use of mini-programs. The issuance of letters of guarantee has been transformed from an offline issuance mode to an online issuance mode. Applicants can apply for the issuance of letters of guarantee directly on the mini-program, submit supporting documents, and then the acceptance party completes the approval online. The entire letter of guarantee issuance process can be completed online, solving the time-consuming, labor-intensive, and inefficient problems of letter of guarantee issuance.

[0004] However, due to the large number of platform users using the guarantee letter issuance mini program, the development process of the guarantee letter issuance application procedure involves a large amount of materials, and many highly similar pages need to be developed and designed. This makes the development and design work of the guarantee letter issuance mini program cumbersome, repetitive, and inconvenient. Therefore, how to simplify the development and design of the page becomes a new problem that needs to be solved. Summary of the Invention

[0005] Based on this, it is necessary to provide a method, device and computer equipment for automatically generating pages of a letter of guarantee management system to address the above problems, which can simplify the development and design of page generation, reduce repetitive work and improve the efficiency of page generation.

[0006] The embodiment of the present invention is implemented as follows: a method for automatically generating pages in a letter of guarantee management system, comprising dividing the pages to be generated into text type, icon type and mixed type according to the page type selected by the user;

[0007] When the page to be generated is of text type, a hierarchical relationship is established using a tree structure and each level is named; a blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level; the height of each region is determined based on the weight coefficient ratio between the levels; the content of each second level is arranged side by side, the spacing is calculated, and the height of each region is adjusted according to the spacing;

[0008] When the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position;

[0009] When the page to be generated is a mixed-type page, a hierarchical relationship is established using a tree structure, and icons and text are bound together as the first level of the tree structure. A blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level. The height of each region is determined based on the weight coefficient ratio between the levels. The content of each second level is arranged side by side, and the spacing is calculated. The height of each region is adjusted according to the spacing.

[0010] Determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain the distance parameters updated by the user, and translate the target object or target area frame according to the updated distance parameters.

[0011] In one embodiment, the present invention provides a computer device for automatically generating pages of a letter of guarantee management system, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for automatically generating pages of a letter of guarantee management system described in any one or more embodiments of the present invention.

[0012] In one embodiment, the present invention provides a computer-readable storage medium for automatically generating a page for a letter of guarantee management system, wherein a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the processor executes the steps of the method for automatically generating a page for a letter of guarantee management system described in any one or more embodiments of the present invention.

[0013] The automatic page generation method for the letter of guarantee management system provided by the present invention establishes a hierarchical relationship and names text-type pages using a tree structure, divides the areas, determines the height of each area according to the weight coefficient ratio between the levels, and adjusts the height of each area according to the spacing size; for icon-type pages, the icon size and page boundary distance are determined by determining the blank display area size, and the icon position is determined by corner point positioning, and the icons are automatically arranged; for mixed-type pages, the icons are bound to the text, and the levels are divided using a tree structure, and then the areas are divided and the heights are adjusted; all generated pages can be translated and adjusted according to the parameters directly changed by the user. The method provided by the present invention realizes the transformation of the development and design of the system pages into layout adjustment, reduces the difficulty of the development and design work, simplifies the process, reduces duplication of work, and improves efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1A flowchart of a method for automatically generating a page for a letter of guarantee management system in one embodiment;

[0015] Figure 2 This is an example diagram of the tree structure hierarchical division of the guarantee letter management system page in one embodiment;

[0016] Figure 3 This is an example diagram of a text-type page automatically generated by a guarantee letter management system page in one embodiment;

[0017] Figure 4 A flowchart of the operation of an automatic page generation device for a letter of guarantee management system in one embodiment;

[0018] Figure 5 This is a structural block diagram of a device for automatically generating pages for a letter of guarantee management system in one embodiment;

[0019] Figure 6 FIG. 1 is a block diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0021] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script without departing from the scope of the present invention.

[0022] like Figure 1 As shown, in one embodiment, a method for automatically generating a page of a letter of guarantee management system is proposed, which may specifically include:

[0023] According to the page type selected by the user, the pages to be generated are divided into text type, icon type and mixed type;

[0024] When the page to be generated is of text type, a hierarchical relationship is established using a tree structure and each level is named; a blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level; the height of each region is determined based on the weight coefficient ratio between the levels; the content of each second level is arranged side by side, the spacing is calculated, and the height of each region is adjusted according to the spacing;

[0025] When the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position;

[0026] When the page to be generated is a mixed-type page, a hierarchical relationship is established using a tree structure, and icons and text are bound together as the first level of the tree structure. A blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level. The height of each region is determined based on the weight coefficient ratio between the levels. The content of each second level is arranged side by side, and the spacing is calculated. The height of each region is adjusted according to the spacing.

[0027] Determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain the distance parameters updated by the user, and translate the target object or target area frame according to the updated distance parameters.

[0028] In this embodiment, the user selects the page type according to their needs. The page type options are text type, icon type, and a mixed type including text and icons. The user confirms the page type based on their needs, that is, the subsequent functional use of the page and the proportion of various contents contained in the page. For example, if the user needs to generate a portal display or needs to display the page structure, and the page content is basically icons, the page to be generated is selected as an icon type page; if the user needs the page for data collection and the page content is basically text, the page to be generated can be selected as a text type page; and if the proportion of text content and icon content in the page is close, the functional use of the subsequent page needs to be considered. For example, if it is used as an interactive registration page, it can be classified as a mixed type.

[0029] In this embodiment, since the automatic generation method of the guarantee letter management system page described in the present invention is mainly applied to the scenario of WeChat applet, combined with the display habits of the mobile phone WeChat applet user interface, most pages are distributed vertically. Based on this, the solution of the present invention chooses to divide the vertical area into regions, but it does not constitute a limitation on the direction of selection when dividing the region when the solution of the present invention is applied to other scenarios.

[0030] In this embodiment, if Figure 2 As shown, a tree structure is used to divide the various titles, subordinate texts of titles, and accompanying text boxes in the page content into levels. For example, in a specific embodiment, the page content includes titles, subordinate texts of titles, and accompanying text boxes. The tree structure is used for hierarchical division, with each title as the first level and each subordinate text of the title and its accompanying text box as the second level. Figure 3 for Figure 2As shown, after hierarchical division is performed using a tree structure, the automatic page generation method of the letter of guarantee management system is executed, and an example diagram of a text type page is finally generated.

[0031] In this embodiment, the second level under the same first level is regarded as a whole, and the blank display area is simply divided into N areas of equal height in the preset direction, where N is the total number of all side-by-side titles named as the first level; the preset direction here can be vertical or horizontal, and the preset direction can be determined according to the user's final page display requirements, and the present invention does not limit this.

[0032] In this embodiment, since the number of text boxes attached to each text in the second level under each first level and the height of the text boxes need to be determined based on actual conditions, that is, the number of attached text boxes and the corresponding text box heights may not be equal, the heights of the N equally divided areas need to be further adjusted to make the page layout more reasonable. To this end, the height of each area can be determined and adjusted by the weight coefficient ratio between levels, the text spacing size, etc., and the blank display area can be reallocated.

[0033] In this embodiment, using a tree structure to establish a hierarchical relationship means dividing the content of the page to be generated provided by the user into layers, and dividing each layer. For example, for a text type page, the title is used as the first layer of the tree structure, the text under the title is used as the second layer of the tree structure, and so on, and each layer is named accordingly.

[0034] In this embodiment, the provided method for automatically generating pages for a letter of guarantee management system establishes a hierarchical relationship and names the text-type pages using a tree structure, divides the regions, determines the height of each region based on the weight coefficient ratio between the levels, and adjusts the height of each region based on the spacing size; for icon-type pages, the icon size and page boundary distance are determined by determining the blank display area size, and the icon position is determined by corner positioning, and the icons are automatically arranged; for mixed-type pages, the icons are bound to the text, and the levels are divided using a tree structure, and then the regions are divided and the heights are adjusted; all generated pages can be translated and adjusted according to the parameters directly changed by the user. The method provided by the present invention realizes the transformation of the development and design of the system pages into layout adjustment, reduces the difficulty of the development and design work, simplifies the process, reduces duplication of work, and improves efficiency.

[0035] In one embodiment, obtaining a blank display area includes the following steps:

[0036] Get the base map of the display page and draw a cross-shaped reference line;

[0037] Divide each reference line into four equal parts and mark the dividing points;

[0038] Read the pixel value of each pixel;

[0039] Perform grayscale processing on all pixels;

[0040] Get the grayscale value of each equally divided point;

[0041] Select each equally divided point as the starting point and use the 8-connection method to determine the connected domain;

[0042] The determined connected domain is marked as a blank display area.

[0043] In this embodiment, the cross-shaped reference line is an auxiliary line and is invisible in the display state; each reference line is divided into four equal parts, and the overlapping point is counted as only one, so each line has 5 points.

[0044] In this embodiment, the pixel value (R, G, B) of each pixel is read, and grayscale processing is performed on all pixels. The processing methods include: maximum method, average method and weighted average method. Among them, if the maximum method is used for grayscale processing, the value of the component with the largest value among the three components R, B, and G of each pixel is directly taken (0 is considered as the minimum and 255 is considered as the maximum), that is, R=G=B=max(R, G, B); if the average method is used for grayscale processing, the average value of the three components R, B, and G of each pixel is taken, that is, R=G=B=(R+G+B) / 3; after determining different weights for the R, B, and G components of the three pixels according to the sensitivity of the human eye to blue and green, a weighted average calculation is performed. According to the formula: Gray(i, j)=0.299*R(i, j)+0.578*G(i, j)+0.114*B(i, j), a weighted average of the three RGB components can be obtained to obtain a more reasonable grayscale image. Each value of R, G, and B is between 0 and 255.

[0045] In this embodiment, each equally divided point is selected as a starting point, and the 8-connection method is used to determine the connected domain, including the following steps:

[0046] To ensure efficiency, each equally divided point should be used as a starting point and the following operations should be performed simultaneously in no particular order:

[0047] S1: Scan the pixels at the eight positions above, below, left and right of the selected pixel in sequence, i.e., the upper left, upper right, lower left and lower right on the diagonal line;

[0048] S2: Using the grayscale value of the selected pixel as a reference value, determine whether the difference between the grayscale values ​​of the eight pixels surrounding the selected pixel and the reference value is within a preset interval. If so, add the corresponding pixel to the current connected domain and mark these eight pixels as visited.

[0049] S3: Recursively repeat the operation of S2 on these 8 pixels until all pixels have been visited.

[0050] In one embodiment, vertical area division is performed based on the number of first-level side-by-side titles, including:

[0051] Determine the vertical height H of the blank display area;

[0052] Determine the total number N of parallel headings at the first level;

[0053] The blank display area is divided into N areas according to H / N.

[0054] In this embodiment, the vertical height H of the blank display area can be determined by obtaining the length and width values ​​of various positions on the edge of the blank display area, selecting the maximum length value as the length of the auxiliary edge frame and the maximum width value as the width of the auxiliary edge frame, and generating the auxiliary edge frame. The center of the blank display area is aligned with the center of the auxiliary edge frame, that is, the length of the auxiliary edge frame is the vertical height H of the blank display area. It should be noted that the auxiliary edge frame is invisible when displayed.

[0055] In one embodiment, the height of each region is determined based on the weight coefficient ratio between the layers, including:

[0056] Determine whether there is an attached text box in the second level under each first level. If so, get the text box height h ij If not, mark the text box height as 0;

[0057] Get the height k of the text in the text box and calculate the height h of the text box ij The ratio a of the height k of the text in the same row as the text box ij ;

[0058] According to the ratio a ij , according to 1+a ij Calculate and record the calculation results as the weight coefficients of each second level;

[0059] Sum the weight coefficients of all second-level layers under each first-level layer, and the summed result is the weight coefficient of the corresponding first-level layer;

[0060] Calculate the sum of the weight coefficients of the first level, calculate the ratio of each first level to the sum, and adjust the height of each divided area in the vertical area according to the obtained ratio;

[0061] Among them, the h ij Refers to the height of the jth text box in the i-th row; k refers to the height of the text in the same row of the text box; a ij Refers to h ij The ratio of k.

[0062] In this embodiment, since the font size of the text in the same interface is unified, that is, the height k of the text in the same row of the text box is consistent;

[0063] In this embodiment, when the vertical area is divided equally, the second level under the same first level is regarded as a whole, and the page is preliminarily laid out according to the total number of the first level. However, since the number of second levels under each first level is different, the number and height of the text boxes of the text in each second level are also different. Therefore, if the page is to be laid out reasonably, the height of each first level needs to be determined separately, and the height of the first level can be obtained by summing the heights of its corresponding second level. Then, the height of each area is adjusted according to the ratio of the height of each first level to the total height of all first levels. However, when this solution is implemented, the height of the page to be processed will be different due to factors such as the size of the terminal display interface and the purpose of the page. Therefore, the adjustment of the height of each area can be converted into the calculation of the weight coefficient between the first levels. Based on the fact that the text font size in the same page is consistent, that is, the height k of the text in each text box is a fixed value, it can be reflected by using the ratio of the height of the content contained in the second level, such as the text and the text box attached to the text, to k as the weight coefficient. That is, the text box height h can be calculated by calculating the text box height h. ij The ratio of the height k of the text in the same row as the text box to k is used as the second-level weight coefficient, that is:

[0064] The second level weight coefficient L i =1+a ij

[0065] Among them, L i is the weight coefficient of the second level; a ij The height of the text box h ij The ratio of the height k of the text in the same row as the text box; 1 is the ratio of the height k of the text in the same row as the text box to the height k of the text in the same row as the text box, indicating that when the text in the second layer has no attached text box, its second-level weight coefficient is 1.

[0066] In this embodiment, if there are multiple subsidiary text boxes or the subsidiary text boxes have different heights, then h ij The height of the jth text box in the i-th row, h ij is a set of height values. For example, in the first row, the height of the first text box is 2, the height of the second text box is 4, and the height of the third text box is 6, that is, h 11 =2,h 12 =2,h 13 =6; the corresponding first line text height k is 2, according to a ij= h ij / k, to find a 11 =1,a12 =2,a 13 =3. To ensure that the later content is fully displayed, the highest height of the same level should be selected as the height of the corresponding second level, that is, h is selected here. 13 , and then according to L i =1+a ij It can be calculated that the weight coefficient of the second level is 4.

[0067] In this embodiment, the corresponding weight coefficients of the first levels are calculated based on the weight coefficients of the second levels, and then the weight coefficients of the first levels are summed. The height ratio of each first level in the entire blank area can be determined by the ratio of the weight coefficient of each first level to the sum of the weight coefficients of each first level. i Refers to the weight coefficient of the second level, N i Refers to the weight coefficient of the first level, then L1, L2, and L3 are the weight coefficients of all second levels under the same first level N1. The weight coefficient of the first level N1 = L1 + L2 + L3. And so on, calculate the weight coefficients of all first levels.

[0068] In this embodiment, the sum of the weight coefficients of the first level is N1+N2+N3+…+N n , then the ratio of each first level to the total can be calculated using the formula:

[0069] N i / (N1+N2+N3+…+N n )

[0070] In a specific embodiment, there are three first levels. The calculated weight coefficients for each first level are N1 = 1, N2 = 2, and N3 = 3. The ratios of the weight coefficients for each first level to the total weight coefficients for the first levels are 1 / 6, 1 / 3, and 1 / 2, respectively. If the height H of the blank display area is 12, the heights of the three divided areas are H1 = 12*1 / 6 = 2; H2 = 12*1 / 3 = 4; and H3 = 12*1 / 2 = 6.

[0071] Arrange the second-level content side by side, calculate the spacing, and adjust the height of each area based on the spacing, including:

[0072] Arrange the second-level contents side by side to form upper and lower areas;

[0073] Calculate the distance between the bottom edge of the content in the upper area and the top edge of the content in the lower area, and record it as content spacing;

[0074] Determine whether the content spacing is less than a preset first threshold. If so, expand the height of each area to transform the page into a long page.

[0075] Determine whether the content spacing is greater than a preset second threshold. If so, translate the lower area content upward until the content spacing is equal to a preset third threshold, leaving a blank space at the bottom of the page.

[0076] The second threshold is greater than the third threshold, and the third threshold is greater than the first threshold.

[0077] In this embodiment, the contents of each second level are arranged side by side up and down to form upper and lower areas, and area edge frames are generated for all upper and lower areas respectively. The length of the area edge frame is equal to the maximum length of the corresponding area, and the width of the area edge frame is equal to the maximum width of the corresponding area, to ensure that the contents of the corresponding areas are all within the generated area edge frames, and the position of the area edge frame of the upper area content and the position of the area edge frame of the lower area content are determined, and the position distance is calculated, which is the distance between the lower edge of the upper area content and the upper edge of the lower area content in this level, and is recorded as the content distance.

[0078] In this embodiment, to ensure the rationality of the adjustment, a first threshold, a second threshold, and a third threshold are preset, and the relationship between the three thresholds must be that the second threshold is greater than the third threshold, and the third threshold is greater than the first threshold. If the first threshold is preset to 3, the second threshold is 5, and the third threshold is 4, then when the content spacing is 2, it can be determined that the content spacing is less than the first threshold, and the height of each area is expanded, making the page longer. When the content spacing is 6, it can be determined that the content spacing is greater than the second threshold, and the content of the lower area needs to be shifted upward until the content spacing equals 4.

[0079] In one embodiment, determining the icon size according to a set ratio includes:

[0080] Get the length and width values ​​of each icon, and select the maximum length and maximum width values;

[0081] Use the maximum length value as the edge box length and the maximum width value as the edge box width to generate an edge box for each icon;

[0082] Align the center of each icon with the center of the corresponding edge frame so that the icon is located within the edge frame;

[0083] According to the set ratio, the icons in each edge frame are enlarged or reduced proportionally to make the sizes of the icons consistent.

[0084] In this embodiment, the set ratio range is 1% to 100%, which can be set and adjusted according to user needs. The icon framed by the edge is proportionally enlarged or reduced according to the set ratio to ensure that the icon only changes size but not shape.

[0085] In this embodiment, the edge frame is used for auxiliary operation and is invisible in the display state.

[0086] In one embodiment, determining the icon position by corner point positioning includes:

[0087] S1: Determine the position of the corner point at the upper left corner of the blank display area so that the corner point of the upper left corner of the first edge frame coincides with the corner point at the upper left corner of the blank display area; move the first edge frame according to a preset rule until the distance between the edge frame and the boundary of the blank display area is equal to the boundary value;

[0088] S2: Starting from the second edge box, each subsequent edge box takes the upper right corner of the previous edge box as the starting point and moves according to the preset rules;

[0089] S3: Determine whether the distance between the edge box and the boundary of the blank display area is less than the boundary value. If so, use the lower left corner point of the first edge box in the same row as the starting point and move according to the preset rules;

[0090] S4: Repeat the operations of S2 and S3 until all edge frames are placed.

[0091] When implementing this embodiment, the following specific operations are performed:

[0092] S1: Determine the corner point A of the upper left corner of the blank display area; determine the corner point a of the upper left corner of the first edge frame; make the corner point a coincide with the corner point A; according to the preset rules, move the target edge frame one unit distance to the right and one unit distance downward, repeat this action until the distance between the long side of the target edge frame and the boundary of the blank display area is equal to the boundary value m1, or until the distance between the width of the target edge frame and the boundary of the blank display area is equal to the boundary value m2. When either of these two states occurs, it is only necessary to continue to move in one direction to the side where the boundary distance between the target edge frame and the blank display area is less than the boundary value until the boundary distance between the target edge frame and the blank display area is equal to the corresponding boundary value, that is, stop moving, and place the upper edge frame there. The boundary values ​​m1 and m2 can be different values ​​or the same value, that is, m1 and m2 can be arbitrary values, which are not limited here;

[0093] S2: Starting from the second edge box, the new corner point is the upper right corner point of the previous edge box, and moves according to the movement rules preset in S1;

[0094] S3: After placing several edge frames, if the distance between the target edge frame and the boundary of the blank display area does not meet the set boundary value m1 or m2, the lower left corner point of the first edge frame in the same row is used as a new starting point and the movement is performed according to the movement rules preset in S1;

[0095] S4: Repeat the operations of S2 and S3 until all edge frames are placed.

[0096] After all edge frames are placed, adjust the left and right positions of all edge frames according to the distance M1 between the left side of the first edge frame in the first row and the boundary of the blank display area, and the distance M2 between the right side of the last edge frame in the first row and the boundary of the blank display area, so that M1 = M2.

[0097] In one embodiment, translating the target area frame according to the input distance parameter includes:

[0098] Lock the relative position of each object and the corresponding area frame;

[0099] Get the distance parameter entered by the user;

[0100] The target region frame is translated according to the distance parameter, so that each object in the target region frame is translated synchronously, and the relative position of each object in the region frame and the region frame remains unchanged.

[0101] In this embodiment, since the relative position of each object and the corresponding area frame is locked, when a translation operation is performed after obtaining the new distance parameter input by the user, all contents within the entire area frame should be translated synchronously, and the relative position of each content and the corresponding area frame will not change.

[0102] like Figure 4 As shown, in one embodiment, the apparatus of the method for automatically generating a page of a letter of guarantee management system includes:

[0103] A data source processing module, which is used to obtain the page type selected by the user and divide the page to be generated into text type, icon type and mixed type;

[0104] A page generation module, configured to execute corresponding page generation processes for different types of pages;

[0105] Determine the type of page to be generated. If the page to be generated is of text type, use a tree structure to establish a hierarchical relationship and name each level; obtain a blank display area and divide it vertically according to the number of side-by-side titles in the first level; determine the height of each area based on the weight coefficient ratio between levels; arrange the content of each second level side by side, calculate the spacing, and adjust the height of each area according to the spacing;

[0106] If the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position;

[0107] If the page to be generated is a mixed-type page, a hierarchical relationship is established using a tree structure, and icons and text are bound together as the first level of the tree structure. A blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level. The height of each region is determined based on the weight coefficient ratio between the levels. The content of each second level is arranged side by side, and the spacing is calculated, and the height of each region is adjusted according to the spacing.

[0108] The page adjustment module is used to determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain the distance parameters input by the user, and translate the target object or target area frame according to the input distance parameters.

[0109] In this embodiment, Figure 5 The data source processing module, page generation module, and page adjustment module shown in the figure are computer programs composed of various program modules, which enable the processor to execute the steps of the automatic page generation method of the letter of guarantee management system in various embodiments of the present invention described in this specification.

[0110] A computer device for automatically generating pages for a letter of guarantee management system, characterized in that it includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for automatically generating pages for a letter of guarantee management system described in any one or more embodiments of the present invention.

[0111] In this embodiment, the above-mentioned computer device is the operating environment for each module provided by the present invention to execute the corresponding method steps. For the explanation of each link, please refer to the explanation content of the method or device of the present invention, and this embodiment will not be repeated here.

[0112] Figure 6 The internal structure of a computer device in one embodiment is shown. The computer device includes a processor, memory, a network interface, an input device, and a display screen connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When executed by the processor, the computer program enables the processor to implement the method for automatically generating a page for a letter of guarantee management system provided in an embodiment of the present invention. The internal memory may also store a computer program. When executed by the processor, the computer program enables the processor to implement the method for automatically generating a page for a letter of guarantee management system provided in an embodiment of the present invention. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or may be a key, trackball, or touchpad provided on the computer device housing, or may be an external keyboard, touchpad, or mouse.

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

[0114] In one embodiment, the method for automatically generating a page of a letter of guarantee management system provided by the embodiment of the present invention can be implemented in the form of a computer program. The computer program can be used in Figure 6 The computer device shown in FIG. 1 is run on the computer device shown in FIG. The memory of the computer device may store various program modules constituting the device for automatically generating the guarantee management system page, for example, Figure 5 The data source processing module, page generation module, and page adjustment module shown in the figure are computer programs composed of various program modules, which enable the processor to execute the steps of the automatic page generation method of the letter of guarantee management system in various embodiments of the present invention described in this specification.

[0115] For example, Figure 6 The computer device shown can be Figure 5 The data source processing module in the apparatus of the automatic page generation method for the letter of guarantee management system shown in the figure performs the following operations: obtaining the page type selected by the user and classifying the page to be generated into a text type, an icon type, and a mixed type; the computer device can execute the following operations through the page generation module: determining the type of the page to be generated; if the page to be generated is a text type, establishing a hierarchical relationship using a tree structure and naming each level; obtaining a blank display area and dividing it vertically into regions according to the number of side-by-side titles in the first level; determining the height of each region based on the weight coefficient ratio between the levels; arranging the content of each second level side by side, calculating the spacing, and adjusting the height of each region based on the spacing;

[0116] If the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position;

[0117] If the page to be generated is a mixed type page, a hierarchical relationship is established using a tree structure, and icons and text are bound as the first level of the tree structure; a blank display area is obtained, and the vertical area is divided according to the number of side-by-side titles of the first level; the height of each area is determined according to the weight coefficient ratio between the levels; the contents of each second level are arranged side by side, and the spacing is calculated, and the height of each area is adjusted according to the size of the spacing; the computer device can determine the relative distance between each object and the area box, and the area box and the page up, down, left, and right through the page adjustment module, lock the relative position, obtain the distance parameter input by the user, and translate the target object or target area box according to the input distance parameter.

[0118] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are performed:

[0119] According to the page type selected by the user, the pages to be generated are divided into text type, icon type and mixed type;

[0120] When the page to be generated is of text type, a hierarchical relationship is established using a tree structure and each level is named; a blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level; the height of each region is determined based on the weight coefficient ratio between the levels; the content of each second level is arranged side by side, the spacing is calculated, and the height of each region is adjusted according to the spacing;

[0121] When the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position;

[0122] When the page to be generated is a mixed-type page, a hierarchical relationship is established using a tree structure, and icons and text are bound together as the first level of the tree structure. A blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level. The height of each region is determined based on the weight coefficient ratio between the levels. The content of each second level is arranged side by side, and the spacing is calculated. The height of each region is adjusted according to the spacing.

[0123] Determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain the distance parameters entered by the user, and translate the target object or target area frame according to the entered distance parameters.

[0124] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor performs the following steps:

[0125] According to the page type selected by the user, the pages to be generated are divided into text type, icon type and mixed type;

[0126] When the page to be generated is of text type, a hierarchical relationship is established using a tree structure and each level is named; a blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level; the height of each region is determined based on the weight coefficient ratio between the levels; the content of each second level is arranged side by side, the spacing is calculated, and the height of each region is adjusted according to the spacing;

[0127] When the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position;

[0128] When the page to be generated is a mixed-type page, a hierarchical relationship is established using a tree structure, and icons and text are bound together as the first level of the tree structure. A blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level. The height of each region is determined based on the weight coefficient ratio between the levels. The content of each second level is arranged side by side, and the spacing is calculated. The height of each region is adjusted according to the spacing.

[0129] Determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain the distance parameters entered by the user, and translate the target object or target area frame according to the entered distance parameters.

[0130] It should be understood that, although the various steps in the flow chart of each embodiment of the present invention are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0131] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-described methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

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

[0133] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A method for automatically generating a page for a letter of guarantee management system, characterized in that: The method for automatically generating a page of the letter of guarantee management system includes: According to the page type selected by the user, the pages to be generated are divided into text type, icon type and mixed type; When the page to be generated is of text type, a hierarchical relationship is established using a tree structure and each level is named; a blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level; the height of each region is determined based on the weight coefficient ratio between the levels; the content of each second level is arranged side by side, the spacing is calculated, and the height of each region is adjusted according to the spacing; When the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position; When the page to be generated is a mixed-type page, a hierarchical relationship is established using a tree structure, and icons and text are bound together as the first level of the tree structure. A blank display area is obtained and vertically divided into regions according to the number of side-by-side titles in the first level. The height of each region is determined based on the weight coefficient ratio between the levels. The content of each second level is arranged side by side, and the spacing is calculated. The height of each region is adjusted according to the spacing. Determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain the distance parameters entered by the user, and translate the target object or target area frame according to the entered distance parameters; The step of obtaining the blank display area includes the following steps: Get the base map of the display page and draw a cross-shaped reference line; Divide each reference line into four equal parts and mark the dividing points; Read the pixel value of each pixel; Perform grayscale processing on all pixels; Get the grayscale value of each equally divided point; Select each equally divided point as the starting point and use the 8-connection method to determine the connected domain; Mark the determined connected domain as a blank display area; Determining the height of each region based on the weight coefficient ratio between levels includes: Determine whether there is an attached text box in the second level under each first level. If so, get the text box height h ij If not, mark the text box height as 0; Get the height of the text in the text box and calculate the text box height h ij The height k of the text in the same row as the text box ij The ratio a ij ; According to the ratio a ij , according to 1+a ij Calculate and record the calculation results as the weight coefficients of each second level; Sum the weight coefficients of all second-level layers under each first-level layer, and the summed result is the weight coefficient of the corresponding first-level layer; Calculate the sum of the weight coefficients of the first level, calculate the ratio of each first level to the sum, and adjust the height of each divided area in the vertical area according to the obtained ratio; Among them, the h ij Refers to the height of the jth text box in the i-th row; k ij Refers to the height of the i-th row and j-th text, a ij Point to k ij With h ij ratio.

2. The method for automatically generating a page for a letter of guarantee management system according to claim 1, characterized in that: The vertical area division according to the number of side-by-side titles at the first level includes: Determine the vertical height H of the blank display area; Determine the total number N of parallel headings at the first level; The blank display area is divided into N areas according to H / N.

3. The method for automatically generating a page for a letter of guarantee management system according to claim 1, characterized in that: The second-level contents are arranged side by side, the spacing is calculated, and the height of each area is adjusted according to the spacing, including: Arrange the second-level contents side by side to form upper and lower areas; Calculate the distance between the bottom edge of the content in the upper area and the top edge of the content in the lower area, and record it as content spacing; Determine whether the content spacing is less than a preset first threshold. If so, expand the height of each area to transform the page into a long page. Determine whether the content spacing is greater than a preset second threshold. If so, translate the lower area content upward until the content spacing is equal to a preset third threshold, leaving a blank space at the bottom of the page. The second threshold is greater than the third threshold, and the third threshold is greater than the first threshold.

4. The method for automatically generating a page for a letter of guarantee management system according to claim 1, characterized in that: Determining the icon size according to the set ratio includes: Get the length and width values ​​of each icon, and select the maximum length and maximum width values; Use the maximum length value as the edge box length and the maximum width value as the edge box width to generate an edge box for each icon; Align the center of each icon with the center of the corresponding edge frame so that the icon is located within the edge frame; According to the set ratio, the icons in each edge frame are enlarged or reduced proportionally to make the sizes of the icons consistent.

5. The method for automatically generating a page for a letter of guarantee management system according to claim 1, characterized in that: The method of determining the icon position by using corner point positioning includes: S1: Determine the position of the corner point at the upper left corner of the blank display area so that the corner point of the upper left corner of the first edge frame coincides with the corner point at the upper left corner of the blank display area; move the first edge frame according to a preset rule until the distance between the edge frame and the boundary of the blank display area is equal to the boundary value; S2: Starting from the second edge box, each subsequent edge box takes the upper right corner of the previous edge box as the starting point and moves according to the preset rules; S3: Determine whether the distance between the edge box and the boundary of the blank display area is less than the boundary value. If so, use the lower left corner point of the first edge box in the same row as the starting point and move according to the preset rules; S4: Repeat the operations of S2 and S3 until all edge frames are placed.

6. The method for automatically generating a page for a letter of guarantee management system according to claim 1, characterized in that: The step of translating the target area frame according to the input distance parameter includes: Lock the relative position of each object and the corresponding area frame; Get the distance parameter entered by the user; The target region frame is translated according to the distance parameter, so that each object in the target region frame is translated synchronously, and the relative position of each object in the region frame and the region frame remains unchanged.

7. A method for automatically generating a page for a letter of guarantee management system, characterized in that: include: A data source processing module, which is used to obtain the page type selected by the user and divide the page to be generated into text type, icon type and mixed type; A page generation module, configured to execute corresponding page generation processes for different types of pages; Determine the type of page to be generated. If the page to be generated is of text type, use a tree structure to establish a hierarchical relationship and name each level; Obtain the blank display area and divide it vertically according to the number of side-by-side titles at the first level; determine the height of each area based on the weight coefficient ratio between levels; Arrange the second-level content side by side, calculate the spacing, and adjust the height of each area according to the spacing; If the page to be generated is of icon type, the size of the blank display area is determined, the icon size is determined according to the set ratio, the page boundary distance is determined according to the set boundary value, and the icon position is determined by corner positioning; the icons are arranged according to the icon size, page boundary distance, and icon position; If the page to be generated is a mixed type page, a hierarchical relationship is established using a tree structure, and icons and texts are bound together as the first level of the tree structure. Obtain the blank display area and divide it vertically according to the number of side-by-side titles at the first level; determine the height of each area based on the weight coefficient ratio between levels; Arrange the second-level content side by side, calculate the spacing, and adjust the height of each area according to the spacing; A page adjustment module, which is used to determine the relative distances between each object and the area frame, and between the area frame and the page, lock the relative positions, obtain distance parameters input by the user, and translate the target object or target area frame according to the input distance parameters; Determining the height of each region based on the weight coefficient ratio between levels includes: Determine whether there is an attached text box in the second level under each first level. If so, get the text box height h ij If not, mark the text box height as 0; Get the height of the text in the text box and calculate the text box height h ij The height k of the text in the same row as the text box ij The ratio a ij ; According to the ratio a ij , according to 1+a ij Calculate and record the calculation results as the weight coefficients of each second level; Sum the weight coefficients of all second-level layers under each first-level layer, and the summed result is the weight coefficient of the corresponding first-level layer; Calculate the sum of the weight coefficients of the first level, calculate the ratio of each first level to the sum, and adjust the height of each divided area in the vertical area according to the obtained ratio; Among them, the h ij Refers to the height of the jth text box in the i-th row; k ij Refers to the height of the i-th row and j-th text, a ij Point to k ij With h ij ratio.

8. A computer device for automatically generating a guarantee letter management system page, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for automatically generating a guarantee management system page as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Page height self-adaptation method and apparatus

    CN106610824A

  • Method and device for adjusting page layout

    CN108287643A

  • Method and device for realizing streaming effect in absolute positioning layout and electronic equipment

    CN109739501A

  • Page rendering method and device, electronic terminal and storage medium

    CN114186155A