Advertisement image generation method and device, equipment and storage medium
By automating the generation of ad images for Q&A apps, the problem of high costs associated with traditional manual design is solved, enabling efficient and attractive ad image generation and improving the usage and click-through rates of Q&A apps.
Patent Information
- Application Number
- CN202511577311.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-06
AI Technical Summary
Traditional advertising image generation relies heavily on manual design, resulting in high labor costs and low conversion rates, making it difficult to meet the efficiency and attractiveness requirements of the question-and-answer app for advertising image generation.
By obtaining the target trending topic name and the original advertisement image, N questions are generated and their answers are reasoned out. The content of the question boxes and answer boxes in the advertisement image is automatically modified to generate N new advertisement images.
It enabled the large-scale production of advertising images, reduced labor costs, improved generation efficiency and attractiveness, and increased the usage and click-through rate of the question-and-answer application.
Smart Images

Figure CN121481633A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to an advertisement image generation method and device, equipment and storage medium. BACKGROUND
[0002] With the rapid development of mobile Internet and artificial intelligence technology, question and answer APPs (Application) have become an important platform for people to acquire knowledge and share experience. In order to attract and retain users in the fierce market competition, operators increasingly rely on accurate, personalized and creative advertisement pushing. As the most direct form of attraction, the generation efficiency, content relevance and creativity level of visual advertisements directly affect the user's willingness to click and the commercial value of the application.
[0003] Traditional advertisement image generation highly depends on manual design, and has the technical problems of high labor cost and low conversion rate. SUMMARY
[0004] The present application provides an advertisement image generation method, device, equipment and storage medium, which can reduce the labor cost of generating advertisement images of question and answer applications, improve the generation efficiency of advertisement images, and improve the conversion rate of advertisement images, thereby improving the usage rate of question and answer applications.
[0005] In a first aspect, the present application provides an advertisement image generation method, comprising: obtaining first information and an original advertisement image of a question and answer application, the first information comprising a target hot topic name, and the original advertisement image comprising a question frame and an answer frame; generating N questions based on the first information, N being a positive integer; performing a push answer for each of the N questions to generate answer content of each question; modifying the content in the question frame and the answer frame in the original advertisement image based on the N questions and the answer content of each question to generate N new advertisement images of the question and answer application.
[0006] In a second aspect, the present application provides an advertisement image generation device, comprising: an obtaining unit configured to obtain first information and an original advertisement image of a question and answer application, the first information comprising a target hot topic name, and the original advertisement image comprising a question frame and an answer frame; a question generating unit configured to generate N questions based on the first information, N being a positive integer; an answer generating unit configured to perform a push answer for each of the N questions to generate answer content of each question; An advertisement generation unit is configured to modify the content in the question frame and the answer frame in the original advertisement image based on the N questions and the answer content of each question, and generate N new advertisement images of the Q&A application.
[0007] In some embodiments, the question generation unit is specifically configured to generate a question prompt based on the first information, the question prompt being used to guide the question generation model to generate a question meeting specific requirements; and analyze and understand the question prompt by using the question generation model to generate the N questions.
[0008] In some embodiments, the question generation unit is specifically configured to determine description information of a target group of the Q&A application based on the first information; and generate the question prompt based on the target hot topic name and the description information of the target group.
[0009] In some embodiments, the question generation unit is specifically configured to determine a structured template of the question prompt; and fill in information in a hot topic name to-be-filled field and a target group to-be-filled field in the structured template based on the target hot topic name and the description information of the target group to generate the question prompt.
[0010] In some embodiments, the structured template further includes at least one to-be-filled field of a question type, a question expected effect, a number of words included in the question, a question output format, and a number of questions, the first information includes a field value of at least one of the question type, the question expected effect, the number of words included in the question, the question output format, and the number of questions, and the filling in of information in the hot topic name to-be-filled field and the target group to-be-filled field in the structured template based on the target hot topic name and the description information of the target group to generate the question prompt includes: analyzing the first information to obtain the field value of at least one of the question type, the question expected effect, the number of words included in the question, the question output format, and the number of questions; and filling in information in at least one to-be-filled field in the structured template corresponding to the at least one of the question type, the question expected effect, the number of words included in the question, the question output format, and the number of questions based on the target hot topic name and the description information of the target group to generate the question prompt.
[0011] In some embodiments, the question generation unit is specifically configured to obtain a question knowledge base including common questions and professional knowledge corresponding to different hot topics; and analyze and understand the question prompt based on the question knowledge base by using the question generation model to generate the N questions.
[0012] In some embodiments, the advertisement generation unit is specifically configured to detect the question frame and the answer frame in the original advertisement image to obtain coordinate information of the question frame and the answer frame; for an i-th question in the N questions, based on the coordinate information of the question frame and the answer frame, and the i-th question and the answer content of the i-th question, the content in the question frame and the answer frame in the original advertisement image is modified to obtain the new advertisement image corresponding to the i-th question, where i is a positive integer from 1 to N.
[0013] In some embodiments, the advertisement generation unit is specifically configured to modify the color value of each pixel point in the question frame and the answer frame in the original advertisement image to a pure color value based on a pre-set pure color value to obtain a first advertisement image without question and answer content; based on the coordinate information of the question frame and the answer frame, the i-th question and the answer content of the i-th question are converted into a question image and an answer image; based on the coordinate information of the question frame and the answer frame, the question image and the answer image are fused with the first advertisement image to obtain the new advertisement image corresponding to the i-th question.
[0014] In some embodiments, the advertisement generation unit is specifically configured to convert the i-th question and the answer content of the i-th question into a web page format; based on the coordinate information of the question frame, the i-th question in the web page format is adjusted in style so that the size of the i-th question matches the size of the question frame; based on the coordinate information of the answer frame, the answer content of the i-th question in the web page format is adjusted in style so that the size of the answer content of the i-th question matches the size of the question frame; the i-th question in the web page format after the style adjustment is converted into the question image; and the answer content of the i-th question in the web page format after the style adjustment is converted into the answer image.
[0015] In some embodiments, before the advertisement generation unit modifies the content in the question frame and the answer frame in the original advertisement image based on the coordinate information of the question frame and the answer frame, and the i-th question and the answer content of the i-th question to obtain the new advertisement image corresponding to the i-th question, the advertisement generation unit is further configured to identify the text content included in the answer frame to obtain the text content included in the answer frame; and if the text content included in the answer frame meets a pre-set requirement, the advertisement generation unit modifies the content in the question frame and the answer frame in the original advertisement image based on the coordinate information of the question frame and the answer frame, and the i-th question and the answer content of the i-th question to obtain the new advertisement image corresponding to the i-th question.
[0016] In some embodiments, the advertisement generation unit is specifically configured to: perform feature extraction on the original advertisement image by a feature extraction module in the text box detection model, to obtain feature information of the original advertisement image; perform boundary box detection on the feature information by a text box detection module in the text box detection model, to obtain a predicted value of a boundary box coordinate of each grid point in the feature information; and obtain coordinate information of the question box and the answer box based on the predicted value of the boundary box coordinate of each grid point.
[0017] In some embodiments, the text box detection model further includes a text style prediction module, and a training process of the text box detection model is completed by a training module. The training module is specifically configured to: obtain a training image set; for each training image in the training image set, perform feature extraction on the training image by the feature extraction module, to obtain feature information of the training image, the training image set including multiple advertisement images of a question and answer application; perform boundary box detection on the feature information of the training image by the text box detection module, to obtain a predicted value of a boundary box coordinate of each grid point in the feature information; perform text style detection on the feature information of the training image by the text box detection module, to obtain a predicted value of a text style type of each grid point in the feature information of the training image; determine a loss value of the text box detection model based on the predicted value of the boundary box coordinate of each grid point and the predicted value of the text style type, and train the text box detection model based on the loss value.
[0018] In some embodiments, the text style prediction module includes a feature conversion unit, and the training module is specifically configured to: perform feature conversion on the feature information of the training image by the feature conversion unit, to obtain n-dimensional features of each grid in the feature information of the training image, n being a positive integer greater than 1; determine a probability value of a text corresponding to the each grid in the training image belonging to each text style type in n text style types based on the n-dimensional features of the each grid; and determine the predicted value of the text style type of the each grid based on the probability value of the text corresponding to the each grid in the training image belonging to each text style type in n text style types.
[0019] In some embodiments, the training module is specifically configured to: for a jth grid in the feature information, perform exponential operation on each dimension of n-dimensional features of the jth grid, to obtain n operation results of the jth grid, j being a positive integer; and for an nth operation result in the n operation results, determine a ratio of the nth operation result of the jth grid to a sum value of the n operation results of the jth grid as the probability value of the jth grid belonging to an nth text style type.
[0020] In some embodiments, the training module is specifically configured to determine the ground truth of the bounding box coordinates and the ground truth of the text style type of each grid; determine a predicted loss value of the bounding box based on the ground truth and the predicted value of the bounding box coordinates of each grid; determine a predicted loss value of the text style type based on the ground truth and the predicted value of the text style type of each grid; and determine the loss value of the text box detection model based on the predicted loss value of the bounding box and the predicted loss value of the text style type.
[0021] In some embodiments, the training module is specifically configured to, for each grid, multiply the predicted value of the text style type of the grid after logarithmic operation with the ground truth of the text style type of the grid to obtain a first product corresponding to the grid; add the first product corresponding to each grid to obtain a first sum value corresponding to the training image; and determine the predicted loss value of the text style type based on the first sum value corresponding to the training image.
[0022] In some embodiments, the training module is specifically configured to determine a first weight of the predicted loss value of the bounding box and a second weight of the predicted loss value of the text style type; and perform weighted summation on the predicted loss value of the bounding box and the predicted loss value of the text style type based on the first weight and the second weight to obtain the loss value of the text box detection model.
[0023] In a third aspect, a computing device is provided, including a processor and a memory. The memory is configured to store a computer program, and the processor is configured to invoke and run the computer program stored in the memory to execute the method of the first aspect.
[0024] In a fourth aspect, a chip is provided for implementing the method in the first aspect and its implementation manners. Specifically, the chip includes a processor configured to invoke and run a computer program from a memory, so that a device installed with the chip executes the method in the first aspect.
[0025] In a fifth aspect, a computer readable storage medium is provided for storing a computer program, which causes a computer to execute the method in the first aspect.
[0026] In a sixth aspect, a computer program product is provided, including computer program instructions, which cause a computer to execute the method in the first aspect.
[0027] In a seventh aspect, a computer program is provided, which, when running on a computer, causes the computer to execute the method in the first aspect.
[0028] To sum up, the application obtains first information and an original advertisement image of a question and answer application, wherein the first information includes a target hot topic name, and the original advertisement image includes a question box and an answer box. Then, based on the first information, N questions are generated, N being a positive integer. For each of the N questions, a push answer is generated to generate answer content of each question. Further, based on the N questions and the answer content of each question, the content in the question box and the answer box in the original advertisement image is modified to generate N new advertisement images of the question and answer application. Therefore, the advertisement image generation method provided by the embodiments of the application can batch generate N diversified advertisement images of the question and answer application through an automatic process, realize the large-scale production of advertisement images, reduce the labor cost of advertisement image production, improve the generation efficiency of the advertisement images of the question and answer application, and meet the demand for a large number of materials for multi-channel delivery. Further, based on the first information, the N questions are generated, and the first information includes a target hot topic name, so that the questions and answer content in the N new advertisement images are closer to the current hot topic, which can significantly improve the attraction and click rate of the advertisement images to improve the usage rate of the question and answer application. In addition, the answer content of each question is generated by push answering the question, rather than being randomly fabricated, which can ensure that the question and answer content presented in the advertisement image has logical authenticity and credibility, simulates high-quality interaction in a real community, thereby enhancing the persuasiveness of the advertisement image and improving the professional image of the question and answer application, which can further improve the usage rate of the question and answer application. Meanwhile, the content modification is performed in the fixed question box and answer box included in the original advertisement image, which not only ensures the uniformity of the advertisement images of the question and answer application in visual elements (such as logo, font, and color matching), but also realizes the dynamic and flexible change of the core information (questions and answer content), and balances the standardization and content innovation of the advertisement images of the question and answer application. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0030] Figure 1 A schematic diagram of an implementation environment of an embodiment of the present application; Figure 2 A flowchart of an advertisement image generation method provided by an embodiment of the present application; Figure 3 A schematic diagram of an information input interface related to an embodiment of the present application; Figure 4 An input schematic diagram of a target hot topic name involved in an embodiment of the present application; Figure 5 An exemplary diagram of an original advertisement image; Figure 6 Another exemplary diagram of an information input interface; Figure 7 An exemplary diagram of a question generation; Figure 8 Another exemplary diagram of a question generation; Figure 9 An exemplary diagram of an answer content generation; Figure 10 An exemplary diagram of a text box detection model; Figure 11 An exemplary diagram of a training of a text box detection model; Figure 12 An exemplary diagram of a text style prediction module; Figure 13A An exemplary diagram of a first advertisement image without a question and answer content; Figure 13B An exemplary diagram of a question image and an answer image; Figure 13C An exemplary diagram of a new advertisement image; Figure 14 An exemplary flow diagram of an advertisement image generation method provided by an embodiment of the present application; Figure 15 An exemplary framework diagram of an advertisement image generation method provided by an embodiment of the present application; Figure 16 An exemplary flow diagram of an advertisement image generation method provided by an embodiment of the present application; Figure 17 An exemplary block diagram of an advertisement image generation apparatus provided by an embodiment of the present application; Figure 18 An exemplary block diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In the embodiments of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices. In the description of the present application, "a plurality of" means two or more than two, unless otherwise specified.
[0033] The advertisement image generation method, device, equipment and storage medium method provided by the embodiments of the present application can be applied to various fields such as advertising and question and answer applications, can improve the generation efficiency of the advertisement image of the question and answer application, reduce the generation cost of the advertisement image of the question and answer application, and can improve the click rate of the advertisement image, thereby improving the use rate of the question and answer application.
[0034] In order to facilitate understanding of the embodiments of the present application, first, the related concepts involved in the embodiments of the present application are introduced: AI integration (Artificial Intelligence Integration): refers to the organic integration and collaborative application of multiple artificial intelligence technologies in a specific system to fully leverage the advantages of different artificial intelligence technologies and improve the intelligent level and comprehensive performance of the system in data processing, analysis, decision-making, content generation, etc. In the embodiments of the present application, AI integration is reflected in the use of a target detection artificial intelligence model to accurately position the question and answer box in the image, and the use of an advanced artificial intelligence language model to realize intelligent content generation (questions and answers), through the collaborative work of the two, to provide core technical support for the full automatic generation of the advertisement image of the question and answer APP.
[0035] Advertisement image of question and answer APP: is a specially designed and used image for the advertisement launching activities of the question and answer APP. Such images usually carry rich advertising information, such as the characteristics, advantages, promotion activities, etc. of products or services, and generally contain the specific element of a question and answer box (i.e. a question box and an answer box). The question and answer box is used to display common questions and answers related to the advertisement, which helps users better understand the advertisement content and enhances the users' trust in the advertisement, thereby improving the marketing effect of the advertisement.
[0036] OCR technology (Optical Character Recognition Technology): It can convert the text information in the image into computer editable text information. In the embodiments of the present application, OCR technology is used for secondary verification of the content in the question and answer box. By recognizing and extracting the text in the question and answer box, the number and content of the text are analyzed to ensure the accuracy and integrity of the content in the question and answer box, providing a reliable data basis for subsequent image processing and content generation.
[0037] Prompt engineering (Prompt Engineering): It is a new technology field focusing on designing and optimizing input prompt information. Its core is to carefully design and optimize the prompt content input to the artificial intelligence model to accurately guide the artificial intelligence model to generate high-quality output content that meets specific needs and expectations. In the embodiments of the present application, Prompt engineering is used to obtain a large number of questions related to hot topics and targeted from the artificial intelligence model, and through reasonable design of prompt information, the model is stimulated to generate valuable questions to support the richness of advertising content.
[0038] Markdown (Markdown): A lightweight markup language based on simple, easy-to-read and easy-to-write plain text format, allowing users to use simple markup symbols to format text, such as setting titles, lists, emphasis, etc. In the embodiments of the present application, Markdown format is used to store the questions and answer scripts obtained from the artificial intelligence model, because of its good readability and scalability, it is convenient for subsequent format conversion and processing, and can easily convert text content into various other formats such as HTML.
[0039] HTML (Hyper Text Markup Language, Hyper Text Markup Language): As a standard markup language for creating web pages, HTML describes the structure and content of web pages through a series of tags and elements, and can define the display method and layout structure of various web page elements such as text, images, links, tables, etc. In the embodiments of the present application, HTML is used to carry the questions and answer content obtained from the artificial intelligence model, providing a suitable carrier for converting these contents into images. By organizing and presenting text information in HTML format, it is convenient for further style design and format conversion.
[0040] CSS (Cascading Style Sheets): A style sheet language used to describe the appearance of HTML documents, it can accurately control the appearance and layout of HTML elements, including font, color, size, spacing, alignment and other aspects. In the embodiments of the present application, CSS plays a key role, by modifying CSS according to the size of the question and answer box, it can ensure that the generated question and answer picture perfectly matches the original question and answer box in style and layout, realizes the fine control and adjustment of image style.
[0041] Currently, in the field of generating advertisement images of question and answer APP, the common method is to rely on manual production of advertisement images, the staff needs to manually collect the original advertisement images of question and answer APP, and then use professional image editing software (such as Adobe Photoshop, etc.) to manually add question and answer boxes on the images. Then, through manual thinking and writing of questions and answers related to the advertisement, finally manually typesetting the written content into the question and answer box, and adjusting the overall style and layout of the image, finally forming a new advertisement image. However, this method needs to invest a lot of manpower and time, from image collection, editing to content writing and typesetting, each link needs manual operation, the production process is complicated and time-consuming, and it cannot meet the urgent demand of large-scale advertisement for the number and updating speed of images. In addition, the manual writing of questions and answers is limited by personal knowledge reserve, thinking limitation and creative level, resulting in that the advertisement content often lacks novelty and attraction, it is difficult to effectively stimulate the clicking interest of the target group, resulting in the technical problem of low conversion rate.
[0042] To address the aforementioned technical problems, this application proposes an advertising image generation method. This method involves acquiring first information and an original advertising image for a question-and-answer application. The first information includes the name of a target trending topic, and the original advertising image includes a question box and an answer box. Next, based on the first information, N questions are generated, where N is a positive integer. For each of the N questions, a reasoning solution is performed, generating the answer content for each question. Then, based on the generated N questions and the generated answer content for each question, the content of the question box and answer box in the original advertising image is modified to generate N new advertising images for the question-and-answer application. Therefore, the advertising image generation method provided by this application, through a fully automated process, can generate N diverse advertising images for question-and-answer applications in batches, achieving large-scale production of advertising images, reducing the labor costs of advertising image production, improving the generation efficiency of advertising images for question-and-answer applications, and meeting the demand for large amounts of materials for multi-channel distribution. Furthermore, this embodiment generates N questions based on the first information, which includes the name of a target trending topic. This makes the questions and answers in the generated N new advertising images more relevant to current trending topics, significantly improving the attractiveness and click-through rate of the advertising images and thus increasing the usage rate of the Q&A app. In addition, the answers to each question in this embodiment are generated through reasoning and solution, rather than being arbitrarily fabricated. This ensures the logical authenticity and credibility of the Q&A content presented in the advertising images, mimicking high-quality interactions in a real community, thereby enhancing the persuasiveness of the advertising images, improving the professional image of the Q&A app, and further increasing its usage rate. Simultaneously, this embodiment modifies the content within the question and answer boxes of the fixed original advertising images. This ensures the uniformity of the advertising images in terms of visual elements (such as logo, font, and color scheme) while achieving dynamic and flexible changes in the core information (question and answer content), balancing the standardization and content innovation of the Q&A app's advertising images.
[0043] The implementation environment of the embodiments of this application is described below.
[0044] Figure 1 This is a schematic diagram of an implementation environment of an embodiment of this application, such as... Figure 1 As shown, the implementation environment includes: a first terminal device 101, a server 102, an advertising platform 103, and a second terminal device 104.
[0045] The first terminal device 101 is connected to the server 102 via wired or wireless means. The first terminal device 101 can be understood as the terminal device of the advertising creator. The first terminal device 101 and the server 102 constitute an advertising image generation system. In this embodiment, the client of the advertising image generation system is installed on the first terminal device 101. When the first terminal device 101 runs the client, the user interface of the client is displayed on the screen of the first terminal device 101. The server 102 can be understood as the server-side or backend of the advertising image generation system. The advertising creator (e.g., a user) can interact with the client of the advertising image generation system installed on the first terminal device 101.
[0046] The first terminal device 101 is connected to the advertising platform 103 via wired or wireless means. The advertising platform 103 can receive advertising images sent by the first terminal device 101 and send the advertising images to the second terminal device 104.
[0047] The second terminal device 104 is connected to the advertising platform 103 via wired or wireless means. The second terminal device 104 can be understood as a user-side terminal device; there can be multiple second terminal devices 104, each corresponding to a different user. The second terminal device 102 can receive advertising images sent by the advertising platform and render these images on the website / App page opened on the second terminal device 104.
[0048] In some embodiments, the advertising image generation method of this application is performed by server 102. For example, the advertising producer inputs first information and the original advertising image of the question-and-answer application into a client on a first terminal device 101. The first terminal device 101 sends the first information and the original advertising image to server 102. Based on the first information, server 102 generates N questions, where N is a positive integer. For each of the N questions, it performs reasoning to generate the answer content for each question. For example, server 102 calls the question-and-answer model included in the question-and-answer application to perform reasoning to generate the answer content for each question. Then, based on the generated N questions and the generated answer content for each question, the content of the question boxes and answer boxes in the original advertising image is modified to generate N new advertising images for the question-and-answer application.
[0049] In some embodiments, such as Figure 1As shown, server 102 sends N new advertising images to first terminal device 101. First terminal device 101 then sends these N new advertising images to advertising platform 103. When advertising platform 103 detects that a user has opened a website / App page on second terminal device 104, it sends the new advertising images to second terminal device 104. Second terminal device 104 renders the new advertising images in the advertising slots on the page, completing the advertising delivery.
[0050] Therefore, the advertising image generation method provided in this application embodiment, through a fully automated process, can generate N diverse advertising images for the Q&A application in batches, realizing the large-scale production of advertising images, reducing the labor cost of advertising image production, improving the generation efficiency of advertising images for the Q&A application, and meeting the demand for a large amount of materials for multi-channel placement. Furthermore, based on the first information input by the advertising producer, this application embodiment generates N questions, where the first information includes the name of a target hot topic. This makes the questions and answers in the generated N new advertising images more closely related to current hot topics, significantly improving the attractiveness and click-through rate of the advertising images, thereby increasing the usage rate of the Q&A application. In addition, the answer content for each question in this application embodiment is generated through reasoning and solution to the question, rather than being arbitrarily fabricated. This ensures that the Q&A content presented in the advertising images has logical authenticity and credibility, mimicking high-quality interaction in a real community, thereby enhancing the persuasiveness of the advertising images, improving the professional image of the Q&A application, and further increasing the usage rate of the Q&A application. Meanwhile, the embodiments of this application modify the content in the question box and answer box contained in the fixed original advertising image. This not only ensures the uniformity of the advertising image of the question and answer application in visual elements (such as logo, font, color scheme), but also realizes the dynamic and flexible change of core information (question and answer content), perfectly balancing the standardization of the advertising image of the question and answer application and content innovation.
[0051] In some embodiments, the advertising image generation method of this application can be performed by the first terminal device 101 described above.
[0052] In some embodiments, the advertising image generation method of this application can be jointly performed by the first terminal device 101 and the server 102.
[0053] In some embodiments, the first terminal device 101 and the second terminal device 104 described above include, but are not limited to, desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices may include smartwatches, smart bracelets, head-mounted devices, etc. Terminal devices are often equipped with a display device, which may also be a monitor, display screen, touchscreen, etc., and the touchscreen may also be a touch screen, touch panel, etc.
[0054] In some embodiments, the server 102 or advertising platform 103 may be one or more servers. When there are multiple servers, at least two servers may be used to provide different services, and / or at least two servers may be used to provide the same service, such as providing the same service in a load-balanced manner. This application embodiment does not limit this. The servers may be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Servers may also become nodes in a blockchain.
[0055] It should be noted that the implementation environment of this application embodiment includes, but is not limited to, Figure 1 As shown.
[0056] The technical solutions of the embodiments of this application will be described in detail below through some examples. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0057] Figure 2 This is a schematic flowchart illustrating an advertising image generation method according to an embodiment of this application. The method of this embodiment can be performed by an apparatus for generating advertising images, such as an advertising image generation device. This advertising image generation device can be... Figure 1 The server 102 shown may be either the first terminal device 101 or a system consisting of the first terminal device 101 and the server 102. For ease of description, this example uses a computing device as the executing entity.
[0058] like Figure 2 As shown, the advertising image generation method of this application embodiment includes: S101. Obtain first information, as well as the original advertising image for the Q&A application.
[0059] The first piece of information includes the name of the target trending topic, and the original ad image includes a question box and an answer box.
[0060] It should be noted that the data used in executing the embodiments of this application and the process of obtaining this data comply with the relevant laws and regulations.
[0061] The advertising image generation method provided in this application is mainly used to generate advertising images for various types of Q&A applications. In the subsequent advertising campaign, the generated advertising images can be placed on various media platforms such as web pages to attract users to learn about the Q&A application through the advertising image, or to use the Q&A application by clicking on the advertising image, thereby increasing the promotion and use of the Q&A application.
[0062] As described above, the current Q&A application's ad image generation relies heavily on manual design, which is inefficient and fails to effectively stimulate the target audience's click interest, resulting in low conversion rates.
[0063] To address this technical problem, this application proposes a novel method for generating advertising images. Through a fully automated process, it can generate N diverse advertising images for a question-and-answer application in batches, achieving large-scale production of advertising images, reducing labor costs, and improving the generation efficiency of advertising images for the question-and-answer application. This method can meet the demand for large amounts of materials for multi-channel deployments. Furthermore, to improve the click-through rate of the generated advertising images, this application also obtains first information, which includes the name of a target trending topic. This makes the questions and answers in the generated N new advertising images more relevant to current trending topics, significantly increasing the attractiveness and click-through rate of the advertising images, thereby improving the usage rate of the question-and-answer application.
[0064] The specific method by which the computing device obtains the first information and the original advertising image of the query and response application is not limited in the embodiments of this application.
[0065] In one possible implementation, the aforementioned computing device is a terminal device. For example, the terminal device can display a figure as shown below. Figure 3 The information input interface shown includes an information input box, an advertising image input box, and a confirmation option. The advertising creator can input first information in the information input box, which includes at least the name of the target trending topic. Simultaneously, the advertising creator can input the original advertising image for the query / answer application in the advertising image input box. Then, the advertising creator triggers the confirmation option. In response to the advertising creator's triggering of the confirmation option, the terminal device acquires the first information and the original advertising image input by the advertising creator, and based on the first information and the original advertising image input by the advertising creator, executes the method of this embodiment to generate N new advertising images for the query / answer application.
[0066] In one possible implementation, the computing device described above is a server. For example, the terminal device can display a diagram as shown below. Figure 3 The information input interface is shown. The advertiser enters first information in the information input box and the original advertising image for the query / answer application in the advertising image input box. Then, the advertiser triggers the confirmation option. In response to the advertiser's confirmation, the terminal device sends the first information and the original advertising image entered by the advertiser to the server. The server can then obtain the first information entered by the advertiser and the original advertising image for the query / answer application from the terminal device, and based on these two information, execute the method of this embodiment to generate N new advertising images for the query / answer application.
[0067] This application embodiment allows the advertising producer to input... Figure 3 There are no restrictions on how you enter the name of the target trending topic in the information input box shown.
[0068] In one example, the advertiser queries trending information on the current media platform, determines the target trending topic name, and then directly enters the target trending topic name into the information input box, such as entering "artificial intelligence" as the target trending topic.
[0069] In one example, such as Figure 4 As shown, when an advertiser enters a target trending topic name, the terminal device displays a list of trending topic names. This list includes trending topic names that occurred within the current time period (e.g., the past week, month, year, or years). For example, this list includes names of trending topics such as real-time crawled hot search lists, news events, and social media discussion trends. Advertisers can... Figure 4 Select one or more trending topic names from the list shown. In response to the advertiser's selection, the terminal device enters the selected trending topic name into the information input box, thus completing the input of the target trending topic name.
[0070] This application does not limit the specific type of the question-and-answer application described above; it can be any question-and-answer application that needs to generate advertising images. That is, the question-and-answer application in this application can be any kind of question-and-answer application that answers a user's input question and generates the response content for that question (also known as a question-and-answer application or question-and-answer APP).
[0071] In some embodiments, the first information input by the advertising creator may include, in addition to the name of the target trending topic, other information required to generate the question.
[0072] In this application embodiment, the original advertising image for the Q&A application can be an advertising image pre-designed by the advertising producer for the Q&A application. For example... Figure 5 As shown, the original advertisement image includes a question box and an answer box. In one example, the question and answer boxes displayed in the advertisement image are styled the same as those displayed when answering a question using the question-and-answer function.
[0073] This application embodiment does not require the accuracy and attractiveness of the content displayed in the question box and response box of the original advertising image. That is to say, the questions included in the question box of the original advertising image can be arbitrarily written by the advertising producer, and the response content included in the response box of the original advertising image can be arbitrarily written by the advertising producer, or it can be the response content generated by the advertising producer through reasoning and answering the questions in the original advertising image using the question and answer function.
[0074] In one embodiment, such as Figure 5 As shown, the original advertising image of the Q&A application may include not only the question box and answer box, but also other advertising elements such as the application's logo, a brief description of its features, and promotional terminology. For example, such as... Figure 5 As shown, it also includes information such as the number of cited documents (e.g., the number of web pages and WeChat articles cited) and the time spent thinking.
[0075] In this embodiment of the application, after the computing device obtains the first information and the original advertising image of the query and response application through the above steps, it executes the following step S102.
[0076] S102. Based on the first information, generate N questions.
[0077] Where N is a positive integer.
[0078] Existing question-and-answer (Q&A) ad image generation methods rely on manual thinking and writing to generate questions. This approach not only requires a significant investment of manpower and time, but also suffers from limitations in individual knowledge, thinking, and creativity, resulting in a lack of novelty and appeal in the generated questions. Consequently, the generated ad images fail to effectively stimulate the target audience's click interest, leading to low conversion rates.
[0079] To address this technical problem, this application embodiment generates N questions based on first information, which includes at least the name of a target trending topic. This ensures that the generated N questions closely capture current public attention, enhancing the timeliness and attractiveness of the advertising images generated based on these questions. Consequently, the generation effect of the questions is improved while reducing the manual and time costs of question generation.
[0080] This application does not limit the specific method by which the computing device generates N questions based on the first information.
[0081] In some embodiments, the computing device inputs the first information as a prompt word into a question generation model to generate N questions that conform to the first information. Optionally, the question generation model can be a question-and-answer model included in the above-described question-and-answer application. In this case, the first information can be understood as the input question, and the N generated questions can be understood as the response content of the question generated by the question-and-answer model.
[0082] In some embodiments, S102 above includes the following steps S102-A and S102-B: S102-A. Based on the first information, generate question prompt words. The question prompt words are used to guide the question generation model to generate questions that meet specific requirements. S102-B: Analyze and understand the question prompts using a question generation model to generate N questions.
[0083] In this implementation, after obtaining the first information based on the above steps, the computing device first generates question prompts based on the first information. These question prompts can be understood as prompts that guide the question-answering model to generate N questions. These prompts can include a set of instructions, blueprints, and contextual information, which are used to guide the question generation model to generate questions that meet specific requirements.
[0084] In this embodiment of the application, the computing device generates the question prompt based on the first information in at least the following ways: Method 1: The computing device parses the first information to obtain the name of the target trending topic carried in the first information. Then, the target trending topic name is determined as the question prompt word. For example, the target trending topic name is determined as the question prompt word. Another example is that the target trending topic name is filled into the corresponding field to be filled in the question prompt word template to generate the question prompt word.
[0085] Method 2: The computing device generates the problem prompt words through the following steps S102-A1 and S102-A2: S102-A1. Based on the first information, determine the description information of the target group for the question and answer application; S102-A2: Generate question prompts based on the target hot topic name and the description information of the target group.
[0086] In this embodiment of the application, in order to further enhance the attractiveness and click-through rate of the advertising images of the generated question-and-answer application, the descriptive information of the target group of the question-and-answer application is also considered when generating questions, so as to ensure that the N generated questions are highly matched with the target group in terms of interest and knowledge, thereby further improving the question generation effect.
[0087] This application embodiment does not limit the specific content of the description information of the target group of the question and answer application included in the first information. Since different question and answer applications may correspond to different target groups, the description information of the target group included in the first information may be different for different question and answer applications in this application embodiment.
[0088] In one example, the descriptive information of the target group for the question and answer application may include at least one of the following: the target group's age group, interest tags, content consumption preferences (such as Generation Z's preference for entertainment-oriented expression), etc.
[0089] In this embodiment of the application, the computing device can obtain description information of the target group for the query-answering application at least through the methods shown in Case 1 and Case 2: Scenario 1: If the first information includes a description of the target group for the Q&A application, then the first information is parsed to obtain the description of the target group for the Q&A application. Optionally, the description of the target group for the Q&A application is input by the advertising creator.
[0090] This application does not limit the specific method by which the advertising producer inputs the description information of the target group for the Q&A application.
[0091] In one example, such as Figure 6 As shown, the information input interface in this embodiment includes a target group information input sub-box and a trending topic name input sub-box. The advertiser can enter a description of the target group for the question-and-answer application in the target group information input sub-box. The advertiser can enter the name of the target trending topic in the trending topic name input sub-box.
[0092] Scenario 2: If the first information does not include the description information of the target group of the Q&A application, the computing device obtains the functional information of the Q&A application and determines the description information of the target group of the Q&A application based on the functional information of the Q&A application and the name of the target hot topic.
[0093] In scenario 2, if the first information does not include the description information of the target group of the Q&A application, the computing device can determine the relevant characteristics of the target group of the Q&A application based on the functional information of the Q&A application and the target hot topic name input by the advertising producer, and then determine the description information of the target group based on the relevant characteristics of the target group.
[0094] For example, the function information of a Q&A app is to provide medical knowledge, healthy eating advice, and self-checks for disease symptoms. The target trending topic entered by the ad creator is "Mediterranean diet." At this point, the computing device can determine that the target group consists of health-conscious adults based on the Q&A app's function information and the target trending topic. Furthermore, it can determine that the target group's age range is 25-45 years old, their interest tags are health and wellness, fitness, food preparation, and quality of life, and their content consumption preferences are trust in scientific evidence, preference for informative content with images and text, and willingness to try new lifestyles.
[0095] In this second method, after the computing device determines the description information of the target group for the question and answer application based on the above steps, it executes step S102-A2 to generate question prompt words based on the target hot topic name and the description information of the target group.
[0096] This application embodiment does not limit the specific method by which the computing device generates question prompts based on the target hot topic name and the description information of the target group.
[0097] In some embodiments, the computing device determines the target hot topic name and the description information of the target group as question prompt words.
[0098] In some embodiments, S102-A2 includes the following steps S102-A21 and S102-A22: S102-A21. Determine the structured template for question prompts; S102-A22. Based on the target hot topic name and the description information of the target group, fill in the information in the hot topic name and target group fields in the structured template to generate question prompt words.
[0099] In this implementation, this application embodiment also provides a structured template for the question prompt, which includes multiple fields to be filled in for generating the question prompt, such as a field for the name of a trending topic and a field for the target group. Thus, the computing device obtains the name of the target trending topic and the description information of the target group, and can fill these fields into the corresponding fields in the structured template to generate the question prompt. For example, the name of the target trending topic is filled into the field for the name of the trending topic in the structured template, and the description information of the target group is filled into the field for the target group to be filled, thus generating the question prompt.
[0100] This application does not impose any restrictions on the specific structure of the structured template for question prompts.
[0101] In some embodiments, the structured template may further include at least one of the following fields to be filled: question type, expected outcome of the question, number of words in the question, question output format, and number of questions.
[0102] The question type specifies the intended use of the generated question (e.g., social media interaction, Q&A community, UGC content creation). For example, the question type may include at least one of the following: opinion discussion, knowledge dissemination, or debate. The expected effect of the question includes high levels of discussion and widespread dissemination.
[0103] At this point, when the computing device generates question prompts based on the target hot topic name and the description information of the target group, in addition to filling in the fields to be filled for the hot topic name and the target group in the structured template, it also needs to determine at least one of the following: question type, expected effect of the question, number of characters included in the question, question output format, and number of questions. Then, at least one of the determined question type, expected effect of the question, number of characters included in the question, question output format, and number of questions is filled into the corresponding fields to be filled to generate question prompts.
[0104] In one example, if the initial information does not include the question type, expected outcome, word count, output format, and number of questions, the computing device can use default values to fill in these fields. For instance, the default question types are opinion discussion, popular science, and debate to generate various question types. The default expected outcome is high discussion and high dissemination to generate more engaging questions. The default word count is no more than 20 words to generate short and easy-to-read questions. The default output format is number + question. The default number of questions is 10 or 20, etc.
[0105] In one example, if the first information includes at least one of the following field values: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. Optionally, these field values are input by the advertising creator. In this case, the computing device parses the first information to obtain the field value of at least one of the following: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. Then, based on the target hot topic name and the description information of the target group, as well as the field value of at least one of the following, it fills in the corresponding fields to be filled in the structured template to generate question prompts. For example, if the field value of the question type is "knowledge popularization" and "debate," then the computing device fills in "knowledge popularization" and "debate" in the question type field to be filled in the structured template. As another example, if the field value of the expected effect of the question is "high discussion level," then the computing device fills in "high discussion level" in the expected effect field to be filled in the structured template. For example, if the field value for the number of characters in the question is no more than 15 characters, then the computing device should enter 15 in the "Number of Characters in Question" field of the structured template. Another example: if the field value for the question output format is "Sequence Number + Question + Expected Effect Tag," then the computing device should enter "Sequence Number + Question + Expected Effect Tag" in the "Question Output Format" field of the structured template. Yet another example: if the field value for the number of questions is 10, then enter 10 in the "Number of Questions" field of the structured template.
[0106] For example, the structured template of the problem prompt words in this application embodiment is shown below: [Character Setting] You are a seasoned social media operations expert, skilled at designing highly interactive questions that incorporate trending topics.
[0107] [Task Background] The current trending topic is [{Target Topic Name}], the target audience is [{Description Information}], and 10 questions need to be generated. Requirements: Expected Outcome: High Public Discussion / High Spreadability Question Type: [Discussion of Opinions / Popular Science / Controversial Debate] Problem output format: Number + Problem + Expected Result Tag [Constraints] Number of questions [e.g., each question should not exceed 20 characters] Avoid sensitive words Use colloquial expressions (such as "What do you think of XXX?").
[0108] Assuming the target topic name in the first information is "Application of Artificial Intelligence in the Medical Field," the target audience description is (age range: 20-30 years old, interest tags: technology, content consumption preferences: entertainment-oriented expression), the expected effect of the input questions is "high discussion level," the question type is "opinion discussion," "knowledge popularization," and "debate," the number of characters in the input questions is "no more than 15 characters," the output format of the input questions is "number + question + expected effect tag," and the number of input questions is "10." The computing device then parses the first information to obtain the target hot topic name, the target audience description, the question type, the expected effect of the question, the number of characters in the question, the output format of the question, and the number of questions. This information is then filled into the structured template of the question prompt words shown above, resulting in the following question prompt words: [Character Setting] You are a seasoned social media operations expert, skilled at designing highly interactive questions that incorporate trending topics.
[0109] [Task Background] The current trending topic is "Application of Artificial Intelligence in the Medical Field," targeting an audience of "age group: 20-30 years old, interest tags: technology, content consumption preferences: entertainment-oriented expression." Ten questions need to be generated, with the following requirements: Expected Outcome of the Question: [High Level of Discussion] Question Types: [Discussion of Opinions, Popular Science, Debate] Problem output format: Number + Problem + Expected Result Tag [Constraints] Number of questions [Each question should not exceed 15 characters] Avoid sensitive words Use colloquial expressions (such as "What do you think of XXX?").
[0110] In some embodiments, the advertising images of this application have at least the following core objectives: topic relevance, target group needs, and content value. Topic relevance means that the generated questions must closely revolve around popular events or trends (such as social hotspots, entertainment hotspots, technological breakthroughs, etc.). Target group needs can be understood as satisfying the target group's needs for information acquisition, opinion expression, or interactive participation. Content value can be understood as providing highly shareable discussion points to stimulate user participation. Therefore, in this application embodiment, the core objectives of the advertising image can also be considered when generating question prompts, so that questions generated based on the question prompts can be more relevant.
[0111] In this embodiment of the application, after generating question prompt words based on the above steps, the computing device executes the above steps S102-B, analyzes and understands the question prompt words through the question generation model, and generates N questions.
[0112] As described above, this application embodiment generates question prompts based on at least one of the following: the target trending topic, the description of the target group for the question-and-answer application, the question type, the expected effect of the question, the number of characters included in the question, the question output format, and the number of questions. In other words, this application embodiment considers the characteristics of trending topics, the features and needs of the target group, and the core objectives of the advertising image when generating question prompts. This ensures that the generated question prompts accurately stimulate the language generation capabilities of the question generation model, guiding it to generate targeted questions closely related to the target trending topic, thereby enhancing the attractiveness and value of the generated questions.
[0113] This application does not limit the specific network structure of the question generation model, as long as it can analyze and understand the question prompts and generate N questions. In one example, the question generation model can be a question-and-answer model included in the above question-and-answer application, that is, the question-and-answer model can answer the input question and generate corresponding response content. In this case, the question prompts can be understood as the questions input to the question-and-answer model, and the N questions are the response content generated by the question-and-answer model in response to the question prompts.
[0114] In this embodiment of the application, the computing device analyzes and understands the question prompts through a question generation model, and there is no limitation on the specific method of generating N questions.
[0115] In some embodiments, such as Figure 7 As shown, the computing device inputs the generated question prompts into the question generation model, which analyzes and understands the question prompts to generate N questions.
[0116] In some embodiments, to further enhance the attractiveness of the generated question, S102-B above includes the following steps S102-B1 and S102-B2: S102-B1. Obtain the question knowledge base, which includes common questions and professional knowledge corresponding to different hot topics; S102-B2: Using a question generation model, analyze and understand the question prompts based on a question knowledge base to generate N questions.
[0117] In this embodiment of the application, in order to improve the accuracy and attractiveness of the generated questions, the computing device also acquires a question knowledge base when it analyzes and understands the question prompts through the question generation model and generates N questions.
[0118] This application does not limit the specific method by which the computing device obtains the problem knowledge base.
[0119] In one possible implementation, the aforementioned question knowledge base is input by the advertising producer. For example, when inputting the first information, the advertising producer can also input the question knowledge base.
[0120] In one possible implementation, the aforementioned problem knowledge base is maintained in real time by a computing device. For example, the computing device periodically retrieves trending topic names, along with related professional knowledge and frequently asked questions (FAQs) for each trending topic from the network. Using these retrieved trending topic names, related professional knowledge, and FQs, the computing device updates the problem knowledge base in real time, ensuring that the base constantly stores the latest trending topics for the current time period, as well as the corresponding FQs and professional knowledge for these latest trending topics.
[0121] Next, as Figure 8 As shown, the computing device inputs the question prompts and the question knowledge base into the question generation model. Based on the question knowledge base, the question generation model accurately analyzes and understands the question prompts to generate N questions.
[0122] Because the question knowledge base in this embodiment includes common questions and professional knowledge corresponding to different hot topics, the computing device, through a question generation model, analyzes and understands question prompts based on this knowledge base. When generating N questions, it can generate targeted questions that satisfy the target hot topic. For example, the professional knowledge corresponding to different hot topics included in the question knowledge base can provide background knowledge for the question generation model, helping the model understand the background of the target hot topic and thus generate more accurate and relevant questions. Furthermore, the common questions corresponding to different hot topics included in the question knowledge base can serve as reference question templates, allowing the question generation model to draw upon the structure and expression of these templates to generate compliant questions.
[0123] In this embodiment of the application, after the computing device generates N questions based on the above steps, it executes the following step S103.
[0124] S103. For each of the N questions, reason and solve the problem, and generate the response content for each question.
[0125] In this embodiment of the application, after the computing device generates N questions based on the above steps, for each of the N questions, the computing device performs reasoning to solve each question and generates the response content for each question.
[0126] In some embodiments, for each of the N questions, such as the i-th question, the computing device inputs the i-th question into the question-answering model, which then performs reasoning to answer the i-th question and generates the response content for the i-th question.
[0127] This application does not limit the specific type of the question-answering model; for example, it can be any language model with question-answering capabilities. In one example, to improve the matching between the response content included in the subsequently generated advertising image and the question-answering application, the question-answering model can be the question-answering model included in the response application. That is, for each of the N questions, the computing device inputs the question into the question-answering application, and the question-answering application calls its own included question-answering model to reason and answer the question, generating the response content for that question.
[0128] In some embodiments, since the above N questions are generated based on the names of target hot topics, in order to improve the accuracy of the answers to these N questions, the computing device obtains a question knowledge base when answering these N questions. This question knowledge base includes professional knowledge corresponding to different hot topics. Thus... Figure 9 As shown, when the computing device answers each of these N questions, it calls the question-answering model, which infers and answers the question based on the knowledge base of that question. The resulting response not only conforms to current hot topics, but is also more professional and readable, providing valuable information to the target audience and thus enhancing the attractiveness of the response.
[0129] As described above, the answers to each question in this embodiment are generated through reasoning and solution, rather than being arbitrarily fabricated. This ensures that the question-and-answer content presented in the advertising image has logical authenticity and credibility, mimicking high-quality interactions in a real community, thereby enhancing the persuasiveness of the advertising image, improving the professional image of the Q&A app, and further increasing the usage rate of the Q&A app.
[0130] S104. Based on N questions and the answer content for each question, modify the content of the question boxes and answer boxes in the original advertising image to generate N new advertising images with question and answer acceptance.
[0131] In this embodiment, the computing device generates N questions based on first information, including the name of a target trending topic. This makes the generated questions and answers more relevant to current trending topics, significantly enhancing their appeal. Thus, by modifying the content of the question and answer boxes in the original advertising image based on N attractive questions and the answer content for each question, N new advertising images for the Q&A application are generated. This not only improves the appeal and click-through rate of the advertising images but also ensures the consistency of visual elements (such as logo, font, and color scheme) in the Q&A application's advertising images, balancing the standardization of the Q&A application's advertising images with content innovation.
[0132] The following describes the specific process by which a computing device modifies the content of the question boxes and answer boxes in the original advertising image based on N questions and the answer content of each question, and generates N new advertising images with question-answering functionality.
[0133] In this embodiment, the N new advertising images are the new advertising images corresponding to the N questions. That is, in this embodiment, for each of the N questions, the computing device can generate a new advertising image corresponding to that question based on the question and its response. Thus, N new advertising images can be generated for the N questions. The specific process of the computing device generating a new advertising image corresponding to each question is basically the same. For ease of description, we will take determining the new advertising image corresponding to the i-th question out of the N questions as an example.
[0134] This application embodiment does not limit the specific method by which the computing device modifies the content of the question box and the response box in the original advertising image based on the i-th question and the response content of the i-th question, and generates a new advertising image corresponding to the question.
[0135] In some embodiments, the computing device can perform text recognition on the original advertising image, identify the original question in the question box and the original response content in the application box, and then replace the original question in the question box with the i-th question, and replace the original response content in the response box with the response content of the i-th question. Finally, the text-replaced advertising image is converted into an image format to generate a new advertising image corresponding to the i-th question.
[0136] In some embodiments, S104 above includes the following steps S104-A and S104-B: S104-A: Detect the question and response boxes in the original advertisement image and obtain their coordinate information; S104-B. For the i-th question among N questions, based on the coordinate information of the question box and the answer box, as well as the content of the i-th question and the answer to the i-th question, modify the content of the question box and the answer box in the original advertisement image to obtain a new advertisement image corresponding to the i-th question, where i is a positive integer from 1 to N.
[0137] In this implementation, before modifying the content of the question boxes and answer boxes in the original advertisement image based on N questions and the answer content of each question, and generating N new advertisement images with question-and-answer compliance, the computing device first detects the question boxes and answer boxes in the original advertisement image to obtain their coordinate information. For example, the coordinate information of the question boxes and answer boxes can be the coordinate values of the four vertices of the question boxes and answer boxes.
[0138] This application embodiment does not limit the specific method by which the computing device detects the question and response boxes in the original advertising image and obtains the coordinate information of the question and response boxes.
[0139] In some embodiments, the computing device may use an existing object detection model to detect objects in the original advertising image, thereby detecting the coordinate information of the question box and the coordinate information of the response box included in the original advertising image.
[0140] In some embodiments, the computing device detects question and response boxes in the original advertising image using a text box detection model. For example... Figure 10 As shown, the text box detection model includes a feature extraction module and a text box detection module. In this case, S104-A above may include the following steps S104-A1 to S104-A3: S104-A1: The feature extraction module in the text box detection model is used to extract features from the original advertising image to obtain the feature information of the original advertising image. S104-A2: Using the text box detection module in the text box detection model, the bounding box of the feature information is detected to obtain the predicted value of the bounding box coordinates of each grid point in the feature information. S104-A3: Based on the predicted bounding box coordinates of each grid point, obtain the coordinate information of the question box and the response box.
[0141] In this implementation, the computing device uses a text box detection model specifically designed for detecting text boxes to detect question and response boxes in the original advertising image. This avoids detecting non-text boxes in the original advertising image, thereby improving the accuracy and efficiency of question and response box detection.
[0142] like Figure 10As shown, the text box detection model includes a feature extraction module and a text box detection module. The feature extraction module is used to extract feature information from the image, and the text box detection module can identify text boxes in the image based on the feature information. Based on this, the computing device inputs the original advertising image of the query application into the feature extraction module of the text box detection model. The feature extraction module performs feature extraction on the original advertising image to obtain its feature information.
[0143] This application does not impose any restrictions on the specific network structure of the feature extraction module.
[0144] In one possible implementation, the feature extraction module includes a backbone network and a fusion network. The computing device can extract feature information at multiple scales from the original advertising image through the backbone network. The fusion network can perform feature fusion on the feature information at multiple scales of the original advertising image. For example, the fusion network can upsample (e.g., through convolution processing using an upsampling convolutional layer) or downsample (e.g., through convolution processing using a downsampling convolutional layer) the feature information at multiple scales to obtain multiple feature information at the same scale. Then, the multiple feature information at the same scale are added together, etc., to obtain the feature information of the original advertising image.
[0145] Next, the computing device inputs the feature information of the original advertisement image output by the feature extraction module into the text box detection module, thereby obtaining the predicted value of the bounding box coordinates of each grid point in the feature information. In this embodiment, the feature information can be understood as a matrix, and each element point in the feature information can be defined as a grid point. In this embodiment, the text box detection module predicts the bounding box coordinates of each grid point (i.e., element point or feature value) in the feature information of the original advertisement image, and records this as the predicted value of the bounding box coordinates of that grid point.
[0146] This application does not limit the specific mesh structure of the text box detection module in its embodiments. In one example, the text box detection module includes a first convolutional layer, a DFL layer, and a decoder. The first convolutional layer is typically a 1x1 convolution, and its main function is to transform the number of channels of the feature information of the original advertisement image to 4 * reg_max. Thus, assuming the dimension of the feature information of the original advertisement image is (c, H, W), the output dimension of the first convolutional layer is (4 * reg_max, H, W). This can be understood as predicting a bounding box at each (H, W) position of the feature information of the original advertisement image, with four coordinates (x, y, w, h), and each coordinate represented by a reg_max dimensional vector. The DFL layer is used to calculate a specific coordinate value by weighted summation of this discrete distribution. For example, for each grid point in the feature information of the original advertising image, the computing device performs Softmax and dot product operations through the DFL layer, probabilistically fusing the four reg_max dimension vectors of the grid point to obtain the four coordinate values corresponding to the grid point, denoted as (delta_x, delta_y, delta_w, delta_h). Finally, the decoder adds (delta_x, delta_y) to the coordinates of the top-left corner of the current grid point to obtain the absolute center coordinates of the bounding box of the grid point. (delta_w, delta_h) undergoes exponential transformation and other operations, and is multiplied by a preset bounding box size to obtain the absolute width and height of the bounding box of the grid point. Finally, the center coordinates and width and height are converted to (x1, y1, x2, y2) format to obtain the predicted values of the bounding box coordinates of the grid point.
[0147] Following the steps described above, the computing device, through the text box detection module, can detect the predicted bounding box coordinates of each grid point in the original advertising image. Then, based on the predicted bounding box coordinates of each grid point, the coordinate information of the question box and response box included in the original advertising image is obtained. For example, in this embodiment, the text box detection module, in addition to predicting the bounding box coordinates of each grid point, also predicts the confidence level of the bounding box of each grid point. Based on the confidence level of the bounding box of each grid point, low-confidence bounding boxes are filtered out. Finally, the filtered bounding boxes are processed using the non-maximum suppression (NMS) method to eliminate overlapping bounding boxes, ultimately resulting in two bounding boxes. The smaller bounding box is then identified as the question box, and the larger bounding box is identified as the response box.
[0148] In some embodiments, in order to improve the detection accuracy of the text box detection model for question boxes and response boxes in the original advertising image, the embodiments of this application further train the text box detection model so that the text box detection model can accurately detect question boxes and response boxes in various advertising images of different types of question applications.
[0149] The training process of the text box detection model is described below. In this embodiment, the training process of the text box detection model can be completed by the aforementioned computing device or by other electronic devices; this embodiment does not impose any limitations on this. For ease of description, the training process of the text box detection model executed by the aforementioned computing device will be used as an example for illustration.
[0150] In some embodiments, the text box detection model of this application further includes a text style prediction module. In this case, the training process of the text box detection model includes the following steps A to E: Step A: Obtain the training image set, which includes multiple advertising images for the question-and-answer application; Step B: For each training image in the training image set, the feature extraction module is used to extract features from the training image to obtain the feature information of the training image. Step C: Using the text box detection module, perform bounding box detection on the feature information of the training image to obtain the predicted value of the bounding box coordinates of each grid point in the feature information; Step D: Using the text style prediction module, perform text style detection on the feature information of the training image to obtain the predicted value of the text style type of each grid point in the feature information; Step E: Based on the predicted bounding box coordinates and text style type of each grid point, determine the loss value of the text box detection model, and train the text box detection model based on the loss value.
[0151] In this embodiment of the application, in order to enable the trained text box detection model to accurately identify the question-and-answer boxes and response boxes in various advertising images for question-and-answer purposes, the training image set includes multiple advertising images for question-and-answer purposes under different image backgrounds, different lighting conditions, and different question and response box sizes.
[0152] In one example, the training image set described above may also include multiple ad images for each type of question application across different types of question applications.
[0153] For example, the training image set of this application embodiment is shown in Table 1: Table 1
[0154] The advertising images in the training image set shown in Table 1 above are diverse and representative, covering different advertising scenarios, styles, and content. Each advertising image in this training image set is used as a training image to train the text box detection model.
[0155] Specifically, in each training round, the computing device selects a batch of training images from the training image set to train the text box detection model. In each training round, such as the current round, the computing device uses the current batch of training images selected in the current round to train the text box detection model. The processing procedure for each training image is consistent. For ease of description, we will use a single training image as an example.
[0156] For each training image, such as Figure 11 As shown, the computing device inputs the training image into the feature extraction module for feature extraction to obtain the feature information of the training image. Next, the computing device inputs the feature information of the training image into the text box detection module for bounding box detection to obtain the predicted value of the bounding box coordinates of each grid point in the feature information of the training image. The specific implementation method can be referred to the relevant descriptions in S104-A1 and S104-A2 above, and will not be repeated here.
[0157] Because advertisement images contain various types of text besides question-and-answer boxes, they can severely interfere with the model's recognition accuracy. To address this technical problem, such as... Figure 11 As shown, a text style prediction module has been added to the text box detection model. This text style prediction module serves as an important supervisory module, aiming to learn the features that distinguish the text inside the question-and-answer box (i.e., the question box and the answer box) from the external distracting text. This makes the trained text box detection model pay more attention to the core visual features that can identify them as "question-and-answer boxes" rather than "ordinary text regions".
[0158] Specifically, such as Figure 11 As shown in this embodiment, the computing device also inputs the feature information of the training image into the text style prediction module for text style detection, and obtains the predicted value of the text style type of each grid point in the feature information of the training image.
[0159] The embodiments of this application do not limit the specific network structure of the text style prediction module.
[0160] In some embodiments, such as Figure 12 As shown, the text style prediction module includes a feature transformation unit. In this case, step D above uses the text style prediction module to perform text style detection on the feature information of the training image, obtaining the predicted value of the text style type for each grid point in the feature information. This can include the following steps D1 to D3: Step D1: Through the feature transformation unit, the feature information is transformed to obtain the n-dimensional feature of each grid, where n is a positive integer greater than 1; Step D2: Based on the n-dimensional features of each grid, determine the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types; Step D3: Based on the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types, determine the predicted value of the text style type for each grid.
[0161] Specifically, such as Figure 12 As shown, the text style prediction module in this embodiment includes a feature conversion unit, so that the computing device can input the feature information of the training image into the feature conversion unit for feature conversion to obtain the n-dimensional features of each grid in the feature information of the training image, where n can be understood as the number of text style types.
[0162] The embodiments of this application do not limit the specific network structure of the feature conversion unit.
[0163] In one example, the feature transformation unit includes a multilayer perceptron (MLP), which comprises convolutional layers, batch normalization layers, activation layers, average pooling layers, and linear layers. The computing device can then perform feature transformation on the feature information of the training image using the following formula (1) to obtain the n-dimensional features of each grid point in the feature information of the training image: (1) in, To train the feature information of the image, The n-dimensional features of each grid point in the feature information of the training image.
[0164] Next, the computing device determines the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types based on the n-dimensional features of each grid.
[0165] In one possible implementation, the computing device can use a prediction module to predict the n-dimensional features of each grid to obtain the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types.
[0166] In another possible implementation, for the j-th grid in the feature information, the computing device performs an exponential operation on each dimension of the n-dimensional features of the j-th grid, obtaining n operation results for the j-th grid, where j is a positive integer. For each of these n operation results, such as the n-th operation result, the computing device determines the probability value that the text corresponding to the j-th grid in the training image belongs to the n-th text style type as the ratio of the n-th operation result of the j-th grid to the sum of the n operation results of the j-th grid.
[0167] For example, the computing device can determine the probability value of the text corresponding to the j-th grid in the training image belonging to the n-th text style type using the following formula (2): (2) in, It is the probability value that the j-th grid point belongs to the nth text style type out of n text style types. For the nth dimension feature of the j-th grid, Let i be the i-th dimension feature of the j-th grid. For the i-th operation result of the j-th grid, For the nth operation result of the j-th grid, This is the sum of the n operation results for the i-th grid.
[0168] Using the method described above, the computing device can determine the probability value of each grid in the feature information of the training image corresponding to the text in the training image belonging to each of the n text style types.
[0169] In this way, the computing device can determine the predicted text style type of each grid based on the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types. For example, for each grid, the text style type with the highest probability value among the n text style types is determined as the predicted text style type of that grid.
[0170] Then, the computing device determines the loss value of the text box detection model based on the predicted bounding box coordinates and the predicted text style type of each grid point in the feature information of the training image. This embodiment does not limit the specific method by which the computing device determines the loss value of the text box detection model based on the predicted bounding box coordinates and the predicted text style type of each grid point in the feature information of the training image. For example, the computing device can use an existing loss function to determine the loss value of the text box detection model based on the predicted bounding box coordinates and the predicted text style type of each grid point in the feature information of the training image.
[0171] In one possible implementation, the computing device determines the ground truth values for the bounding box coordinates and the text style type of each grid cell. For example, for each grid cell in the feature information of the training image, the computing device determines the corresponding region of that grid cell in the training image, and then determines the ground truth value for the bounding box coordinates of that region as the bounding box coordinates of that grid cell. Simultaneously, the computing device determines the ground truth value for the text style type of that region as the text style type of that grid cell. Next, based on the ground truth and predicted values of the bounding box coordinates for each grid cell, the computing device determines the prediction loss value for the bounding box and the prediction loss value for the text style type based on the ground truth and predicted values of the text style type for each grid cell.
[0172] This application does not limit the specific method by which the computing device determines the prediction loss value of the text style type based on the ground truth value and the predicted value of the text style type for each grid.
[0173] In one example, for each grid cell, the computing device performs a logarithmic operation on the predicted value of the text style type for that grid cell, and then multiplies it by the true value of the text style type for that grid cell to obtain a first product corresponding to that grid cell. Next, the first products corresponding to each grid cell are summed to obtain a first sum value corresponding to the training image, and then, based on the first sum value corresponding to the training image, a prediction loss value for the text style type is determined.
[0174] For example, the computing device can determine the prediction loss value of the text style type using the following formula (3): (3) Where B is the number of training images in the current batch. It is the actual value of the text style type for a certain grid, optionally It can be a one-hot n-dimensional vector. This is the predicted value for the text style type of a given grid. It is the first product corresponding to a certain grid. This is the first sum value corresponding to a certain training image in the current batch of training images.
[0175] In the embodiments of this application, after the computing device determines the predicted loss value of the bounding box and the predicted loss value of the text style type, it determines the loss value of the text box detection model based on the predicted loss value of the bounding box and the predicted loss value of the text style type.
[0176] For example, the sum of the predicted loss value of the bounding box and the predicted loss value of the text style type can be used as the loss value of the text box detection model.
[0177] For example, a first weight is determined for the predicted loss value of the bounding box, and a second weight is determined for the predicted loss value of the text style type. Then, based on the first and second weights, the predicted loss values of the bounding box and the predicted loss values of the text style type are weighted and summed to obtain the loss value of the text box detection model.
[0178] For example, the computing device can determine the loss value of the text box detection model using the following formula (4). : (4) in, It is the first weight. It is the predicted loss value of the bounding box. It is the second weight. This is the predicted loss value for text style type. Optionally, =1, The value is 0.5, with the detection task as the primary driver and the text style type task as the secondary driver.
[0179] In this way, the computing device uses the calculated loss value to adjust the parameters in the text box prediction model, obtaining the text box prediction model after this round of training. Next, the computing device selects a new batch of training images from the training image set and uses these images to process the text box detection model, obtaining the loss value of the text box detection model corresponding to this round of training. Then, the loss value is used to train the text box prediction model after this round of training for a second round. This process is repeated iteratively to obtain the trained text box detection model.
[0180] In some embodiments, when using the trained text box detection model to detect question and response boxes in advertising images, only the feature extraction module and the text box detection module are used, without using the text style prediction module. The specific detection process is described in detail in steps S104-A1 to S104-A3 above, and will not be repeated here.
[0181] In this embodiment of the application, the computing device detects the question box and the response box in the original advertising image through the above steps, obtains the coordinate information of the question box and the response box, and then executes the above steps S104-B. For each of the N questions, such as the i-th question, the computing device modifies the content of the question box and the response box in the original advertising image based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, to obtain a new advertising image corresponding to the i-th question, where i is a positive integer from 1 to N.
[0182] In some embodiments, before the computing device modifies the content of the question and answer boxes in the original advertising image based on the coordinate information of the question and answer boxes, and based on N questions and the content of the answer to each question, to generate N new advertising images with question and answer compliance, it first recognizes the text content included in the answer boxes of the original advertising image to obtain the text content included in the answer boxes. For example, OCR technology is used to recognize the text content in the answer boxes, converting the text information in the original advertising image into computer-editable text information. Next, it is determined whether the text content included in the answer boxes meets preset requirements. For example, if the number of text contents included in the question and answer boxes reaches a preset number, it is determined that the text content included in the answer boxes meets the preset requirements. If the number of text contents included in the question and answer boxes does not reach the preset number, it is determined that the text content included in the answer boxes does not meet the preset requirements. In this way, the computing device only modifies the content of the question and answer boxes in the original advertising image based on the coordinate information of the question and answer boxes, as well as the N questions and the answer content of each question, when it determines that the text content included in the answer box meets the preset requirements. This generates N new advertising images that meet the question and answer requirements. For example, the computing device modifies the content of the question and answer boxes in the original advertising image based on the coordinate information of the question and answer boxes, as well as the i-th question and the answer content of the i-th question, to obtain the new advertising image corresponding to the i-th question. This avoids the problem that the answer boxes included in the original advertising image are too small to display the answer content of the generated questions, resulting in poor quality of the subsequently generated advertising images.
[0183] This application embodiment does not limit the specific method by which the computing device modifies the content of the question box and the response box in the original advertising image based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, to obtain a new advertising image corresponding to the i-th question.
[0184] In some embodiments, the computing device determines the size of the question box based on its coordinate information, and then converts the i-th question into a question image of the same size as the question box. Similarly, the computing device determines the size of the response box based on its coordinate information, and then converts the response content of the i-th question into a response image of the same size as the response box. Next, the content of the question box in the original advertisement image is overlaid with the question image corresponding to the i-th question, and the content of the response box in the original advertisement image is overlaid with the response image corresponding to the i-th question, thereby obtaining a new advertisement image corresponding to the i-th question.
[0185] In some embodiments, S104-B above includes the following steps S104-B1 to S104-B3: S104-B1. Based on the preset solid color value, modify the color value of each pixel in the question box and answer box in the original advertisement image to the solid color value to obtain the first advertisement image without question and answer content. S104-B2. Based on the coordinate information of the question box and the answer box, convert the i-th question and the answer content of the i-th question into a question image and an answer image; S104-B3. Based on the coordinate information of the question box and the response box, the question image and the response image are fused with the first advertisement image to obtain a new advertisement image corresponding to the i-th question.
[0186] In this implementation, after successfully acquiring the coordinate information of the question and answer boxes in the original advertisement image, the computing device further processes the original advertisement image. Using an image processing algorithm, a solid color fill operation is performed on the question and answer box areas. Specifically, based on a pre-set solid color value, the color value of each pixel in the question and answer box areas is modified to that solid color value, thereby quickly and effectively removing the question and answer boxes from the original advertisement image, resulting in a clean and concise advertisement image without question and answer content, denoted as the first advertisement image. This first advertisement image provides an ideal base template for subsequently overlaying new question and answer content onto the original image. For example, for... Figure 5 The content in the question and answer boxes of the original advertisement image shown is modified to solid color values, resulting in the following: Figure 13A The first advertisement image shown has no question-and-answer content.
[0187] Next, the computing device converts the i-th question and its response content into a question image and a response image based on the coordinate information of the question box and the response box.
[0188] In one example, the computing device converts the i-th question into a question image of the same size as the question box based on the coordinate information of the question box. Similarly, the computing device converts the response content of the i-th question into a response image of the same size as the response box based on the coordinate information of the response box. In some embodiments, such as... Figure 13B As shown, the question image and the response image can be a single image, i.e., a question-and-answer image.
[0189] In another example, the computing device converts the i-th question and its answer into a webpage format. Then, based on the coordinates of the question box, the i-th question in the webpage format is styled so that its size matches the size of the question box. Similarly, based on the coordinates of the answer box, the answer to the i-th question in the webpage format is styled so that its size matches the size of the question box. Finally, the styled i-th question in the webpage format is converted into a question image, and the styled answer to the i-th question in the webpage format is converted into a response image.
[0190] For example, taking HTML format as an example, the computing device organizes the i-th question and its answer in Markdown format (because Markdown scripts have good readability and scalability, facilitating subsequent format conversion and processing) to form a standardized script. During this process, the i-th question and its answer are properly formatted and structured, such as by setting headings, paragraphs, and lists, to ensure clarity and ease of understanding. Next, the computing device converts the Markdown script of the i-th question and its answer into HTML format, resulting in the i-th question and its answer in HTML format. For instance, using professional conversion tools, the markup symbols in the Markdown format are converted into HTML tags, and the text content is converted into HTML elements, thus presenting the i-th question and its answer in HTML format, providing a suitable medium for subsequent conversion into images. Then, based on the coordinate information of the question box, the computing device adjusts the style of the i-th question in HTML format, such as by performing CSS adjustments (e.g., setting corresponding CSS styles according to the width and height of the question box), ensuring that the generated question-and-answer image perfectly matches the question box in terms of font, size, spacing, and alignment. Similarly, based on the coordinate information of the response box, the computing device adjusts the style of the response content of the i-th question in HTML format, such as by performing CSS adjustments (e.g., setting corresponding CSS styles according to the width and height of the response box), ensuring that the generated response image perfectly matches the response box in terms of font, size, spacing, and alignment.
[0191] Then, the i-th question in the styled webpage format is converted into a question image, and the answer content of the i-th question in the styled webpage format is converted into an answer image. For example, the computing device uses the browser's powerful rendering capabilities to convert the i-th question in the CSS-adjusted HTML format into a question image that matches the height of the question box, and to convert the answer content of the i-th question in the CSS-adjusted HTML format into an answer image that matches the height of the answer box.
[0192] Finally, based on the coordinate information of the question and answer boxes, the question image and the answer image are fused with the first advertising image to obtain a new advertising image corresponding to the i-th question. For example, based on the coordinate information of the question and answer boxes, the question image and the answer image are accurately overlaid onto the first advertising image. During the image synthesis process, precise image synthesis algorithms, such as pixel-level overlay algorithms and transparency blending algorithms, are employed to ensure seamless fusion of the question and answer images with the original advertising image in terms of color, resolution, and position, avoiding problems such as color deviation, image overlap, or positional misalignment, thereby obtaining an image like... Figure 13C The new advertisement image corresponding to the i-th question shown.
[0193] Using the method described above, the computing device can determine the new advertising image corresponding to each of the N questions, and thus obtain the N new advertising images applicable to that question.
[0194] The advertising image generation method provided in this application embodiment obtains first information and an original advertising image for question-and-answer purposes. The first information includes the name of a target trending topic, and the original advertising image includes a question box and an answer box. Then, based on the first information, N questions are generated, where N is a positive integer. For each of the N questions, a reasoning solution is performed, generating the answer content for each question. Furthermore, based on the generated N questions and the generated answer content for each question, the content in the question box and answer box of the original advertising image is modified to generate N new advertising images for the question-and-answer purposes. Therefore, the advertising image generation method provided in this application embodiment, through a fully automated process, can generate N diverse advertising images for question-and-answer purposes in batches, achieving large-scale production of advertising images, reducing the labor cost of advertising image production, improving the generation efficiency of advertising images for question-and-answer purposes, and meeting the demand for large amounts of materials for multi-channel placement. Furthermore, this embodiment generates N questions based on the first information, which includes the name of a target trending topic. This makes the questions and answers in the generated N new advertising images more relevant to current trending topics, significantly improving the attractiveness and click-through rate of the advertising images and thus increasing the usage rate of the Q&A app. In addition, the answers to each question in this embodiment are generated through reasoning and solution, rather than being arbitrarily fabricated. This ensures the logical authenticity and credibility of the Q&A content presented in the advertising images, mimicking high-quality interactions in a real community, thereby enhancing the persuasiveness of the advertising images, improving the professional image of the Q&A app, and further increasing its usage rate. Simultaneously, this embodiment modifies the content within the question and answer boxes of the fixed original advertising images. This ensures the uniformity of the advertising images in terms of visual elements (such as logo, font, and color scheme) while achieving dynamic and flexible changes in the core information (question and answer content), balancing the standardization and content innovation of the Q&A app's advertising images.
[0195] The foregoing provides an overall overview of the process for generating advertising images according to embodiments of this application. The following section will combine... Figure 14 Taking a system consisting of terminal devices and servers as examples, the model processing method provided in the embodiments of this application will be further described.
[0196] Figure 14 This is a schematic flowchart of an advertising image generation method provided in an embodiment of this application. Figure 15 This is a schematic diagram of the framework of the advertising image generation method provided in the embodiments of this application.
[0197] like Figure 14 and Figure 15 As shown, the advertising image generation method of this application embodiment includes: S201. The terminal device obtains the first information and the original advertising image of the question and answer application.
[0198] For example, the terminal device receives the first information input by the advertising creator, as well as the original advertising image for the Q&A application.
[0199] The first piece of information includes the name of the target trending topic, and the original ad image includes a question box and an answer box.
[0200] The specific implementation process of S201 can be referred to the relevant description of S101 above, and will not be repeated here.
[0201] S202, The terminal device sends the first information and the original advertising image to the server.
[0202] S203. The server generates a problem prompt based on the first information.
[0203] Among them, question prompts are used to guide the question generation model to generate questions that meet specific requirements.
[0204] In some embodiments, based on the first information, the description information of the target group for the question-and-answer application is determined; a structured template for question prompts is determined; based on the target hot topic name and the description information of the target group, information is filled into the hot topic name field and the target group field in the structured template to generate question prompts.
[0205] In one example, the structured template also includes at least one field to be filled: question type, expected outcome of the question, number of characters in the question, output format of the question, and number of questions. The first information includes the field value of at least one of the following: question type, expected outcome of the question, number of characters in the question, output format of the question, and number of questions. At this time, based on the target hot topic name and the description information of the target group, information is filled into the fields to be filled for the hot topic name and the target group in the structured template to generate question prompts. This includes: parsing the first information to obtain the field value of at least one of the following: question type, expected outcome of the question, number of characters in the question, output format of the question, and number of questions; and based on the description information of the target hot topic name and the target group, as well as the field value of at least one of the following: question type, expected outcome of the question, number of characters in the question, output format of the question, and number of questions, information is filled into the corresponding at least one field to be filled in the structured template to generate question prompts.
[0206] The specific implementation process of S203 can be referred to the relevant description of S102 above, and will not be repeated here.
[0207] S204. The server retrieves the problem knowledge base.
[0208] The question knowledge base includes common questions and professional knowledge corresponding to different hot topics.
[0209] S205. The server uses a question generation model to analyze and understand the question prompts based on a question knowledge base, and generates N questions.
[0210] The specific implementation process of S205 can be referred to the relevant description of S102 above, and will not be repeated here.
[0211] S206. For the i-th question among N questions, the server uses the question-answering model included in the question-answering application to reason about and answer the i-th question, and generates the response content for the i-th question.
[0212] Where i is a positive integer from 1 to N.
[0213] The specific implementation process of S206 can be referred to the relevant description of S103 above, and will not be repeated here.
[0214] S207. The server uses a text box detection model to detect the question and response boxes in the original advertisement image and obtains the coordinate information of the question and response boxes.
[0215] For example, the feature extraction module in the text box detection model extracts features from the original advertisement image to obtain the feature information of the original advertisement image; the text box detection module in the text box detection model performs bounding box detection on the feature information to obtain the predicted value of the bounding box coordinates of each grid point in the feature information; based on the predicted value of the bounding box coordinates of each grid point, the coordinate information of the question box and the response box is obtained.
[0216] The specific implementation process of S207 can be referred to the relevant description of S104 above, and will not be repeated here.
[0217] S208. Based on the preset solid color values, the server modifies the color values of each pixel in the question and answer boxes of the original advertisement image to solid color values, thus obtaining the first advertisement image without question and answer content.
[0218] S209. Based on the coordinate information of the question box and the answer box, the server converts the i-th question and the answer content of the i-th question into a question image and an answer image.
[0219] In some embodiments, such as Figure 15As shown, the process involves converting the i-th question and its answer into a webpage format; adjusting the style of the i-th question in the webpage format based on the coordinates of the question box, ensuring the size of the i-th question matches the size of the question box; adjusting the style of the answer content of the i-th question in the webpage format based on the coordinates of the answer box, ensuring the size of the answer content matches the size of the question box; converting the style-adjusted i-th question in the webpage format into a question image using a browser; and converting the style-adjusted answer content of the i-th question in the webpage format into an answer image using a browser. For example, as shown... Figure 15 As shown, the question image and the response image are combined into one image, denoted as the question-and-response image.
[0220] S210. Based on the coordinate information of the question box and the response box, the server merges the question image and the response image with the first advertisement image to obtain a new advertisement image corresponding to the i-th question.
[0221] The specific implementation process of S208 to S210 can be referred to the relevant description of S104 above, and will not be repeated here.
[0222] S211. The server sends the generated N new advertising images for the terminal device.
[0223] In some embodiments, the terminal device sends the aforementioned N new advertising images to an advertising delivery platform. The advertising delivery platform then delivers these N new advertising images to the user. For example, as... Figure 1 As shown, when the advertising platform detects that a user opens a website / app page on a second terminal device, it sends the aforementioned new advertising image to the second terminal device. The second terminal device then renders the new advertising image in the advertising space on the page. This allows the user to read the question in the question box and the answer in the answer box within the advertising image to understand the functionality of the Q&A application. Furthermore, when the second terminal device detects that an object triggers the usage option on the advertising space, it downloads and installs the Q&A application, thus promoting the application.
[0224] The advertising image generation method provided in this application, through interaction between terminal devices and servers, and via a fully automated process, can generate a large number of advertising images with different content and styles in a short time. This meets the urgent needs of large-scale advertising campaigns for image quantity and update speed, improves the efficiency and response speed of advertising campaigns, reduces the labor costs of advertising image production, enhances the generation efficiency of advertising images for the question-and-answer application, and improves the economic benefits of advertising campaigns, making advertising campaigns more economical and efficient. Furthermore, this application embodiment generates question prompts based on first information, and then generates N questions based on the question prompts and a question knowledge base. The first information includes the name of a target hot topic, thereby making the questions and answers in the generated N new advertising images more closely related to current hot topics. This avoids the uniformity and limitations of traditional advertising content, better attracts user attention, meets the needs and interests of different users, enhances the attractiveness and marketing effect of advertising, makes advertising more targeted and personalized, and significantly improves the attractiveness and click-through rate of advertising images. Meanwhile, this embodiment modifies the content within the question and answer boxes of the fixed original advertising image. This ensures the uniformity of visual elements (such as logo, font, and color scheme) in the advertising image for the Q&A application, while also enabling the dynamic and flexible variation of core information (question and answer content), balancing the standardization of the advertising image for the Q&A application with content innovation. Furthermore, in this embodiment, the advertising creator can flexibly adjust the input original image and popular topic knowledge base according to changes in market demand and marketing strategies. The system can then automatically generate advertising images that meet the requirements, enhancing the flexibility and adaptability of advertising placement, improving the effectiveness and competitiveness of advertising, and enabling advertising creators to better adapt to dynamic market changes.
[0225] In some embodiments, to further improve the effect of the generated advertising image, this application embodiment trains a text box detection model and uses the trained text box detection model to recognize question-and-answer boxes. The following is in conjunction with... Figure 16 The following is a further introduction to the advertising image generation method provided in the embodiments of this application.
[0226] Figure 16 This is a schematic flowchart of an advertising image generation method provided in an embodiment of this application.
[0227] like Figure 16 As shown, the advertising image generation method of this application embodiment includes: S301, The first server acquires the training image set.
[0228] The training image set includes multiple advertising images from the Q&A application.
[0229] S302. For each training image in the training image set, the first server extracts features from the training image through the feature extraction module to obtain the feature information of the training image.
[0230] The specific implementation process of S302 above can be referred to the relevant description of step B above, and will not be repeated here.
[0231] S303. The first server uses the text box detection module to perform bounding box detection on the feature information of the training image, and obtains the predicted value of the bounding box coordinates of each grid point in the feature information.
[0232] The specific implementation process of S303 above can be referred to the relevant description of step C above, and will not be repeated here.
[0233] S304. The first server uses the text style prediction module to perform text style detection on the feature information of the training image, and obtains the predicted value of the text style type of each grid point in the feature information of the training image.
[0234] The specific implementation process of S304 above can be referred to the relevant description of step D above, and will not be repeated here.
[0235] S305. The first server determines the loss value of the text box detection model based on the predicted values of the bounding box coordinates and text style type of each grid point, and trains the text box detection model based on the loss value.
[0236] The specific implementation process of S305 above can be referred to the relevant description of step E above, and will not be repeated here.
[0237] The above steps S301 to S305 describe the training process for the text box detection model. In other words, in order to enable the text box detection model to accurately detect question and answer boxes in the advertising image of the question-and-answer application, this embodiment uses the advertising image of the question-and-answer application to train the text box detection model. This allows the text box detection model to learn relevant information about question and answer boxes in the advertising image of the question-and-answer application, thereby accurately identifying various types and styles of question and answer boxes.
[0238] S306. The terminal device obtains the first information and the original advertising image of the Q&A application.
[0239] The first piece of information includes the name of the target trending topic, and the original ad image includes a question box and an answer box.
[0240] The specific implementation process of S306 can be referred to the relevant description of S101 above, and will not be repeated here.
[0241] S307. The terminal device sends the first information and the original advertising image to the second server.
[0242] S308, the second server generates a problem prompt based on the first information.
[0243] Among them, question prompts are used to guide the question generation model to generate questions that meet specific requirements.
[0244] The second server and the first server mentioned above can be the same server or different servers. This application embodiment does not limit this.
[0245] The specific implementation process of S308 can be referred to the relevant description of S102 above, and will not be repeated here.
[0246] S309, The second server retrieves the problem knowledge base.
[0247] The question knowledge base includes common questions and professional knowledge corresponding to different hot topics.
[0248] S310, the second server, uses a question generation model to analyze and understand question prompts based on a question knowledge base, generating N questions.
[0249] The specific implementation process of S310 can be referred to the relevant description of S102 above, and will not be repeated here.
[0250] S311. For the i-th question among N questions, the server uses the question-answering model included in the question-answering application to reason about and answer the i-th question, and generates the response content for the i-th question.
[0251] Where i is a positive integer from 1 to N.
[0252] The specific implementation process of S311 can be referred to the relevant description of S103 above, and will not be repeated here.
[0253] S312. The second server uses the trained text box detection model to detect the question and response boxes in the original advertisement image and obtains the coordinate information of the question and response boxes.
[0254] For example, the feature extraction module in the trained text box detection model extracts features from the original advertisement image to obtain the feature information of the original advertisement image; the text box detection module in the trained text box detection model performs bounding box detection on the feature information to obtain the predicted value of the bounding box coordinates of each grid point in the feature information; based on the predicted value of the bounding box coordinates of each grid point, the coordinate information of the question box and the response box is obtained.
[0255] The specific implementation process of S312 can be referred to the relevant description of S104 above, and will not be repeated here.
[0256] S313. The second server modifies the color value of each pixel in the question box and answer box of the original advertisement image to a solid color value based on the preset solid color value, so as to obtain the first advertisement image without question and answer content.
[0257] S314. The second server converts the i-th question and the response content of the i-th question into a question image and a response image based on the coordinate information of the question box and the response box.
[0258] In some embodiments, the i-th question and its answer are converted into a webpage format; based on the coordinate information of the question box, the style of the i-th question in the webpage format is adjusted so that the size of the i-th question matches the size of the question box; based on the coordinate information of the answer box, the style of the answer of the i-th question in the webpage format is adjusted so that the size of the answer of the i-th question matches the size of the question box; the style-adjusted i-th question in the webpage format is converted into a question image; and the style-adjusted answer of the i-th question in the webpage format is converted into an answer image.
[0259] S315. Based on the coordinate information of the question box and the response box, the server merges the question image and the response image with the first advertisement image to obtain a new advertisement image corresponding to the i-th question.
[0260] The specific implementation process of S315 to S210 can be referred to the relevant description of S104 above, and will not be repeated here.
[0261] S316. The server sends the generated N new advertising images for the terminal device.
[0262] The advertising image generation method provided in this application first trains a text box detection model on a first server. This allows the text box detection model to learn relevant information about question and answer boxes in the advertising image of a question-and-answer application. The trained text box detection model can accurately identify various types and styles of question and answer boxes in the advertising image. Next, a second server uses the trained text box detection model to detect the question and answer boxes in the original advertising image, obtaining accurate coordinate information. Based on this accurate coordinate information, and using the accurately detected question and answer boxes, along with the generated N questions and their corresponding answers, the content of the question and answer boxes in the original advertising image is accurately modified. This results in N high-quality new advertising images that meet the question-and-answer application requirements, thereby improving the overall advertising image generation effect.
[0263] The above text combined Figures 2 to 16 The method embodiments of this application are described in detail below, in conjunction with... Figure 17 The following describes in detail the device embodiments of this application.
[0264] Figure 17 This is a schematic block diagram of an advertising image generation apparatus provided in an embodiment of this application.
[0265] like Figure 17 As shown, the advertising image generation device 10 includes: The acquisition unit 11 is used to acquire first information and the original advertising image of the question and answer application. The first information includes the name of the target hot topic, and the original advertising image includes a question box and an answer box. Question generation unit 12 is used to generate N questions based on the first information, where N is a positive integer; The response generation unit 13 is used to reason and solve each of the N questions and generate the response content for each question. The advertisement generation unit 14 is used to modify the content of the question boxes and answer boxes in the original advertisement image based on the N questions and the answer content of each question, and generate N new advertisement images that meet the question and answer requirements.
[0266] In some embodiments, the question generation unit 12 is specifically used to generate question prompts based on the first information, the question prompts being used to guide the question generation model to generate questions that meet specific requirements; and to generate the N questions by analyzing and understanding the question prompts through the question generation model.
[0267] In some embodiments, the question generation unit 12 is specifically used to determine the description information of the target group for the question answering application based on the first information; and to generate the question prompt words based on the target hot topic name and the description information of the target group.
[0268] In some embodiments, the question generation unit 12 is specifically used to determine a structured template for the question prompt; based on the target hot topic name and the description information of the target group, to fill in the fields to be filled for the hot topic name and the fields to be filled for the target group in the structured template, and generate the question prompt.
[0269] In some embodiments, the structured template further includes at least one field to be filled: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. The first information includes the field value of at least one of the following: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. The question generation unit 12 is specifically used to parse the first information to obtain the field value of at least one of the following: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. Based on the target hot topic name and the description information of the target group, as well as the field value of at least one of the following: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions, the unit fills in the corresponding at least one field to be filled in the structured template to generate the question prompt word.
[0270] In some embodiments, the question generation unit 12 is specifically used to acquire a question knowledge base, which includes common questions and professional knowledge corresponding to different hot topics; and to generate the N questions by analyzing and understanding the question prompts based on the question knowledge base through the question generation model.
[0271] In some embodiments, the advertisement generation unit 14 is specifically used to detect the question box and the response box in the original advertisement image to obtain the coordinate information of the question box and the response box; for the i-th question among the N questions, based on the coordinate information of the question box and the response box, and the content of the i-th question and the response to the i-th question, the content of the question box and the response box in the original advertisement image is modified to obtain the new advertisement image corresponding to the i-th question, where i is a positive integer from 1 to N.
[0272] In some embodiments, the advertisement generation unit 14 is specifically configured to modify the color value of each pixel in the question box and the answer box of the original advertisement image to the solid color value based on a preset solid color value, thereby obtaining a first advertisement image without question and answer content; based on the coordinate information of the question box and the answer box, convert the i-th question and the answer content of the i-th question into a question image and an answer image; based on the coordinate information of the question box and the answer box, fuse the question image and the answer image with the first advertisement image to obtain the new advertisement image corresponding to the i-th question.
[0273] In some embodiments, the advertisement generation unit 14 is specifically configured to: convert the i-th question and its response content into a webpage format; adjust the style of the i-th question in the webpage format based on the coordinate information of the question box, so that the size of the i-th question matches the size of the question box; adjust the style of the response content of the i-th question in the webpage format based on the coordinate information of the response box, so that the size of the response content matches the size of the question box; convert the style-adjusted i-th question in the webpage format into the question image; and convert the style-adjusted response content of the i-th question in the webpage format into the response image.
[0274] In some embodiments, before modifying the content of the question box and the response box in the original advertising image based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, to obtain the new advertising image corresponding to the i-th question, the advertising generation unit 14 is further configured to identify the text content included in the response box to obtain the text content included in the response box; if the text content included in the response box meets the preset requirements, then based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, the content of the question box and the response box in the original advertising image is modified to obtain the new advertising image corresponding to the i-th question.
[0275] In some embodiments, the advertisement generation unit 14 is specifically used to extract features from the original advertisement image through the feature extraction module in the text box detection model to obtain feature information of the original advertisement image; to perform bounding box detection on the feature information through the text box detection module in the text box detection model to obtain the predicted value of the bounding box coordinates of each grid point in the feature information; and to obtain the coordinate information of the question box and the response box based on the predicted value of the bounding box coordinates of each grid point.
[0276] In some embodiments, the text box detection model further includes a text style prediction module. The training process of the text box detection model is completed by the training module. Specifically, the training module is used to acquire a training image set. For each training image in the training image set, the feature extraction module extracts features from the training image to obtain feature information of the training image. The training image set includes multiple advertising images of the question-and-answer application. The text box detection module performs bounding box detection on the feature information of the training image to obtain the predicted value of the bounding box coordinates of each grid point in the feature information. The text style prediction module performs text style detection on the feature information of the training image to obtain the predicted value of the text style type of each grid point in the feature information of the training image. Based on the predicted value of the bounding box coordinates and the predicted value of the text style type of each grid point, the loss value of the text box detection model is determined, and the text box detection model is trained based on the loss value.
[0277] In some embodiments, the text style prediction module includes a feature conversion unit. The training module is specifically configured to perform feature conversion on the feature information of the training image through the feature conversion unit to obtain n-dimensional features of each grid in the feature information of the training image, where n is a positive integer greater than 1; based on the n-dimensional features of each grid, determine the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types; and based on the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types, determine the predicted value of the text style type of each grid.
[0278] In some embodiments, the training module is specifically used to perform an exponential operation on each of the n-dimensional features of the j-th grid in the feature information to obtain n operation results of the j-th grid, where j is a positive integer; for the n-th operation result among the n operation results, the ratio of the n-th operation result of the j-th grid to the sum of the n operation results of the j-th grid is determined as the probability value of the j-th grid belonging to the n-th text style type.
[0279] In some embodiments, the training module is specifically configured to: determine the ground truth value of the bounding box coordinates and the ground truth value of the text style type for each grid; determine the prediction loss value of the bounding box based on the ground truth value and the predicted value of the bounding box coordinates for each grid; determine the prediction loss value of the text style type based on the ground truth value and the predicted value of the text style type for each grid; and determine the loss value of the text box detection model based on the prediction loss value of the bounding box and the prediction loss value of the text style type.
[0280] In some embodiments, the training module is specifically configured to, for each grid, perform a logarithmic operation on the predicted value of the text style type of the grid, multiply it by the true value of the text style type of the grid to obtain a first product corresponding to the grid; add the first products corresponding to each grid to obtain a first sum value corresponding to the training image; and determine the prediction loss value of the text style type based on the first sum value corresponding to the training image.
[0281] In some embodiments, the training module is specifically used to determine a first weight for the predicted loss value of the bounding box and a second weight for the predicted loss value of the text style type; based on the first weight and the second weight, the predicted loss value of the bounding box and the predicted loss value of the text style type are weighted and summed to obtain the loss value of the text box detection model.
[0282] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 17 The apparatus shown can execute the embodiments of the reasoning method of the above-described language model, and the foregoing and other operations and / or functions of each module in the apparatus are respectively for implementing the above-described method embodiments, which will not be described in detail here for the sake of brevity.
[0283] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0284] Figure 18 This is a schematic block diagram of a computing device provided in an embodiment of this application. The computing device can be a terminal device or a server. The example uses the computing device as a server to execute the above-described advertising image generation method.
[0285] like Figure 18 As shown, the computing device 40 may include: The system includes a memory 41 and a processor 42. The memory 41 stores a computer program 43 and transfers the computer program 43 to the processor 42. In other words, the processor 42 can retrieve and run the computer program 43 from the memory 41 to implement the methods described in the embodiments of this application.
[0286] For example, the processor 42 can be used to execute the steps in the above method according to the instructions in the computer program 43.
[0287] In some embodiments of this application, the processor 42 may include, but is not limited to: General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0288] In some embodiments of this application, the memory 41 includes, but is not limited to: Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0289] In some embodiments of this application, the computer program 43 may be divided into one or more modules, which are stored in the memory 41 and executed by the processor 42 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 43 in the computing device.
[0290] like Figure 18 As shown, the computing device 40 may further include: Transceiver 34, which can be connected to processor 42 or memory 41.
[0291] The processor 42 can control the transceiver 34 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 34 may include a transmitter and a receiver. The transceiver 34 may further include antennas, and the number of antennas may be one or more.
[0292] It should be understood that the various components in the computing device 40 are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0293] This application also provides a computer storage medium storing a computer program thereon, which, when loaded and executed by a computing device, enables the computing device to implement the above-described method embodiments.
[0294] This application also provides a computer program product comprising a computer program stored in a readable storage medium. At least one processor of a computing device can read the computer program from the readable storage medium, load and execute the computer program, and cause the computing device to implement the method embodiments described above.
[0295] In other words, when implemented using software, it can be implemented wholly or partially in the form of a computer program product. This computer program product includes a computer program. When the computer program is loaded and executed on a computing device, it generates, wholly or partially, the processes or functions according to the embodiments of this application. The computer program can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program can be transferred from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to the computing device or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0296] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0297] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0298] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0299] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Furthermore, reference can be made between the various method embodiments and between the various device embodiments; identical or corresponding content in different embodiments can be mutually referenced, without further elaboration.
Claims
1. A method for generating advertising images, characterized in that, include: Obtain first information and the original advertising image for the question and answer application, wherein the first information includes the name of the target trending topic and the original advertising image includes a question box and an answer box; Based on the first information, N questions are generated, where N is a positive integer; For each of the N questions, reason and solve the problem, and generate the response content for each question; Based on the N questions and the answers to each question, the content of the question boxes and answer boxes in the original advertising image is modified to generate N new advertising images that meet the question and answer requirements.
2. The method according to claim 1, characterized in that, Based on the first information, N questions are generated, including: Based on the first information, a question prompt word is generated, which is used to guide the question generation model to generate a question that meets specific requirements; The question generation model analyzes and understands the question prompts to generate the N questions.
3. The method according to claim 2, characterized in that, The step of generating question prompt words based on the first information includes: Based on the first information, determine the description information of the target group for the question and answer application; Based on the target trending topic name and the description information of the target group, the question prompt words are generated.
4. The method according to claim 3, characterized in that, The step of generating the question prompt words based on the target trending topic name and the description information of the target group includes: Determine the structured template for the question prompt words; Based on the target hot topic name and the description information of the target group, information is filled into the fields to be filled for hot topic name and target group in the structured template to generate the question prompt words.
5. The method according to claim 4, characterized in that, The structured template also includes at least one of the following fields to be filled: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. The first information includes the field value of at least one of the following: question type, expected effect of the question, number of characters in the question, output format of the question, and number of questions. The process of filling in the fields for the hot topic name and the target group based on the target hot topic name and the target group description information in the structured template to generate the question prompt words includes: Parse the first information to obtain the field value of at least one of the following: question type, expected effect of the question, number of words included in the question, question output format, and number of questions; Based on the target hot topic name and the description information of the target group, as well as the field value of at least one of the following: question type, expected effect of the question, number of characters included in the question, question output format, and number of questions, information is filled into at least one field to be filled in the structured template to generate the question prompt words.
6. The method according to claim 2, characterized in that, The step of analyzing and understanding the question prompts using the question generation model to generate the N questions includes: Obtain a question knowledge base, which includes common questions and professional knowledge corresponding to different hot topics; The question generation model analyzes and understands the question prompts based on the question knowledge base to generate the N questions.
7. The method according to any one of claims 1-6, characterized in that, The process of modifying the content of the question boxes and answer boxes in the original advertisement image based on the N questions and the answer content of each question, and generating N new advertisement images that meet the question and answer requirements, includes: The question and answer boxes in the original advertisement image are detected to obtain the coordinate information of the question and answer boxes; For the i-th question among the N questions, based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, the content of the question box and the response box in the original advertisement image is modified to obtain the new advertisement image corresponding to the i-th question, where i is a positive integer from 1 to N.
8. The method according to claim 7, characterized in that, The step of modifying the content of the question box and the response box in the original advertisement image based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, to obtain the new advertisement image corresponding to the i-th question, includes: Based on the preset solid color value, the color value of each pixel in the question box and answer box in the original advertisement image is modified to the solid color value to obtain the first advertisement image without question and answer content; Based on the coordinate information of the question box and the response box, the i-th question and the response content of the i-th question are converted into a question image and a response image; Based on the coordinate information of the question box and the response box, the question image and the response image are fused with the first advertisement image to obtain the new advertisement image corresponding to the i-th question.
9. The method according to claim 8, characterized in that, The step of converting the i-th question and its response content into a question image and a response image based on the coordinate information of the question box and the response box includes: Convert the i-th question and its answer into a webpage format; Based on the coordinate information of the question box, the style of the i-th question in the webpage format is adjusted so that the size of the i-th question matches the size of the question box; Based on the coordinate information of the response box, the style of the response content of the i-th question in the webpage format is adjusted so that the size of the response content of the i-th question matches the size of the question box; Convert the i-th question in the styled webpage format into the question image; The response content of the i-th question under the adjusted webpage format is converted into the response image.
10. The method according to claim 7, characterized in that, Before modifying the content of the question box and the response box in the original advertisement image based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, to obtain the new advertisement image corresponding to the i-th question, the method further includes: The text content included in the response box is identified to obtain the text content included in the response box; The step of modifying the content of the question box and the response box in the original advertisement image based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, to obtain the new advertisement image corresponding to the i-th question, includes: If the text content included in the response box meets the preset requirements, then based on the coordinate information of the question box and the response box, as well as the content of the i-th question and the response to the i-th question, the content of the question box and the response box in the original advertisement image is modified to obtain the new advertisement image corresponding to the i-th question.
11. The method according to claim 7, characterized in that, The step of detecting the question and answer boxes in the original advertisement image to obtain the coordinate information of the question and answer boxes includes: The feature extraction module in the text box detection model is used to extract features from the original advertisement image to obtain the feature information of the original advertisement image. The text box detection module in the text box detection model performs bounding box detection on the feature information to obtain the predicted value of the bounding box coordinates of each grid point in the feature information. Based on the predicted bounding box coordinates of each grid point, the coordinate information of the question box and the response box is obtained.
12. The method according to claim 11, characterized in that, The text box detection model also includes a text style prediction module, and the training process of the text box detection model includes: A training image set is obtained. For each training image in the training image set, the feature extraction module is used to extract features from the training image to obtain the feature information of the training image. The training image set includes multiple advertising images for the question-and-answer application. The text box detection module performs bounding box detection on the feature information of the training image to obtain the predicted value of the bounding box coordinates of each grid point in the feature information. The text style prediction module performs text style detection on the feature information of the training image to obtain the predicted value of the text style type of each grid point in the feature information of the training image. Based on the predicted bounding box coordinates and text style type of each grid point, the loss value of the text box detection model is determined, and the text box detection model is trained based on the loss value.
13. The method according to claim 12, characterized in that, The text style prediction module includes a feature transformation unit. The text style prediction module performs text style detection on the feature information of the training image to obtain a predicted value for the text style type of each grid point in the feature information, including: The feature conversion unit performs feature conversion on the feature information of the training image to obtain n-dimensional features of each grid in the feature information of the training image, where n is a positive integer greater than 1. Based on the n-dimensional features of each grid, determine the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types; Based on the probability value of the text corresponding to each grid in the training image belonging to each of the n text style types, the predicted value of the text style type of each grid is determined.
14. The method according to claim 13, characterized in that, The step of determining the probability value of the text corresponding to each grid in the training image, based on the n-dimensional features of each grid, belonging to each of the n text style types, includes: For the j-th grid in the feature information, perform an exponential operation on each of the n-dimensional features of the j-th grid to obtain n operation results for the j-th grid, where j is a positive integer; For the nth operation result among the n operation results, the ratio of the nth operation result of the jth grid to the sum of the n operation results of the jth grid is determined as the probability value of the jth grid belonging to the nth text style type.
15. The method according to claim 12, characterized in that, The method of determining the loss value of the text box detection model based on the predicted values of the bounding box coordinates and text style type for each grid point includes: Determine the truth value of the bounding box coordinates and the truth value of the text style type for each grid. Based on the true and predicted values of the bounding box coordinates of each grid, the prediction loss value of the bounding box is determined. Based on the ground truth and predicted values of the text style type for each grid, the prediction loss value for the text style type is determined; The loss value of the text box detection model is determined based on the predicted loss value of the bounding box and the predicted loss value of the text style type.
16. The method according to claim 15, characterized in that, The determination of the prediction loss value for the text style type based on the ground truth value and predicted value of the text style type for each grid includes: For each grid, the predicted value of the text style type of the grid is logarithmically calculated and then multiplied with the true value of the text style type of the grid to obtain the first product corresponding to the grid. Add the first products corresponding to each grid to obtain the first sum value corresponding to the training image; Based on the first sum value corresponding to the training image, the prediction loss value of the text style type is determined.
17. The method according to claim 15, characterized in that, The determination of the loss value of the text box detection model based on the predicted loss value of the bounding box and the predicted loss value of the text style type includes: Determine a first weight for the predicted loss value of the bounding box and a second weight for the predicted loss value of the text style type; Based on the first weight and the second weight, the predicted loss value of the bounding box and the predicted loss value of the text style type are weighted and summed to obtain the loss value of the text box detection model.
18. An advertising image generation device, characterized in that, include: The acquisition unit is used to acquire first information and the original advertising image of the question and answer application. The first information includes the name of the target hot topic, and the original advertising image includes a question box and an answer box. The question generation unit is used to generate N questions based on the first information, where N is a positive integer; The response generation unit is used to reason and solve each of the N questions and generate the response content for each question. The advertisement generation unit is used to modify the content of the question boxes and answer boxes in the original advertisement image based on the N questions and the answer content of each question, and generate N new advertisement images that meet the question and answer requirements.
19. A computing device, characterized in that, Including processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program to implement the method as described in any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that, Used to store computer programs; The computer program causes the computer to perform the method as described in any one of claims 1 to 17.