Automatic sorting layout method, device, medium and equipment for website content rendering

By obtaining the image element information of the poster image, calculating the layout priority and sorting it, the problem of chaotic layout of traditional posters is solved, the poster's attention and information communication effect are improved, and the audience's visual experience is enhanced.

CN119782645BActive Publication Date: 2025-09-05BEIJING TONGQIANYIWAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411925747.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-09-05
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

Traditional poster layout methods lack flexibility and intelligence, resulting in chaotic and disordered poster displays, making it difficult to meet the audience's aesthetic and information acquisition needs, and reducing the poster's attention and information communication effect.

Method used

By obtaining the image element information of the poster image, calculating its layout priority, sorting and laying out according to the priority, and combining the image's theme, color, graphics and text differences, the presentation order of the poster is determined to improve the visual effect and information communication effect.

Benefits of technology

By rationally arranging the layout order of the posters, the posters’ attention and information communication effect are improved, visual jumping is avoided, and the audience’s cognitive experience and information understanding are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782645B_ABST
    Figure CN119782645B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer vision technology, and in particular to a method, device, medium and equipment for automatic sorting layout when rendering website content, comprising: characterizing the differences between a determined presentation image and each image to be presented in multiple dimensions such as theme, color, graphics and text, and combining the first layout priority of the image to be presented itself to obtain a second layout priority corresponding to each image to be presented, so as to determine the presentation order of target poster images one by one, so that when M target poster images are laid out and presented, target poster images with similar themes, colors, graphics and text are placed in relatively close positions, which will not give the audience a strong sense of visual jump, but can allow the audience to better focus on a specific theme, more easily identify and understand the information conveyed by the graphics and text, and improve the attention of the target poster images and the information conveying effect when rendering website content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method, device, medium and equipment for automatically sorting and arranging website content when rendering. Background Art

[0002] With the rapid development of the internet, the forms of information presented on websites are becoming increasingly diverse. Poster images, as important visual communication vehicles, play a key role in attracting user attention and conveying key information. On a website page containing multiple poster images, how to effectively organize and display these poster images when rendering the website content, maximizing their visual impact within the limited page space and guiding users through the content, has become a major challenge in website design and development.

[0003] Traditional layout methods often lack flexibility and intelligence. They may only place poster images based on simple fixed rules such as upload time order or random arrangement, for static display or layout display in an order set by the user. With the rapid spread of information and people's continuous pursuit of visual experience, traditional poster layout methods lack objective analysis of the poster layout order, which may lead to display problems such as confusion and disorder, making it difficult to meet the audience's diverse needs such as aesthetics and information acquisition, thereby reducing the attention of posters on web pages and the effectiveness of information communication.

[0004] Therefore, how to reasonably arrange the layout order of posters to improve the poster's attention and information communication effect has become an urgent problem to be solved. Summary of the Invention

[0005] In response to the above technical problems, the present invention adopts a technical solution of an automatic sorting and layout method for website content rendering, which includes the following steps:

[0006] S10, obtaining M target poster images, poster themes and image element information corresponding to each target poster image, where M is an integer greater than 1.

[0007] S20 , acquiring a first layout priority corresponding to each target poster image according to image element information corresponding to each target poster image.

[0008] S30 , obtaining first sorting results corresponding to the M target poster images according to the first layout priority corresponding to each target poster image.

[0009] S40 , initializing t=1, and determining the first target poster image in the first sorting result as the first presentation image, and determining other target poster images except the first presentation image as images to be presented.

[0010] S50 , acquiring a second layout priority corresponding to each to-be-presented image according to the first layout priority corresponding to each to-be-presented image, the tth presented image, and the image element information corresponding to each to-be-presented image.

[0011] S60: Determine the image to be presented corresponding to the largest second layout priority as the t+1th presentation image.

[0012] S70, update t=t+1, and delete the tth presentation image and the t+1th presentation image from the first sorting result, repeat step S50 until t=M-1, and obtain the 1st to Mth presentation images.

[0013] S80 , when rendering website content, laying out M target poster images according to the order of the first presentation image to the Mth presentation image.

[0014] The present invention also provides an automatic sorting and layout device for website content rendering, the automatic sorting and layout device for website content rendering comprising:

[0015] The data acquisition module is used to obtain M target poster images, the poster theme and image element information corresponding to each target poster image, where M is an integer greater than 1.

[0016] The first priority acquisition module is configured to acquire a first layout priority corresponding to each target poster image according to image element information corresponding to each target poster image.

[0017] The first sorting module is configured to obtain a first sorting result corresponding to the M target poster images according to a first layout priority corresponding to each target poster image.

[0018] The module for determining images to be presented is used to initialize t=1, determine the first target poster image in the first sorting result as the first presentation image, and determine other target poster images other than the first presentation image as images to be presented.

[0019] The second priority acquisition module is used to acquire the second layout priority corresponding to each image to be presented according to the first layout priority corresponding to each image to be presented, the image element information corresponding to the tth presented image and each image to be presented.

[0020] The first presentation image determination module is configured to determine the to-be-presented image corresponding to the largest second layout priority as the t+1th presentation image.

[0021] The second presentation image determination module is used to update t=t+1, and delete the tth presentation image and the t+1th presentation image from the first sorting result, and repeatedly execute the second priority acquisition module until t=M-1, and obtain the 1st presentation image to the Mth presentation image.

[0022] The poster layout module is used to layout M target poster images according to the order of the first presentation image to the Mth presentation image when rendering website content.

[0023] The present invention also provides a non-transitory computer-readable storage medium, which stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned automatic sorting and layout method when rendering website content.

[0024] The present invention also provides an electronic device comprising a processor and the above-mentioned non-transitory computer-readable storage medium.

[0025] The present invention has at least the following beneficial effects: according to the image element information corresponding to each target poster image, the first layout priority corresponding to each target poster image is obtained; according to the first layout priority corresponding to each target poster image, the first sorting result corresponding to M target poster images is obtained; t=1 is initialized, and the first target poster image in the first sorting result is determined as the first presentation image; the other target poster images other than the first presentation image are determined as images to be presented; according to the first layout priority corresponding to each image to be presented, the tth presentation image and the image element information corresponding to each image to be presented, the second layout priority corresponding to each image to be presented is obtained; the image to be presented corresponding to the largest second layout priority is determined as the t+1th presentation image; t=t+1 is updated, and the tth presentation image and the t+1th presentation image are deleted from the first sorting result; and the second layout is repeated. The priority acquisition step, until t=M-1, obtains the 1st presentation image to the Mth presentation image, and when rendering the website content, the M target poster images are laid out according to the order of the 1st presentation image to the Mth presentation image. It can be seen that by characterizing the differences between the tth presentation image and each image to be presented in multiple dimensions such as theme, color, graphics and text, combined with the first layout priority of the image to be presented itself, the second layout priority corresponding to each image to be presented is obtained, and the presentation order of the target poster images is determined one by one, so that when laying out the M target poster images, the target poster images with similar themes, colors, graphics and texts are placed in a relatively close position, which will not bring a strong sense of visual jump to the audience, allowing the audience to better focus on specific topics, and more easily identify and understand the information conveyed by graphics and text, thereby improving the attention of the target poster image and the information communication effect when rendering the website content. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 This is a flow chart of a method for automatically sorting and arranging website content when rendering, provided in Example 1 of the present invention;

[0028] Figure 2 A flowchart of a method for generating a website poster based on multiple elements provided in the second embodiment of the present invention;

[0029] Figure 3 This is a structural diagram of an automatic sorting and layout device for rendering website content provided by Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is understood that, where appropriate, the above-mentioned terms used to distinguish similar objects can be interchanged so that the present invention can also implement other embodiments other than the above-mentioned illustrated embodiments or described embodiments. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Example 1

[0033] This embodiment provides a method for automatically sorting and laying out website content. Figure 1 As shown, the automatic sorting layout method for website content rendering includes the following steps:

[0034] S10, obtaining M target poster images, poster themes and image element information corresponding to each target poster image, where M is an integer greater than 1.

[0035] Among them, static posters can easily cause visual fatigue to the audience, while sorting the layout of posters can ensure that when the website content is rendered, posters with more prominent visual effects, more critical themes or more in line with user browsing expectations will be displayed first, reasonably guiding the user's visual flow, making the visual presentation of the entire page more orderly, reasonable and attractive, avoiding the disordered piling up of information and the burying of important content, and effectively improving the overall visual quality of the website page.

[0036] The current poster layout method is generally to display the posters in the order set by the user. With the rapid spread of information and people's continuous pursuit of visual experience, the traditional poster display method lacks objective analysis of the order of poster presentation, which may lead to display problems such as confusion and disorder, making it difficult to meet the audience's diverse needs such as aesthetics and information acquisition, thereby reducing the attention of the target poster image and the information communication effect.

[0037] Therefore, this embodiment obtains the image element information corresponding to each target poster image, integrates the poster features of multiple dimensions to sort the M target poster images that need to be presented, and thus reasonably arranges the layout order of the target poster images to improve the attention and information communication effect of the target poster images.

[0038] In a specific embodiment, the image element information includes color element information, graphic element information, and text element information. S10 includes the following steps:

[0039] S101: Input each target poster image into a preset theme recognition model to obtain the poster theme corresponding to each target poster image.

[0040] S102 , obtaining color element information corresponding to each target poster image according to the hue corresponding to each pixel in each target poster image, wherein the color element information includes the number of hue types, the proportion of warm tones, and the proportion of cool tones.

[0041] S103: Input each target poster image into a preset semantic segmentation model to obtain a plurality of graphic elements and a plurality of text elements corresponding to each target poster image.

[0042] S104 , performing bounding box detection on each graphic element and each text element, and obtaining a first frame and a first frame area corresponding to each graphic element, and a second frame and a second frame area corresponding to each text element.

[0043] S105, obtaining graphic element information corresponding to each target poster image based on a number of graphic elements corresponding to each target poster image and a first frame area corresponding to each graphic element, wherein the graphic element information includes a first number of graphic elements and a first frame area corresponding to each graphic element.

[0044] S106, obtaining text element information corresponding to each target poster image based on the number of text elements corresponding to each target poster image and the second frame area corresponding to each text element, wherein the text element information includes the second number of text elements and the second frame area corresponding to each text element.

[0045] The preset theme recognition model is used to extract features and predict themes from the input target poster image, thereby characterizing the poster features of the target poster image in the theme dimension. The specific types of poster themes can be pre-set by the implementer based on actual circumstances. For example, the specific types of poster themes can include product promotion, art exhibitions, environmental protection, charity events, and other types.

[0046] By counting the hues of all pixels in the target poster image, we can obtain the color element information of the target poster image, which is used to characterize the poster features of each target poster image in the color dimension. Among them, the color element information includes the number of hue types, that is, how many different colors appear in the target poster image. The warm color ratio is the ratio of warm-toned pixels (such as red, orange, yellow, etc.) to the total number of pixels in the target poster image. The cool color ratio is the ratio of cool-toned pixels (such as blue, green, purple, etc.) to the total number of pixels in the target poster image.

[0047] The preset semantic segmentation model is used to perform feature extraction, upsampling, deconvolution, and pixel-level classification on the input target poster image, assigning corresponding category labels to each pixel, such as image element labels and text element labels, thereby obtaining a number of graphic elements and text elements corresponding to each target poster image. Each text element can include multiple characters.

[0048] Based on the bounding box detection algorithm, bounding box detection is performed on each graphic element and each text element to obtain the first frame and first frame area corresponding to each graphic element, as well as the second frame and second frame area corresponding to each text element. Furthermore, graphic element information and text element information corresponding to each target poster image are obtained to characterize the poster features of each target poster image in the graphic and text dimensions. Those skilled in the art will recognize that any bounding box detection algorithm in the prior art falls within the scope of protection of the present invention, and no further description is given herein.

[0049] As described above, the image element information corresponding to each target poster image is obtained, and the poster features of multiple dimensions are integrated as the basis for sorting the M target poster images that need to be laid out and presented, so as to reasonably arrange the layout order of the target poster images to improve the attention and information communication effect of the target poster images.

[0050] S20 , acquiring a first layout priority corresponding to each target poster image according to image element information corresponding to each target poster image.

[0051] The first layout priority is the priority of the corresponding target poster image in displaying the poster layout.

[0052] In one embodiment, S20 includes the following steps:

[0053] S201 , obtaining the color complexity corresponding to each target poster image according to the number of hue types, the proportion of warm tones, and the proportion of cool tones corresponding to each target poster image.

[0054] S202 : Acquire the graphic complexity corresponding to each target poster image according to the first quantity corresponding to each target poster image and the first frame area corresponding to each graphic element.

[0055] S203 : Acquire the text complexity corresponding to each target poster image according to the second quantity corresponding to each target poster image and the second frame area corresponding to each text element.

[0056] S204, obtaining a first layout priority corresponding to each target poster image according to the color complexity, graphic complexity, and text complexity corresponding to each target poster image, wherein the first layout priority is negatively correlated with the color complexity, graphic complexity, and text complexity.

[0057] Among them, in the process of target poster image layout, transitioning from simple colors to complex colors, from simple graphics to complex images, and from simple text to complex text can reduce display problems such as chaos and disorder, provide the audience with an adaptation process, and constantly bring new visual stimulation and surprises to the audience, thereby increasing the attention of the target poster image and the information communication effect.

[0058] Therefore, in this embodiment, the first layout priority is negatively correlated with the color complexity, graphic complexity and text complexity. The first layout priority corresponding to each target poster image can be obtained based on the color complexity, graphic complexity and text complexity corresponding to each target poster image, which serves as the data basis for reasonably arranging the layout order of the target poster images.

[0059] In one specific embodiment, S201 includes the following steps:

[0060] S2011 , obtaining a first difference degree corresponding to each target poster image according to a warm tone ratio and a cool tone ratio corresponding to each target poster image.

[0061] S2012, obtaining the color complexity corresponding to each target poster image based on the number of hue types and the first difference degree corresponding to each target poster image, wherein the color complexity is positively correlated with the number of hue types, and negatively correlated with the first difference degree.

[0062] Among them, the greater the first difference between the warm tone ratio and the cool tone ratio corresponding to the target poster image, that is, the greater the proportion of warm tones corresponding to the target poster image, or the greater the proportion of cool tones corresponding to the target poster image, it means that the tone of the target poster image is more uniform and the corresponding color complexity is lower.

[0063] The greater the number of hue types corresponding to the target poster image, the more complex the hue information of the target poster image is, and the higher the corresponding color complexity is.

[0064] Therefore, the color complexity is positively correlated with the number of hue types and negatively correlated with the first degree of difference. Based on the number of hue types and the first degree of difference corresponding to each target poster image, the color complexity corresponding to each target poster image can be obtained as the data basis for reasonably arranging the layout order of the target poster images.

[0065] In one specific embodiment, S202 includes the following steps:

[0066] S2021 , obtaining a second degree of difference between all graphic elements corresponding to each target poster image according to a first frame area corresponding to each graphic element corresponding to each target poster image.

[0067] S2022: Obtain the graphic complexity corresponding to each target poster image according to the first quantity and the second difference degree corresponding to each target poster image, wherein the graphic complexity is negatively correlated with the first quantity and the second difference degree.

[0068] Among them, the greater the difference between the first frame areas corresponding to different graphic elements in the target poster image and the larger the first number corresponding to the target poster image, the more complicated the graphic information of the target poster image is and the higher the corresponding graphic complexity is.

[0069] Therefore, the graphic complexity is positively correlated with the first quantity and the second degree of difference. The graphic complexity corresponding to each target poster image can be obtained based on the first quantity and the second degree of difference corresponding to each target poster image, which serves as the data basis for reasonably arranging the layout order of the target poster images.

[0070] In one specific embodiment, S203 includes the following steps:

[0071] S2031 : Acquire a third degree of difference between all text elements corresponding to each target poster image according to the second frame area corresponding to each text element corresponding to each target poster image.

[0072] S2032 : Acquire the text complexity corresponding to each target poster image according to the second quantity and the third difference degree corresponding to each target poster image, wherein the text complexity is positively correlated with the second quantity and the third difference degree.

[0073] Among them, the greater the difference between the second frame areas corresponding to different text elements in the target poster image and the larger the second number corresponding to the target poster image, the more complicated the text information of the target poster image is and the higher the corresponding text complexity is.

[0074] Therefore, the text complexity is positively correlated with the second quantity and the third degree of difference. The text complexity corresponding to each target poster image can be obtained based on the second quantity and the third degree of difference corresponding to each target poster image, which serves as the data basis for reasonably arranging the layout order of the target poster images.

[0075] As mentioned above, setting the first layout priority is negatively correlated with the color complexity, graphic complexity and text complexity. According to the color complexity, graphic complexity and text complexity corresponding to each target poster image, the first layout priority corresponding to each target poster image is obtained, which serves as the data basis for reasonably arranging the layout order of the target poster images, thereby reducing display problems such as chaos and disorder, constantly bringing new visual stimulation and surprise to the audience, and improving the attention and information communication effect of the target poster image.

[0076] S30 , obtaining first sorting results corresponding to the M target poster images according to the first layout priority corresponding to each target poster image.

[0077] The M target poster images are sorted in descending order of the first layout priority, and a first sorting result corresponding to the M target poster images is obtained as a basis for arranging the layout order of the target poster images.

[0078] S40 , initializing t=1, and determining the first target poster image in the first sorting result as the first presentation image, and determining other target poster images except the first presentation image as images to be presented.

[0079] Among them, the first target poster image in the first sorting result, that is, the target poster image corresponding to the largest first layout priority, is determined as the first presentation image, and other target poster images other than the first presentation image are determined as images to be presented. On the basis of determining the first presentation image, the priority of the images to be presented is analyzed, so as to gradually determine the layout presentation order of the target poster images.

[0080] S50 , acquiring a second layout priority corresponding to each to-be-presented image according to the first layout priority corresponding to each to-be-presented image, the tth presented image, and the image element information corresponding to each to-be-presented image.

[0081] In a specific embodiment, S50 includes the following steps:

[0082] S501 , according to the poster theme corresponding to each image to be presented and the poster theme corresponding to the t-th presented image, obtain the theme difference degree between each image to be presented and the t-th presented image.

[0083] S502, based on the number of hue types, warm color ratio and cool color ratio corresponding to each image to be presented, and the number of hue types, warm color ratio and cool color ratio corresponding to the t-th presented image, obtain the degree of color difference between each image to be presented and the t-th presented image.

[0084] S503, based on the first quantity corresponding to each image to be presented and the first frame area corresponding to each graphic element, as well as the first quantity corresponding to the t-th presented image and the first frame area corresponding to each graphic element, obtain the degree of graphic difference between each image to be presented and the t-th presented image.

[0085] S504, based on the second quantity corresponding to each image to be presented and the second frame area corresponding to each text element, as well as the second quantity corresponding to the t-th presented image and the second frame area corresponding to each text element, obtain the degree of text difference between each image to be presented and the t-th presented image.

[0086] S505. Based on the degree of subject difference, color difference, graphic difference, and text difference between each image to be presented and the tth presented image, and the first layout priority corresponding to each image to be presented, obtain the second layout priority corresponding to each image to be presented, wherein the second layout priority is negatively correlated with the degree of subject difference, color difference, graphic difference, and text difference, and is positively correlated with the first layout priority.

[0087] In a specific embodiment, S501 includes the following steps:

[0088] S5011, calculating the semantic similarity between the poster theme corresponding to each image to be presented and the poster theme corresponding to the t-th presented image.

[0089] S5012, based on the degree of semantic similarity between the poster theme corresponding to each image to be presented and the poster theme corresponding to the t-th presented image, obtain the degree of theme difference between the poster theme corresponding to each image to be presented and the poster theme corresponding to the t-th presented image, wherein the degree of theme difference is negatively correlated with the degree of semantic similarity.

[0090] When the semantic similarity between the target image and the tth image is high, meaning the thematic difference is small, this indicates that the core content or main idea conveyed by the target image and the tth image are similar. When arranging the presentation order, placing target poster images with similar themes closer together can help viewers better focus on the specific theme, think deeply about related issues, and form a coherent cognitive experience. Therefore, the second layout priority is negatively correlated with the degree of thematic difference.

[0091] Among them, those skilled in the art know that any method for calculating the semantic similarity between texts in the prior art falls within the protection scope of the present invention and will not be described in detail here.

[0092] In a specific embodiment, S502 includes the following steps:

[0093] S5021: Determine the difference between the number of hue types corresponding to each to-be-presented image and the number of hue types corresponding to the t-th presented image as a first color difference value between each to-be-presented image and the t-th presented image.

[0094] S5022: Determine the difference between the warm color ratio corresponding to each image to be presented and the warm color ratio corresponding to the t-th presented image as a second color difference value between each image to be presented and the t-th presented image.

[0095] S5023: Determine the difference between the cool color ratio corresponding to each to-be-presented image and the cool color ratio corresponding to the t-th presented image as a third color difference value between each to-be-presented image and the t-th presented image.

[0096] At step S5024, a degree of color difference between each image to be presented and the t-th presented image is obtained based on the first color difference value, the second color difference value, and the third color difference value between each image to be presented and the t-th presented image, wherein the degree of color difference is positively correlated with the first color difference value, the second color difference value, and the third color difference value.

[0097] When the color difference between the target image and the tth image presented is small, it indicates that the color combination of the target image and the tth image presented is relatively similar, indicating a more harmonious and unified visual atmosphere. For example, a group of posters with blue as the primary color may use different shades of blue to express different emotions or messages. When arranging the presentation order, placing target poster images with similar colors in close proximity can reduce the visual jump and make the entire presentation process smoother. Therefore, the second layout priority is negatively correlated with the degree of color difference.

[0098] In a specific embodiment, S503 includes the following steps:

[0099] S5031 : Acquire a first quantity difference value between each to-be-presented image and the t-th presented image according to the first quantity corresponding to each to-be-presented image and the first quantity corresponding to the t-th presented image.

[0100] S5032: Determine an average value of first frame areas corresponding to all graphic elements corresponding to each image to be presented as a first average frame area corresponding to each image to be presented.

[0101] S5033: Determine an average value of the first frame areas corresponding to all graphic elements corresponding to the t-th presented image as a first average frame area corresponding to the t-th presented image.

[0102] S5034 , obtaining a first frame area difference value between each image to be presented and the t th presented image based on the first average frame area corresponding to each image to be presented and the first average frame area corresponding to the t th presented image.

[0103] S5035. According to the first quantity difference value and the first frame area difference value between each image to be presented and the t-th presented image, the degree of graphic difference between each image to be presented and the t-th presented image is obtained, wherein the degree of graphic difference is positively correlated with the first quantity difference value and the first frame area difference value.

[0104] Among them, when the degree of graphic difference between the image to be presented and the t-th presented image is small, it means that the image to be presented and the t-th presented image are relatively similar in terms of graphic shape, style, or expression method. For example, a group of posters all use simple line graphics to express the theme, and may only differ in the specific graphic content. In this case, presenting posters with similar graphics in sequence can make it easier for the audience to identify and understand the information conveyed by the graphics, while also enhancing the relevance between posters. In addition, the audience can quickly adapt to similar graphic styles during the viewing process and better appreciate and interpret the uniqueness of each poster.

[0105] In a specific embodiment, S504 includes the following steps:

[0106] S5041 : Acquire a second quantity difference value between each to-be-presented image and the t-th presented image according to the second quantity corresponding to each to-be-presented image and the second quantity corresponding to the t-th presented image.

[0107] S5042: Determine an average value of the second frame areas corresponding to all text elements corresponding to each image to be presented as a second average frame area corresponding to each image to be presented.

[0108] S5043: Determine an average value of the second frame areas corresponding to all text elements corresponding to the t-th presented image as a second average frame area corresponding to the t-th presented image.

[0109] S5044 , obtaining a second frame area difference value between each image to be presented and the t th presented image according to the second average frame area corresponding to each image to be presented and the second average frame area corresponding to the t th presented image.

[0110] S5045, based on the second quantity difference value and the second frame area difference value between each image to be presented and the tth presented image, obtain the degree of text difference between each image to be presented and the tth presented image, wherein the degree of text difference is positively correlated with the second quantity difference value and the second frame area difference value.

[0111] Among them, when the degree of textual difference between the image to be presented and the t-th presented image is small, it indicates that the image to be presented and the t-th presented image are relatively similar in textual content, font style or expression. For example, a group of posters all use concise and clear slogan-like text to convey information, and may only differ slightly in the specific wording. Presenting posters in the order of the smallest textual difference can make it easier for the audience to remember and understand the main information of the posters, avoiding confusion caused by frequent changes in textual style. At the same time, similar textual expressions can also strengthen the overall style and theme of the poster, allowing the audience to form a unified impression during the viewing process.

[0112] Therefore, the second layout priority is negatively correlated with the theme difference degree, color difference degree, graphic difference degree, and text difference degree, and is positively correlated with the first layout priority.

[0113] As described above, based on the image element information corresponding to the tth presented image and each image to be presented, the degree of subject difference, color difference, graphic difference and text difference between the tth presented image and each image to be presented is measured to characterize the differences between the tth presented image and each image to be presented in multiple dimensions of subject, color, graphic and text. Combined with the first layout priority of the image to be presented itself, the second layout priority corresponding to each image to be presented is obtained, so that when laying out the target poster image, target poster images with similar themes, colors, graphics and texts are placed in a closer position, which will not bring a strong sense of visual jump to the audience, allowing the audience to better focus on specific topics, and more easily identify and understand the information conveyed by graphics and text, thereby improving the attention of the target poster image and the information communication effect.

[0114] S60: Determine the image to be presented corresponding to the largest second layout priority as the t+1th presentation image.

[0115] S70, update t=t+1, and delete the tth presentation image and the t+1th presentation image from the first sorting result, repeat step S50 until t=M-1, and obtain the 1st to Mth presentation images.

[0116] Among them, based on the differences between the image to be presented and the previous presented image in multiple dimensions such as theme, color, graphics and text, combined with the first layout priority of the image to be presented itself, the next presented image is determined, and so on, until the layout presentation order of the M target poster images is determined, thereby improving the overall attention and overall information communication effect of the M target poster images.

[0117] S80 , when rendering website content, laying out M target poster images according to the order of the first presentation image to the Mth presentation image.

[0118] In the above, according to the image element information corresponding to each target poster image, the first layout priority corresponding to each target poster image is obtained, and according to the first layout priority corresponding to each target poster image, the first sorting result corresponding to M target poster images is obtained, t=1 is initialized, and the first target poster image in the first sorting result is determined as the first presentation image, and the other target poster images other than the first presentation image are determined as images to be presented, and according to the first layout priority corresponding to each image to be presented, the tth presentation image and the image element information corresponding to each image to be presented, the second layout priority corresponding to each image to be presented is obtained, and the image to be presented corresponding to the largest second layout priority is determined as the t+1th presentation image, t=t+1 is updated, and the tth presentation image and the t+1th presentation image are deleted from the first sorting result, and the acquisition of the second layout priority is repeated. Take steps until t=M-1, obtain the 1st presentation image to the Mth presentation image, and when rendering the website content, layout the M target poster images according to the order of the 1st presentation image to the Mth presentation image. It can be seen that by characterizing the differences between the tth presentation image and each image to be presented in multiple dimensions such as theme, color, graphics and text, combined with the first layout priority of the image to be presented itself, the second layout priority corresponding to each image to be presented is obtained, and the presentation order of the target poster images is determined one by one, so that when laying out the M target poster images, the target poster images with similar themes, colors, graphics and texts are placed in a relatively close position, which will not bring a strong sense of visual jump to the audience, allowing the audience to better focus on specific topics, and more easily identify and understand the information conveyed by graphics and text, thereby improving the attention of the target poster image and the information communication effect when rendering the website content.

[0119] Example 2

[0120] This embodiment 2 provides a method for generating a website poster based on multiple elements, such as Figure 2 As shown, the multi-element based website poster generation method includes the following steps:

[0121] S1, obtaining an initial poster image, a target description text, several preset target object names, a first priority corresponding to each target object name, and a preset element database input by a user.

[0122] The initial poster image may refer to a semi-finished poster image that already includes some poster elements. For example, the initial poster image may include some poster elements such as the poster theme and the poster name.

[0123] The preset target object name may refer to the theme, name, product, interest group, etc. corresponding to the poster, which is used to represent the purpose, source, audience, and other information of the corresponding poster, and serves as the data basis for influencing the content of the poster to generate a target poster that meets the requirements.

[0124] According to the importance of each target object name in generating a target poster that meets the requirements, the first priority corresponding to each target object name is obtained. Specifically, the specific value of the first priority corresponding to each target object name can be set by the implementer according to actual conditions.

[0125] The target description text may refer to a descriptive text of the desired poster product, which may be provided by implementers such as users or designers. The target description text may represent the implementer's settings and expectations regarding the theme, name, product, interest groups, etc. of the poster. The preset element database includes several initial element objects, so that the target element objects required for the target poster are filtered out from the preset element database based on the target description text and the target object name, and are used to fill in the initial poster image to generate a target poster that meets the requirements.

[0126] The initial element object may refer to poster elements such as graphics, illustrations, photos, text, and colors.

[0127] S2, based on several target object names and a preset element database, obtains several key description sentences in the target description text, all key description words and the number of first words corresponding to each key description sentence, and the reference element object corresponding to each key description word in the preset element database, wherein each key description sentence includes at least one target object name.

[0128] Among them, the target description text includes several initial description sentences. Based on the target object name, several key description sentences are screened out from the target description text, which can reduce the interference of redundant sentences and invalid sentences, focus on the key needs of generating posters, and improve the generation efficiency and quality of target posters.

[0129] Key descriptive words can refer to the keywords in the key description sentence that represent the implementer's settings and expectations for the target poster. Among the massive element objects in the preset element database, focusing on the key requirements of generating the poster, screening out the reference element objects corresponding to the key descriptive words in the target description text, and using them as the element basis for generating the target poster can improve the efficiency and quality of generating the target poster.

[0130] In the above, based on the target object name, several key description sentences are screened out from the target description text, which reduces the interference of redundant sentences and invalid sentences, focuses on the key needs of generating posters, and obtains the key description words corresponding to each key description sentence and the reference element objects corresponding to each key description word as the basis for generating target posters, thereby improving the generation efficiency and quality of target posters.

[0131] In one embodiment, S2 includes the following steps:

[0132] S21, obtaining several initial description sentences from the target description text.

[0133] S22: Match each target object name with each initial description statement, and obtain the first number of target object names included in each initial description statement.

[0134] S23: Determine the initial description sentences corresponding to the first name quantity greater than the first preset quantity threshold as key description sentences.

[0135] S24 , performing keyword extraction on each key description sentence, obtaining all key description words corresponding to each key description sentence, and the number of first words corresponding to all key description words corresponding to each key description sentence.

[0136] S25 , matching each key descriptor with the preset element database, and obtaining a reference element object corresponding to each key descriptor in the preset element database.

[0137] Among them, different initial description sentences can be divided according to punctuation marks in the target description text.

[0138] Each target object name and each initial description statement is traversed, searched, and matched to obtain all target object names and the corresponding number of first names included in each initial description statement. The larger the number of first names, that is, the more target object names included in the initial description statement, the richer the descriptive information of the target poster in the initial description statement. Therefore, the initial description statement corresponding to the number of first names greater than a first preset number threshold is determined as a key description statement.

[0139] Keywords are extracted from each key description sentence according to a keyword extraction algorithm. Those skilled in the art are aware that any keyword extraction algorithm in the prior art falls within the protection scope of the present invention, and will not be described in detail here.

[0140] As described above, based on the first preset quantity threshold and the number of first names corresponding to each initial description statement, key description statements with richer description information are screened out for keyword extraction and element screening, thereby obtaining all key description words corresponding to each key description statement and the reference element objects corresponding to each key description word, thereby improving the generation efficiency and quality of the target poster.

[0141] In a specific embodiment, the preset element database includes a plurality of initial element objects and an element tag corresponding to each initial element object. S25 includes the following steps:

[0142] S251 : For any key description word, calculate the semantic similarity between the current key description word and the element label corresponding to each initial element object.

[0143] S252 : Determine the initial element object corresponding to the maximum semantic similarity corresponding to the current key descriptor as the reference element object corresponding to the current key descriptor.

[0144] Among them, those skilled in the art know that any method for calculating semantic similarity in the prior art falls within the protection scope of the present invention, and will not be described in detail here.

[0145] As described above, based on the semantic similarity between the key descriptive words and the element labels, the reference element objects corresponding to each key descriptive word are screened out from the preset element database as the basis for generating the target poster, thereby improving the matching degree between the reference element objects and the key requirements of the generated poster and improving the generation quality of the target poster.

[0146] S3, according to all target object names and corresponding key descriptive words included in each key descriptive sentence, obtain the first position of each target object name in the corresponding key descriptive sentence and the second position of each key descriptive word in the corresponding key descriptive sentence.

[0147] In a specific embodiment, S3 includes the following steps:

[0148] S31 , determining the character position sequence number of the first character in each target object name in the corresponding key description sentence as the first position of each target object name in the corresponding key description sentence.

[0149] S32 , determining the character position sequence number of the first character of each key description word in the corresponding key description sentence as the second position of each key description word in the corresponding key description sentence.

[0150] As mentioned above, the first position is used to represent the position information of the target object name in the corresponding key description sentence, and the second position is used to represent the position information of the key descriptive word in the corresponding key description sentence. The correlation between the key descriptive word and the target object name can be measured by the distance between the first position and the second position, providing a data basis for analyzing the matching between the key descriptive word and the requirements for generating posters.

[0151] S4, obtains the second priority corresponding to the current key descriptor based on the second position corresponding to each key descriptor, the number of first words corresponding to the key descriptive sentence corresponding to each key descriptor, and the first position and first priority corresponding to each target object name included in the key descriptive sentence corresponding to each key descriptor.

[0152] In a specific embodiment, S4 includes the following steps:

[0153] S41, for any key descriptive word, any key descriptive sentence corresponding to the current key descriptive word, and any target object name corresponding to the current key descriptive sentence, obtain the degree of association of the current key descriptive word with the current target object name included in the current key descriptive sentence based on the first position of the current target object name in the current key descriptive sentence and the second position of the current key descriptive word in the current key descriptive sentence.

[0154] S42: Determine the proportion of the number of first words corresponding to the current key description sentence to the sum of the numbers of first words corresponding to all key description sentences as the criticality corresponding to the current key description sentence.

[0155] S43: Determine the average value of the first priorities corresponding to all target object names included in the current key description sentence as the third priority corresponding to the current key description sentence.

[0156] S44: Obtain a fourth priority level corresponding to the current key description sentence according to the criticality level and the third priority level corresponding to the current key description sentence.

[0157] S45, obtaining the first importance of the current key descriptor relative to the current key description sentence based on the first priority corresponding to each target object name and the association degree of the current key descriptor relative to all target object names included in the current key description sentence.

[0158] S46 , obtaining a second priority corresponding to the current key description word according to the fourth priority corresponding to the current key description sentence and the first importance of the current key description word relative to all key description sentences.

[0159] The closer the first position is to the second position, the higher the degree of association between the corresponding key description word and the corresponding target object name is.

[0160] The more first words corresponding to the key description sentence, that is, the more key description words included in the key description sentence, the richer the description information of the target poster in the key description sentence, and correspondingly, the greater the criticality of the key description sentence. The greater the first priority corresponding to the target object name, the more important the target object name is in generating a target poster that meets the requirements, and correspondingly, the greater the third priority, the more important the key description sentence is in generating a target poster that meets the requirements. Furthermore, combining the criticality and the third priority corresponding to the key description sentence, the fourth priority corresponding to the key description sentence is obtained, which comprehensively represents the priority of the key description sentence in generating the target poster.

[0161] Correspondingly, the first importance is positively correlated with the corresponding first priority and the association degree, and the second priority is positively correlated with the corresponding fourth priority and the first importance.

[0162] In the above, based on the second position corresponding to each key descriptive word, the number of first words corresponding to the key descriptive sentence corresponding to each key descriptive word, and the first position and first priority corresponding to each target object name included in the key descriptive sentence corresponding to each key descriptive word, the second priority corresponding to the current key descriptive word is obtained, which comprehensively represents the priority of each key descriptive word when generating the target poster. As the basis for generating the poster, it improves the matching between the generated poster and the target description text, thereby improving the efficiency and quality of poster generation and meeting user needs.

[0163] S5. According to the reference element object corresponding to each key descriptor, the second priority corresponding to each key descriptor and the preset priority threshold, the target element object corresponding to the initial poster image is obtained, wherein the target element object is used to generate the target poster image together with the initial poster image.

[0164] Among them, according to the preset priority threshold and the second priority corresponding to each key descriptive word, the reference element objects corresponding to the key descriptive words are screened to obtain the target element objects. The target element objects can be added to the appropriate position in the initial poster image, adjusted in size, changed in color, and other operations, so that the final generated target poster image can better reflect the key information of the target description text and have higher visual appeal and communication effect.

[0165] In a specific embodiment, the preset element database includes a plurality of initial element objects and a preset area range corresponding to each initial element object, wherein the preset area range includes a minimum preset area and a maximum preset area. S5 further includes the following steps:

[0166] S51 , obtaining a to-be-filled region in the initial poster image and an area to be filled corresponding to the to-be-filled region according to the pixel value of each pixel point in the initial poster image.

[0167] S52: Determine a reference element object whose corresponding second priority is greater than a preset priority threshold as a target element object.

[0168] S53: Acquire the preset area range corresponding to each target element object according to the preset area range corresponding to each initial element object.

[0169] S54 , obtaining the required area corresponding to each target element object according to the second priority corresponding to the key descriptor corresponding to each target element object and the preset area range corresponding to each target element object.

[0170] S55 , screening out the to-be-filled element objects from all target elements according to the to-be-filled area and the required area corresponding to each target element object.

[0171] S56 , filling all the element objects to be filled into the to-be-filled area of ​​the initial poster image to obtain a target poster image.

[0172] Among them, the minimum preset area may refer to the minimum area that makes the corresponding initial element object have a better visual effect in the target poster image, and the maximum preset area may refer to the maximum area that makes the corresponding initial element object have a better visual effect in the target poster image.

[0173] When the pixel value of a pixel point in the initial poster image is within a preset pixel value range, the corresponding pixel point is divided into the area to be filled. The preset pixel value range may refer to the pixel value range corresponding to all background pixels in the initial poster image.

[0174] A higher second priority indicates a higher importance and priority for the corresponding target element in generating the target poster. Therefore, different second priorities for the same target element result in different sizes appearing on the target poster image, achieving different visual appeal and communication effects. Therefore, the required area for each target element is positively correlated with its corresponding second priority.

[0175] In order to ensure that there are gaps in the target poster image and improve the visual communication effect, this embodiment further screens the target element objects according to the area to be filled and the required area corresponding to each target element object, and fills the screened element objects to be filled into the to-be-filled area of ​​the initial poster image to obtain the target poster image.

[0176] In a specific embodiment, S54 includes the following steps:

[0177] S541: Determine an average value of a maximum preset area and a minimum preset area corresponding to each target element object as a first intermediate area corresponding to each target element object.

[0178] S542: Determine half of the difference between the maximum preset area and the minimum preset area corresponding to each target element object as the second intermediate area corresponding to each target element object.

[0179] S543 , obtaining the required area corresponding to each target element object according to the second priority corresponding to the key descriptor corresponding to each target element object, the first middle area and the second middle area corresponding to each target element object, and a preset required area calculation model.

[0180] In a specific embodiment, the preset required area calculation model is:

[0181] A=S1+((1 / (1+e^(-k×B)))-1)×S2, where A refers to the required area corresponding to the target element object, B refers to the second priority corresponding to the key descriptor corresponding to the target element object, k refers to the preset coefficient corresponding to the second priority, S1 refers to the first intermediate area corresponding to the target element object, S1=(C1+C2) / 2, S2 refers to the first intermediate area corresponding to the target element object, S1=(C2-C1) / 2, C1 refers to the minimum preset area corresponding to the target element object, and C2 refers to the maximum preset area corresponding to the target element object.

[0182] Among them, the value range of ((1 / (1+e^(-k×B)))-1) is (-1, 1), then the value range of A is (C1, C2), and A is positively correlated with B. As B increases, A gradually increases from C1 to C2, thereby improving the visual appeal and communication effect of the corresponding target element object in the target poster image.

[0183] In a specific embodiment, S55 includes the following steps:

[0184] S551, if the area to be filled is greater than the sum of the required areas corresponding to the first M target element objects corresponding to the second priority, and is less than or equal to the sum of the required areas corresponding to the first M+1 target element objects corresponding to the second priority, then the first M target element objects corresponding to the second priority are determined as the element objects to be filled, where M=1, 2,..., N, and N refers to the total number of target element objects.

[0185] The sum of the required areas of all the element objects to be filled is smaller than the area to be filled, thereby ensuring that there are gaps in the target poster image and improving the visual communication effect of the target poster image.

[0186] In the above, according to the names of several target objects and the preset element database, several key description sentences in the target description text, all key description words and the number of first words corresponding to each key description sentence, and the reference element object corresponding to each key description word in the preset element database are obtained. According to all target object names and all corresponding key description words included in each key description sentence, the first position of each target object name in the corresponding key description sentence and the second position of each key description word in the corresponding key description sentence are obtained. According to the second position corresponding to each key description word, the number of first words corresponding to the key description sentence corresponding to each key description word, the first position corresponding to each target object name included in the key description sentence corresponding to each key description word, and the first position corresponding to each target object name included in the key description sentence corresponding to each key description word are obtained. Position and first priority, obtain the second priority corresponding to the current key descriptor, and according to the reference element object corresponding to each key descriptor, the second priority corresponding to each key descriptor and the preset priority threshold, obtain the target element object corresponding to the initial poster image to generate the target poster image together with the initial poster image. It can be seen that this embodiment reduces the interference of redundant sentences and invalid sentences in the target description text, focuses on the key needs of generating posters through key description sentences, and comprehensively represents the priority of each key descriptor in generating the target poster through the second priority, thereby improving the matching between the generated poster and the target description text, thereby improving the generation efficiency and quality of the poster, and then improving the visual appeal and communication effect of the target poster image to meet user needs.

[0187] Example 3

[0188] This embodiment 3 provides an automatic sorting layout device for website content rendering, such as Figure 3 As shown, the automatic sorting layout device for website content rendering includes:

[0189] The data acquisition module 31 is used to acquire M target poster images, the poster theme and image element information corresponding to each target poster image, where M is an integer greater than 1.

[0190] The first priority obtaining module 32 is configured to obtain a first layout priority corresponding to each target poster image according to image element information corresponding to each target poster image.

[0191] The first sorting module 33 is configured to obtain a first sorting result corresponding to the M target poster images according to the first layout priority corresponding to each target poster image.

[0192] The to-be-presented image determining module 34 is configured to initialize t=1, determine the first target poster image in the first sorting result as the first presentation image, and determine other target poster images other than the first presentation image as to-be-presented images.

[0193] The second priority acquisition module 35 is configured to acquire the second layout priority corresponding to each image to be presented according to the first layout priority corresponding to each image to be presented, the image element information corresponding to the tth presented image and each image to be presented.

[0194] The first presentation image determination module 36 is configured to determine the to-be-presented image corresponding to the largest second layout priority as the t+1th presentation image.

[0195] The second presentation image determination module 37 is used to update t=t+1, and delete the t-th presentation image and the t+1-th presentation image from the first sorting result, and repeatedly execute the second priority acquisition module 35 until t=M-1, and obtain the 1st to Mth presentation images.

[0196] The poster layout module 38 is used to layout the M target poster images according to the order from the first presentation image to the Mth presentation image when rendering the website content.

[0197] In a specific embodiment, the image element information includes color element information, graphic element information, and text element information. The data acquisition module 31 includes:

[0198] The poster theme acquisition submodule is used to input each target poster image into a preset theme recognition model to obtain the poster theme corresponding to each target poster image.

[0199] The color element information acquisition submodule is used to obtain the color element information corresponding to each target poster image based on the hue corresponding to each pixel in each target poster image, wherein the color element information includes the number of hue types, the proportion of warm tones, and the proportion of cool tones.

[0200] The semantic segmentation submodule is used to input each target poster image into a preset semantic segmentation model to obtain a number of graphic elements and a number of text elements corresponding to each target poster image.

[0201] The frame area acquisition submodule is used to perform bounding box detection on each graphic element and each text element, and obtain the first frame and first frame area corresponding to each graphic element, and the second frame and second frame area corresponding to each text element.

[0202] The graphic element information acquisition submodule is used to obtain the graphic element information corresponding to each target poster image based on a number of graphic elements corresponding to each target poster image and a first frame area corresponding to each graphic element, wherein the graphic element information includes a first number of graphic elements and a first frame area corresponding to each graphic element.

[0203] The text element information acquisition submodule is used to obtain the text element information corresponding to each target poster image based on the number of text elements corresponding to each target poster image and the second frame area corresponding to each text element, wherein the text element information includes the second number of text elements and the second frame area corresponding to each text element.

[0204] In a specific embodiment, the first priority acquisition module 32 includes:

[0205] The color complexity acquisition submodule is used to obtain the color complexity corresponding to each target poster image according to the number of hue types, warm tone ratio and cool tone ratio corresponding to each target poster image.

[0206] The graphic complexity acquisition submodule is used to acquire the graphic complexity corresponding to each target poster image according to the first quantity corresponding to each target poster image and the first frame area corresponding to each graphic element.

[0207] The text complexity acquisition submodule is used to acquire the text complexity corresponding to each target poster image according to the second quantity corresponding to each target poster image and the second frame area corresponding to each text element.

[0208] The first priority acquisition submodule is used to obtain the first layout priority corresponding to each target poster image based on the color complexity, graphic complexity and text complexity corresponding to each target poster image, wherein the first layout priority is negatively correlated with the color complexity, graphic complexity and text complexity.

[0209] In a specific embodiment, the color complexity acquisition submodule includes:

[0210] The first difference degree acquisition unit is configured to acquire a first difference degree corresponding to each target poster image according to a warm tone ratio and a cool tone ratio corresponding to each target poster image.

[0211] The color complexity acquisition unit is used to obtain the color complexity corresponding to each target poster image based on the number of hue types and the first difference degree corresponding to each target poster image, wherein the color complexity is positively correlated with the number of hue types, and the color complexity is negatively correlated with the first difference degree.

[0212] In a specific embodiment, the graphics complexity acquisition submodule includes:

[0213] The second difference degree obtaining unit is configured to obtain a second difference degree between all graphic elements corresponding to each target poster image according to the first frame area corresponding to each graphic element corresponding to each target poster image.

[0214] The graphic complexity acquisition unit is used to acquire the graphic complexity corresponding to each target poster image according to the first quantity and the second difference degree corresponding to each target poster image, wherein the graphic complexity is positively correlated with the first quantity and the second difference degree.

[0215] In a specific embodiment, the text complexity acquisition submodule includes:

[0216] The third difference degree obtaining unit is configured to obtain a third difference degree between all text elements corresponding to each target poster image according to the second frame area corresponding to each text element corresponding to each target poster image.

[0217] The text complexity acquisition unit is used to acquire the text complexity corresponding to each target poster image according to the second quantity and the third difference degree corresponding to each target poster image, wherein the text complexity is positively correlated with the second quantity and the third difference degree.

[0218] In a specific embodiment, the second priority acquisition module 35 includes:

[0219] The theme difference degree acquisition submodule is used to obtain the theme difference degree between each image to be presented and the tth presented image based on the poster theme corresponding to each image to be presented and the poster theme corresponding to the tth presented image.

[0220] The color difference degree acquisition submodule is used to obtain the color difference degree between each image to be presented and the tth presented image based on the number of hue types, warm tone ratio and cool tone ratio corresponding to each image to be presented, and the number of hue types, warm tone ratio and cool tone ratio corresponding to the tth presented image.

[0221] The graphic difference degree acquisition submodule is used to obtain the graphic difference degree between each image to be presented and the tth presented image based on the first quantity corresponding to each image to be presented and the first frame area corresponding to each graphic element, as well as the first quantity corresponding to the tth presented image and the first frame area corresponding to each graphic element.

[0222] The text difference degree acquisition submodule is used to obtain the text difference degree between each image to be presented and the tth presented image based on the second quantity corresponding to each image to be presented and the second frame area corresponding to each text element, as well as the second quantity corresponding to the tth presented image and the second frame area corresponding to each text element.

[0223] The second priority acquisition submodule is used to obtain the second layout priority corresponding to each image to be presented based on the degree of subject difference, color difference, graphic difference, and text difference between each image to be presented and the tth presented image, as well as the first layout priority corresponding to each image to be presented, wherein the second layout priority is negatively correlated with the degree of subject difference, color difference, graphic difference, and text difference, and is positively correlated with the first layout priority.

[0224] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0225] Example 4

[0226] A fourth embodiment of the present invention provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores at least one instruction or at least one program segment, and the at least one instruction or at least one program segment is loaded and executed by a processor to implement the following steps:

[0227] S10, obtaining M target poster images, poster themes and image element information corresponding to each target poster image, where M is an integer greater than 1.

[0228] S20 , acquiring a first layout priority corresponding to each target poster image according to image element information corresponding to each target poster image.

[0229] S30 , obtaining first sorting results corresponding to the M target poster images according to the first layout priority corresponding to each target poster image.

[0230] S40 , initializing t=1, and determining the first target poster image in the first sorting result as the first presentation image, and determining other target poster images except the first presentation image as images to be presented.

[0231] S50 , acquiring a second layout priority corresponding to each to-be-presented image according to the first layout priority corresponding to each to-be-presented image, the tth presented image, and the image element information corresponding to each to-be-presented image.

[0232] S60: Determine the image to be presented corresponding to the largest second layout priority as the t+1th presentation image.

[0233] S70, update t=t+1, and delete the tth presentation image and the t+1th presentation image from the first sorting result, repeat step S50 until t=M-1, and obtain the 1st to Mth presentation images.

[0234] S80 , when rendering website content, laying out the M target poster images according to the order from the first presentation image to the Mth presentation image.

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

[0236] Those skilled in the art will clearly understand that for the sake of convenience and brevity in description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0237] Example 5

[0238] A fifth embodiment of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium according to the fourth embodiment of the present invention.

[0239] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any form. Although the present invention has been disclosed as above in terms of preferred embodiments, they are not intended to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A method for automatic sorting and layout when rendering website content, characterized in that: The automatic sorting layout method for website content rendering includes the following steps: S10, obtaining M target poster images, poster themes and image element information corresponding to each target poster image, where M is an integer greater than 1; S20, acquiring a first layout priority corresponding to each target poster image according to image element information corresponding to each target poster image; S30, obtaining a first sorting result corresponding to the M target poster images according to the first layout priority corresponding to each target poster image; S40, initializing t=1, and determining the first target poster image in the first sorting result as the first presentation image, and determining other target poster images other than the first presentation image as images to be presented; S50, obtaining a second layout priority corresponding to each image to be presented based on the first layout priority corresponding to each image to be presented, the tth presented image, and the image element information corresponding to each image to be presented, wherein obtaining the second layout priority corresponding to each image to be presented based on the first layout priority corresponding to each image to be presented, the tth presented image, and the image element information corresponding to each image to be presented includes: S505: Obtaining a second layout priority corresponding to each image to be presented based on the degree of subject difference, color difference, graphic difference, and text difference between each image to be presented and the tth presented image, and the first layout priority corresponding to each image to be presented, wherein the second layout priority is negatively correlated with the degree of subject difference, color difference, graphic difference, and text difference, and is positively correlated with the first layout priority; S60, determining the to-be-presented image corresponding to the largest second layout priority as the t+1th presentation image; S70, updating t=t+1, and deleting the t-th presentation image and the t+1-th presentation image from the first sorting result, and repeating step S50 until t=M-1, obtaining the 1st to Mth presentation images; S80 , when rendering website content, laying out the M target poster images according to the order from the first presentation image to the Mth presentation image.

2. The automatic sorting and layout method for website content rendering according to claim 1, characterized in that: The image element information includes color element information, graphic element information, and text element information. S10 includes the following steps: S101, inputting each target poster image into a preset theme recognition model to obtain the poster theme corresponding to each target poster image; S102, acquiring color element information corresponding to each target poster image based on the hue corresponding to each pixel in each target poster image, wherein the color element information includes the number of hue types, the proportion of warm tones, and the proportion of cool tones; S103, inputting each target poster image into a preset semantic segmentation model to obtain a plurality of graphic elements and a plurality of text elements corresponding to each target poster image; S104, performing bounding box detection on each graphic element and each text element, obtaining a first frame and a first frame area corresponding to each graphic element, and a second frame and a second frame area corresponding to each text element; S105, acquiring graphic element information corresponding to each target poster image based on the number of graphic elements corresponding to each target poster image and the first frame area corresponding to each graphic element, wherein the graphic element information includes a first number of graphic elements and a first frame area corresponding to each graphic element; S106, obtaining text element information corresponding to each target poster image based on the number of text elements corresponding to each target poster image and the second frame area corresponding to each text element, wherein the text element information includes a second number of text elements and a second frame area corresponding to each text element.

3. The automatic sorting and layout method for website content rendering according to claim 2, characterized in that: S20 includes the following steps: S201, obtaining the color complexity corresponding to each target poster image according to the number of hue types, the proportion of warm tones, and the proportion of cool tones corresponding to each target poster image; S202, obtaining a graphic complexity corresponding to each target poster image according to a first quantity corresponding to each target poster image and a first frame area corresponding to each graphic element; S203, obtaining a text complexity level corresponding to each target poster image based on the second number corresponding to each target poster image and the second frame area corresponding to each text element; S204, obtaining a first layout priority corresponding to each target poster image based on the color complexity, graphic complexity, and text complexity corresponding to each target poster image, wherein the first layout priority is negatively correlated with the color complexity, graphic complexity, and text complexity.

4. The automatic sorting and layout method for website content rendering according to claim 3 is characterized in that: S201 includes the following steps: S2011, obtaining a first difference degree corresponding to each target poster image according to a warm tone ratio and a cool tone ratio corresponding to each target poster image; S2012, obtaining the color complexity corresponding to each target poster image based on the number of hue types and the first degree of difference corresponding to each target poster image, wherein the color complexity is positively correlated with the number of hue types, and negatively correlated with the first degree of difference.

5. The automatic sorting and layout method for website content rendering according to claim 3, characterized in that: S202 includes the following steps: S2021, obtaining a second degree of difference between all graphic elements corresponding to each target poster image based on a first frame area corresponding to each graphic element corresponding to each target poster image; S2022: Obtain a graphic complexity corresponding to each target poster image based on the first quantity and the second difference degree corresponding to each target poster image, wherein the graphic complexity is positively correlated with the first quantity and the second difference degree.

6. The automatic sorting and layout method for website content rendering according to claim 3, characterized in that: S203 includes the following steps: S2031, obtaining a third degree of difference between all text elements corresponding to each target poster image based on the second frame area corresponding to each text element corresponding to each target poster image; S2032: Acquire the text complexity corresponding to each target poster image according to the second quantity and the third difference degree corresponding to each target poster image, wherein the text complexity is positively correlated with the second quantity and the third difference degree.

7. The automatic sorting and layout method for website content rendering according to claim 2, characterized in that: S50 includes the following steps: S501, obtaining a degree of theme difference between each to-be-presented image and the t-th presented image based on a poster theme corresponding to each to-be-presented image and a poster theme corresponding to the t-th presented image; S502, obtaining a degree of color difference between each to-be-presented image and the t-th presented image based on the number of hue types, the proportion of warm tones, and the proportion of cool tones corresponding to each to-be-presented image, and the number of hue types, the proportion of warm tones, and the proportion of cool tones corresponding to the t-th presented image; S503: Obtaining a degree of graphic difference between each to-be-presented image and the t-th presented image based on the first number corresponding to each to-be-presented image and the first frame area corresponding to each graphic element, and the first number corresponding to the t-th presented image and the first frame area corresponding to each graphic element; S504, based on the second quantity corresponding to each image to be presented and the second frame area corresponding to each text element, as well as the second quantity corresponding to the t-th presented image and the second frame area corresponding to each text element, obtain the degree of text difference between each image to be presented and the t-th presented image.

8. An automatic sorting and layout device for website content rendering, characterized in that: The automatic sorting layout device for website content rendering includes: A data acquisition module is used to acquire M target poster images, poster themes and image element information corresponding to each target poster image, where M is an integer greater than 1; A first priority acquisition module, configured to acquire a first layout priority corresponding to each target poster image based on image element information corresponding to each target poster image; A first sorting module is configured to obtain a first sorting result corresponding to the M target poster images according to a first layout priority corresponding to each target poster image; a module for determining an image to be presented, configured to initialize t=1, determine the first target poster image in the first sorting result as the first presentation image, and determine other target poster images other than the first presentation image as images to be presented; A second priority acquisition module is configured to acquire a second layout priority corresponding to each image to be presented based on the first layout priority corresponding to each image to be presented, the image element information corresponding to the tth presented image and each image to be presented, wherein the second priority acquisition module includes: a second priority acquisition submodule, configured to acquire a second layout priority corresponding to each image to be presented based on a degree of subject difference, color difference, graphic difference, and text difference between each image to be presented and the t-th presented image, and a first layout priority corresponding to each image to be presented, wherein the second layout priority is negatively correlated with the degree of subject difference, color difference, graphic difference, and text difference, and is positively correlated with the first layout priority; A first presentation image determination module, configured to determine the image to be presented corresponding to the largest second layout priority as the t+1th presentation image; a second presentation image determination module, configured to update t=t+1, delete the t-th presentation image and the t+1-th presentation image from the first sorting result, and repeatedly execute the second priority acquisition module until t=M-1, and acquire the 1st to Mth presentation images; The poster layout module is used to layout the M target poster images according to the order of the first presentation image to the Mth presentation image when rendering website content.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the automatic sorting and layout method for rendering website content as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.

Citation Information

Patent Citations

  • Image generation method and device, electronic equipment and storage medium

    CN115329119A

  • Image generation method and device, equipment and storage medium

    CN118429474A