Product advertisement image generation method and apparatus, device, storage medium, and program product
By obtaining the original pictures and associated information of the product, and using the training model to generate slogans and scene pictures, the problem of manual production time and inconsistent text with pictures is solved, and the automatic batch generation of consistent product advertising pictures is realized.
Patent Information
- Application Number
- PCT/CN2024/139998
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-06
- Filing Date
- 2024-12-17
- Publication Date
- 2025-08-14
AI Technical Summary
In the prior art, product advertising pictures are mainly made by manual production, which takes a long time and cannot be mass-produced. At the same time, advertising pictures generated by artificial intelligence often have problems such as text and pictures.
By obtaining the original product picture information and product association information of the target product, using the trained model to generate slogan information, combining the original product picture information and slogan information to generate the target scene map, and finally generating a product advertising map consistent with the slogan information.
Automatic batch generation of product advertising maps is realized to ensure that the slogan is consistent with the scene map, avoid the situation where the text and the picture are inconsistent, and improve the production efficiency and accuracy.
Smart Images

Figure CN2024139998_14082025_PF_FP_ABST
Abstract
Description
Product advertising image generation method, device, equipment, storage medium and program product
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese Patent Application No. 202410171999.X, filed on February 6, 2024, entitled “Method, device, equipment, storage medium and program product for generating product advertising images,” the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0003] The present application relates to the technical field of product advertising image generation, and in particular to a product advertising image generation method, device, equipment, storage medium and program product. Background Art
[0004] Product advertising images are based on big data analysis of merchants and consumers. They extract some focused questions and content that can be answered through product details, and express and explain them in a structured manner on the main image, in order to help consumers quickly make shopping decisions and achieve conversions.
[0005] However, in current related technologies, product advertising images are mainly produced manually, which is not only time-consuming but also cannot be produced in batches. Summary of the Invention
[0006] In view of this, the purpose of this application is to propose a method, device, electronic device, storage medium and program product for generating product advertisement images.
[0007] Based on the above objectives, this application provides a method for generating a product advertisement image, including:
[0008] Obtain the original product image information and product related information of the target product;
[0009] generating advertising information of the target product based on the product-related information;
[0010] generating a target scene graph of the target product based on the original product image information and the advertising slogan information;
[0011] An advertisement image of the target product is generated based on the target scene image and the advertisement slogan information.
[0012] Based on the same inventive concept, the present application provides a device for generating a product advertisement image, comprising:
[0013] The acquisition module obtains the original product image information and product related information of the target product;
[0014] A first generating module, generating advertising slogan information of the target product based on the product-related information;
[0015] A second generating module generates a target scene graph of the target product based on the original product image information and the advertising slogan information;
[0016] The third generating module generates an advertisement image of the target product based on the target scene image and the advertisement slogan information.
[0017] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor. When the processor executes the program, the method for generating product advertising images as described above is implemented.
[0018] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the product advertising image generation method as described above.
[0019] Based on the same inventive concept, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the above-mentioned method for generating product advertising images.
[0020] From the above, it can be seen that the product advertising image generation method, device, electronic device and program product provided by this application obtain the original product image information and product association information of the target product; generate the advertising slogan information of the target product based on the product association information; generate the target scene image of the target product based on the original product image information and the advertising slogan information; generate the advertising image of the target product based on the target scene image and the advertising slogan information. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] FIG1 is a schematic diagram of an application scenario of an embodiment of the present application;
[0023] FIG2 is a flow chart of a method for generating a product advertisement image according to an embodiment of the present application;
[0024] FIG3 is a schematic diagram of a process for generating a scene graph of a product according to an embodiment of the present application;
[0025] FIG4 is a schematic diagram of the structure of a device for generating a product advertisement image according to an embodiment of the present application;
[0026] FIG5 is a schematic structural diagram of a specific electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of this specification more clear, this specification is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0028] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, usage scenarios, etc. of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0029] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0030] In order to make the purpose, technical solutions and advantages of this specification more clear, this specification is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0031] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meaning understood by people with ordinary skills in the field to which this application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements, objects or method steps appearing before the word include the elements, objects or method steps listed after the word and their equivalents, without excluding other elements, objects or method steps. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In addition, in the description of the embodiments of the present application, unless otherwise specified, the term "multiple" refers to two or more. The term "and / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0032] It is understandable that before using the technical solutions of each embodiment of this application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0033] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the technical solution of this application based on the prompt message.
[0034] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this application. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this application.
[0036] As mentioned in the background technology section, product advertising images are based on big data analysis of merchants and consumers, extracting some focused questions and content that can be answered through product details information, and expressing and explaining them in a structured manner in the main image, in order to help consumers quickly make shopping decisions and convert them. However, in the current related technologies, product advertising images are mainly produced manually, which is not only time-consuming but also cannot be mass-produced. In addition, the inventors also found that if the product advertising images are directly generated through artificial intelligence (AI) painting, not only most of the generated advertising images cannot be used directly, but also there are often cases where the text and the picture scene do not match.
[0037] In order to solve the above technical problems, the present application provides a method for generating product advertising images, which obtains the original product image information and product association information of the target product; generates the advertising slogan information of the target product based on the product association information; generates the target scene graph of the target product based on the original product image information and the advertising slogan information; generates the advertising image of the target product based on the target scene graph and the advertising slogan information, so that the advertising images of the product can be automatically generated in batches according to the original product image information and product association information of the target product, and the advertising slogan information is added when generating the target scene graph, so that the generated target scene graph is consistent with the advertising slogan information, avoiding the situation where the advertising slogan is inconsistent with the scene image.
[0038] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0039] In some specific application scenarios, the product advertisement image generation method of this application can be applied to various platforms or systems involving product advertisement image generation. As an example, this application scenario includes at least one server and at least one terminal. The server and terminal can communicate via a network to achieve data transmission. The network can be a wired network or a wireless network, which is not specifically limited in this application.
[0040] The server can be a server that provides various services. Specifically, the server can be used to provide background services for applications running on the terminal. Optionally, in some implementations, the product advertising image generation method provided in the embodiment of the present application can be executed by a server or a terminal. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. The embodiment of the present application does not specifically limit this.
[0041] With reference to Figure 1, it is a schematic diagram of an application scenario of the method for generating a product advertisement image provided by an exemplary embodiment of the present application. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices capable of realizing the above functions. The server 102 and the data storage system 103 can both be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0042] The server 102 is used to provide a product advertising image generation service to the user of the terminal device 101. The terminal device 101 is installed with a client that communicates with the server 102, and the user can obtain data through the client. During the product advertising image generation process, the server 102 can first obtain the original product image information and product association information of the target product; then generate the advertising slogan information of the target product based on the product association information; and generate the target scene graph of the target product based on the original product image information and the advertising slogan information; finally, generate the advertising image of the target product based on the target scene graph and the advertising slogan information. Optionally, the product advertising image generation process can also be completed by the client, which is not limited to this.
[0043] The data storage system 103 stores various data related to the generation of product advertisement images. Both the terminal device 101 and the server 102 can randomly retrieve various data from the data storage system 103 .
[0044] The following describes a method for generating a product advertisement image according to an exemplary embodiment of the present application, using the application scenario of Figure 1. It should be noted that the above application scenario is provided solely to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, the embodiments of the present application can be applied to any applicable scenario.
[0045] Referring to FIG2 , an embodiment of the present application provides a method for generating a product advertisement image, the method comprising the following steps:
[0046] S101, obtaining original product image information and product related information of the target product.
[0047] In specific implementation, the target product can be any product for which an advertisement image is to be generated. Optionally, the original product image information and product related information of the uploaded target product can be directly obtained from the product sales system. Alternatively, a unique code (product ID) can be set for each product and then the existing product information can be obtained through the unique code.
[0048] In some embodiments, the product-related information includes one or more of product detail image information, product review information, and product description information. Product detail image information refers to detailed information about the product through images, typically provided by the user. Product description information primarily refers to information describing the product through text, such as the product title and product introduction. Product review information refers to user-published product reviews. Optionally, this product review information may be published review information collected in the product sales system, including anonymous or non-anonymous review information.
[0049] S102: Generate advertising slogan information of the target product based on the product-related information.
[0050] In a specific implementation, the target product's slogan information is the text portion of the product's advertising image. This text portion generally uses eye-catching and concise text to express the product's characteristics, such as "green, environmentally friendly, pollution-free," "natural and organic," etc. Currently, related art generally designs slogans manually. However, in this embodiment, the slogan information is directly generated based on the target product's product-related information. Optionally, the acquired product-related information can be directly input into a trained slogan generation model, which directly outputs the slogan information. Optionally, a word segmentation tool can be used to extract multiple phrases from the product-related information, and then the most frequently repeated phrases are selected as the slogan information.
[0051] In some embodiments, generating the advertising slogan information of the target product based on the product-related information specifically includes:
[0052] Performing a screening operation on the product-related information;
[0053] The advertising slogan information of the target product is generated based on the filtered product-related information.
[0054] In specific implementations, considering that product-related information may contain a large amount of content, much of which is invalid, the product-related information can be filtered first, and then the advertising slogan information for the target product can be generated based on the filtered product-related information. Optionally, the specific filtering operation rules can be set as needed and are not limited to this. For example, some invalid information templates can be set in advance, and then the filtering operation can be performed through regular expression matching.
[0055] In some embodiments, the product-related information includes product detail image information; and filtering the product-related information specifically includes:
[0056] Extracting multiple text information from the product details image information using optical character recognition technology;
[0057] sorting the plurality of text messages in descending order of font size, and determining target text messages ranked at a preset ranking;
[0058] The target text information is determined as a result of the screening operation.
[0059] During specific implementation, the inventors of this application have discovered through research that in product detail pictures, those contents that want to be highlighted generally have larger fonts, while some information such as serial number parameters generally have smaller fonts. Those contents that want to be highlighted can better express the characteristics of the product and are therefore more suitable as slogans. Information with smaller fonts is invalid information for product promotion. In summary, when the product-related information includes product detail picture information, the multiple text information in the product detail picture information is first extracted by optical character recognition (OCR) technology, and then the multiple text information is sorted in order from large to small in font size, and the target text information ranked in the preset ranking is determined, and finally the target text information is determined as the result of the screening operation. Optionally, the preset ranking can be set as needed and is not limited to this. In some embodiments, when the slogan information of the target product is generated through product detail picture information, the text information with the largest font size can be directly determined as the slogan information.
[0060] It should be noted that OCR (Optical Character Recognition) technology is a technology that converts text in an image into text format through recognition software.
[0061] In some embodiments, the product-related information includes product evaluation information; and filtering the product-related information specifically includes:
[0062] removing product evaluation information having a word count less than a preset word count or belonging to preset default comment information from the product evaluation information to obtain filtered product evaluation information;
[0063] Determining high-frequency words that appear more frequently than a preset frequency in the filtered product evaluation information;
[0064] The high frequency words are determined as a result of the filtering operation.
[0065] During specific implementation, it is considered that when the product evaluation information includes more comment information, it may include a lot of invalid evaluation information, for example, invalid comment information that belongs to the preset default comment information or too few words. Therefore, when the product-related information includes product evaluation information, the product evaluation information with fewer words than the preset number of words or the preset default comment information can be removed from the product evaluation information to obtain filtered product evaluation information, and then the high-frequency words that appear more frequently than the preset frequency in the filtered product evaluation information are further determined, that is, some words that appear less frequently are excluded, and finally the high-frequency words are determined as the result of the filtering operation. Optionally, the preset number of words and the preset default comment information can be set as needed, and there is no limitation on this.
[0066] In some embodiments, the product-related information includes product description information; and filtering the product-related information specifically includes:
[0067] removing the product description information that is preset invalid information from the product description information to obtain the target product description information;
[0068] The target product description information is determined as a result of the screening operation.
[0069] In a specific implementation, when the product-related information includes product description information, in order to more accurately generate the target product's advertising slogan information from the product description information, the target product description information can be obtained by first removing some of the product description information from the product description information by presetting invalid information; then the target product description information is determined as the result of the screening operation. Optionally, the presetting invalid information can be set as needed and is not limited to this, for example, the product specifications are: 12 pieces / box, 500kg, size 36cm, number (100023), etc.
[0070] In some embodiments, after filtering the product detail image information and product evaluation information according to the methods of the above respective embodiments, a secondary filtering operation can be performed by presetting invalid information, thereby improving the efficiency and accuracy of generating advertising slogan information.
[0071] In some embodiments, generating the advertising slogan information of the target product based on the filtered product-related information specifically includes:
[0072] Inputting the filtered product-related information into a trained advertising slogan generation model to obtain a plurality of candidate advertising slogan information;
[0073] Obtaining the target type of the target product;
[0074] Determine the target promotion focus information corresponding to the target type; wherein different types correspond to different promotion focus information;
[0075] Target advertising slogan information corresponding to the target promotion emphasis information is determined from a plurality of candidate advertising slogan information, and the target advertising slogan information is determined as the advertising slogan information of the target product.
[0076] During specific implementation, in order to accurately obtain the advertising slogan information of the target product, the filtered product-related information can be first input into the trained advertising slogan generation model to obtain multiple candidate advertising slogan information, and then the target promotion focus information of the target product is determined according to the target type of the target product, and finally the target advertising slogan information corresponding to the target promotion focus information is determined from the multiple candidate advertising slogan information. Optionally, different promotion focus information corresponding to different types can be set as needed. For example, if food types care more about origin / taste, then the origin advertising slogan and taste advertising slogan of food type products will have a higher weight, that is, the current target promotion focus information is origin and taste advertising slogan. If clothing products care more about brand / texture, then the brand advertising slogan and texture advertising slogan of clothing products will have a higher weight, that is, the current target promotion focus information is brand and texture advertising slogan.
[0077] In some embodiments, the slogan generation model can use a Low-Rank Adaptation (LoRA) model (a technology for large language models used to solve the problem of fine-tuning these models) to tune the model for the extraction of slogan information. This is mainly used to solve the problems of non-standard generation results of large language models, the inability to directly provide slogans requiring secondary post-processing extraction, and low result availability (the presence of repeated phrases, meaningless phrases, illegal words, etc.). Optionally, in some embodiments, the large model for slogan information extraction can also be post-processed by an advertising slogan attribute classifier to classify the slogans into corresponding attributes.
[0078] In some embodiments, the product-related information includes product detail picture information; generating the advertising slogan information of the target product based on the product-related information specifically includes: extracting multiple text information from the product detail picture information through optical character recognition technology; sorting the multiple text information in order from large to small font size, and determining the target text information ranked in a preset ranking; generating the advertising slogan information of the target product based on the target text information.
[0079] In some embodiments, the product-related information includes product evaluation information; generating the advertising slogan information of the target product based on the product-related information specifically includes: removing the product evaluation information with a word count less than a preset word count or belonging to the preset default comment information from the product evaluation information to obtain filtered product evaluation information; determining high-frequency words in the filtered product evaluation information that appear more than a preset frequency; and determining the advertising slogan information of the target product based on the high-frequency words.
[0080] In some embodiments, the product association information includes product description information; generating the advertising slogan information of the target product based on the product association information specifically includes: removing the product description information that belongs to preset invalid information from the product description information to obtain the target product description information; generating the advertising slogan information of the target product based on the target product description information.
[0081] S103: Generate a target scene graph of the target product based on the original product image information and the advertising slogan information.
[0082] During specific implementation, it is considered that the scene included in the final generated advertising image should correspond to the advertising slogan. Moreover, even for the same product, advertising slogans can be selected from multiple angles. For example, if the advertising slogan of a certain product is green and environmentally friendly, then the corresponding scene image should highlight the theme of green and environmental protection. At this time, the scene image should try to include some elements of nature. If the theme of the generated scene image is a sense of technology, then it is obvious that the advertising slogan and the scene at this time have a sense of disharmony. In summary, in the embodiment of the present application, the target scene image of the target product is generated based on the original product image information and the advertising slogan information. Optionally, the original product image information and the advertising slogan information can be directly input into the image generation model obtained by training to obtain the target scene image of the target product. Optionally, multiple preset scene background images can be set in advance, and then the corresponding target preset scene background image is selected from the multiple preset scene background images according to the advertising slogan information, and then the original product image information and the target preset scene background image are combined together to obtain the target scene image of the target product.
[0083] In some embodiments, generating a target scene graph of the target product based on the original product image information and the advertising slogan information specifically includes:
[0084] Determining the main information of the target product based on the original product image information;
[0085] Inputting the subject information and the advertising slogan information into the trained scene description model to obtain scene description information of the target product;
[0086] The target scene graph is generated by the image generation model obtained through training and based on the original product image information and the scene description information.
[0087] During specific implementation, in order to generate the target scene graph more accurately, the main information of the target product can be first determined based on the original product image information. The main information is the overview information of the product body, such as category, shape, color and other information. Optionally, the original product image information can be input into the trained image recognition model to obtain the main information of the target product. The main information and the advertising slogan information are then input into the trained scene description model to obtain the scene description information of the target product. The scene description information is a text description of the characteristics, style, etc. of the scene graph to be generated. Optionally, in some embodiments, the expected scene description or expected scene graph provided by the user can also be obtained, and then the expected scene description or expected scene graph is input into the trained scene description model together with the main information and the advertising slogan information to obtain the scene description information of the target product. Finally, the original product image information and the scene description information are input into the trained image generation model to generate the target scene graph.
[0088] In some embodiments, determining the main information of the target product based on the original product image information specifically includes:
[0089] Extracting the product body from the original product image information;
[0090] The commodity body is input into the trained image-text recognition model to obtain the subject information of the target commodity; wherein the subject information includes the category information, color information, and shape information of the target commodity.
[0091] In specific implementation, the product body, that is, the foreground image, in the original product image information can be extracted through an image extraction model, and then the product body is input into the trained image-text recognition model to obtain the main body information of the target product.
[0092] In some embodiments, generating the target scene graph based on the original product image information and the scene description information through the trained image generation model specifically includes:
[0093] Performing main segmentation on the original product image information to obtain a segmentation mask image of the target product;
[0094] Performing edge extraction on the original product image information to obtain a foreground edge extraction image of the target product;
[0095] The original product image information, the segmentation mask image, the foreground edge extraction image, and the scene description information are input into the trained image generation model to obtain the target scene image.
[0096] In specific implementation, in order to make the generated target scene graph more accurate, and to ensure that the target product in the target scene graph is consistent with the product body in the original product image information, and to achieve a perfect combination of the foreground and background parts. In this embodiment, the original product image information is subjected to subject segmentation and edge extraction respectively to obtain a segmentation mask map of the target product and a foreground edge extraction map of the target product. Then, the original product image information, the segmentation mask map, the foreground edge extraction map, and the scene description information are input into the trained image generation model to obtain the target scene graph. Referring to Figure 3, the original product image is first subjected to image understanding by the model to obtain a subject description (i.e., subject information). Then, the subject information and the advertising slogan information are input into the scene description model together to obtain an adaptive scene description. At the same time, the original product image is subjected to subject segmentation and edge extraction respectively to obtain a segmentation mask map and a foreground edge extraction map. Finally, the adaptive scene description, the original product image information, the segmentation mask map, and the foreground edge extraction map are input into the trained image generation model, and the subject information of the target product is obtained through AIGC background generation technology. It should be noted that AIGC stands for Artificial Intelligence Generated Content, which is translated into Chinese as artificial intelligence generated content.
[0097] S104: Generate an advertisement image of the target product based on the target scene image and the advertisement slogan information.
[0098] In a specific implementation, after obtaining the target scene image and the advertising slogan information, the target scene image and the advertising slogan information can be combined and typeset to generate an advertising image for the target product. Alternatively, the target scene image and the advertising slogan information can be directly input into a trained design layout model to obtain an advertising image for the target product.
[0099] It should be noted that all the trained models mentioned in the embodiments of the present application can use any neural network model in the relevant technology, and the specific training method can also refer to the training process of the neural network model in the relevant technology. Optionally, in some embodiments, the open source model that has been trained in the relevant technology can also be directly selected, and there is no limitation on this.
[0100] In some embodiments, generating an advertisement image of the target product based on the target scene image and the advertising slogan information specifically includes:
[0101] Determine the aspect ratio of the target scene graph:
[0102] In response to the aspect ratio being greater than 1, determining that the position of the advertising slogan information in the target scene graph is a first preset position, cropping a first target edge of the target scene graph, and superimposing the advertising slogan information on the first preset position in the cropped target scene graph to obtain an advertising image of the target product; wherein the first preset position is a position close to an upper edge or a lower edge of the target scene graph, and the target edges include a first edge of the target scene graph that is away from the first preset position and two second edges adjacent to the first edge;
[0103] In response to the aspect ratio being less than 1, the position of the slogan information in the target scene graph is determined to be a second preset position, and the second target edge of the target scene graph is cropped, and the slogan information is superimposed on the second preset position in the cropped target scene graph to obtain an advertising image of the target product; wherein, the second preset position is a position close to the left edge or right edge of the target scene graph, and the target edge includes a third edge in the target scene graph away from the second preset position and two fourth edges adjacent to the third edge.
[0104] During specific implementation, in order to accurately layout the advertising image of the target product so that the generated advertising image conforms to the user's aesthetic taste as much as possible in terms of layout, in an embodiment of the present application, the picture is adaptively cropped according to the aspect ratio of the product, and the placement area (position) of the slogan in the target scene image is determined at the same time. When the aspect ratio is greater than 1, it means that the width is greater than the height at this time. The position of the slogan information can be set to one of the left and right sides of the target scene image, and then the other three side edges where the slogan information is not set are cropped so that the product body and the slogan are in the center area of the cropped target scene image. When the aspect ratio is less than 1, it means that the height is greater than the width at this time. The position of the slogan information can be set to one of the upper and lower sides of the target scene image, and then the other three side edges where the slogan information is not set are cropped. Optionally, when the aspect ratio is equal to 1, the position of the slogan information in the target scene image can be randomly determined as the first preset position or the second preset position. Optionally, in some embodiments, in order to improve the display effect of the slogan information in the target scene graph and prevent the slogan information from being unable to be seen clearly due to the similar colors of the two, the background color of the target scene graph can be obtained first, and then the color wheel can be used to obtain the inverse color that is significantly different from the background color for the color of the slogan information.
[0105] The method for generating product advertising images provided in the present application obtains the original product image information and product-related information of the target product; generates the advertising slogan information of the target product based on the product-related information; generates the target scene graph of the target product based on the original product image information and the advertising slogan information; generates the advertising image of the target product based on the target scene graph and the advertising slogan information, so that the advertising images of the products can be automatically generated in batches according to the original product image information and product-related information of the target product, and the advertising slogan information is added when generating the target scene graph, so that the generated target scene graph is consistent with the advertising slogan information, thereby avoiding the situation where the advertising slogan is inconsistent with the scene image.
[0106] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of the embodiment of the present application can also be applied in a distributed scenario and completed by multiple devices working together. In the case of such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the method described.
[0107] It should be noted that the above description is of specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0108] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, with reference to FIG4 , the present application further provides a device for generating a product advertisement image, the device comprising:
[0109] Acquisition module 201, acquires original product image information and product related information of the target product;
[0110] A first generating module 202 generates advertising information of the target product based on the product-related information;
[0111] The second generating module 203 generates a target scene graph of the target product based on the original product image information and the advertising slogan information;
[0112] The third generating module 204 generates an advertisement image of the target product based on the target scene image and the advertisement slogan information.
[0113] In some embodiments, the product-related information includes one or more of product detail image information, product evaluation information, and product description information.
[0114] In some embodiments, the first generation module includes:
[0115] A screening unit, for screening the product-related information;
[0116] The phrase generating unit generates advertising slogan information of the target product based on the filtered product-related information.
[0117] In some embodiments, the product-related information includes product detail image information; the screening unit is specifically configured to:
[0118] Extracting multiple text information from the product details image information using optical character recognition technology;
[0119] sorting the plurality of text messages in descending order of font size, and determining target text messages ranked at a preset ranking;
[0120] The target text information is determined as a result of the screening operation.
[0121] In some embodiments, the product-related information includes product evaluation information; the screening unit is specifically configured to:
[0122] removing product evaluation information having a word count less than a preset word count or belonging to preset default comment information from the product evaluation information to obtain filtered product evaluation information;
[0123] Determining high-frequency words that appear more frequently than a preset frequency in the filtered product evaluation information;
[0124] The high frequency words are determined as a result of the filtering operation.
[0125] In some embodiments, the product-related information includes product description information; the screening unit is specifically configured to:
[0126] removing the product description information that is preset invalid information from the product description information to obtain the target product description information;
[0127] The target product description information is determined as a result of the screening operation.
[0128] In some embodiments, the phrase generation unit is specifically configured to:
[0129] Inputting the filtered product-related information into a trained advertising slogan generation model to obtain a plurality of candidate advertising slogan information;
[0130] Obtaining the target type of the target product;
[0131] Determine the target promotion focus information corresponding to the target type; wherein different types correspond to different promotion focus information;
[0132] Target advertising slogan information corresponding to the target promotion emphasis information is determined from a plurality of candidate advertising slogan information, and the target advertising slogan information is determined as the advertising slogan information of the target product.
[0133] In some embodiments, the second generation module includes:
[0134] a subject determination unit, configured to determine subject information of the target product based on the original product image information;
[0135] An input unit, inputting the subject information and the advertising slogan information into a trained scene description model to obtain scene description information of the target product;
[0136] The scene generation unit generates the target scene graph based on the image generation model obtained through training and the original product image information and the scene description information.
[0137] In some embodiments, the subject determination unit is specifically configured to:
[0138] Extracting the product body from the original product image information;
[0139] The commodity body is input into the trained image-text recognition model to obtain the subject information of the target commodity; wherein the subject information includes the category information, color information, and shape information of the target commodity.
[0140] In some embodiments, the scene generation unit is specifically configured to:
[0141] Performing main segmentation on the original product image information to obtain a segmentation mask image of the target product;
[0142] Performing edge extraction on the original product image information to obtain a foreground edge extraction image of the target product;
[0143] The original product image information, the segmentation mask image, the foreground edge extraction image, and the scene description information are input into the trained image generation model to obtain the target scene image.
[0144] In some embodiments, the third generation module is specifically configured to:
[0145] Determine the aspect ratio of the target scene graph:
[0146] In response to the aspect ratio being greater than 1, determining that the position of the advertising slogan information in the target scene graph is a first preset position, cropping a first target edge of the target scene graph, and superimposing the advertising slogan information on the first preset position in the cropped target scene graph to obtain an advertising image of the target product; wherein the first preset position is a position close to an upper edge or a lower edge of the target scene graph, and the target edges include a first edge of the target scene graph that is away from the first preset position and two second edges adjacent to the first edge;
[0147] In response to the aspect ratio being less than 1, the position of the slogan information in the target scene graph is determined to be a second preset position, and the second target edge of the target scene graph is cropped, and the slogan information is superimposed on the second preset position in the cropped target scene graph to obtain an advertising image of the target product; wherein, the second preset position is a position close to the left edge or right edge of the target scene graph, and the target edge includes a third edge in the target scene graph away from the second preset position and two fourth edges adjacent to the third edge.
[0148] For the convenience of description, the above devices are described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0149] The product advertisement image generation device of the above embodiment is used to implement the corresponding product advertisement image generation method in any of the above embodiments, and has the beneficial effects of the corresponding data query method embodiment, which will not be repeated here.
[0150] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the method for generating a product advertising image described in any of the above embodiments is implemented.
[0151] FIG5 shows a more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other within the device via the bus 1050.
[0152] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0153] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0154] The input / output interface 1030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0155] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0156] The bus 1050 comprises a path for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0157] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0158] The electronic device of the above embodiment is used to implement the corresponding product advertisement image generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0159] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the product advertising image generation method described in any of the above embodiments.
[0160] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0161] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the product advertising image generation method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0162] Based on the same inventive concept, corresponding to any of the above-described embodiments and methods, the present disclosure further provides a computer program product comprising a computer program. In some embodiments, the computer program is executed by one or more processors to cause the processors to perform the product advertising image generation method described in the above-described embodiments, and has the beneficial effects of the corresponding method embodiments, which are not further described here.
[0163] In some embodiments, the computer program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0164] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. Within the scope of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0165] In addition, for simplicity of description and discussion, and in order not to make the embodiment of the application difficult to understand, the known power supply / ground connection with integrated circuit (IC) chip and other components may or may not be shown in the accompanying drawings provided. In addition, the device can be shown in the form of a block diagram to avoid making the embodiment of the application difficult to understand, and this also takes into account the following fact, that is, the details of the embodiment of these block diagram devices are highly dependent on the platform to be implemented in the embodiment of the application (that is, these details should be fully within the scope of understanding of those skilled in the art). When specific details (for example, circuit) are set forth to describe exemplary embodiments of the application, it will be apparent to those skilled in the art that the embodiment of the application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0166] Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may utilize the embodiments discussed.
[0167] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of this application.
Claims
1. A method for generating a product advertisement image, comprising: Obtain the original product image information and product related information of the target product; generating advertising information of the target product based on the product-related information; generating a target scene graph of the target product based on the original product image information and the advertising slogan information; An advertisement image of the target product is generated based on the target scene image and the advertisement slogan information.
2. The method according to claim 1, wherein The product-related information includes one or more of product details image information, product evaluation information, and product description information.
3. The method according to claim 2, characterized in that Generating the advertising slogan information of the target product based on the product-related information specifically includes: Performing a screening operation on the product-related information; The advertising slogan information of the target product is generated based on the filtered product-related information.
4. The method according to claim 3, wherein: The product-related information includes product details and picture information; The product-related information is filtered, specifically including: Extracting multiple text information from the product details image information using optical character recognition technology; sorting the plurality of text messages in descending order of font size, and determining target text messages ranked at a preset ranking; The target text information is determined as a result of the screening operation.
5. The method according to claim 3, wherein The product-related information includes product evaluation information; and filtering the product-related information specifically includes: removing product evaluation information having a word count less than a preset word count or belonging to preset default comment information from the product evaluation information to obtain filtered product evaluation information; Determining high-frequency words that appear more frequently than a preset frequency in the filtered product evaluation information; The high frequency words are determined as a result of the filtering operation.
6. The method according to claim 3, wherein: The product-related information includes product description information; and filtering the product-related information specifically includes: removing the product description information that is preset invalid information from the product description information to obtain the target product description information; The target product description information is determined as a result of the screening operation.
7. The method according to claim 3, wherein: Generating the advertising slogan information of the target product based on the filtered product-related information specifically includes: Inputting the filtered product-related information into a trained advertising slogan generation model to obtain a plurality of candidate advertising slogan information; Obtaining the target type of the target product; Determine the target promotion focus information corresponding to the target type; wherein different types correspond to different promotion focus information; Target advertising slogan information corresponding to the target promotion emphasis information is determined from a plurality of candidate advertising slogan information, and the target advertising slogan information is determined as the advertising slogan information of the target product.
8. The method according to claim 1, wherein Generating a target scene graph of the target product based on the original product image information and the advertising slogan information specifically includes: Determining the main information of the target product based on the original product image information; Inputting the subject information and the advertising slogan information into the trained scene description model to obtain scene description information of the target product; The target scene graph is generated by the image generation model obtained through training and based on the original product image information and the scene description information.
9. The method according to claim 8, wherein Determining the main information of the target product based on the original product image information specifically includes: Extracting the product body from the original product image information; The commodity body is input into the trained image-text recognition model to obtain the subject information of the target commodity; wherein the subject information includes the category information, color information, and shape information of the target commodity.
10. The method according to claim 8, wherein The image generation model obtained through training is used to generate the target scene graph based on the original product image information and the scene description information, specifically including: Performing main segmentation on the original product image information to obtain a segmentation mask image of the target product; Performing edge extraction on the original product image information to obtain a foreground edge extraction image of the target product; The original product image information, the segmentation mask image, the foreground edge extraction image, and the scene description information are input into the trained image generation model to obtain the target scene image.
11. The method according to claim 1, wherein Generating an advertisement image of the target product based on the target scene image and the advertisement slogan information specifically includes: Determine the aspect ratio of the target scene graph: In response to the aspect ratio being greater than 1, determining that the position of the advertising slogan information in the target scene graph is a first preset position, cropping a first target edge of the target scene graph, and superimposing the advertising slogan information on the first preset position in the cropped target scene graph to obtain an advertising image of the target product; wherein the first preset position is a position close to an upper edge or a lower edge of the target scene graph, and the target edges include a first edge of the target scene graph that is away from the first preset position and two second edges adjacent to the first edge; In response to the aspect ratio being less than 1, the position of the slogan information in the target scene graph is determined to be a second preset position, and the second target edge of the target scene graph is cropped, and the slogan information is superimposed on the second preset position in the cropped target scene graph to obtain an advertising image of the target product; wherein, the second preset position is a position close to the left edge or right edge of the target scene graph, and the target edge includes a third edge in the target scene graph away from the second preset position and two fourth edges adjacent to the third edge.
12. A device for generating a product advertisement image, comprising: The acquisition module obtains the original product image information and product related information of the target product; A first generating module, generating advertising slogan information of the target product based on the product-related information; A second generating module generates a target scene graph of the target product based on the original product image information and the advertising slogan information; The third generating module generates an advertisement image of the target product based on the target scene image and the advertisement slogan information.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 11 when executing the program. 14 . A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to claim 1 .
15. A computer program product comprising computer program instructions, which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Picture analysis model training method, advertisement picture selection method and electronic equipment
CN113869392A
Advertisement copywriting generation method and device, equipment, medium and product
CN115018549A
Cboth case generation method and device, electronic equipment and storage medium
CN116894429A
Advertisement generation method and system, medium and equipment
CN117372087A
Commodity advertisement map generation method and device, equipment, storage medium and program product
CN118154722A