Poster generation method and device, electronic equipment and storage medium
By generating text and image content through a large model and performing layer overlay processing, the problems of complex elements and cross-modal semantic consistency in poster generation are solved, and efficient and accurate poster generation is achieved to meet the requirements of diverse aesthetics and application scenarios.
Patent Information
- Application Number
- CN202510668501.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-26
AI Technical Summary
The poster generation process has problems such as complex elements, difficulty in achieving cross-modal semantic consistency, and conflicts between aesthetic subjectivity and professional design, which makes it difficult to generate poster results that can meet diverse aesthetic needs and meet the requirements of application scenarios.
A large model is used to generate text content and image content, and the content is integrated through the typesetting layout model. The raw image model is used to generate image content. Intent analysis is combined to determine whether reference image query is needed. The text and images are configured on different layers to achieve optimized visual effects.
It improves the efficiency and accuracy of poster generation, ensures that the poster content meets the needs, reduces resource consumption, enhances visual effects and flexibility, and meets diverse modification needs.
Smart Images

Figure CN120707700A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of AI (Artificial Intelligence) technology, specifically computer vision, large models and other technical fields, and can be applied to scenarios such as artificial intelligence-based content generation (AIGC), and in particular to a poster generation method, device, electronic device and storage medium. Background Art
[0002] Posters are a key vehicle for information dissemination and visual marketing, widely used in e-commerce marketing, brand promotion, social media, and other scenarios. With the development of AI technology, poster generation technology is breaking through the limitations of traditional design methods and gradually moving towards intelligent creation. Summary of the Invention
[0003] The present disclosure provides a poster generation method, device, electronic device and storage medium.
[0004] According to one aspect of the present disclosure, a poster generation method is provided, comprising:
[0005] Obtain poster generation demand information;
[0006] Generate demand information based on the poster and generate first copy content;
[0007] Based on the poster generation demand information, a first image content is generated using a raw image model;
[0008] A first target poster is generated based on the first text content and the first image content.
[0009] According to another aspect of the present disclosure, there is provided a poster generating apparatus, comprising:
[0010] Acquisition module, used to obtain poster generation requirement information;
[0011] A first generating module, configured to generate demand information based on the poster and generate first copy content;
[0012] A second generating module is configured to generate demand information based on the poster and generate first image content using a raw image model;
[0013] The third generating module is used to generate a first target poster based on the first text content and the first image content.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the poster generation method proposed in the above aspect of the present disclosure.
[0018] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the poster generation method proposed in the above aspect of the present disclosure.
[0019] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the poster generation method proposed in the above aspect of the present disclosure.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0022] Figure 1 is a flowchart of a poster generation method provided according to an embodiment of the present disclosure;
[0023] Figure 2 is a flowchart of a poster generation method provided according to another embodiment of the present disclosure;
[0024] Figure 3 is a flowchart of a poster generation method provided according to another embodiment of the present disclosure;
[0025] Figure 4 is a flowchart of a poster generation method provided according to another embodiment of the present disclosure;
[0026] Figure 5 is a flowchart of a poster generation method provided according to another embodiment of the present disclosure;
[0027] Figure 6 A schematic structural diagram of a poster generating device according to an embodiment of the present disclosure;
[0028] Figure 7 It is a block diagram of an electronic device used to implement the poster generation method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0030] In related technologies, the difficulties of poster generation are mainly reflected in the following aspects:
[0031] First, the elements involved in posters are extremely complex, integrating multiple types such as text, images, icons, and brand logos. The layouts are rich and diverse, covering dozens of styles such as grid, freestyle, and minimalist. This requires the system to have the ability to decouple cross-modal features and accurately analyze the characteristics of various elements. It also needs to have dynamic layout optimization capabilities to adapt to different layout requirements. For example, in the production of promotional posters, key information such as price, selling points, and main image must be displayed in a reasonable layered manner within a limited space, and must strictly comply with visual flow design rules.
[0032] Secondly, there are huge challenges in cross-modal semantic consistency. The image and text matching of the poster must achieve precise alignment at the semantic level. For example, the theme of "Cool Summer" should correspond to the visual presentation of cool colors and water elements. However, existing solutions often have the problem of style fragmentation, such as technological copywriting paired with retro illustrations.
[0033] In addition, aesthetic subjectivity conflicts with professional design. Users have significant subjective differences in their definition of "beautiful", and different industries and scenarios have specific standards for poster styles.
[0034] Therefore, how to generate poster results that can meet diverse aesthetic needs and meet the requirements of application scenarios is a major challenge in the poster generation process.
[0035] Therefore, in order to address at least one of the above-mentioned problems, the present disclosure proposes a poster generation method, device, electronic device and storage medium.
[0036] The poster generation method, apparatus, electronic device, and storage medium according to embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0037] Figure 1 It is a flowchart of a poster generation method provided according to an embodiment of the present disclosure.
[0038] The embodiment of the present disclosure takes the poster generating method configured in a poster generating device as an example. The poster generating device can be applied to any electronic device so that the electronic device can perform a poster generating function.
[0039] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, mobile terminal, server, etc. The mobile terminal can be, for example, a mobile phone, tablet computer, personal digital assistant, wearable device, etc., which are hardware devices with various operating systems, touch screens and / or display screens.
[0040] like Figure 1 As shown, the poster generation method may include the following steps S101 to S104:
[0041] Step S101: Obtain poster generation requirement information.
[0042] Among them, the poster generation requirement information is used to indicate the poster design requirements, and the poster generation requirement information may include user questions (queries) input by the user in the AI seaside generation system.
[0043] As an example, the poster generation requirement information may include poster theme, poster style, application scenario, poster size and other information.
[0044] Step S102: Generate demand information based on the poster and generate first copy content.
[0045] The first copy content refers to the text content included in the poster to be generated.
[0046] As an example, demand information can be generated based on the poster, and the first copy content can be generated using a large model.
[0047] Step S103: generating demand information based on the poster and using a raw image model to generate first image content.
[0048] The first image content refers to the image content included in the poster to be generated, such as a background image.
[0049] As an example, poster generation requirement information may be input into a raw image model to obtain the first image content output by the raw image model.
[0050] Step S104: Generate a first target poster based on the first text content and the first image content.
[0051] The first text content and the first image content may be fused to obtain a first target poster.
[0052] As an example, a typesetting layout model may be used to fuse the first text content and the first image content to obtain a first target poster.
[0053] It should be noted that, when performing content fusion, the first text content and the first image content can be placed in different layers to generate an editable target poster. For example, the target poster can be in SVG (Scalable Vector Graphics) format.
[0054] The poster generation method of the disclosed embodiment can automatically extract key points of the demand based on the poster generation demand information, thereby generating a first copy content with a clear theme and highlighting key information; it can automatically generate a first image content that can intuitively present the core theme of the poster by using a raw image model based on the demand information; and further, based on the first copy content and the first image content, it can obtain a first target poster with a better overall visual effect.
[0055] It should be noted that in the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0056] In order to clearly illustrate how the first image content is generated in any embodiment of the present disclosure, the present disclosure also proposes a poster generation method.
[0057] Figure 2 It is a flowchart of a poster generation method provided according to another embodiment of the present disclosure.
[0058] like Figure 2 As shown, the poster generation method may include the following steps S201 to S207:
[0059] Step S201: Obtain poster generation requirement information.
[0060] The poster generation requirement information includes the target object and the poster application scenario. The target object can be a real or virtual object with a popularity greater than a set value. For example, the real object includes a real person, and the virtual object includes anime characters, virtual celebrities, etc.
[0061] Step S202: Generate demand information based on the poster and generate first copy content.
[0062] The explanation of step S202 can be found in the relevant description of any embodiment of the present disclosure and will not be repeated here.
[0063] Step S203: generating first prompt information based on the poster generation requirement information, where the first prompt information is used to instruct the generation of image content.
[0064] In any one embodiment of the present disclosure, based on the poster generation demand information, the poster theme prediction is performed to obtain the target poster theme; a first prompt template is obtained, wherein the first prompt template includes an input parameter field; the target poster theme is filled into the filling position corresponding to the input parameter field to obtain the first prompt information.
[0065] The first prompt template is used to generate prompt information for image content generation; the input parameter field included in the first prompt template has a corresponding filling position, and exemplarily, the input parameter field may include a poster theme field.
[0066] As an example, a large model can be used to predict the poster theme. After obtaining the target poster theme, the target poster theme is filled into the filling position corresponding to the poster theme field in the first prompt template, thereby obtaining the first prompt information.
[0067] In summary, by predicting the poster theme based on the poster generation demand information and filling in the prompt template, the first prompt information that meets the demand can be generated quickly and accurately.
[0068] In any embodiment of the present disclosure, the first prompt template also includes at least one of the following: prompt generation task description information corresponding to the image content generation scene, image background description information, image element description information, character attribute description information when the image element includes a character, output format description information, and a reference example; wherein the reference example includes a reference poster theme, and prompt information corresponding to the reference poster theme.
[0069] Among them, the prompt generation task description information corresponding to the image content generation scenario is used to explain the specific requirements or task execution guidance of the prompt generation task corresponding to the image content generation scenario; the image background description information is used to describe the background environment presented by the image; the image element description information is used to explain the specific requirements of the elements contained in the image; the character attribute description information is used to explain the appearance, occupation and other characteristics of the characters when the image elements include characters; the output format description information is used to explain the specific presentation form, structure or specifications of the generated prompt information.
[0070] The number of reference examples included in the first prompt template may be one or more.
[0071] For example, the following is a first prompt template provided by an embodiment of the present disclosure:
[0072] "You are an expert in poster main element design. Please associate the main elements of the poster according to the theme and generate a text prompt description.
[0073] Requirements: 1. The background should be pure, describing only the main elements, without any text or slogans;
[0074] 2. The main elements of the image should be relevant to the theme, have a sense of design, and be positive;
[0075] 3. If the scene involves people, they should be described as Asian with yellow skin and black hair;
[0076] 4. If the scene involves people, it must include descriptions of the person, age, occupation, and behavior;
[0077] 5. The output should be brief and concise, highlight the main body, contain only the prompt content, no more than 30 words, and do not contain any other output.
[0078] Reference example:
[0079] Poster theme: Spring Festival school starts, prompt: Primary school students happily carry their schoolbags to school;
[0080] Poster theme: Pinbo Health Products Store, prompt: A middle-aged health worker smiling and showing a massager;
[0081] Poster theme: Hydraulic excavator production, prompt: Engineers focus on operating a hydraulic excavator;
[0082] Poster theme: Happy Chinese New Year, prompt: A family happily reunites, wearing red clothes.
[0083] The current theme is [], please output a pure English prompt".
[0084] It should be noted that, when the first prompt template also includes prompt generation task description information, image background description information, image element description information, and character attribute description information when the image elements include characters, the first prompt information generated based on the first prompt template also includes the aforementioned information; when the first prompt template also includes output format description information, the generated first prompt information conforms to the output format description information.
[0085] In summary, the first prompt template covers a variety of information such as task description, background elements, character attributes, output format, etc., which can accurately guide the generation of prompt information, reduce ambiguity, and improve efficiency; in addition, the reference examples included in the first prompt template can provide intuitive guidance, which helps to quickly generate prompt information that meets the requirements.
[0086] Step S204 : performing intention analysis based on the poster generation requirement information to determine whether a reference image query is required in the generation process of the first target poster.
[0087] In any one embodiment of the present disclosure, an intent analysis is performed based on poster generation requirement information to determine whether there is an association relationship between the first target poster and the target object; in response to the existence of an association relationship between the first target poster and the target object, it is determined that a reference image query is required for the generation process of the first target poster; in response to the absence of an association relationship between the first target poster and the target object, it is determined that a reference image query is not required for the generation process of the first target poster.
[0088] Among them, intent analysis is performed to determine whether the first target poster to be generated contains the content of the target object; if the first target poster to be generated contains the content of the target object, it is determined that the first target poster and the target object have an association relationship, and then it is determined that a reference image query is required; if the first target poster to be generated does not contain the content of the target object, it is determined that the first target poster and the target object do not have an association relationship, and then it is determined that a reference image query is not required.
[0089] In summary, intent analysis based on poster generation demand information can accurately determine the relationship between the first target poster and the target object, thereby deciding whether to refer to the image query. This avoids unnecessary queries, saves resources, improves generation efficiency, and ensures that the generated poster is more in line with the needs.
[0090] In step S205 , in response to the need to perform a reference image query during the generation process of the first target poster, the first raw image model is used to query the target reference image of the target object, and the first image content is generated based on the first prompt information and the target reference image.
[0091] Among them, generating an image based on a target reference image of a target object can improve the generation quality of the first image content.
[0092] In any embodiment of the present disclosure, a first raw image model is used to perform an image query in a first image library based on a poster application scenario and a target object to obtain a target reference image.
[0093] When performing an image query, you can first search for images of the target object in the first image library, and then filter the queried images based on the poster application scenario to obtain a target reference image that matches the poster application scenario and includes the target object.
[0094] The first raw image model may refer to an iRAG (image based Retrieval-Augmented Generation) model.
[0095] In summary, based on the poster application scenario and the target object, the first raw image model can accurately and quickly obtain a target reference image that fits the poster application scenario and contains the target object from the first image library.
[0096] Step S206 , in response to the fact that the generation process of the target poster does not require a reference image query, the second image generation model is used to generate the first image content based on the first prompt information.
[0097] The second raw image model may refer to a raw image model that does not have a function of querying a reference image. For example, the second raw image model may be a FLUX model.
[0098] Therefore, the second raw image model can directly generate the first image content based on the first prompt information. Without the need for a reference image query, the second raw image model is used to generate the first image content, avoiding the reference image query step, thereby reducing computing resource consumption and improving image generation efficiency.
[0099] Step S207: Generate a first target poster based on the first text content and the first image content.
[0100] In any one of the embodiments of the present disclosure, the first text content is configured in the first layer, and the first image content is configured in the second layer; based on the poster style, a matching target effect layer is determined; the first layer, the second layer and the target effect layer are superimposed to obtain an editable first target poster.
[0101] Among them, different poster styles have corresponding effect layers. For example, the retro style can correspond to effect layers such as texture overlay, low saturation and light effect; the natural style can correspond to effect layers such as natural texture, soft colors and light source effects; the minimalist style can correspond to effect layers such as geometric shapes, low saturation and noise effects.
[0102] As an example, the matching target effect layer can be determined based on a preset mapping relationship between the poster style and the corresponding effect layer.
[0103] In summary, placing text content and image content on different layers facilitates independent editing and adjustment; determining the target effect layer based on the poster style can enhance overall visual coordination; and overlaying layers to create editable posters improves design efficiency while retaining flexibility to meet diverse modification needs.
[0104] The poster generation method of the disclosed embodiment automatically generates text content and prompt information based on poster generation requirement information, and flexibly determines whether a reference image query is required through intent analysis. If a reference image query is required, the first raw image model is used to accurately obtain the target reference image of the target object and generate the image content. If a reference image query is not required, the second raw image model is directly called to quickly generate the image based on the prompt information. This process, through an intelligent decision-making mechanism, ensures that the poster content meets the requirements while improving the efficiency and accuracy of poster generation and reducing unnecessary resource consumption. In addition, when a reference image query is required, performing a reference image query through the first raw image model can inject more information into the first image content, making the generated poster more suitable for the requirements.
[0105] In order to clearly illustrate how the first copy content is generated in any embodiment of the present disclosure, the present disclosure also proposes a poster generation method.
[0106] Figure 3 It is a flowchart of a poster generation method provided according to another embodiment of the present disclosure.
[0107] like Figure 3 As shown, the poster generation method may include the following steps S301 to S305:
[0108] Step S301: Obtain poster generation requirement information.
[0109] The poster generation requirement information includes a poster application scenario, or the poster application scenario can be determined based on the poster generation requirement information.
[0110] Step S302: Obtain a target text position template, wherein the target text position template is used to indicate at least one of the text content position, the text content quantity, and the text content length.
[0111] The target copy position template may include a text box or a copy content example to indicate at least one of the copy content position, the copy content quantity (such as the number of lines) and the copy content length through the text box or the copy content example.
[0112] In any embodiment of the present disclosure, a text position template can be randomly selected from the text position template library as the target text position template. It should be noted that the text position templates in the text position template library do not include image content.
[0113] In any embodiment of the present disclosure, based on the poster application scenario corresponding to the copy location template in the copy location template library, a target copy location template that matches the poster generation requirement information is selected from the copy location template library. A preset correspondence exists between the copy location template and the poster application scenario, and based on the preset correspondence, the target copy location template can be searched for in the copy location template library.
[0114] In summary, querying the target copy position template based on the poster application scenario can accurately match the needs, ensure that the copy layout is reasonable, the quantity is moderate, and the length is appropriate, thereby enhancing the poster's visual effect and information communication effect, and improving poster design efficiency.
[0115] Step S303 : generating first copy content based on the poster generation requirement information according to at least one of the copy content position, copy content quantity, and copy content length.
[0116] In any embodiment of the present disclosure, a second prompt template is obtained, which includes an input parameter field and a copy filling attribute field; based on the poster, the demand information is generated, the field value corresponding to the input parameter field is determined, and the field value is filled into the filling position corresponding to the input parameter field; at least one of the copy content position, the copy content quantity and the copy content length is filled into the filling position corresponding to the copy filling attribute field to obtain the second prompt information; based on the second prompt information, the first copy content is generated.
[0117] Among them, the input parameter fields may include a poster theme field, a target object field, a poster style field, and an application scenario field, etc.
[0118] The text filling attribute fields may include a text content position field, a text content quantity field, a text content length field, and the like.
[0119] It should be noted that the second prompt template may further include prompt generation task description information and output format description information corresponding to the copy content generation scenario.
[0120] For example, the second prompt template provided by the embodiment of the present disclosure is as follows:
[0121] You are now tasked with generating a poster copy. I will provide user input, a reference style, and the required copy location template information. You need to output the corresponding poster copy based on the user input and the copy location template information. Note that the template text nodes wrap, and that the English position is in English, and the Chinese position is in Chinese:
[0122] The user input (input parameter field) is:
[0123] The reference copywriting style is:
[0124] The copy position template information (copy fill attribute field) is:
[0125] Then the output is:
[0126] In summary, obtaining a second prompt template containing input parameter fields and copy filling attribute fields, and accurately filling field values such as input parameters, copy content position, quantity and length into the second prompt template can quickly generate the second prompt information, and then based on the second prompt information, it can generate the first copy content that matches the user input and meets the copy position, quantity and length requirements. The generation efficiency of the second prompt information and copy content is relatively high.
[0127] Step S304: generating demand information based on the poster and using a raw image model to generate first image content.
[0128] Step S305: Generate a first target poster based on the first text content and the first image content.
[0129] The explanation of steps S304 to S305 can be found in the relevant description of any embodiment of the present disclosure and will not be repeated here.
[0130] The poster generation method of the disclosed embodiment obtains a target text position template, wherein the target text position template is used to indicate at least one of the text content position, the number of text contents, and the length of the text content; and generates first text content based on the poster generation requirement information based on at least one of the text content position, the number of text contents, and the length of the text content. Obtaining the target text position template can clearly determine key elements such as the text content position, the number, and the length, and then based on these elements and the poster generation requirement information, the first text content can be quickly and accurately generated.
[0131] The first target poster is generated when no target poster template matching the poster generation requirement information is found. In order to clearly illustrate how a poster is generated when a target poster template matching the poster generation requirement information is found in any embodiment of the present disclosure, the present disclosure also proposes a poster generation method.
[0132] Figure 4 It is a flowchart of a poster generation method provided according to another embodiment of the present disclosure.
[0133] like Figure 4 As shown, the poster generation method may include the following steps S401 to S405:
[0134] Step S401: Obtain poster generation requirement information.
[0135] Step S402: determining a poster application scenario based on the poster generation requirement information; and searching a poster template library for a target poster template that matches the poster generation requirement information based on the poster application scenario.
[0136] Among them, the poster application scenario is first determined based on the poster generation demand information, and then the target poster template is quickly matched in the poster template library based on the poster application scenario, which can improve the template query efficiency while ensuring that the matched template meets the needs.
[0137] In any embodiment of the present disclosure, when the poster generation requirement information includes the poster application scenario, the poster application scenario can be directly extracted from the poster generation requirement information.
[0138] In any embodiment of the present disclosure, when the poster application scenario is not included in the poster generation demand information, poster theme prediction and content extraction are performed based on the poster generation demand information to obtain the target poster theme and target extracted content; based on the target poster theme and target extracted content, the poster application scenario is determined.
[0139] As an example, a large model can be used to predict poster themes and extract content, and to determine poster application scenarios based on the target poster theme and target extracted content.
[0140] Therefore, by performing theme prediction and content extraction based on poster generation demand information, we can accurately grasp the poster theme and core information, and then accurately determine the poster application scenario.
[0141] Step S403 : when a target poster template matching the poster generation requirement information is found, second copy content is generated based on the poster generation requirement information and the copy content filling information corresponding to the target poster template.
[0142] The text content filling information may include at least one of the text content position, the text content quantity, and the text content length.
[0143] In any embodiment of the present disclosure, the poster generation requirement information and the copy content filling information corresponding to the target poster template can be input into the large model to obtain the second copy content output by the large model.
[0144] In any embodiment of the present disclosure, a third prompt template is obtained, which includes an input parameter field and a copy filling attribute field; based on the poster generation requirement information, the field value corresponding to the input parameter field is determined, and the field value is filled into the filling position corresponding to the input parameter field; at least one of the copy content position, copy content quantity and copy content length included in the copy content filling information is filled into the filling position corresponding to the copy filling attribute field to obtain the third prompt information; based on the third prompt information, the second copy content is generated.
[0145] The third prompt template is the same as the second prompt template. For relevant information in the third prompt template, refer to the relevant description of the second prompt template.
[0146] Thus, the third prompt information can be quickly generated based on the third prompt template, and then based on the third prompt information, the second copy content that matches the user input and meets the copy position, quantity, and length requirements can be generated.
[0147] Step S404: Based on the second text content, an image search is performed in the second image library to obtain second image content that matches the second text content.
[0148] In any embodiment of the present disclosure, the images in the second image library correspond to image description information, and the second text content is compared with the image description information to obtain second image content that matches the second text content.
[0149] In any embodiment of the present disclosure, the images in the second image library correspond to image feature vectors, and a text feature vector corresponding to the second text content is obtained; the vector similarity between the text feature vector and the image feature vector corresponding to the image in the second image library is obtained; based on the vector similarity, the second image content that matches the second text content is searched in the second image library.
[0150] By obtaining the text feature vector of the second copy content and calculating the similarity with the feature vector of the image in the second image library, not only can the second image matching the second copy content be accurately and efficiently queried, but the accuracy and efficiency of image retrieval are also improved, making the poster image and text more compatible, thereby improving the quality of poster generation.
[0151] Step S405: Generate a second target poster based on the second text content and the second image content.
[0152] Among them, the steps of generating the second target poster based on the second text content and the second image content are the same as those of generating the first target poster based on the first text content and the first image content. For specific implementation, please refer to the relevant description in the aforementioned embodiment and will not be repeated here.
[0153] The poster generation method of the embodiment of the present disclosure, when a target poster template matching the poster generation requirement information is queried, generates a second copy content based on the poster generation requirement information and the copy content filling information corresponding to the target poster template; then queries for the matching second image content based on the second copy content; finally, generates a second target poster based on the second copy content and the second image content. While improving the automation and accuracy of poster generation, it ensures a high degree of fit between the image and the text, thereby enhancing the visual effect of the poster. In addition, the efficiency of generating posters based on templates is also relatively high.
[0154] In order to clearly illustrate how poster generation is performed in any embodiment of the present disclosure, the present disclosure also proposes a poster generation method.
[0155] Figure 5 It is a flowchart of a poster generation method provided according to another embodiment of the present disclosure.
[0156] like Figure 5 As shown, the poster generation method may include:
[0157] (1) Get the user query.
[0158] (2) Predict the poster theme and extract the content of the user query to obtain the target poster theme and target extracted content, and determine the poster application scenario based on the target poster theme and target extracted content.
[0159] (3) Perform poster template matching based on poster application scenarios.
[0160] (4) In the case that the target poster template is not matched, a poster copy (first copy content) is generated based on the poster generation requirement information, a raw image prompt (first prompt information) is generated based on the poster generation requirement information, the user query is analyzed for intent to determine whether a reference image query is required, in response to the need for a reference image query, the iRAG model (first raw image model) is called to perform a raw image operation to obtain the main image content (first image content) / in response to the need for a reference image query, the FLUX model (second raw image model) is called to perform a raw image operation to obtain the main image content (first image content), the poster copy and the main image content are integrated (layer overlay), and a poster in SVG format (first target poster) is output; wherein, this process can be called a raw image poster sub-process.
[0161] (5) When the target poster template is matched, the poster copy (second copy content) is generated based on the poster generation requirement information and the copy content filling information corresponding to the target poster template, the main image (second image content) is recalled based on the poster copy, the poster copy and the main image content are integrated (layer overlay), and the poster in SVG format (second target poster) is output; wherein, this process can be called the poster image change sub-process.
[0162] The poster replacement sub-process in this disclosure ensures that the poster content is rich and coordinated through efficient image library retrieval and text generation; the raw image poster sub-process uses advanced model combinations to ensure that the generated posters have a high level of visual effects and theme expression, greatly reducing the need to re-produce posters due to poor quality.
[0163] With the above Figures 1 to 5 Corresponding to the poster generation method provided in the embodiment, the present disclosure also provides a poster generation device. Since the poster generation device provided in the embodiment of the present disclosure is similar to the above-mentioned poster generation method, Figures 1 to 5 The poster generation method provided in the embodiment corresponds to the embodiment, so the implementation of the poster generation method is also applicable to the poster generation device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
[0164] Figure 6 It is a structural diagram of a poster generating device provided according to an embodiment of the present disclosure.
[0165] like Figure 6 As shown, the poster generating device 600 may include: an acquisition module 610 , a first generating module 620 , a second generating module 630 and a third generating module 640 .
[0166] Wherein, the acquisition module 610 is used to obtain poster generation requirement information;
[0167] A first generating module 620 is configured to generate demand information based on the poster and generate first copy content;
[0168] The second generating module 630 is used to generate demand information based on the poster and generate the first image content using the raw image model;
[0169] The third generating module 640 is configured to generate a first target poster based on the first text content and the first image content.
[0170] In a possible implementation of the embodiment of the present disclosure, the poster generation requirement information includes a target object, and the second generation module 630 is specifically configured to:
[0171] Generate first prompt information based on the poster generation requirement information, where the first prompt information is used to instruct the generation of image content;
[0172] Performing intent analysis based on poster generation requirement information to determine whether a reference image query is required during the generation process of the first target poster;
[0173] In response to the need to perform a reference image query during the generation process of the first target poster, a first raw image model is used to query the target reference image of the target object, and first image content is generated based on the first prompt information and the target reference image.
[0174] In a possible implementation of the embodiment of the present disclosure, the second generating module 630 is further configured to:
[0175] In response to the fact that the generation process of the target poster does not require a reference image query, the second image generation model is adopted to generate the first image content based on the first prompt information.
[0176] In a possible implementation of the embodiment of the present disclosure, the second generating module 630 is specifically configured to:
[0177] Performing intention analysis based on poster generation demand information to determine whether there is a correlation between the first target poster and the target object;
[0178] In response to an association relationship between the first target poster and the target object, determining that a reference image query is required for a generation process of the first target poster;
[0179] In response to the fact that there is no association relationship between the first target poster and the target object, it is determined that a generation process of the first target poster does not require a reference image query.
[0180] In a possible implementation of the embodiment of the present disclosure, the poster generation requirement information includes a poster application scenario, and the second generation module 630 is specifically configured to:
[0181] The first raw image model is used to perform image query in the first image library based on the poster application scenario and target object to obtain the target reference image.
[0182] In a possible implementation of the embodiment of the present disclosure, the second generating module 630 is specifically configured to:
[0183] Based on the poster generation demand information, the poster theme is predicted to obtain the target poster theme;
[0184] Obtaining a first prompt template, wherein the first prompt template includes an input parameter field;
[0185] Fill the target poster theme into the filling position corresponding to the input parameter field to obtain the first prompt information.
[0186] In a possible implementation of the embodiment of the present disclosure, the first prompt template further includes at least one of the following:
[0187] Description information of the prompt generation task corresponding to the image content generation scenario, image background description information, image element description information, character attribute description information when the image elements include characters, output format description information, and reference examples;
[0188] The reference example includes a reference poster theme and prompt information corresponding to the reference poster theme.
[0189] In a possible implementation of the embodiment of the present disclosure, the first generating module 620 is specifically configured to:
[0190] Obtaining a target copy position template, wherein the target copy position template is used to indicate at least one of a copy content position, a copy content quantity, and a copy content length;
[0191] The first copy content is generated based on the poster generation demand information according to at least one of the copy content position, the copy content quantity and the copy content length.
[0192] In a possible implementation of the embodiment of the present disclosure, the first generating module 620 is specifically configured to:
[0193] Obtain a second prompt template, the second prompt template including an input parameter field and a text filling attribute field;
[0194] Generate demand information based on the poster, determine the field value corresponding to the input parameter field, and fill the field value into the fill position corresponding to the input parameter field;
[0195] Fill at least one of the position of the text content, the number of text contents, and the length of the text content into the filling position corresponding to the text filling attribute field to obtain second prompt information;
[0196] Based on the second prompt information, the first copy content is generated.
[0197] In a possible implementation of the embodiment of the present disclosure, the poster generation requirement information includes a poster application scenario, and the first generation module 620 is specifically configured to:
[0198] Based on the poster application scenario corresponding to the copy position template in the copy position template library, a target copy position template that matches the poster generation requirement information is selected from the copy position template library.
[0199] In a possible implementation of the embodiment of the present disclosure, the first target poster is generated when no target poster template matching the poster generation requirement information is found. The apparatus further includes a fourth generation module configured to:
[0200] When a target poster template matching the poster generation requirement information is found, generating second copy content based on the poster generation requirement information and the copy content filling information corresponding to the target poster template;
[0201] Based on the second copy content, an image search is performed in the second image library to obtain second image content that matches the second copy content;
[0202] A second target poster is generated based on the second text content and the second image content.
[0203] In a possible implementation of the embodiment of the present disclosure, the fourth generating module is specifically configured to:
[0204] Obtaining a third prompt template, wherein the third prompt template includes an input parameter field and a text filling attribute field;
[0205] Generate demand information based on the poster, determine the field value corresponding to the input parameter field, and fill the field value into the fill position corresponding to the input parameter field;
[0206] Filling at least one of the following items, including the position of the copy content, the number of the copy content, and the length of the copy content, into the filling position corresponding to the copy filling attribute field to obtain third prompt information;
[0207] Based on the third prompt information, generate the second copy content.
[0208] In a possible implementation of the embodiment of the present disclosure, the images in the second image library correspond to image feature vectors, and the fourth generation module is specifically configured to:
[0209] Obtaining a text feature vector corresponding to the second copy content;
[0210] Obtaining a vector similarity between a text feature vector and an image feature vector corresponding to an image in a second image library;
[0211] Based on the vector similarity, the second image library is searched for second image content that matches the second text content.
[0212] In a possible implementation of the embodiment of the present disclosure, the apparatus further includes a template query module, configured to:
[0213] Generate demand information based on the poster and determine the poster application scenario;
[0214] Based on the poster application scenario, the target poster template that matches the poster generation requirement information is searched in the poster template library.
[0215] In a possible implementation of the embodiment of the present disclosure, the template query module is specifically configured to:
[0216] Based on the poster generation demand information, the poster theme prediction and content extraction are performed to obtain the target poster theme and target extracted content;
[0217] Determine the poster application scenario based on the target poster theme and target extraction content.
[0218] In a possible implementation of the embodiment of the present disclosure, the third generating module 640 is specifically configured to:
[0219] Arrange the first text content on the first layer, and arrange the first image content on the second layer;
[0220] Based on the poster style, determine the matching target effect layer;
[0221] The first layer, the second layer and the target effect layer are superimposed to obtain an editable first target poster.
[0222] The poster generation device of the disclosed embodiment can automatically extract key points of the demand based on the poster generation demand information, thereby generating a first text content with a clear theme and highlighting key information; it can automatically generate a first image content that can intuitively present the core theme of the poster by using a raw image model based on the demand information; and further, based on the first text content and the first image content, it can obtain a first target poster with a better overall visual effect.
[0223] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0224] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0225] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 702 or a computer program loaded from a storage unit 708 into a RAM (Random Access Memory) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An I / O (Input / Output) interface 705 is also connected to the bus 704.
[0226] Multiple components in the electronic device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0227] The computing unit 701 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various specialized AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the poster generation method. For example, in some embodiments, the poster generation method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the poster generation method described above can be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the poster generating method in any other appropriate manner (for example, by means of firmware).
[0228] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0229] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0230] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0231] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0232] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0233] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0234] It's important to note that artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). This encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0235] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0236] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A poster generation method, comprising: Obtain poster generation demand information; Generate demand information based on the poster and generate first copy content; Based on the poster generation demand information, a first image content is generated using a raw image model; A first target poster is generated based on the first text content and the first image content.
2. The method according to claim 1, wherein the poster generation requirement information includes a target object, and wherein generating the first image content using a raw image model based on the poster generation requirement information comprises: generating first prompt information based on the poster generation requirement information, wherein the first prompt information is used to instruct generation of image content; Performing intent analysis based on the poster generation requirement information to determine whether a reference image query is required during the generation of the first target poster; In response to the need to perform a reference image query during the generation process of the first target poster, a first raw image model is used to query the target reference image of the target object, and the first image content is generated based on the first prompt information and the target reference image.
3. The method according to claim 2, wherein generating the first image content based on the poster generation demand information using a raw image model further comprises: In response to the fact that the generation process of the target poster does not require a reference image query, a second image generation model is used to generate the first image content based on the first prompt information.
4. The method according to claim 2, wherein the performing intention analysis based on the poster generation requirement information to determine whether a reference image query is required in the generation process of the first target poster comprises: Performing intention analysis based on the poster generation demand information to determine whether there is an association relationship between the first target poster and the target object; In response to an association relationship between the first target poster and the target object, determining that a reference image query is required in a process of generating the first target poster; In response to the fact that there is no association relationship between the first target poster and the target object, it is determined that a reference image query is not required in a generation process of the first target poster.
5. The method according to claim 4, wherein the poster generation requirement information includes a poster application scenario, and the step of using the first raw image model to query a target reference image comprises: The first raw image model is used to perform an image query in a first image library based on the poster application scenario and the target object to obtain the target reference image.
6. The method according to claim 2, wherein generating demand information based on the poster and generating the first prompt information comprises: Based on the poster generation demand information, a poster theme prediction is performed to obtain a target poster theme; Obtaining a first prompt template, wherein the first prompt template includes an input parameter field; Fill the target poster theme into the filling position corresponding to the input parameter field to obtain the first prompt information.
7. The method according to claim 6, wherein the first prompt template further comprises at least one of the following: Description information of the prompt generation task corresponding to the image content generation scenario, image background description information, image element description information, character attribute description information when the image elements include characters, output format description information, and reference examples; in, The reference example includes a reference poster theme and prompt information corresponding to the reference poster theme.
8. The method according to claim 1, wherein generating the first copy content based on the poster generation demand information comprises: Obtaining a target copy position template, wherein the target copy position template is used to indicate at least one of a copy content position, a copy content quantity, and a copy content length; According to at least one of the position of the copy content, the amount of the copy content, and the length of the copy content, the first copy content is generated based on the poster generation demand information.
9. The method according to claim 8, wherein generating the first copy content based on the poster generation requirement information according to at least one of the copy content location, copy content quantity, and copy content length comprises: Obtaining a second prompt template, wherein the second prompt template includes an input parameter field and a text filling attribute field; Generate demand information based on the poster, determine the field value corresponding to the input parameter field, and fill the field value into the filling position corresponding to the input parameter field; Filling at least one of the position of the text content, the number of text contents, and the length of the text content into the filling position corresponding to the text filling attribute field to obtain second prompt information; Based on the second prompt information, the first copy content is generated.
10. The method according to claim 8, wherein the poster generation requirement information includes a poster application scenario, and the obtaining of a target copy position template includes: Based on the poster application scenario corresponding to the copy position template in the copy position template library, the target copy position template that matches the poster generation requirement information is selected from the copy position template library.
11. The method according to claim 1, wherein the first target poster is generated when no target poster template matching the poster generation requirement information is found, the method further comprising: When a target poster template matching the poster generation requirement information is found, generating second copy content based on the poster generation requirement information and the copy content filling information corresponding to the target poster template; Based on the second text content, performing an image search in a second image library to obtain second image content that matches the second text content; A second target poster is generated based on the second text content and the second image content.
12. The method according to claim 11, wherein generating the second copy content based on the poster generation requirement information and the copy content filling information corresponding to the target poster template comprises: Obtaining a third prompt template, wherein the third prompt template includes an input parameter field and a text filling attribute field; Generate demand information based on the poster, determine the field value corresponding to the input parameter field, and fill the field value into the filling position corresponding to the input parameter field; Filling at least one of the copy content position, copy content quantity, and copy content length included in the copy content filling information into the filling position corresponding to the copy filling attribute field to obtain third prompt information; Based on the third prompt information, the second copy content is generated.
13. The method according to claim 11, wherein the images in the second image library correspond to image feature vectors, and performing an image search in the second image library based on the second text content to obtain second image content that matches the second text content comprises: Obtaining a text feature vector corresponding to the second copy content; Obtaining a vector similarity between the text feature vector and the image feature vector corresponding to the image in the second image library; Based on the vector similarity, the second image content that matches the second text content is searched in the second image library.
14. The method according to claim 11, further comprising: Generating demand information based on the poster and determining an application scenario for the poster; Based on the poster application scenario, a target poster template that matches the poster generation requirement information is searched in a poster template library.
15. The method according to claim 14, wherein generating demand information based on the poster and determining a poster application scenario comprises: Based on the poster generation demand information, poster theme prediction and content extraction are performed to obtain a target poster theme and target extracted content; Based on the target poster theme and the target extracted content, the poster application scenario is determined.
16. The method according to any one of claims 1 to 15, wherein the poster generation requirement information is used to determine a poster style, and the generating a first target poster based on the first text content and the first image content comprises: Arrange the first text content on a first layer, and arrange the first image content on a second layer; Based on the poster style, determining a matching target effect layer; The first layer, the second layer and the target effect layer are superimposed to obtain the editable first target poster.
17. A poster generating device comprising: Acquisition module, used to obtain poster generation requirement information; A first generating module, configured to generate demand information based on the poster and generate first copy content; A second generating module is configured to generate demand information based on the poster and generate first image content using a raw image model; The third generating module is used to generate a first target poster based on the first text content and the first image content.
18. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 16.
19. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 16.
20. A computer program product comprising a computer program, wherein the computer program implements the method according to any one of claims 1 to 16 when executed by a processor.