A method, device, medium and equipment for generating website posters based on multiple elements

By analyzing the position and priority of key descriptive sentences and words, and automatically filtering and combining the website posters, the problem of time-consuming and labor-intensive and lack of personalization in the existing technology is solved, and efficient and personalized poster generation is achieved, which improves visual appeal and information communication effect.

CN119782646BActive Publication Date: 2025-07-11BEIJING TONGQIANYIWAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411925748.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-07-11
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing website poster generation methods are time-consuming and labor-intensive, lacking flexibility and personalization, and it is difficult to meet the diverse needs of users, especially in the rapid screening and combination of poster elements.

Method used

By obtaining the initial poster image, target description text and target object name input by the user, using the preset element database, analyzing the location and priority of key description statements and words, automatically filtering and combining to generate target poster images, and optimizing the poster generation process with a multi-element layout priority algorithm.

Benefits of technology

It improves the efficiency and quality of poster generation, enhances the matching between the poster and the target description text, and improves visual appeal and information communication effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782646B_ABST
    Figure CN119782646B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image generation, and in particular to a method, device, medium and equipment for generating website posters based on multiple elements, including: screening out key description statements from the target description text, reducing the interference of redundant and invalid statements in the target description text, focusing on the key requirements for generating posters through the key description statements, and based on the target object name, key description words and the number of the first words corresponding to the key description statements, and the reference element objects corresponding to the key description words, obtaining the second priority corresponding to the key description words, and then screening out the target element objects corresponding to the initial poster image to jointly generate the target poster image with the initial poster image. The second priority comprehensively represents the priority degree of each key description word when generating the target poster, improving the matching degree between the generated poster and the target description text, the generation efficiency and quality of the poster, as well as the visual attraction and communication effect of the target poster image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image generation, and particularly to a method, device, medium and equipment for generating website posters based on multiple elements. Background Art

[0002] In today's digital age, website posters, as an important visual communication medium, are widely used in various online platforms, e-commerce websites, social media promotion and other scenarios. With the continuous growth of users' demands for poster personalization and diversification, the traditional way of generating posters using a single template or simple image editing has become difficult to meet the requirements. On the one hand, users expect posters to accurately convey specific information and themes, and this information often involves multiple different objects and rich descriptive content. On the other hand, it is a very challenging task to quickly screen and reasonably combine elements that meet the poster theme and user intent from a vast element library.

[0003] Most current website poster generation methods rely on existing poster templates and the manual creation of professional designers. This is not only time-consuming and laborious, but also lacks flexibility and personalization. Moreover, the selection of elements requires users to have certain design skills and experience. For ordinary users, it is difficult to generate personalized posters that meet their needs, resulting in poor efficiency and quality of poster production, and it is difficult to generate unique posters according to users' specific needs to meet the rapidly changing market demands.

[0004] Therefore, how to improve the efficiency and quality of poster generation to meet the needs of different users has become an urgent problem to be solved. Summary of the Invention

[0005] In view of the above technical problems, the technical solution adopted by the present invention is a method for generating website posters based on multiple elements. The method for generating website posters based on multiple elements includes the following steps:

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

[0007] S2, according to the preset number of target object names and the preset element database, obtaining several key description statements in the target description text, all key description words corresponding to each key description statement and the number of the first words, and reference element objects corresponding to each key description word in the preset element database, wherein each key description statement includes at least one target object name.

[0008] S3. Based on all the target object names and corresponding key description words included in each key description statement, obtain the first position of each target object name in the corresponding key description statement and the second position of each key description word in the corresponding key description statement.

[0009] S4. Based on the second position corresponding to each key description word, the number of the first words in the key description statement corresponding to each key description word, the first position and the first priority corresponding to each target object name included in the key description statement corresponding to each key description word, obtain the second priority corresponding to the current key description word.

[0010] S5. Based on the reference element object corresponding to each key description word, the second priority corresponding to each key description word, and a preset priority threshold, obtain the target element object corresponding to the initial poster image, where the target element object is used to jointly generate the target poster image with the initial poster image.

[0011] The present invention also provides a website poster generation device based on multiple elements. The website poster generation device based on multiple elements includes:

[0012] A data acquisition module, configured to acquire an initial poster image, a target description text, a plurality of preset target object names, the first priority corresponding to each target object name, and a preset element database input by a user.

[0013] A data screening module, configured to obtain a plurality of key description statements in the target description text, all the key description words and the number of the first words corresponding to each key description statement, and the reference element object corresponding to each key description word in the preset element database according to the plurality of target object names and the preset element database, where at least one target object name is included in each key description statement.

[0014] A position acquisition module, configured to obtain the first position of each target object name in the corresponding key description statement and the second position of each key description word in the corresponding key description statement based on all the target object names and corresponding key description words included in each key description statement.

[0015] A priority acquisition module, configured to obtain the second priority corresponding to the current key description word based on the second position corresponding to each key description word, the number of the first words in the key description statement corresponding to each key description word, the first position and the first priority corresponding to each target object name included in the key description statement corresponding to each key description word.

[0016] A target element object acquisition module, configured to acquire a target element object corresponding to an initial poster image according to a reference element object corresponding to each key descriptor, a second priority corresponding to each key descriptor, and a preset priority threshold, where the target element object is used to jointly generate a target poster image with the initial poster image.

[0017] The present invention also provides a non-transitory computer-readable storage medium storing at least one instruction or at least one segment of program, and the at least one instruction or at least one segment of program is loaded and executed by a processor to implement the above-mentioned multi-element-based website poster generation method.

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

[0019] The present invention has at least the following beneficial effects: according to a plurality of target object names and a preset element database, a plurality of key description statements in a target description text, all key descriptors corresponding to each key description statement and the number of first words, and reference element objects corresponding to each key descriptor in the preset element database are acquired; according to all target object names included in each key description statement and all corresponding key descriptors, the first position of each target object name in the corresponding key description statement and the second position of each key descriptor in the corresponding key description statement are acquired; according to the second position corresponding to each key descriptor, the number of first words corresponding to the key description statement corresponding to each key descriptor, the first position corresponding to each target object name included in the key description statement corresponding to each key descriptor, and the first priority, the second priority corresponding to the current key descriptor is acquired; according to the reference element object corresponding to each key descriptor, the second priority corresponding to each key descriptor, and a preset priority threshold, a target element object corresponding to the initial poster image is acquired to jointly generate a target poster image with the initial poster image. It can be seen that in this embodiment, the interference of redundant and invalid statements in the target description text is reduced, the key requirements for generating posters are focused through key description statements, and the second priority comprehensively represents the priority of each key descriptor when generating a target poster, improving the matching degree between the generated poster and the target description text, thereby improving the generation efficiency and quality of the poster, and further improving the visual attraction and communication effect of the target poster image to meet user needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0021] Figure 1 This is a flowchart of a method for generating a website poster based on multiple elements provided in Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of an automatic sorting and layout method during website content rendering provided in Embodiment 2 of the present invention;

[0023] Figure 3 This is a structural schematic diagram of a device for generating a website poster based on multiple elements provided in Embodiment 3 of the present invention. Detailed implementation manners

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

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

[0026] Embodiment 1

[0027] Embodiment 1 of the present invention provides a method for generating a website poster based on multiple elements. The method for generating a website poster based on multiple elements includes the following steps, as Figure 1 shown:

[0028] S1. Obtain the initial poster image, target description text, a plurality of preset target object names, the first priority corresponding to each target object name, and a preset element database input by the user.

[0029] Among them, the initial poster image can refer to a semi-finished poster image that already includes some poster elements. For example, the initial poster image can include some poster elements such as the poster theme and the poster name.

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

[0031] According to the importance of each target object name when generating a target poster that meets the requirements, obtain the first priority corresponding to each target object name. Specifically, the specific values of the first priorities corresponding to each target object name can be set by the implementer according to the actual situation.

[0032] The target description text can refer to the description text of the poster finished product that is expected to be obtained, which can be provided by implementers such as users or designers. The target description text can characterize the settings and expectations of the implementer for aspects such as the theme, name, product, and interest group of the poster. There are several initial element objects in the preset element database, so that based on the target description text and the target object name, the target element objects required for the target poster are screened out from the preset element database, and are used to fill the initial poster image to generate a target poster that meets the requirements.

[0033] Among them, the initial element object can refer to poster elements of types such as graphics, illustrations, photos, text, and colors.

[0034] S2. According to several target object names and the preset element database, obtain several key description statements in the target description text, all the key description words and the number of the first words corresponding to each key description statement, and the reference element objects corresponding to each key description word in the preset element database, where each key description statement includes at least one target object name.

[0035] Among them, the target description text includes several initial description statements. Screening out several key description statements from the target description text based on the target object name can reduce the interference of redundant and invalid statements, focus on the key requirements for generating the poster, and improve the generation efficiency and quality of the target poster.

[0036] The key description word can refer to the keyword in the key description statement that characterizes the settings and expectations of the implementer for the target poster. Among the massive element objects in the preset element database, focusing on the key requirements for generating the poster, screening out the reference element objects corresponding to the key description words in the target description text, and using them as the element basis for generating the target poster can improve the generation efficiency and quality of the target poster.

[0037] As described above, several key description statements are filtered out from the target description text based on the target object name, reducing the interference of redundant and invalid statements, focusing on the key requirements for generating the poster, and obtaining the key description words corresponding to each key description statement and the reference element objects corresponding to each key description word as the basis for generating the target poster, improving the generation efficiency and quality of the target poster.

[0038] In a specific embodiment, S2 includes the following steps:

[0039] S21, obtain several initial description statements from the target description text.

[0040] S22, match each target object name with each initial description statement to obtain the first name quantity of the target object name included in each initial description statement.

[0041] S23, determine the initial description statements corresponding to the first name quantities greater than the first preset quantity threshold as key description statements.

[0042] S24, perform keyword extraction on each key description statement to obtain all the key description words corresponding to each key description statement, and the first word quantity corresponding to all the key description words corresponding to each key description statement.

[0043] S25, match each key description word with the preset element database to obtain the reference element object corresponding to each key description word in the preset element database.

[0044] Among them, different initial description statements can be divided by the punctuation marks in the target description text.

[0045] Traverse and retrieve and match each target object name with each initial description statement to obtain all the target object names included in each initial description statement and the corresponding first name quantity. The larger the first name quantity, that is, the more target object names included in the initial description statement, the richer the description information of the initial description statement for the target poster. Therefore, the initial description statements corresponding to the first name quantities greater than the first preset quantity threshold are determined as key description statements.

[0046] Perform keyword extraction on each key description statement according to the keyword extraction algorithm. Among them, those skilled in the art know that any keyword extraction algorithm in the prior art falls within the protection scope of the present invention and will not be elaborated here.

[0047] As described above, according to the first preset quantity threshold and the quantity 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, so as to obtain all key description words corresponding to each key description statement and reference element objects corresponding to each key description word, improving the generation efficiency and quality of the target poster.

[0048] In a specific embodiment, the preset element database includes a number of initial element objects and element tags corresponding to each initial element object. S25 includes the following steps:

[0049] S251, for any key description word, calculate the semantic similarity between the current key description word and the element tags corresponding to each initial element object.

[0050] S252, determine the initial element object corresponding to the maximum semantic similarity corresponding to the current key description word as the reference element object corresponding to the current key description word.

[0051] 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 elaborated herein.

[0052] As described above, according to the semantic similarity between the key description words and the element tags, reference element objects corresponding to each key description word are screened out from the preset element database as the basis for generating the target poster, improving the matching degree between the reference element objects and the key requirements for generating the poster, and improving the generation quality of the target poster.

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

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

[0055] S31, determine the character position serial number of the first character in each target object name in the corresponding key description statement as the first position of each target object name in the corresponding key description statement.

[0056] S32, determine the character position serial number of the first character in each key description word in the corresponding key description statement as the second position of each key description word in the corresponding key description statement.

[0057] As described above, the position information of the target object name in the corresponding key description statement is characterized by the first position, and the position information of the key description word in the corresponding key description statement is characterized by the second position. Then, the relevance between the key description 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 description word and the requirements for generating a poster.

[0058] S4. According to the second position corresponding to each key description word, the number of the first words in the key description statement corresponding to each key description word, the first position and the first priority corresponding to each target object name included in the key description statement corresponding to each key description word, obtain the second priority corresponding to the current key description word.

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

[0060] S41. For any key description word, any key description statement corresponding to the current key description word, and any target object name corresponding to the current key description statement, obtain the degree of association of the current key description word with respect to the current target object name included in the current key description statement according to the first position of the current target object name in the current key description statement and the second position of the current key description word in the current key description statement.

[0061] S42. Determine the key degree corresponding to the current key description statement as the proportion of the number of the first words in the current key description statement in the sum of the numbers of the first words in all key description statements.

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

[0063] S44. Obtain the fourth priority corresponding to the current key description statement according to the key degree and the third priority corresponding to the current key description statement.

[0064] S45. Obtain the first importance degree of the current key description word with respect to the current key description statement according to the first priority corresponding to each target object name and the degree of association of the current key description word with respect to all target object names included in the current key description statement.

[0065] S46. Obtain the second priority corresponding to the current key description word according to the fourth priority corresponding to the current key description statement and the first importance degree of the current key description word with respect to all key description statements.

[0066] Among them, the closer the first position and the second position are, the higher the degree of association between the corresponding key description words and the corresponding target object names.

[0067] The more the number of the first words corresponding to the key description statement, that is, the more key description words included in the key description statement, the richer the description information of the key description statement for the target poster. Correspondingly, the greater the key degree corresponding to the key description statement. The greater the first priority corresponding to the target object name, the higher the importance of the target object name when generating a target poster that meets the requirements. Correspondingly, the greater the third priority, the higher the importance of the key description statement when generating a target poster that meets the requirements. Further, by combining the key degree corresponding to the key description statement and the third priority, the fourth priority corresponding to the key description statement is obtained, which comprehensively represents the priority degree of the key description statement when generating the target poster.

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

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

[0070] S5. Based on the reference element object corresponding to each key description word, the second priority corresponding to each key description word, and a preset priority threshold, the target element object corresponding to the initial poster image is obtained, where the target element object is used to jointly generate the target poster image with the initial poster image.

[0071] Among them, based on the preset priority threshold and the second priority corresponding to each key description word, the reference element object corresponding to the key description word is screened to obtain the target element object. Through operations such as adding the target element object to a suitable position in the initial poster image, adjusting the size, and changing the color, the finally generated target poster image can better reflect the key information of the target description text and has higher visual attractiveness and communication effect.

[0072] In a specific embodiment, the preset element database includes a number of initial element objects and a corresponding preset area range for each initial element object. The preset area range includes a minimum preset area and a maximum preset area. S5 further includes the following steps:

[0073] S51. According to the pixel values of each pixel point in the initial poster image, obtain the area to be filled in the initial poster image and the area to be filled corresponding to the area to be filled.

[0074] S52. Determine the reference element object whose corresponding second priority is greater than the preset priority threshold as the target element object.

[0075] S53. According to the preset area range corresponding to each initial element object, obtain the preset area range corresponding to each target element object.

[0076] S54. According to the second priority corresponding to the key description word of each target element object and the preset area range corresponding to each target element object, obtain the required area corresponding to each target element object.

[0077] S55. According to the area to be filled and the required area corresponding to each target element object, screen out the element objects to be filled from all the target elements.

[0078] S56. Fill all the element objects to be filled into the area to be filled in the initial poster image to obtain the target poster image.

[0079] Among them, the minimum preset area can be the minimum area that enables the corresponding initial element object to have a better visual effect in the target poster image, and the maximum preset area can be the maximum area that enables the corresponding initial element object to have a better visual effect in the target poster image.

[0080] When the pixel value of the pixel point in the initial poster image is within the preset pixel value range, the corresponding pixel point is divided into the area to be filled. Among them, the preset pixel value range can be the pixel value range corresponding to all background pixel points in the initial poster image.

[0081] The higher the second priority, the higher the importance and priority of the corresponding target element object when generating the target poster. Therefore, when the second priorities corresponding to the same target element object are different, the size of the target element object presented in the target poster image is different, so as to achieve different visual attractions and communication effects. Therefore, the required area corresponding to each target element object is positively correlated with the corresponding second priority.

[0082] To ensure that there are gaps in the target poster image and improve the visual communication effect, in this embodiment, the target element objects are further screened according to the area to be filled and the required area corresponding to each target element object, and the selected element objects to be filled are filled into the area to be filled of the initial poster image to obtain the target poster image.

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

[0084] S541, determine the average value of the maximum preset area and the minimum preset area corresponding to each target element object as the first intermediate area corresponding to each target element object.

[0085] 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.

[0086] S543, according to the second priority corresponding to the key description word corresponding to each target element object, the first intermediate area, the second intermediate area and the preset required area calculation model corresponding to each target element object, obtain the required area corresponding to each target element object.

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

[0088] 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 description word 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 second 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.

[0089] 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 attraction and communication effect of the corresponding target element object in the target poster image.

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

[0091] S551, if the area to be filled is greater than the sum of the required areas of the target element objects corresponding to the first M second priorities and less than or equal to the sum of the required areas of the target element objects corresponding to the first M+1 second priorities, then the target element objects corresponding to the first M second priorities 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.

[0092] Among them, the sum of the required areas of all the element objects to be filled is less than the area to be filled, which ensures that there are gaps in the target poster image and improves the visual communication effect of the target poster image.

[0093] As described above, according to several target object names and a preset element database, several key description statements in the target description text, all the key description words corresponding to each key description statement and the number of the first words, as well as the reference element objects corresponding to each key description word in the preset element database are obtained. According to all the target object names and the corresponding all key description words included in each key description statement, the first position of each target object name in the corresponding key description statement and the second position of each key description word in the corresponding key description statement are obtained. According to the second position corresponding to each key description word, the number of the first words corresponding to the key description statement corresponding to each key description word, the first position corresponding to each target object name included in the key description statement corresponding to each key description word and the first priority, the second priority corresponding to the current key description word is obtained. According to the reference element object corresponding to each key description word, the second priority corresponding to each key description word and a preset priority threshold, the target element objects corresponding to the initial poster image are obtained to generate the target poster image together with the initial poster image. It can be seen that this embodiment reduces the interference of redundant and invalid statements in the target description text, focuses on the key requirements for generating the poster through the key description statements, and comprehensively represents the priority degree of each key description word when generating the target poster through the second priority, improves the matching degree between the generated poster and the target description text, thereby improving the generation efficiency and quality of the poster, and further improving the visual attraction and communication effect of the target poster image to meet the user's needs.

[0094] Embodiment 2

[0095] Embodiment 2 provides an automatic sorting and layout method during website content rendering. The automatic sorting and layout method during website content rendering includes, as Figure 2 shown:

[0096] S10, obtain M target poster images, the poster theme, color element information, graphic element information, and text element information corresponding to each target poster image, where M is an integer greater than 1.

[0097] Among them, static posters are likely to cause visual fatigue for viewers. The switching and presentation of posters can continuously bring new visual stimuli, break the monotony, quickly attract the attention of viewers, and different posters can convey information from different angles. The form of poster switching and presentation can make the conveyed information more rich and comprehensive.

[0098] The current poster display method generally switches and displays according to the order set by the user independently. With the rapid spread of information and the continuous pursuit of visual experience by people, the traditional poster display method lacks an objective analysis of the poster presentation order, and there may be display problems such as chaos and disorder, which are difficult to meet the diverse needs of viewers' aesthetics and information acquisition, thereby reducing the attention and information transmission effect of the target poster images.

[0099] Therefore, in this embodiment, the poster theme, color element information, graphic element information, and text element information corresponding to each target poster image are obtained, and the M target poster images to be presented are sorted by integrating poster features from multiple dimensions, so as to reasonably arrange the switching order of the target poster images and improve the attention and information transmission effect of the target poster images.

[0100] In a specific implementation manner, S10 includes the following steps:

[0101] S101, input each target poster image into a preset theme recognition model to obtain the poster theme corresponding to each target poster image.

[0102] S102, obtain the color element information corresponding to each target poster image according to the hue corresponding to each pixel point in each target poster image, where the color element information includes the number of hue types, the warm color tone ratio, and the cold color tone ratio.

[0103] S103, 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.

[0104] S104, perform bounding box detection on each graphic element and each text element to obtain the first frame and the first frame area corresponding to each graphic element, and the second frame and the second frame area corresponding to each text element.

[0105] S105, obtain the graphic element information corresponding to each target poster image according to the number of graphic elements corresponding to each target poster image and the first frame area corresponding to each graphic element, where the graphic element information includes the first number of graphic elements and the first frame area corresponding to each graphic element.

[0106] S106. Obtain the text element information corresponding to each target poster image based on the several text elements corresponding to each target poster image and the second frame area corresponding to each text element. The text element information includes the second quantity of text elements and the second frame area corresponding to each text element.

[0107] Among them, the preset theme recognition model is used to extract features and predict the theme of the input target poster image, so as to represent the poster features of the target poster image in the theme dimension. The specific type of the poster theme can be preset by the implementer according to the actual situation. For example, the specific type of the poster theme can include various types such as product promotion, art exhibition, environmental protection, charity activities, etc.

[0108] By counting the hues of all pixel points in the target poster image, the color element information of the target poster image can be obtained, which is used to represent 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 proportion of warm colors, that is, the proportion of pixel points of warm colors (such as red, orange, yellow, etc.) in the target poster image to the total pixel points. The proportion of cold colors, that is, the proportion of pixel points of cold colors (such as blue, green, purple, etc.) in the target poster image to the total pixel points.

[0109] The preset semantic segmentation model is used to perform operations such as feature extraction, upsampling, deconvolution, and pixel-level classification on the input target poster image, and assign corresponding category labels to each pixel point, such as image element labels and text element labels, so as to obtain several graphic elements and several text elements corresponding to each target poster image. Among them, each text element may include several texts.

[0110] Perform bounding box detection on each graphic element and each text element according to the bounding box detection algorithm, obtain the first frame and the first frame area corresponding to each graphic element, and the second frame and the second frame area corresponding to each text element, and then obtain the graphic element information and text element information corresponding to each target poster image, which are used to represent the poster features of each target poster image in the graphic dimension and the text dimension. Among them, those skilled in the art know that any bounding box detection algorithm in the prior art falls within the protection scope of the present invention, and will not be elaborated here.

[0111] As described above, obtain the poster theme, color element information, graphic element information, and text element information corresponding to each target poster image, and synthesize the poster features in multiple dimensions as the basis for sorting the M target poster images to be presented, so as to reasonably arrange the switching order of the target poster images to improve the attention and information transmission effect of the target poster images.

[0112] S20. Obtain the first layout priority corresponding to each target poster image according to the color element information, graphic element information, and text element information corresponding to each target poster image.

[0113] Among them, the first layout priority is the priority for the corresponding target poster image to be preferentially displayed during the poster switching display process.

[0114] In a specific embodiment, S20 includes the following steps:

[0115] S201. Obtain the color complexity corresponding to each target poster image according to the number of hue types, warm color tone ratio, and cold color tone ratio corresponding to each target poster image.

[0116] S202. Obtain 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.

[0117] S203. Obtain 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.

[0118] S204. Obtain the 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. Among them, the first layout priority is negatively correlated with the color complexity, graphic complexity, and text complexity.

[0119] Among them, during the switching process of the target poster image, 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 an adaptation process for the audience, and continuously bring new visual stimuli and surprises to the audience, improving the attention and information transmission effect of the target poster image.

[0120] Therefore, in this embodiment, since 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 according to the color complexity, graphic complexity, and text complexity corresponding to each target poster image, serving as the data basis for reasonably arranging the switching order of the target poster images.

[0121] In a specific embodiment, S201 includes the following steps:

[0122] S2011. Obtain the first degree of difference corresponding to each target poster image according to the warm color tone ratio and cold color tone ratio corresponding to each target poster image.

[0123] S2012. Obtain the color complexity corresponding to each target poster image according to the number of hue types and the first degree of difference corresponding to each target poster image. Among them, the color complexity is positively correlated with the number of hue types, and the color complexity is negatively correlated with the first degree of difference.

[0124] Among them, the greater the first degree of difference between the warm color ratio and the cold color ratio corresponding to the target poster image, that is, the greater the proportion of warm colors or the greater the proportion of cold colors corresponding to the target poster image, it indicates that the hue of the target poster image is more unified, and the corresponding color complexity is lower.

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

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

[0127] In a specific embodiment, S202 includes the following steps:

[0128] S2021. Obtain the second degree of difference between all graphic elements corresponding to each target poster image according to the first frame area corresponding to each graphic element of each target poster image.

[0129] S2022. Obtain the graphic complexity corresponding to each target poster image according to the first quantity and the second degree of difference corresponding to each target poster image. Among them, the graphic complexity is negatively correlated with the first quantity and the second degree of difference.

[0130] Among them, the greater the difference between the first frame areas corresponding to different graphic elements in the target poster image and the greater the first quantity corresponding to the target poster image, it indicates that the graphic information of the target poster image is more complex, and the corresponding graphic complexity is higher.

[0131] Therefore, since 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 according to the first quantity and the second degree of difference corresponding to each target poster image, as the data basis for reasonably arranging the switching order of the target poster images.

[0132] In a specific embodiment, S203 includes the following steps:

[0133] S2031. Obtain the 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.

[0134] S2032. Obtain the text complexity corresponding to each target poster image according to the second quantity and the third degree of difference corresponding to each target poster image, where the text complexity is positively correlated with the second quantity and the third degree of difference.

[0135] Among them, the greater the difference between the second frame areas corresponding to different text elements in the target poster image and the greater the second quantity corresponding to the target poster image, the more complex the text information of the target poster image, and the higher the corresponding text complexity.

[0136] Therefore, since 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 according to the second quantity and the third degree of difference corresponding to each target poster image, as the data basis for reasonably arranging the switching order of the target poster images.

[0137] As described above, it is set that the first layout priority is negatively correlated with the color complexity, the graphic complexity, and the text complexity. According to the color complexity, the graphic complexity, and the text complexity corresponding to each target poster image, the first layout priority corresponding to each target poster image is obtained, as the data basis for reasonably arranging the switching order of the target poster images, thereby reducing display problems such as chaos and disorder, continuously bringing new visual stimuli and surprises to the audience, and improving the attention and information transmission effect of the target poster images.

[0138] S30. Obtain the first sorting result corresponding to the M target poster images according to the first layout priority corresponding to each target poster image.

[0139] Among them, the M target poster images are sorted in descending order of the first layout priority to obtain the first sorting result corresponding to the M target poster images, as the basis for arranging the switching order of the target poster images.

[0140] S40. Initialize t = 1, determine the first target poster image in the first sorting result as the first presentation object, and determine the other target poster images except the first presentation object as the to-be-presented objects.

[0141] 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 object, and the other target poster images except the first presentation object are determined as objects to be presented. Based on the determination of the first presentation object, the priorities of the objects to be presented are analyzed, so as to gradually determine the presentation order of the target poster images.

[0142] S50. According to the first layout priority corresponding to each object to be presented, the poster themes, color element information, graphic element information, and text element information corresponding to the t-th presentation object and each object to be presented, obtain the second layout priority corresponding to each object to be presented.

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

[0144] S501. According to the poster theme corresponding to each object to be presented and the poster theme corresponding to the t-th presentation object, obtain the degree of theme difference between each object to be presented and the t-th presentation object.

[0145] S502. According to the number of hue types, warm color ratio, and cold color ratio corresponding to each object to be presented, and the number of hue types, warm color ratio, and cold color ratio corresponding to the t-th presentation object, obtain the degree of color difference between each object to be presented and the t-th presentation object.

[0146] S503. According to the first quantity corresponding to each object to be presented and the first frame area corresponding to each graphic element, and the first quantity corresponding to the t-th presentation object and the first frame area corresponding to each graphic element, obtain the degree of graphic difference between each object to be presented and the t-th presentation object.

[0147] S504. According to the second quantity corresponding to each object to be presented and the second frame area corresponding to each text element, and the second quantity corresponding to the t-th presentation object and the second frame area corresponding to each text element, obtain the degree of text difference between each object to be presented and the t-th presentation object.

[0148] S505. According to the degree of theme difference, color difference, graphic difference, text difference between each object to be presented and the t-th presentation object, and the first layout priority corresponding to each object to be presented, obtain the second layout priority corresponding to each object to be presented, where the second layout priority is negatively correlated with the degree of theme difference, color difference, graphic difference, and text difference, and the second layout priority is positively correlated with the first layout priority.

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

[0150] S5011. Calculate the semantic similarity degree between the poster theme corresponding to each object to be presented and the poster theme corresponding to the t-th presented object.

[0151] S5012. According to the semantic similarity degree between the poster theme corresponding to each object to be presented and the poster theme corresponding to the t-th presented object, obtain the theme difference degree between the poster theme corresponding to each object to be presented and the poster theme corresponding to the t-th presented object, where the theme difference degree is negatively correlated with the semantic similarity degree.

[0152] Among them, when the semantic similarity degree between the object to be presented and the t-th presented object is relatively high, that is, when the theme difference degree is relatively small, it means that the core content or main idea conveyed by the object to be presented and the t-th presented object is relatively similar. When arranging the presentation order, placing the target poster images with similar themes in relatively close positions can enable the audience to better focus on a specific theme, deeply think about relevant issues, and form a coherent cognitive experience. Therefore, the second layout priority is negatively correlated with the theme difference degree.

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

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

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

[0156] S5022. Determine the difference between the warm color tone ratio corresponding to each object to be presented and the warm color tone ratio corresponding to the t-th presented object as the second color difference value between each object to be presented and the t-th presented object.

[0157] S5023. Determine the difference between the cool color tone ratio corresponding to each object to be presented and the cool color tone ratio corresponding to the t-th presented object as the third color difference value between each object to be presented and the t-th presented object.

[0158] S5024. According to the first color difference value, the second color difference value, and the third color difference value between each object to be presented and the t-th presented object, obtain the color difference degree between each object to be presented and the t-th presented object, where the color difference degree is positively correlated with the first color difference value, the second color difference value, and the third color difference value.

[0159] Among them, when the color difference degree between the object to be presented and the t-th presented object is small, it indicates that the color matching between the object to be presented and the t-th presented object is relatively similar, that is, the visual atmosphere is relatively harmonious and unified. For example, a group of posters all have blue as the main color, and may use different shades of blue to express different emotions or information. When arranging the presentation order, placing the target poster images with similar colors in relatively close positions will not bring a strong visual jump to the audience, making the entire presentation process smoother. Therefore, the second layout priority is negatively correlated with the color difference degree.

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

[0161] S5031, according to the first quantity corresponding to each object to be presented and the first quantity corresponding to the t-th presented object, obtain the first quantity difference value between each object to be presented and the t-th presented object.

[0162] S5032, determine the average value of the first frame areas corresponding to all graphic elements corresponding to each object to be presented as the first average frame area corresponding to each object to be presented.

[0163] S5033, determine the average value of the first frame areas corresponding to all graphic elements corresponding to the t-th presented object as the first average frame area corresponding to the t-th presented object.

[0164] S5034, according to the first average frame area corresponding to each object to be presented and the first average frame area corresponding to the t-th presented object, obtain the first frame area difference value between each object to be presented and the t-th presented object.

[0165] S5035, according to the first quantity difference value and the first frame area difference value between each object to be presented and the t-th presented object, obtain the graphic difference degree between each object to be presented and the t-th presented object, where the graphic difference degree is positively correlated with both the first quantity difference value and the first frame area difference value.

[0166] Among them, when the graphic difference degree between the object to be presented and the t-th presented object is small, it indicates that the object to be presented and the t-th presented object are relatively similar in terms of the shape, style or expression method of the graphics. 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 the posters with similar graphics in sequence can allow the audience to more easily recognize and understand the information conveyed by the graphics, and at the same time enhance the relevance between the posters. Moreover, the audience can quickly adapt to the similar graphic style during the viewing process and better appreciate and interpret the unique features of each poster.

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

[0168] S5041: Obtain the second quantity difference value between each object to be presented and the t-th presented object according to the second quantity corresponding to each object to be presented and the second quantity corresponding to the t-th presented object.

[0169] S5042: Determine the average value of the second frame areas corresponding to all text elements corresponding to each object to be presented as the second average frame area corresponding to each object to be presented.

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

[0171] S5044: Obtain the second frame area difference value between each object to be presented and the t-th presented object according to the second average frame area corresponding to each object to be presented and the second average frame area corresponding to the t-th presented object.

[0172] S5045: Obtain the text difference degree between each object to be presented and the t-th presented object according to the second quantity difference value and the second frame area difference value between each object to be presented and the t-th presented object, where the text difference degree is positively correlated with both the second quantity difference value and the second frame area difference value.

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

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

[0175] As described above, according to the poster themes, color element information, graphic element information, and text element information corresponding to each object to be presented for the t-th presented object, the theme difference degree, color difference degree, graphic difference degree, and text difference degree between the t-th presented object and each object to be presented are measured to characterize the differences between the t-th presented object and each object to be presented in multiple dimensions of theme, color, graphics, and text. Combining the first layout priority of the object to be presented itself, the second layout priority corresponding to each object to be presented is obtained. When switching the target poster image to be presented, the target poster images with similar themes, colors, graphics, and text are placed in relatively close positions, which will not bring a strong visual jump to the audience, allowing the audience to better focus on a specific theme, more easily recognize and understand the information conveyed by the graphics and text, and improving the attention and information transmission effect of the target poster image.

[0176] S60. Determine the object to be presented corresponding to the largest second layout priority as the (t + 1)-th presented object.

[0177] S70. Update t = t + 1, and delete the t-th presented object and the (t + 1)-th presented object from the first sorting result. Repeat step S50 until t = M - 1 to obtain the 1st presented object to the M-th presented object.

[0178] Among them, according to the differences between the object to be presented and the previously determined presented object in multiple dimensions of theme, color, graphics, and text, and combining the first layout priority of the object to be presented itself, the next presented object is determined, and so on until the presentation order of M target poster images is determined, improving the overall attention and overall information transmission effect of the M target poster images.

[0179] S80. When rendering the website content, switch the M target poster images according to the order of the 1st presented object to the M-th presented object.

[0180] As described above, according to the color element information, graphic element information, and text 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. Initialize t = 1, and determine the first target poster image in the first sorting result as the 1st presentation object, and determine the other target poster images except the 1st presentation object as the to-be-presented objects. According to the first layout priority corresponding to each to-be-presented object, the poster themes, color element information, graphic element information, and text element information corresponding to the t-th presentation object and each to-be-presented object, the second layout priority corresponding to each to-be-presented object is obtained. The to-be-presented object corresponding to the largest second layout priority is determined as the (t + 1)-th presentation object. Update t = t + 1, and delete the t-th presentation object and the (t + 1)-th presentation object from the first sorting result. Repeat the step of obtaining the second layout priority until t = M - 1, and obtain the 1st presentation object to the M-th presentation object. Switch the M target poster images according to the order of the 1st presentation object to the M-th presentation object. It can be seen that by characterizing the differences between the t-th presentation object and each to-be-presented object in multiple dimensions of theme, color, graphics, and text, and combining the first layout priority of the to-be-presented object itself, the second layout priority corresponding to each to-be-presented object is obtained, and the presentation order of the target poster images is determined one by one. When switching to present M target poster images, the target poster images with similar themes, colors, graphics, and text are placed in relatively close positions, which will not bring a strong visual jump to the audience, allowing the audience to better focus on a specific theme, and making it easier to recognize and understand the information conveyed by the graphics and text, improving the attention and information transmission effect of the target poster images during website content rendering.

[0181] Embodiment III

[0182] Embodiment III provides a multi-element-based website poster generation device. The multi-element-based website poster generation device includes, as Figure 3 shown:

[0183] A data acquisition module 31, configured to acquire an initial poster image, a target description text, a plurality of preset target object names, a first priority corresponding to each target object name, and a preset element database input by a user.

[0184] A data screening module 32, configured to obtain a plurality of key description statements in the target description text, all key description words and the first word quantity corresponding to each key description statement, and a reference element object corresponding to each key description word in the preset element database according to the plurality of target object names and the preset element database, where each key description statement includes at least one target object name.

[0185] A position acquisition module 33, configured to obtain, according to all target object names included in each key description statement and all corresponding key description words, a first position of each target object name in the corresponding key description statement and a second position of each key description word in the corresponding key description statement.

[0186] A priority acquisition module 34, configured to obtain, according to the second position corresponding to each key description word, the number of first words corresponding to the key description statement corresponding to each key description word, the first position and the first priority corresponding to each target object name included in the key description statement corresponding to each key description word, a second priority corresponding to the current key description word.

[0187] A target element object acquisition module 35, configured to obtain, according to the reference element object corresponding to each key description word, the second priority corresponding to each key description word and a preset priority threshold, a target element object corresponding to the initial poster image, where the target element object is used to jointly generate a target poster image with the initial poster image.

[0188] In a specific embodiment, the position acquisition module 33 includes:

[0189] A first position acquisition sub-module, configured to determine, as the first position of each target object name in the corresponding key description statement, the character position serial number of the first character in each target object name in the corresponding key description statement.

[0190] A second position acquisition sub-module, configured to determine, as the second position of each key description word in the corresponding key description statement, the character position serial number of the first character in each key description word in the corresponding key description statement.

[0191] In a specific embodiment, the priority acquisition module 34 includes:

[0192] An association degree acquisition sub-module, configured to, for any key description word, any key description statement corresponding to the current key description word, and any target object name corresponding to the current key description statement, obtain, according to the first position of the current target object name in the current key description statement and the second position of the current key description word in the current key description statement, the association degree of the current key description word with respect to the current target object name included in the current key description statement.

[0193] A key degree acquisition sub-module, configured to determine, as the key degree corresponding to the current key description statement, the proportion of the number of first words corresponding to the current key description statement in the sum of the numbers of first words corresponding to all key description statements.

[0194] The third-priority acquisition sub-module is used to determine the average value of the first priorities corresponding to all target object names included in the current key description statement as the third priority corresponding to the current key description statement.

[0195] The fourth-priority acquisition sub-module is used to obtain the fourth priority corresponding to the current key description statement according to the key degree and the third priority corresponding to the current key description statement.

[0196] The first importance degree acquisition sub-module is used to obtain the first importance degree of the current key description word relative to the current key description statement according to the first priority corresponding to each target object name and the association degree of the current key description word relative to all target object names included in the current key description statement.

[0197] The second-priority acquisition sub-module is used to obtain the second priority corresponding to the current key description word according to the fourth priority corresponding to the current key description statement and the first importance degree of the current key description word relative to all key description statements.

[0198] In a specific embodiment, the data screening module 32 includes:

[0199] The initial description statement acquisition sub-module is used to obtain a plurality of initial description statements from the target description text.

[0200] The first name quantity acquisition sub-module is used to match each target object name with each initial description statement, and obtain the first name quantity of the target object names included in each initial description statement.

[0201] The key description statement determination sub-module is used to determine the initial description statements corresponding to the first name quantities greater than the first preset quantity threshold as key description statements.

[0202] The first word quantity acquisition sub-module is used to extract keywords from each key description statement, obtain all key description words corresponding to each key description statement, and the first word quantity corresponding to all key description words corresponding to each key description statement.

[0203] The reference element object acquisition sub-module is used to match each key description word with the preset element database, and obtain the reference element object corresponding to each key description word in the preset element database.

[0204] 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. The preset area range includes a minimum preset area and a maximum preset area. The target element object acquisition module 35 further includes:

[0205] The area-to-be-filled acquisition sub-module is used to obtain the area-to-be-filled region and the corresponding area-to-be-filled in the initial poster image according to the pixel values of each pixel point in the initial poster image.

[0206] The target element object determination sub-module is used to determine the reference element object whose corresponding second priority is greater than the preset priority threshold as the target element object.

[0207] The preset area range acquisition sub-module is used to obtain the preset area range corresponding to each target element object according to the preset area range corresponding to each initial element object.

[0208] The required area acquisition sub-module is used to obtain the required area corresponding to each target element object according to the second priority corresponding to the key description word corresponding to each target element object and the preset area range corresponding to each target element object.

[0209] The element object to be filled acquisition sub-module, which is a screening sub-module, is used to screen out the element objects to be filled from all the target element objects according to the area to be filled and the required area corresponding to each target element object.

[0210] The target poster image acquisition sub-module is used to fill all the element objects to be filled into the area to be filled in the initial poster image to obtain the target poster image.

[0211] In a specific embodiment, the required area acquisition sub-module includes the following steps:

[0212] The first intermediate area acquisition unit is used to determine the average value of the maximum preset area and the minimum preset area corresponding to each target element object as the first intermediate area corresponding to each target element object.

[0213] The second intermediate area acquisition unit is used to 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.

[0214] The required area acquisition unit is used to obtain the required area corresponding to each target element object according to the second priority corresponding to the key description word corresponding to each target element object, the first intermediate area, the second intermediate area corresponding to each target element object, and the preset required area calculation model.

[0215] In a specific embodiment, the element object to be filled acquisition sub-module includes the following steps:

[0216] An element object acquisition unit to be filled, which is used to determine the object elements to be filled as the object elements to be filled if the area to be filled is greater than the sum of the required areas of the target element objects corresponding to the first M second priorities and less than or equal to the sum of the required areas of the target element objects corresponding to the first M+1 second priorities, where M = 1, 2,..., N, and N refers to the total number of target element objects.

[0217] It should be noted that for the information interaction, execution process, etc. between the above modules, since they are based on the same concept as the method embodiment of the present invention, for their specific functions and the technical effects brought, reference can be specifically made to the method embodiment part, which will not be elaborated here.

[0218] Embodiment 4

[0219] Embodiment 4 of the present invention provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one segment of program is stored, and the at least one instruction or at least one segment of program is loaded and executed by a processor to implement the steps:

[0220] S1. Obtain the initial poster image, target description text, a plurality of preset target object names, the first priority corresponding to each target object name, and a preset element database input by the user.

[0221] S2. According to the plurality of target object names and the preset element database, obtain a plurality of key description statements in the target description text, all key description words corresponding to each key description statement and the first word quantity, and the reference element objects corresponding to each key description word in the preset element database, where each key description statement includes at least one target object name.

[0222] S3. According to all the target object names included in each key description statement and the corresponding all key description words, obtain the first position of each target object name in the corresponding key description statement and the second position of each key description word in the corresponding key description statement.

[0223] S4. According to the second position corresponding to each key description word, the first word quantity corresponding to the key description statement corresponding to each key description word, the first position corresponding to each target object name included in the key description statement corresponding to each key description word, and the first priority, obtain the second priority corresponding to the current key description word.

[0224] S5. According to the reference element object corresponding to each key description word, the second priority corresponding to each key description word, and a preset priority threshold, obtain the target element object corresponding to the initial poster image, where the target element object is used to jointly generate a target poster image with the initial poster image.

[0225] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronization Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0226] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.

[0227] Embodiment Five

[0228] Embodiment Five of the present invention provides an electronic device, which includes a processor and the non-transitory computer-readable storage medium in Embodiment Four of the present invention.

[0229] The above are only the preferred embodiments of the present invention and do not impose any formal restrictions on the present invention. Although the present invention has been disclosed above with the preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to equivalent embodiments by using the technical content disclosed above within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A method for generating a website poster based on multiple elements, characterized in that The multi-element-based website poster generation method includes the following steps: S1. Obtain the initial poster image input by the user, the target description text, a plurality of preset target object names, the first priority corresponding to each target object name, and the preset element database; S2. According to the plurality of target object names and the preset element database, obtain a plurality of key description statements in the target description text, all key description words corresponding to each key description statement and the first word quantity, and the reference element objects corresponding to each key description word in the preset element database, wherein each key description statement includes at least one target object name; S3. According to all the target object names included in each key description statement and all the key description words corresponding thereto, obtain the first position of each target object name in the corresponding key description statement and the second position of each key description word in the corresponding key description statement; S4. According to the second position corresponding to each key description word, the first word quantity corresponding to the key description statement corresponding to each key description word, the first position and the first priority corresponding to each target object name included in the key description statement corresponding to each key description word, obtain the second priority corresponding to the current key description word; S5. According to the reference element object corresponding to each key description word, the second priority corresponding to each key description word, and the preset priority threshold, obtain the target element object corresponding to the initial poster image, wherein the target element object is used to jointly generate the target poster image with the initial poster image.

2. The method for generating a website poster based on multiple elements according to claim 1, wherein S3 includes the following steps: S31. Determine the character position serial number of the first character in each target object name in the corresponding key description statement as the first position of each target object name in the corresponding key description statement; S32. Determine the character position serial number of the first character in each key description word in the corresponding key description statement as the second position of each key description word in the corresponding key description statement.

3. The method for generating a website poster based on multiple elements according to claim 1, wherein, S4 includes the following steps: S41. For any key description word, any key description statement corresponding to the current key description word, and any target object name corresponding to the current key description statement, obtain the association degree of the current key description word relative to the current target object name included in the current key description statement according to the first position of the current target object name in the current key description statement and the second position of the current key description word in the current key description statement; S42. Determine the proportion of the first word quantity corresponding to the current key description statement in the sum of the first word quantities corresponding to all key description statements as the key degree corresponding to the current key description statement; S43. Determine the average value of the first priorities corresponding to all the target object names included in the current key description statement as the third priority corresponding to the current key description statement; S44. According to the key degree and the third priority corresponding to the current key description statement, obtain the fourth priority corresponding to the current key description statement; S45. Obtain the first importance degree of the current key description word with respect to the current key description statement according to the first priority corresponding to each target object name and the association degree of the current key description word with respect to all target object names included in the current key description statement. S46. Obtain the second priority corresponding to the current key description word according to the fourth priority corresponding to the current key description statement and the first importance degree of the current key description word with respect to all key description statements.

4. The method for generating a website poster based on multiple elements according to claim 1, wherein S2 includes the following steps: S21. Obtain a number of initial description statements from the target description text. S22. Match each target object name with each initial description statement, and obtain the first name quantity of the target object names included in each initial description statement. S23. Determine the initial description statements corresponding to the first name quantities greater than the first preset quantity threshold as key description statements. S24. Extract keywords from each key description statement, obtain all key description words corresponding to each key description statement, and the first word quantity corresponding to all key description words corresponding to each key description statement. S25. Match each key description word with the preset element database, and obtain the reference element object corresponding to each key description word in the preset element database.

5. The method for generating a website poster based on multiple elements according to claim 4, wherein, The preset element database includes a number of initial element objects and the preset area range corresponding to each initial element object. The preset area range includes the minimum preset area and the maximum preset area. S5 also includes the following steps: S51. Obtain the area to be filled and the area to be filled corresponding to the area to be filled in the initial poster image according to the pixel values of each pixel point in the initial poster image. S52. Determine the reference element objects with the corresponding second priority greater than the preset priority threshold as target element objects. S53. Obtain the preset area range corresponding to each target element object according to the preset area range corresponding to each initial element object. S54. Obtain the required area corresponding to each target element object according to the second priority corresponding to the key description word corresponding to each target element object and the preset area range corresponding to each target element object. S55. Screen out the element objects to be filled from all target element objects according to the area to be filled and the required area corresponding to each target element object. S56. Fill all the element objects to be filled into the area to be filled in the initial poster image to obtain the target poster image.

6. The method for generating a website poster based on multiple elements according to claim 5, characterized in that, S54 includes the following steps: S541. Determine the average value of the maximum preset area and the minimum preset area corresponding to each target element object as the first intermediate area corresponding to each target element object. 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. S543. Obtain 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 intermediate area, the second intermediate area corresponding to each target element object, and the preset required area calculation model.

7. The method for generating a website poster based on multiple elements according to claim 5, wherein S55 includes the following steps: S551. If the area to be filled is greater than the sum of the required areas corresponding to the target element objects corresponding to the first M second priorities and less than or equal to the sum of the required areas corresponding to the target element objects corresponding to the first M + 1 second priorities, then determine the target element objects corresponding to the first M second priorities as the element objects to be filled, where M = 1, 2,..., N, and N refers to the total number of target element objects.

8. A website poster generation device based on multiple elements, characterized in that The website poster generation device based on multiple elements includes: A data acquisition module, configured to acquire an initial poster image, a target description text, a preset number of target object names, the first priority corresponding to each target object name, and a preset element database input by a user; A data screening module, configured to obtain several key description statements in the target description text, all key descriptors corresponding to each key description statement and the number of the first words, and the reference element objects corresponding to each key descriptor in the preset element database according to the several target object names and the preset element database, where each key description statement includes at least one target object name; A position acquisition module, configured to obtain the first position of each target object name in the corresponding key description statement and the second position of each key descriptor in the corresponding key description statement according to all target object names and all corresponding key descriptors included in each key description statement; A priority acquisition module, configured to obtain the second priority corresponding to the current key descriptor according to the second position corresponding to each key descriptor, the number of the first words corresponding to the key description statement corresponding to each key descriptor, the first position and the first priority corresponding to each target object name included in the key description statement corresponding to each key descriptor; A target element object acquisition module, configured to obtain the target element objects corresponding to the initial poster image according to the reference element objects corresponding to each key descriptor, the second priority corresponding to each key descriptor, and a preset priority threshold, where the target element objects are used to jointly generate a target poster image with the initial poster image.

9. A non-transitory computer-readable storage medium storing at least one instruction or at least one program segment therein, characterized in that, The at least one instruction or the at least one program is loaded and executed by a processor to implement the method for generating a website poster based on multiple elements as described in any one of claims 1 - 7.

10. An electronic device, characterized in that, It includes a processor and the non-transitory computer-readable storage medium described in claim 9.

Citation Information

Patent Citations

  • Poster generation method and device and computer equipment

    CN116740208A

  • Activity poster generation method and device, storage medium and electronic device

    CN117576262A