An information typesetting method, apparatus, device, and storage medium

By using an intelligent layout method, the layout area, safety area, and target area are determined based on the size and information type of the target display area. This solves the limitations of existing banner generation technologies, achieving aesthetically pleasing and harmonious layouts of any size and number of characters, and improving the scalability and aesthetics of banners.

CN113204941BActive Publication Date: 2026-06-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2020-02-03
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies require the simultaneous input of main text, secondary text, and action point text when generating banner ads. If any one of them is missing, the ad cannot be generated. Furthermore, the text size only varies based on the number of characters, and the technology cannot support the generation of long and short texts or single-line texts, which consumes a lot of manpower and time.

Method used

By acquiring the size and information type of the target display area, the layout area, safe area, and target area are determined. Based on the size and type of these areas, the target display information is intelligently laid out, free from word count limitations, achieving aesthetically pleasing and harmonious layouts at any size and with any number of words.

Benefits of technology

It enables banner generation with any size and any number of characters, improves the scalability and aesthetics of the layout, saves manpower and time costs, and generates banners that are both harmonious and beautiful.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113204941B_ABST
    Figure CN113204941B_ABST
Patent Text Reader

Abstract

This application provides an information layout method, apparatus, device, and storage medium. The method includes: acquiring size information of a target display area and at least one target display piece of information; determining a layout area corresponding to at least one target display piece of information within the target display area based on the size information of the target display area; determining a safety area size information ratio based on the size information of the layout area and the size information of the target display area; determining a safety area corresponding to at least one target display piece of information within the layout area based on the safety area size information ratio and the size information of the layout area; determining a target area corresponding to at least one target display piece of information within the safety area based on the type of at least one target display piece of information and the size information of the safety area; and layouting at least one target display piece of information within the corresponding target area. This application can generate banner advertisements with coordination and aesthetics under any size, any number of lines of text, and any number of characters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of Internet technology, specifically relating to an information typesetting method, apparatus, device, and storage medium. Background Technology

[0002] To ensure a harmonious and aesthetically pleasing banner ad display on an advertising page, the elements within the page need to be arranged in a logical and organized manner. This arrangement involves adjusting the position and size of visual information elements such as text, images, and graphics on the page layout to create a cohesive and organized presentation.

[0003] like Figure 1 As shown, most existing layout functions are rule-based. When a user enters a layout function like this... Figure 1 After generating the banner as shown in A, you need to input the main text, secondary text, and action point text simultaneously to generate the corresponding banner. If any one of the three texts is missing, the banner cannot be generated. Figure 1 The banner generated from the title text input in A can be like this: Figure 1 As shown in B in the diagram. Meanwhile, continue as follows... Figure 1 As shown in B, existing technologies only adjust text size based on the number of words. When the text has more words, the font size decreases; when the text has fewer words, the font size increases. Furthermore, existing technologies have limitations on the number of words in the text and do not support the generation of banners with long text, short text, or single-line text. Banners cannot be generated when only the main title or subtitle is determined. In addition, generating banners based on existing technologies requires designers to develop text layout rules for each size, which consumes a significant amount of manpower and time. Summary of the Invention

[0004] To support intelligent text typesetting under any size, any number of lines, and any number of characters, and to generate banners that are both harmonious and aesthetically pleasing, this application proposes an information typesetting method, apparatus, device, and storage medium.

[0005] On the one hand, this application proposes an information typesetting method, the method comprising:

[0006] Obtain the size information of the target display area and at least one target display information;

[0007] Based on the size information of the target display area, determine the layout area corresponding to the at least one target display information in the target display area;

[0008] The size ratio of the safe area is determined based on the size information of the layout area and the size information of the target display area;

[0009] Based on the ratio of the safe area size information and the size information of the layout area, a safe area corresponding to the at least one target display information is determined in the layout area;

[0010] Based on the type of the at least one target display information and the size information of the safe area, determine the target area corresponding to the at least one target display information in the safe area;

[0011] The information of at least one target is displayed in the corresponding target area.

[0012] On the other hand, this application proposes an information typesetting device, the device comprising:

[0013] The acquisition module is used to acquire the size information of the target display area and at least one target display information;

[0014] The layout area determination module is used to determine the layout area corresponding to the at least one target display information in the target display area based on the size information of the target display area.

[0015] The safe area size information ratio determination module is used to determine the safe area size information ratio based on the size information of the layout area and the size information of the target display area;

[0016] The safe area determination module is used to determine the safe area corresponding to the at least one target display information in the layout area based on the ratio of the safe area size information and the size information of the layout area.

[0017] The target area determination module is used to determine the target area corresponding to the at least one target display information in the safe area based on the type of the at least one target display information and the size information of the safe area;

[0018] The layout module is used to arrange the at least one target display information in the corresponding target area.

[0019] On the other hand, this application proposes an electronic device including a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the information typesetting method as described above.

[0020] On the other hand, this application proposes a computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded by a processor and executed as described above in the information typesetting method.

[0021] This application proposes an information layout method, apparatus, device, and storage medium. Based on the size information of the target display area input at a user terminal and one or more target display information of any number of characters, a layout area is determined from the target display area according to its size information. Then, based on the size information of the target display area, the layout area is planned to obtain a safe area. Next, based on the type of target display information and the size of the safe area, a corresponding target area is planned for each target display information. Finally, each target display information is placed in its corresponding target area. Because the target display information can be placed arbitrarily within the safe area without affecting the overall layout, a better layout scheme can be used for any number or number of target display information, allowing the target display information text to break free from rule constraints, significantly improving the banner's scalability and enabling richer and more diverse layout methods. Furthermore, since this application determines the safe area based on the size information of the target display area input by the user terminal, and is not limited to a fixed size, it ensures that the banner text will not lose its aesthetic appeal due to size changes under various sizes, thereby guaranteeing the usability, scalability, coordination, and aesthetics of the banner in the overall layout. Attached Figure Description

[0022] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the banner structure generated using existing technology.

[0024] Figure 2 This is a schematic diagram of the implementation environment of an information layout method provided in an embodiment of this application.

[0025] Figure 3 This is a flowchart illustrating an information layout method provided in an embodiment of this application.

[0026] Figure 4 This is a schematic diagram of the structure of an information editing interface provided in an embodiment of this application.

[0027] Figure 5 This is a schematic diagram illustrating the process of an end user inputting information in an information editing interface, as provided in an embodiment of this application.

[0028] Figure 6This is a flowchart illustrating another information layout method provided in an embodiment of this application.

[0029] Figure 7 This is a schematic diagram of the structure of a typesetting area provided in an embodiment of this application.

[0030] Figure 8 This is a flowchart illustrating another information layout method provided in an embodiment of this application.

[0031] Figure 9 This is a flowchart illustrating another information layout method provided in an embodiment of this application.

[0032] Figure 10 This is a schematic diagram of the structure of a security area provided in an embodiment of this application.

[0033] Figure 11 This is a flowchart illustrating another information layout method provided in an embodiment of this application.

[0034] Figure 12 This is a schematic diagram of the structure of the main and subtitle information area provided in the embodiments of this application.

[0035] Figure 13 This is a schematic diagram of the structure for regional planning of main and subtitle information provided in an embodiment of this application.

[0036] Figure 14 This is a schematic diagram illustrating the size planning effect of the target display information provided in the embodiments of this application.

[0037] Figure 15 This is a flowchart illustrating another information layout method provided in an embodiment of this application.

[0038] Figure 16 This is a banner diagram obtained under different sizes and display information using the information layout method provided in the embodiments of this application.

[0039] Figure 17 This is a schematic diagram of the structure of an information typesetting device provided in an embodiment of this application.

[0040] Figure 18 This is a schematic diagram of the server structure provided in an embodiment of this application. Detailed Implementation

[0041] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0043] Figure 2 This is a schematic diagram illustrating the implementation environment of an information layout method provided in an embodiment of the present invention. For example... Figure 2 As shown, this implementation environment may include at least a terminal 01 and a server 02. The terminal 01 can establish a direct or indirect connection with the server 02 via wired or wireless means to achieve data transmission between them through this network. For example, the terminal 01 can send user-inputted size information and target display information to the server 02 through this network. The server 02 can determine the target area based on the size information and target display information, and then display the target display information in the target area through the terminal 01.

[0044] Specifically, the server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0045] Specifically, terminal 01 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these.

[0046] It should be noted that, Figure 2 This is just one example.

[0047] Figure 3 This is a flowchart illustrating an information layout method provided in an embodiment of this application. This specification provides the operational steps of the method described in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server product execution, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown in the attached drawings... Figure 3 As shown, the method may include:

[0048] S101. Obtain the size information of the target display area and at least one target display information.

[0049] In this application's embodiments, "Banner" refers to a banner ad, an image displaying a merchant's advertising content placed on the advertiser's page. It is the most basic form of internet advertising, and the image can be static or animated. Typically, when a user clicks on a banner, they are redirected to the advertiser's webpage.

[0050] Accordingly, the target display area can be the area corresponding to the banner, that is, the area displayed by the banner.

[0051] In practical applications, when end users want to generate a banner that is well-organized, harmonious, and aesthetically pleasing, they can access the banner generation system. The banner generation system will display banners to users such as... Figure 4 The information editing interface shown is as follows: Figure 4 As shown in AC, in this information editing interface, the end user can select or enter the size information of the banner, and enter at least one target display information that they want to display.

[0052] In one feasible embodiment, the size information of the target display area can be manually selected by the end user on the information editing interface, or it can be manually entered by the end user on the information editing interface. When the end user selects manually, the information editing interface can present a size information selection box for the end user to select. When the end user enters manually, the information editing interface can present an information input box for the user to enter manually.

[0053] In one feasible embodiment, the target display information can be of various types, quantities, and word counts. For example, the target display information may include main title information, description information of the main title information, and links to the advertiser's webpage corresponding to the main and subtitle information.

[0054] In practical applications, "various quantities" can refer to the number of lines of information, the description of the main title information can refer to the subtitle information, and the link information can refer to the action point information (when the end user clicks on the action point information, they can immediately browse the advertiser's webpage). For example, if the main title information is "The female boss in the rouge shop", then the subtitle information can be "Shop No. 75", and the action point information can be "Buy Now", etc.

[0055] In practical applications, taking the description information of the main title information as the subtitle information and the link information as the action point information as an example, the at least one target display information may include at least one line of main title information, at least one line of subtitle information, at least one line of main title information + at least one line of subtitle information, at least one line of main title information + action point information, at least one line of subtitle information + action point information, at least one line of main title information + at least one line of subtitle information + action point information, etc.

[0056] It should be noted that there is no limit to the number of characters in each target display information. Furthermore, in practical applications, the target display area may only include the main title and / or subtitle information. However, since the action point information is the corresponding link information, the target display area generally cannot contain only action point information. That is, action point information generally cannot exist alone; it must exist simultaneously with the main title and / or subtitle information. For example, action point information may exist simultaneously with the main title, with the subtitle, or with both the main and subtitle information.

[0057] Figure 5 The diagram illustrates the process of an end-user inputting information in the information editing interface. As shown in Figure 5, end-users can input any amount and number of characters of target display information in the information editing interface according to their actual needs, and select or fill in any size of the target display area. This enables the generation of banners for various types and amounts of information (such as long text, short text, and single-line text), allowing the target display information to break free from rule constraints and have richer and more diverse layout options. Furthermore, by breaking free from rule constraints, designers are no longer required to construct text layout constraints, effectively saving manpower and time costs.

[0058] S103. Based on the size information of the target display area, determine the layout area corresponding to the at least one target display information in the target display area.

[0059] In the embodiments of this application, such as Figure 6 As shown, S103 may include:

[0060] S10301. If the target display area includes a target object, then the object area corresponding to the target object is determined based on the size information of the target display area and the attribute information of the target object.

[0061] S10303. Determine the positional bias of the layout area based on the object area.

[0062] S10305. Within the specified positional bias range, the area outside the object area in the target display area is determined as the layout area.

[0063] S10307. If the target display area does not include the target object, then the target display area is determined as the layout area.

[0064] In this embodiment, the target object refers to the thing that the banner most wants to convey to the user, which can be a person, a product, a virtual product, etc. For example, if the main title is "The Female Boss in the Rouge Shop," then the target object could be a book. This target object can be determined before layout; for example, if a book advertiser wants to promote a certain book, they will use that book as the target object and display it in the target display area.

[0065] In one feasible embodiment, such as Figure 4 As shown in D, the information editing interface may also include a tag information input box, in which the end user can enter a tag article corresponding to the book (e.g., bestseller) and add the tagged article to the book.

[0066] It should be noted that, Figure 4 This is just one example. In other application scenarios, Figure 4 The information editing interface can also be expressed in other forms.

[0067] In practical applications, since the target display area may or may not include the target object, after obtaining the size information of the target display area, the layout area can be determined based on whether the target object exists in the target display area. The specific process of layout area can be as follows:

[0068] (1) Figure 7 The diagram shown is a structural representation of the typesetting area. Figure 7As shown, if the target display area includes a target object, the area outside the target object within the target display area can be determined as the layout area. Specifically: since the target object can be preset, and its attribute information (position information and size information, etc.) can also be pre-selected, the object area corresponding to the target object can be determined within the target display area based on the length and width information of the target display area, the length and width information of the target object, and the position information of the target object. After obtaining the object area, the positional bias of the layout area can be determined based on the object area, and the layout area can be determined based on this positional bias. For example, if the object area is set closer to the left side of the target display area, then the layout area is set to the right, and the area to the right of the object area can be determined as the layout area. If the object area is set closer to the right side of the target display area, then the layout area is set to the left, and the area to the left of the object area can be determined as the layout area. If the object area is in the middle of the target display area, then the layout area can be centered.

[0069] (2) If the target display area does not include the target object, the target display area can be used as the layout area. Alternatively, the target display area can be scaled according to the preset scaling ratio, and the scaled area can be used as the layout area, and the layout area can be centered as shown.

[0070] In this embodiment, the layout area is determined by using the size information of the target display area selected or entered by the target object and the end user on the information editing interface. This can improve the accuracy and feasibility of determining the safe area, thereby improving the accuracy of subsequent safe area determination.

[0071] S105. Determine the ratio of the size information of the safe area based on the size information of the layout area and the size information of the target display area.

[0072] In one feasible embodiment, such as Figure 8 As shown, S105 may include:

[0073] S10501. Determine the safety area length information coefficient ratio based on the length information of the layout area and the length information of the target display area.

[0074] S10503. Determine the safety area width information coefficient ratio based on the width information of the layout area and the width information of the target display area.

[0075] S10505. Determine the percentage of safe area length information based on the ratio of the safe area length information coefficients.

[0076] S10507. Determine the percentage of safe area width information based on the safe area width information coefficient ratio.

[0077] S10509. The percentage of the length information of the safe area and the percentage of the width information of the safe area are used as the ratio of the size information of the safe area.

[0078] In a feasible embodiment, the calculation formula for S10501 can be as follows:

[0079] LRatio=textAreaLength / BanneLength,

[0080] Wherein, LRatio represents the ratio of the length information coefficient of the safe area, textAreaLength represents the length information of the layout area, and BannerLength represents the length information of the target display area.

[0081] The formula for calculating S10503 is as follows:

[0082] WRatio=textAreaWidth / BannerWidth,

[0083] Wherein, WRatio represents the ratio of the width information coefficient of the security area, textAreaWidth represents the width information of the layout area, and BannerWidth represents the width information of the target display area.

[0084] The formula for calculating S10505 is as follows:

[0085] ,

[0086] Where percentL represents the percentage of the total area length information, and LRatio represents the ratio of the safe area length information coefficient.

[0087] The formula for calculating S10507 is as follows:

[0088] ,

[0089] Where percentW represents the percentage of secure area width information, and WRatio represents the ratio of secure area width information coefficients.

[0090] It should be noted that the values ​​in the calculation formulas of S10501-S10507 (such as 2.8125, 0.0024375, 0.1525, etc.) are just examples. In other application scenarios, other values ​​can be selected for the calculation of the safe area size information ratio according to actual needs.

[0091] S107. Based on the ratio of the safety area size information and the size information of the layout area, determine the safety area corresponding to the at least one target display information in the layout area.

[0092] In one feasible embodiment, such as Figure 9 As shown, S107 may include:

[0093] S10701. Determine the length information of the safe area based on the percentage of the safe area length information and the length information of the layout area.

[0094] S10703. Determine the width information of the safe area based on the percentage of the safe area width information and the width information of the layout area.

[0095] S10705. Based on the length information and width information of the safe area, generate the safe area in the layout area and center the safe area.

[0096] In a feasible embodiment, the calculation formula for S10701 can be as follows:

[0097] ,

[0098] Here, safeL represents the length of the safe area, percentL represents the percentage of the total area length, and textAreaLength represents the length of the layout area.

[0099] The formula for calculating S10703 is as follows:

[0100] ,

[0101] Among them, safeW represents the width of the safe area, percentW represents the percentage of the safe area width, and textAreaWidth represents the width of the text area.

[0102] After obtaining safeL and safeW, the corresponding safe regions can be generated in the typesetting area.

[0103] In one feasible embodiment, the safe area can be centered within the layout area. Of course, when the target display area includes a target object, in addition to centering, one side of the safe area can also be aligned with one side of the object area, such as... Figure 10 As shown.

[0104] In this embodiment, the safe area is determined by the ratio of the safe area size information to the size information of the layout area. This safe area can accommodate information display for any target without affecting the overall banner layout. This method of determining the safe area not only improves the accuracy and reliability of the determination but also allows the safe area to be dynamically planned for target display areas of different sizes, rather than being a fixed ratio. This means that banner generation is no longer limited to a fixed size and can generate banners of any size.

[0105] S109. Based on the type of the at least one target display information and the size information of the security area, determine the target area corresponding to the at least one target display information in the security area.

[0106] In one feasible embodiment, such as Figure 11 As shown, S109 may include:

[0107] S10901. If the at least one target display information includes action point information, then the size information of the first target area corresponding to the action point information is determined based on the length information of the safe area and the width information of the target display area.

[0108] S10903. Based on the size information of the first target area, generate a first target area corresponding to the action point information in the safe area, and center the first target area.

[0109] S10905. The area in the security area other than the first target area is determined as the main and subtitle information area.

[0110] S10907. If the action point information is not included in the at least one target display information, then the safe area is determined as the main and subtitle information area.

[0111] In a feasible embodiment, it can be first determined whether the at least one target display information includes action point information. If action point information exists, a first target area can be planned for the action point information. Specifically, the length information of the safe area can be used as the length information of the first target area, and the product of the width information of the target display area and a preset threshold (for example, the preset threshold can be 0.08) can be determined as the width information of the first target area. A first target area (i.e., the action point information area) corresponding to the length information and width information of the first target area can be generated in the safe area, and the first target area can be centered in the safe area.

[0112] In practical applications, since action point information generally cannot exist in isolation, after determining the first target area, the area within the safe zone other than the first target area can be designated as the main and sub-title information area, such as... Figure 12 As shown in A. If action point information does not exist, the safe area can be directly defined as the main and sub-title information area, such as... Figure 12 As shown in B in the diagram.

[0113] After determining the main and subtitle information areas, new areas can be planned for each main and subtitle based on these areas, as well as the number of titles and the amount of text in each title and subtitle. The main title information has higher importance and will receive a larger target area. Specifically, continuing as follows... Figure 11 As shown, if the at least one target display information includes candidate title information, and the candidate title information includes at least one of main title information or subtitle information, then the method may further include:

[0114] S10909. Determine the width percentage of the candidate title information based on the aspect ratio of the security area and the preset threshold corresponding to the candidate title information.

[0115] S109011. Determine the width information of the second target region corresponding to the candidate title information based on the width information percentage of the candidate title information and the width information of the security region.

[0116] S109013. Determine the length information of the second target region corresponding to the candidate title information based on the length information of the security region.

[0117] S109015. Based on the length information and width information of the second target region, generate a second target region corresponding to the candidate title information in the main and subtitle information region.

[0118] S109017. The second target area is centered in the main and sub-title information area, and when the action point information is included in the at least one target display information, the first target area is placed around the second target area. When the candidate title information is the main title information and the sub-title information, the second target area corresponding to the main title information is centered in the main and sub-title information area, and the second target area corresponding to the sub-title information is placed around the second target area corresponding to the main title information.

[0119] In a feasible embodiment, if the candidate title information includes subtitle information, the calculation formula for S10909 can be as follows:

[0120] ,

[0121] Wherein, percentW1 represents the percentage of width information of candidate title information including subtitle information, percentW0 represents the preset width information percentage, which can be taken as 0.618 in practical applications, safeL represents the length information of the safe area, safeW represents the width information of the safe area, and 00.35 is the preset threshold corresponding to the candidate title information including subtitle information.

[0122] In a feasible embodiment, if the candidate title information does not include subtitle information, the calculation formula for S10909 can be as follows:

[0123] ,

[0124] Where percentW2 represents the percentage of width information of candidate title information excluding subtitle information, and 0.3458 is the preset threshold corresponding to candidate title information excluding subtitle information.

[0125] After determining percentW1 or percentW2, the product of percentW1 or percentW2 and the width information of the safe area can be calculated to obtain the width information of the second target area. The length information of the safe area can be used as the length information of the second target area corresponding to the candidate title information. Finally, based on the length information and width information of the second target area, the second target area corresponding to the candidate title information is generated in the main and sub-title information areas.

[0126] In practical applications, since the main title information has a high priority, we can first obtain the number of main title information in the target display information and divide the corresponding target areas for the main title information. The target areas corresponding to the main title information should be as large as possible, filling the entire safe area horizontally and vertically. If the main title information has too few characters, increase the character spacing. After planning the target areas corresponding to the main title information, divide the target areas corresponding to the subtitle information above and below the main text. The first target area corresponding to the action point information can be set above and below the target information corresponding to the subtitle information, thereby determining the visual vertical order of the final target display information layout and the approximate spatial division of the main and subtitle information, such as... Figure 13 As shown.

[0127] In this embodiment, the target area corresponding to each target display information is determined based on the type of each target display information and the size information of the security area. This tightly integrates the determination of the target area with the information type, improving the accuracy and aesthetics of the target area determination. Furthermore, planning the target display information sequentially according to its priority helps generate a well-organized and aesthetically pleasing banner.

[0128] S1011. Arrange the at least one target display information in the corresponding target area.

[0129] In one feasible embodiment, S1011 may include:

[0130] S101101. If the at least one target display information includes the action point information, then adjust the size information of the action point information according to the size information of the first target area, and arrange the action point information with the adjusted size information in the first target area.

[0131] S101103. If the at least one target display information includes the subtitle information, then the size information of the subtitle information is determined according to the preset subtitle size information and the size information of the safe area, and the subtitle information is arranged in the corresponding target area according to the size information of the subtitle information.

[0132] S101105. If the at least one target display information includes the main title information, then the size information of the main title information is determined according to the size information of the safe area, the size information of the preset sub-text, and the length of the information contained in the main title information, and the main title information is arranged in the corresponding target area according to the size information of the main title information.

[0133] In a feasible embodiment, the size (e.g., font size) of the action point information and the main and sub-title information can be planned based on the relationship between the main and sub-title information, the size of the security area, the type of target display information, and the number of characters in the target display information. That is, after knowing the size of the target area corresponding to each target display information, the target display information can be placed into the corresponding target area, and the font size can be continuously adjusted to ensure that the target display information fills the entire target area as much as possible. If the target display information is too short, the spacing can be appropriately increased to fill the corresponding target area, thereby achieving a visually appealing effect. Figure 14 The image shown is a schematic diagram illustrating the size planning effect of the target information display.

[0134] In one feasible embodiment, the size information of the action point information can be planned such that the action point information is kept at its maximum in the first target area.

[0135] In one feasible embodiment, the size information of the subtitle information can be planned according to the following formula:

[0136] ,

[0137] Here, descFont represents the size information of the subtitle information, safeL represents the length information of the safe area, and descFont0 represents the preset size information of the subtitle text. For example, the value of descFont0 can be 10.

[0138] In one feasible embodiment, the size information of the main title information can be planned according to the following formula:

[0139] ,

[0140] Here, mainFont represents the size of the main title information, mainTextLength represents the length of the information contained in the main title information, safeL represents the length of the safe area, and descFont0 represents the size of the preset sub-text. For example, the value of descFont0 can be 10.

[0141] In this embodiment, the size of the target display information can be planned according to the relationship between the main and subtitle information, the size of the safe area, the type of target display information, the number of characters in the target display information, etc., avoiding the defect of enlarging or shrinking the text size solely based on the number of characters. This allows the size of the target display information to be adjusted to the most suitable size for the corresponding target area without limiting the number of characters in the target display information, further improving the aesthetics and harmony of the banner.

[0142] In this embodiment, based on all the information obtained above, all target display information is laid out once. After layout, if the set boundary conditions are not met (e.g., the layout area exceeds the safe area), the process returns to S109 to readjust the target area, font size, etc., corresponding to the target display information, and performs text layout again; until the layout meets the preset boundary conditions, the final layout information is output. Boundary determination can further improve the generation of banners that are both aesthetically pleasing and harmonious.

[0143] Figure 15 This is a flowchart illustrating another information layout method provided in an embodiment of this application. For example... Figure 15As shown, in this embodiment of the application, a layout area can be determined from the target display area based on the size information of the target display area input on the user terminal and one or more lines of target display information of any number of characters. Then, based on the size information of the target display area, the layout area is planned again to obtain a safe area. Then, based on the type of target display information and the size of the safe area, a corresponding target area is planned for each target display information, and the size information of the target display information is adjusted. Finally, each target display information is laid out in the corresponding target area. Figure 16 The image shown is a banner diagram obtained under different sizes and display information using the information layout method provided in the embodiments of this application. Figure 16 As shown, within this safe area, the target display information can be placed arbitrarily without affecting the overall layout. For target display information of any quantity, word count, and text effects, a superior layout scheme can be used, allowing the target display information text to break free from rule constraints and significantly improving the banner's scalability, enabling richer and more diverse layout options. Furthermore, since this application determines the safe area based on the size information of the target display area input by the user terminal, and is not limited to a fixed size, it ensures that the banner text does not lose its aesthetic appeal due to size changes, thus guaranteeing the banner's usability, scalability, harmony, and aesthetics in the overall layout.

[0144] like Figure 17 As shown in the figure, this application embodiment provides an information typesetting device, which may include:

[0145] The acquisition module 201 can be used to acquire the size information of the target display area and at least one target display information.

[0146] The layout area determination module 203 can be used to determine the layout area corresponding to the at least one target display information in the target display area based on the size information of the target display area.

[0147] In one feasible embodiment, the typesetting area determination module 203 may include:

[0148] The object region determination unit can be used to determine the object region corresponding to the target object based on the size information of the target display region and the attribute information of the target object if the target display region includes a target object.

[0149] The position bias determination unit can be used to determine the position bias of the layout area based on the object area.

[0150] The first layout area determination unit can be used to determine the area outside the object area in the target display area as the layout area within the position bias range.

[0151] The second layout area determination unit can be used to determine the target display area as the layout area if the target display area does not include the target object.

[0152] The safe area size information ratio determination module 205 can be used to determine the safe area size information ratio based on the size information of the layout area and the size information of the target display area.

[0153] In one feasible embodiment, the safety area size information ratio determination module 205 may include:

[0154] The safe area length information coefficient ratio determination unit can be used to determine the safe area length information coefficient ratio based on the length information of the layout area and the length information of the target display area.

[0155] The safe area width information coefficient ratio determination unit can be used to determine the safe area width information coefficient ratio based on the width information of the layout area and the width information of the target display area.

[0156] The safe area length information percentage determination unit can be used to determine the safe area length information percentage based on the safe area length information coefficient ratio.

[0157] The safe area width information percentage determination unit can be used to determine the safe area width information percentage based on the safe area width information coefficient ratio.

[0158] The safety area size information ratio generation unit can be used to use the percentage of the safety area length information and the percentage of the safety area width information as the safety area size information ratio.

[0159] The safe area determination module 207 can be used to determine the safe area corresponding to the at least one target display information in the layout area based on the ratio of the safe area size information and the size information of the layout area.

[0160] In one feasible embodiment, the safe area determination module 207 may include:

[0161] The safety area length information determination unit can be used to determine the length information of the safety area based on the percentage of the safety area length information and the length information of the layout area.

[0162] The safety area width information determination unit can be used to determine the width information of the safety area based on the percentage of the safety area width information and the width information of the layout area.

[0163] The safe area generation unit can be used to generate the safe area in the layout area according to the length information and width information of the safe area, and to center the safe area.

[0164] The target area determination module 209 can be used to determine the target area corresponding to the at least one target display information in the safe area based on the type of the at least one target display information and the size information of the safe area.

[0165] In one feasible embodiment, the target region determination module 209 may include:

[0166] The first target area size information generation unit can be used to determine the size information of the first target area corresponding to the action point information based on the length information of the safe area and the width information of the target display area if the at least one target display information includes action point information.

[0167] The first target area generation unit can be used to generate a first target area corresponding to the action point information in the safe area based on the size information of the first target area, and to center the first target area.

[0168] The first main and subtitle information area generation unit can be used to determine the area outside the first target area in the security area as the main and subtitle information area.

[0169] The second main and subtitle information area generation unit can be used to determine the safe area as the main and subtitle information area if the action point information is not included in the at least one target display information.

[0170] In a feasible embodiment, the at least one target display information further includes candidate title information, wherein the candidate title information is at least one of main title information or subtitle information, and the target area determination module 209 may further include:

[0171] The candidate title information width percentage determination unit can be used to determine the width percentage of the candidate title information based on the aspect ratio of the security area and a preset threshold corresponding to the candidate title information.

[0172] The second target area width information determination unit can be used to determine the width information of the second target area corresponding to the candidate title information based on the width information percentage of the candidate title information and the width information of the security area.

[0173] The second target region length information determination unit can be used to determine the length information of the second target region corresponding to the candidate title information based on the length information of the security region.

[0174] The second target region generation unit can be used to generate a second target region corresponding to the candidate title information in the main and subtitle information region based on the length information and width information of the second target region.

[0175] The setting unit can be used to center the second target area in the main and sub-title information area, and when the action point information is included in the at least one target display information, to set the first target area around the second target area, and when the candidate title information is the main title information and the sub-title information, to center the second target area corresponding to the main title information in the main and sub-title information area, and to set the second target area corresponding to the sub-title information around the second target area corresponding to the main title information.

[0176] The layout module 2011 can be used to layout the at least one target display information in the corresponding target area.

[0177] In one feasible embodiment, the typesetting module 2011 may include:

[0178] The first layout unit can be used to adjust the size information of the action point information according to the size information of the first target area if the at least one target display information includes the action point information, and then layout the action point information with the adjusted size information in the first target area.

[0179] The second layout unit can be used to determine the size information of the subtitle information based on the preset subtitle size information and the size information of the safe area if the at least one target display information includes the subtitle information, and then layout the subtitle information in the corresponding target area according to the size information of the subtitle information.

[0180] The third layout unit can be used to determine the size information of the main title information based on the size information of the safe area, the size information of the preset sub-text, and the length of the information contained in the main title information if the at least one target display information includes the main title information, and then layout the main title information in the corresponding target area according to the size information of the main title information.

[0181] It should be noted that the device embodiments provided in this application are based on the same inventive concept as the method embodiments described above.

[0182] This application also provides an electronic device for information layout, which includes a processor and a memory. The memory stores at least one instruction or at least one program segment, which is loaded and executed by the processor to implement the information layout method provided in the above method embodiments.

[0183] Embodiments of this application also provide a storage medium storing at least one instruction or at least one program segment, wherein the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the information typesetting method provided in the above method embodiments.

[0184] Optionally, in the embodiments of this specification, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0185] The memory described in this specification can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for the functions, etc.; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.

[0186] The vehicle movement direction determination method provided in this application can be executed on a mobile terminal, computer terminal, server, or similar computing device. Taking running on a server as an example... Figure 18 This is a hardware structure block diagram of a server for a method of determining the direction of vehicle movement provided in an embodiment of this application. For example... Figure 18 As shown, the server 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (CPUs 310 may include, but are not limited to, microprocessors MCUs or programmable logic devices FPGAs), memory 330 for storing data, and one or more storage media 320 (e.g., one or more mass storage devices) for storing application programs 323 or data 322. The memory 310 and storage media 320 may be temporary or persistent storage. The program stored in the storage media 320 may include one or more modules, each module including a series of instruction operations on the server. Furthermore, the CPU 310 may be configured to communicate with the storage media 320 and execute a series of instruction operations stored in the storage media 320 on the server 300. The server 300 may also include one or more power supplies 360, one or more wired or wireless network interfaces 350, one or more input / output interfaces 340, and / or one or more operating systems 321, such as Windows Server. TM Mac OSX TM Unix™, Linux TM FreeBSD TM etc.

[0187] The input / output interface 340 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 300. In one example, the input / output interface 340 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 340 may be a radio frequency (RF) module used for wireless communication with the Internet.

[0188] Those skilled in the art will understand that Figure 18 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 300 may also include... Figure 18 The more or fewer components shown, or having the same Figure 18 The different configurations shown.

[0189] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0190] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and server embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0191] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0192] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An information typesetting method, characterized in that, The method includes: Obtain the size information of the target display area and at least one target display information; the target display area is the area displayed by the banner advertisement, and the target display information is information of various types, quantities, and word counts. Based on the size information of the target display area, determine the layout area corresponding to the at least one target display information in the target display area; The size ratio of the safe area is determined based on the size information of the layout area and the size information of the target display area; Based on the ratio of the safe area size information and the size information of the layout area, a safe area corresponding to the at least one target display information is determined in the layout area; the at least one target display information is used to be placed arbitrarily in the corresponding safe area. Based on the type of the at least one target display information and the size information of the safe area, determine the target area corresponding to the at least one target display information in the safe area; The information of at least one target is displayed in the corresponding target area.

2. The method according to claim 1, characterized in that, The step of determining the layout area corresponding to the at least one target display information in the target display area based on the size information of the target display area includes: If the target display area includes a target object, then the object area corresponding to the target object is determined based on the size information of the target display area and the attribute information of the target object; The positional bias of the layout area is determined based on the object area; Within the specified positional bias range, the area outside the object area in the target display area is defined as the layout area; If the target display area does not include the target object, then the target display area is determined as the layout area.

3. The method according to claim 1, characterized in that, The step of determining the ratio of the safe area size information based on the size information of the layout area and the size information of the target display area includes: The ratio of the length information of the safe area is determined based on the length information of the layout area and the length information of the target display area; The width information coefficient ratio of the safe area is determined based on the width information of the layout area and the width information of the target display area; The percentage of safe area length information is determined based on the ratio of the safe area length information coefficients. The percentage of safe area width information is determined based on the ratio of the safe area width information coefficients. The percentage of the safe area length information and the percentage of the safe area width information are used as the safe area size information ratio.

4. The method according to claim 3, characterized in that, The step of determining the safe area corresponding to the at least one target display information in the layout area based on the ratio of the safe area size information and the size information of the layout area includes: The length information of the safe area is determined based on the percentage of the safe area length information and the length information of the layout area; The width information of the safe area is determined based on the percentage of the safe area width information and the width information of the layout area; Based on the length and width information of the safe area, the safe area is generated in the layout area and centered.

5. The method according to claim 4, characterized in that, The step of determining the target area corresponding to the at least one target display information within the security area based on the type of the at least one target display information and the size information of the security area includes: If the at least one target display information includes action point information, then the size information of the first target area corresponding to the action point information is determined based on the length information of the safe area and the width information of the target display area. Based on the size information of the first target area, a first target area corresponding to the action point information is generated in the safe area, and the first target area is centered. The area outside the first target area within the security zone is defined as the main and subtitle information area; If the action point information is not included in the at least one target display information, then the safe area is determined as the main and sub-title information area.

6. The method according to claim 5, characterized in that, The at least one target display information further includes candidate title information, wherein the candidate title information is at least one of main title information or subtitle information. After determining the main and subtitle information areas, the method further includes: The width percentage of the candidate title information is determined based on the aspect ratio of the security area and the preset threshold corresponding to the candidate title information. Based on the width percentage of the candidate title information and the width information of the safe area, the width information of the second target area corresponding to the candidate title information is determined; Based on the length information of the security area, determine the length information of the second target area corresponding to the candidate title information; Based on the length information and width information of the second target region, a second target region corresponding to the candidate title information is generated in the main and sub-title information region; The second target area is centered in the main and sub-title information area, and when the action point information is included in the at least one target display information, the first target area is placed around the second target area. When the candidate title information is the main title information and the sub-title information, the second target area corresponding to the main title information is centered in the main and sub-title information area, and the second target area corresponding to the sub-title information is placed around the second target area corresponding to the main title information.

7. The method according to claim 6, characterized in that, The step of arranging the at least one target display information in the corresponding target area includes: If the action point information is included in the at least one target display information, the size information of the action point information is adjusted according to the size information of the first target area, and the action point information with the adjusted size information is arranged in the first target area; If the subtitle information is included in the at least one target display information, the size information of the subtitle information is determined according to the preset subtitle size information and the size information of the safe area, and the subtitle information is arranged in the corresponding target area according to the size information of the subtitle information; If the at least one target display information includes the main title information, then the size information of the main title information is determined according to the size information of the safe area, the size information of the preset sub-text, and the length of the information contained in the main title information, and the main title information is arranged in the corresponding target area according to the size information of the main title information.

8. An information typesetting device, characterized in that, The device includes: The acquisition module is used to acquire the size information of the target display area and at least one target display information; the target display area is the area displayed by the banner advertisement, and the target display information is information of various types, quantities, and word counts. The layout area determination module is used to determine the layout area corresponding to the at least one target display information in the target display area based on the size information of the target display area. The safe area size information ratio determination module is used to determine the safe area size information ratio based on the size information of the layout area and the size information of the target display area; The safe area determination module is used to determine a safe area corresponding to the at least one target display information in the layout area based on the ratio of the safe area size information and the size information of the layout area; the at least one target display information is used to be placed arbitrarily in the corresponding safe area; The target area determination module is used to determine the target area corresponding to the at least one target display information in the safe area based on the type of the at least one target display information and the size information of the safe area; The layout module is used to arrange the at least one target display information in the corresponding target area.

9. The information typesetting device according to claim 8, characterized in that, The typesetting area determination module includes: An object region determination unit is used to determine the object region corresponding to the target object based on the size information of the target display region and the attribute information of the target object if the target display region includes a target object; A position bias determination unit is used to determine the position bias of the layout area based on the object area; The first layout area determination unit is used to determine the area outside the object area in the target display area as the layout area within the position bias range; The second layout area determination unit is used to determine the target display area as the layout area if the target display area does not include the target object.

10. The information typesetting device according to claim 8, characterized in that, The safe area size information ratio determination module includes: The safe area length information coefficient ratio determination unit is used to determine the safe area length information coefficient ratio based on the length information of the layout area and the length information of the target display area; The safe area width information coefficient ratio determination unit is used to determine the safe area width information coefficient ratio based on the width information of the layout area and the width information of the target display area; The safe area length information percentage determination unit is used to determine the safe area length information percentage based on the safe area length information coefficient ratio. The safe area width information percentage determination unit is used to determine the safe area width information percentage based on the safe area width information coefficient ratio; A safety area size information ratio generation unit is used to use the percentage of the safety area length information and the percentage of the safety area width information as the safety area size information ratio.

11. The information typesetting device according to claim 10, characterized in that, The safe zone determination module includes: The safety area length information determination unit is used to determine the length information of the safety area based on the percentage of the safety area length information and the length information of the layout area; The safety area width information determination unit is used to determine the width information of the safety area based on the percentage of the safety area width information and the width information of the layout area; A safe area generation unit is used to generate the safe area in the layout area according to the length information and width information of the safe area, and to center the safe area.

12. The information typesetting device according to claim 11, characterized in that, The target region determination module includes: The first target area size information generation unit is used to determine the size information of the first target area corresponding to the action point information based on the length information of the safe area and the width information of the target display area if the at least one target display information includes action point information; The first target area generation unit is configured to generate a first target area corresponding to the action point information in the safe area based on the size information of the first target area, and to center the first target area. The first main and subtitle information area generation unit is used to determine the area outside the first target area in the security area as the main and subtitle information area; The second main and subtitle information area generation unit is used to determine the safe area as the main and subtitle information area if the action point information is not included in the at least one target display information.

13. The information typesetting device according to claim 12, characterized in that, The at least one target display information further includes candidate title information, wherein the candidate title information is at least one of main title information or subtitle information, and the target area determination module further includes: The candidate title information width percentage determination unit is used to determine the width percentage of the candidate title information based on the aspect ratio of the security area and a preset threshold corresponding to the candidate title information. The second target area width information determination unit is used to determine the width information of the second target area corresponding to the candidate title information based on the width information percentage of the candidate title information and the width information of the security area; The second target region length information determination unit is used to determine the length information of the second target region corresponding to the candidate title information based on the length information of the security region. The second target region generation unit is used to generate a second target region corresponding to the candidate title information in the main and sub-title information region according to the length information and width information of the second target region. The setting unit is configured to center the second target area in the main and sub-title information area, and when the action point information is included in the at least one target display information, to set the first target area around the second target area, and when the candidate title information is the main title information and the sub-title information, to center the second target area corresponding to the main title information in the main and sub-title information area, and to set the second target area corresponding to the sub-title information around the second target area corresponding to the main title information.

14. The information typesetting device according to claim 13, characterized in that, The typesetting module includes: The first layout unit is configured to, if the at least one target display information includes the action point information, adjust the size information of the action point information according to the size information of the first target area, and layout the action point information with the adjusted size information in the first target area. The second layout unit is used to determine the size information of the subtitle information according to the preset subtitle size information and the size information of the safe area if the at least one target display information includes the subtitle information, and to layout the subtitle information in the corresponding target area according to the size information of the subtitle information; The third layout unit is used to determine the size information of the main title information based on the size information of the safe area, the size information of the preset sub-text, and the length of the information contained in the main title information if the at least one target display information includes the main title information, and then to layout the main title information in the corresponding target area according to the size information of the main title information.

15. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the information typesetting method as described in any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the information typesetting method as described in any one of claims 1 to 7.