Promotion of image generation methods, systems, devices, storage media and program products
By introducing image generation technology into the dissemination of traditional corporate culture, differentiated promotional images are dynamically generated, which solves the problems of single communication content, lack of diversity and sense of customization, and achieves more efficient dissemination of corporate culture.
Patent Information
- Application Number
- CN202411615911.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-04-08
AI Technical Summary
The traditional corporate culture communication model has the problem of relatively single communication content, lack of diversity, and no sense of exclusive customization.
A method of promoting image generation is provided. By responding to the image generation request of the client, the generation parameters of the target promotion image to be generated are determined, the pre-trained image generation model and large language model are called, the initial image and target text are generated, and the differentiated target promotion image is fused to generate differentiated target promotion image.
Improves the diversity and exclusive customization of the target promotion images, ensuring that the image content matches the target object and background.
Smart Images

Figure CN119783945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and specifically to a promotion image generation method, system, device, storage medium and program product. Background Art
[0002] Corporate culture communication is crucial for modern enterprises. It can enhance employee cohesion, improve a sense of belonging, shape the corporate image, and promote innovation and communication. In the traditional corporate culture communication model, the communication content is usually pre-made in advance. Although it can promote the flow of information within the enterprise and the interaction between employees to a certain extent, because the communication content is pre-made, the communication content seen by different employees is very similar. That is, the traditional corporate culture communication model has problems such as relatively single communication content, lack of diversity, and no exclusive customization. Summary of the invention
[0003] In order to solve the problems in the above-mentioned related technologies such as relatively single dissemination content, lack of diversity, and no sense of exclusive customization, the present application provides a promotion image generation method, system, device, storage medium and program product.
[0004] A first aspect of the present application provides a promotion image generation method, which is applied to a server, and the method comprises:
[0005] In response to an image generation request sent by the first client, determining generation parameters of a first target promotion image to be generated, wherein the image generation request includes task attribute description information of the target object to be promoted, and the task attribute description information is used to describe the attributes of the tasks included in the subject to be promoted;
[0006] Calling a pre-trained image generation model to generate an initial image according to generation parameters, wherein the initial image includes a first target virtual image and a first target background corresponding to the generation parameters; the first target virtual image is a preset image representation of the subject to be promoted;
[0007] Calling a pre-trained large language model to generate a first target text according to the task features described by the task attribute description information and the semantic features of the first target background;
[0008] The initial image and the first target text are fused to obtain a first target promotion image.
[0009] A second aspect of the present application provides a promotion image generation method, which is applied to a client, and the method comprises:
[0010] In response to a start instruction of the image generation application, displaying an image generation interface, wherein the image generation interface includes image generation options;
[0011] In response to a triggering operation on the image generation option, an object list is displayed, wherein the object list includes an identification of each object included in the subject to be promoted;
[0012] In response to a selection operation on any object, an image generation request is sent to the server, the image generation request includes task attribute description information of the object, the image generation request is used to request the server to generate a first target promotion image according to the method provided in the first aspect above, and send the first access address of the first target promotion image to the client of the object, the object is the object to which the first target promotion image is to be promoted, and the task attribute description information is used to describe the attributes of the tasks contained in the subject to be promoted.
[0013] The third aspect of the present application provides a promotion image generation device, which is applied to a server, and the device includes:
[0014] A determination module, configured to determine generation parameters of a first target promotion image to be generated in response to an image generation request sent by the first client, wherein the image generation request includes task attribute description information of the target object to be promoted, and the task attribute description information is used to describe the attributes of the tasks included in the subject to be promoted;
[0015] A first generation module is used to call a pre-trained image generation model to generate an initial image according to generation parameters, wherein the initial image includes a first target virtual image and a first target background corresponding to the generation parameters; the first target virtual image is a preset image representation of a subject to be promoted;
[0016] A second generation module is used to call a pre-trained large language model to generate a first target text according to the task features described by the task attribute description information and the semantic features of the first target background;
[0017] The fusion module is used to fuse the initial image and the first target text to obtain a first target promotion image.
[0018] A fourth aspect of the present application provides a promotion image generation device, which is applied to a client, and the device includes:
[0019] A first display module, configured to display an image generation interface in response to a start instruction of an image generation application, wherein the image generation interface includes image generation options;
[0020] A second display module is used to display an object list in response to a triggering operation on the image generation option, wherein the object list includes the identification of each object included in the subject to be promoted;
[0021] A sending module is used to send an image generation request to a server in response to a selection operation on any object, wherein the image generation request includes task attribute description information of the object, and the image generation request is used to request the server to generate a first target promotion image according to the method provided in the first aspect, and send a first access address of the first target promotion image to the client of the object, wherein the object is the object to which the first target promotion image is to be promoted, and the task attribute description information is used to describe the attributes of the tasks contained in the subject to be promoted.
[0022] A fifth aspect of the present application provides a promotion image generation system, the system comprising: a first client and a server;
[0023] The first client is used to display an image generation interface in response to a start instruction of an image generation application, wherein the image generation interface includes an image generation option; in response to a trigger operation on the image generation option, display an object list, wherein the object list includes an identifier of each object included in the subject to be promoted; in response to a selection operation on any object, send an image generation request to a server; the image generation request includes task attribute description information of the object, wherein the task attribute description information is used to describe the attributes of the task included in the subject to be promoted;
[0024] The server is used to determine the generation parameters of the first target promotion image to be generated according to the image generation request; call the pre-trained image generation model to generate an initial image according to the generation parameters, and the initial image includes the first target virtual image and the first target background corresponding to the generation parameters; call the pre-trained large language model to generate the first target text according to the task features described by the task attribute description information and the semantic features of the first target background; fuse the initial image and the first target text to obtain the first target promotion image.
[0025] The sixth aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect above, or to implement the method described in the second aspect above.
[0026] The seventh aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method as described in the first aspect above, or to implement the method as described in the second aspect above.
[0027] An eighth aspect of the present application provides a computer program product, including a computer program, wherein the computer program is executed by a processor to implement the method described in the first aspect above, or to implement the method described in the second aspect above.
[0028] Based on the promotion image generation method provided in the first aspect above, the present application has at least the following beneficial effects or advantages:
[0029] In the embodiment of the present application, since the initial image and target text are dynamically generated based on the image generation request using a pre-trained model, the initial image and target text can maintain differences for different image generation requests, thereby making the target promotion images obtained by fusing the initial image and the target text different, thereby improving the diversity of the target promotion images. Furthermore, since the target text is generated based on the task attribute description information of the target object and the semantic features of the target background, it not only ensures that the target text can match the target object, but also ensures that the target text matches the target background, thereby improving the exclusive customization of the target image.
[0030] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0032] Figure 1 A schematic diagram of an application scenario of a promotion image generation method provided in an embodiment of the present application;
[0033] Figure 2 A first flow chart of a promotion image generation method provided in an embodiment of the present application;
[0034] Figure 3 A second flow chart of a promotion image generation method provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of generating an initial image provided in an embodiment of the present application;
[0036] Figure 5 A third flow chart of a promotion image generation method provided in an embodiment of the present application;
[0037] Figure 6 A fourth flow chart of a promotion image generation method provided in an embodiment of the present application;
[0038] Figure 7 A fifth flow chart of a promotion image generation method provided in an embodiment of the present application;
[0039] Figure 8 A sixth flow chart of a promotion image generation method provided in an embodiment of the present application;
[0040] Fig. 9 A schematic diagram of the interface transformation of the client provided in the embodiment of the present application;
[0041] Fig.10 A seventh flow chart of a promotion image generation method provided in an embodiment of the present application;
[0042] Fig.11 A first structural schematic diagram of a promotional image generating device provided in an embodiment of the present application;
[0043] Fig.12 A second structural schematic diagram of a promotion image generating device provided in an embodiment of the present application;
[0044] Fig.13 A schematic diagram of the composition of a promotional image generation system provided in an embodiment of the present application;
[0045] Fig.14 A schematic diagram of the composition of two promotional image generation systems provided in the embodiments of the present application;
[0046] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0048] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0049] Stable Diffusion XL (SDXL): An advanced image generation model developed by Stability AI. It significantly improves and expands on the traditional Stable Diffusion model. It can better handle complex scenes, details and colors when generating images, improving the quality and diversity of images. The SDXL model is often used in art creation, advertising design, game development and other fields.
[0050] Large Language Model (LLM): A language model with a large number of parameters designed to understand and generate human language. Such models are usually based on deep learning architectures, such as Transformer, which learn language structures and patterns through unsupervised pre-training on massive text data. LLM can perform various natural language processing tasks, such as text generation, question answering, translation, etc.
[0051] Prompt: It is the guiding text used when interacting with the large language model. Users can use specific prompts to guide the model to generate relevant responses or complete specific tasks. Prompts can be a simple question, an explanatory text, or a more complex instruction. The purpose is to enable the model to generate meaningful output based on these prompts.
[0052] Few-shot Learning (FSL): is a machine learning paradigm in which a model learns and infers with very few samples. For example, a model only needs to see a few examples (with introductory words before and after, such as "Please respond based on the following example") to understand the context of a specific task. FSL is different from traditional machine learning tasks, which usually rely on a large amount of training data.
[0053] Low-Rank Adaptation (LoRA): is a technique for fine-tuning large models, mainly used to quickly adapt to new tasks or data without training the entire model. It is easy to quickly adjust the model to a specific application field through small sample learning, such as using the generative model for a specific artistic style, which greatly facilitates the application in specific tasks.
[0054] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0055] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination", etc.
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0057] In the traditional corporate culture communication method, the communication content is usually pre-made. For example, a small number of background images and a small number of texts are pre-set. When the employee triggers the synthesis of images and texts, the target background image and target text are selected from the preset background images and texts, and the target background image and target text are merged to obtain the communication content. Since the background image and text are both preset, the similarity of different communication contents is high, that is, the communication content is relatively single and lacks diversity. In addition, the text may not match the actual situation of the employees, and the text may not match the background, that is, the communication content does not have an exclusive sense of customization. In addition, there are limitations such as one-way communication, long cycle, high cost, and neglect of content. Among them, one-way communication is often a top-down communication method within the enterprise. The management leads the content delivery, and the feedback and participation of employees are low, resulting in insufficient communication of the communication content and failure to attract the participation and creativity of young employees. The long cycle and high cost mean that a large-scale cultural communication activity takes at least several months to prepare, and both the time cost and the labor cost are high. Ignoring content, traditional corporate culture communication often overemphasizes etiquette and form, resulting in poor actual communication results and insufficient effectiveness and practicality of information transmission.
[0058] Based on this, the embodiment of the present application provides a method for generating a promotion image. Figure 1 Schematic diagram of an application scenario of a promotion image generation method provided by an embodiment of the present application. Figure 1 As shown, the scenario includes a first client of a first user, a second client of a second user, and a server, wherein the first user and the second user may be users included in the subject to be promoted, and the subject to be promoted may be any type such as enterprises, institutions, organizations, groups, etc.
[0059] Any of the first client and the second client may be a terminal device such as a mobile phone, a tablet computer, a desktop computer, a portable notebook, a wearable device, a vehicle-mounted terminal, etc. The client may install and run an image generation application, which may be an independent application (Application, App for short), a small program embedded in other applications, or a web application, etc.
[0060] The client is integrated with a display screen, which is configured to display the user interface (UserInterface, UI) of the client, and provides an interface for interaction and information exchange between the client and the user. The UI involved in the embodiment of the present application can be configured as a medium interface for user operation to interact with the image generation application. As an interactive interface with the user, the UI can convert the computer language of the image generation application into a form that the user can accept and recognize, including displayed pictures, text, buttons, etc. The commonly used form of expression of UI can be a graphical user interface (Graphic User Interface, GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control (control) displayed in the display screen of the client, wherein the control can include visual interface elements such as icons, buttons, menus, tabs, text boxes, etc. The control can be implemented as a visual function interface of the image generation application, and the control receives the corresponding trigger operation of the user, and the corresponding function interface of the image generation application receives the corresponding processing instruction, so that the image generation application responds to the processing instruction for functional processing. For example, each user operation (such as clicking, double-clicking, editing, etc.) inputs corresponding instructions to the image generation application through the corresponding GUI control, thereby triggering the image generation application to perform related processing and update the GUI based on the processed results.
[0061] The server can be an independent server such as a physical server or a cloud server, or a server cluster composed of multiple servers. The server can maintain image generation strategies, image promotion strategies, etc. Among them, the image generation strategy is used to instruct the server to determine the generation parameters of the first target promotion image to be generated when receiving the image generation request sent by the first client; call the pre-trained image generation model to generate an initial image according to the generation parameters, and the initial image includes the first target virtual image and the first target background corresponding to the generation parameters. The first target virtual image is the image representation of the preset subject to be promoted. And, call the pre-trained large language model to generate the first target text according to the task attribute description information of the target object to be promoted contained in the image generation model and the first target background; and fuse the initial image and the first target text to obtain the first target promotion image. The image promotion strategy is used to instruct the server to save the first target promotion image to a preset storage area, and generate the first access address of the first target promotion image according to the storage location of the first target promotion image, and send the first access address to the second client. The first access address is used for the second client to access the first target promotion image. The target object can be any user (such as employees, leaders, etc.), work group, department, etc. included in the subject to be promoted.
[0062] The client and the server can exchange data based on the network, which can be a wired network or a wireless network. For the data exchange between the client and the server, please refer to the relevant description below.
[0063] It should be understood that Figure 1 In the figure, the first client and the second client are both mobile phones, the server is an independent physical server, and the target object is the second user included in the subject to be promoted. That is, Figure 1 The illustration is only a schematic representation of the application scenario of the promotion image generation method involved in this application, and does not constitute a limitation on the technical solution of this application. In some other embodiments, the application scenario of the screening condition creation method involved in this application may also include more or fewer components.
[0064] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0065] Figure 2 A flowchart of a promotion image generation method provided in an embodiment of the present application, Figure 2 The method shown can be Figure 1 The server in the implementation. Figure 2 As shown, the method includes the following steps 101-104.
[0066] Step 101, in response to an image generation request sent by a first client, determining generation parameters of a first target promotion image to be generated; the image generation request includes task attribute description information of the target object to be promoted, and the task attribute description information is used to describe the attributes of the tasks included in the subject to be promoted.
[0067] Step 102, calling a pre-trained image generation model, generating an initial image according to generation parameters, wherein the initial image includes a first target virtual image and a first target background corresponding to the generation parameters, and the first target virtual image is a preset image representation of the subject to be promoted.
[0068] Step 103: Call the pre-trained large language model to generate the first target text according to the task features described by the task attribute description information and the semantic features of the first target background.
[0069] Step 104: fuse the initial image and the first target text to obtain a first target promotion image.
[0070] Among them, the subject to be promoted can be any type such as an enterprise, an organization, a group, etc., that is, the subject to be promoted includes multiple users, and the target object can be any user (employee, leader, etc.), working group, department, etc. included in the subject to be promoted. The tasks contained in the subject to be promoted can be positions, projects, etc. The task attribute description information can be at least one of the name, work number, department, and position of the target object. The attribute of the task can be the name and identification of the task. As an example, the subject to be promoted is an enterprise, the target object is any employee A included in the enterprise, and the task attribute description information is the work number. The work number is associated with the position of algorithm engineer held by user A in the enterprise. Therefore, the task attribute description information can describe the job title of the algorithm engineer position included in the enterprise. As another example, the subject to be promoted is an enterprise, the target object is the working group 1 included in the enterprise, and the task attribute description information is the job title of each employee included in the working group 1. Accordingly, the task attribute description information can describe the personnel composition and other information of the working group 1 included in the enterprise. The specific content of the task attribute description information and the attributes of the task can be set by oneself according to needs in actual applications, and this application does not make specific restrictions on this.
[0071] Taking the subject to be promoted as an enterprise and the target object as any user (e.g., employee) of the enterprise as an example, in order to enhance the interaction between the users working in the enterprise, in some embodiments, the users working in the enterprise can send promotional images to each other. Specifically, the first user (e.g., employee A) working in the enterprise can first operate its first client to input the start instruction of the image generation application. In response to the start instruction, the first client displays an image generation interface, which includes an image generation option. In response to the first user's triggering operation on the image generation option, the first client displays an object list (e.g., an employee list), and the object list includes the identifiers of the objects contained in the enterprise (e.g., the name and work number of each employee); when the first user selects any object (e.g., employee B) in the object list, the first client determines the any object as the target object to be promoted in response to the first user's selection operation on the any object, and sends an image generation request to the server according to the task attribute description information of the target object (e.g., the name and work number of employee B). After receiving the image generation request, the server generates a target promotion image in the manner described in steps 102 to 104.
[0072] In order to enhance the difference and interest between different promotional images, in some embodiments, multiple first images containing virtual images of the subject to be promoted and multiple second images containing different background themes can be pre-designed, and the first image and the second image can be used to fine-tune the existing SDXL model using FLS and LoRA technology to obtain an image generation model suitable for the subject to be promoted. And, the existing large language model is fine-tuned and trained according to information such as the task attributes of each object contained in the subject to be promoted to obtain a large language model suitable for the subject to be promoted. Correspondingly, when the server receives an image generation request, the image generation model obtained by fine-tuning training is called, and an initial image is generated according to the determined generation parameters, and the initial image includes the first target virtual image and the first target background corresponding to the generation parameters. And the large language model obtained by fine-tuning training is called to generate the first target text according to the task features described by the task attribute description information of the target object and the semantic features of the first target background. The initial image and the first target text are fused to obtain the first target promotion image. Among them, the virtual image is the image representation of the subject to be promoted, and the virtual image can be a virtual person, a virtual animal, etc., which is not specifically limited in this application.
[0073] In the promotional image generation method provided in the embodiment of the present application, since the initial image and target text are dynamically generated based on the image generation request and using the pre-trained model, the initial image and target text can maintain differences for different image generation requests, thereby making the target promotion images obtained by fusion of the initial image and the target text different, thereby improving the diversity of the target promotion images. Furthermore, since the target text is generated based on the task attribute description information of the target object and the semantic features of the target background, it not only ensures that the target text can match the target object, but also ensures that the target text matches the target background, thereby improving the exclusive customization of the target image.
[0074] In order to ensure that the style of the virtual image is unified and the background is consistent with public cognition, so that the generated promotional images are different from each other, in some embodiments, after fine-tuning the training to obtain the image generation model, the image generation model can be used to generate multiple virtual images in different states (also called original virtual images, such as a jumping virtual image, a standing virtual image, a riding virtual image, etc.) and multiple backgrounds (also called original backgrounds), and based on the generated multiple virtual images and multiple backgrounds, combined with parameter fine-tuning, a target promotional image is generated. Specifically, Figure 3 As shown, step 101 may include the following steps 1011 to 1013:
[0075] Step 1011, in response to an image generation request sent by the first client, determining an original virtual image and an original background corresponding to a first target promotion image to be generated, wherein the image generation request includes task attribute description information of a target object to be promoted.
[0076] In some embodiments, any one of the virtual images in the virtual image set can be determined as the original virtual image corresponding to the first target promotional image; based on the matching relationship between the preset virtual image and the background set, a target background set matching the original virtual image in the preset multiple background sets is determined; and any one of the original backgrounds in the target background set is determined as the original background corresponding to the first target promotional image.
[0077] Specifically, in order to avoid the unreasonable situation of the virtual image swimming in the desert, after using the image generation model to generate multiple virtual images in different states and multiple backgrounds, the generated multiple virtual images can be determined as a virtual image set. For any virtual image in the virtual image set, at least one background that matches the any virtual image in the multiple backgrounds is determined and used as the background set. And, a matching relationship between the virtual image and the background set is established. When the image generation request sent by the first client is received, a virtual image can be randomly selected from the virtual image set and determined as the original virtual image corresponding to the first target promotion image. According to the established matching relationship between the virtual image and the background set, a target background set that matches the original virtual image in the multiple background sets is determined. A background is randomly selected from the target background set and determined as the original background corresponding to the first target promotion image.
[0078] Furthermore, in order to ensure that the target virtual image can be located at a suitable position in the target promotion image, and the target virtual image will not be incompletely displayed due to deviation in any direction. In some embodiments, the background may include a background theme and additional elements. Among them, the background theme may be a city building, a football field, a summer lotus pond, a seaside beach, a forest stream, etc. The additional elements are used to circle the position of the target virtual image in the target promotion image, and the additional elements may be a circular base, a winding path, etc. The specific styles of the background theme and the accessory elements can be set as needed in actual applications.
[0079] Step 1012, obtain the first sub-generation parameter corresponding to the original virtual image, the second sub-generation parameter corresponding to the original background, and the first fusion parameter; the first sub-generation parameter is used to transform the original virtual image into a first target virtual image, the second sub-generation parameter is used to transform the original background into the first target background, and the first fusion parameter is used to fuse the first target virtual image and the first target background.
[0080] The first sub-generation parameter may include a first prompt word and a first seed parameter, wherein the first prompt word is used to describe the attributes of the original virtual image, and the first seed parameter is used to transform the original virtual image to obtain the target virtual image. The second sub-generation parameter may include a second prompt word and a second seed parameter and the attributes (such as name, logo, etc.) of the additional element and a position parameter, wherein the second prompt word is used to describe the attributes of the background theme, and the second seed parameter is used to transform the original background to obtain the target background; the position parameter is used by the image generation model to determine the target area corresponding to the additional element in the initial image when generating the initial image, and to locate the target virtual image in the target area.
[0081] In order to ensure the stability of the target virtual image and target background generated by the image generation model, in some embodiments, in the process of generating multiple virtual images in different states using the image generation model obtained by fine-tuning training, it is also possible to generate multiple virtual images in any state (for example, a jumping virtual image) by adjusting the corresponding first prompt word for any virtual image in any state (for example, generating 15 jumping virtual images), determine the virtual image whose image quality is greater than the preset image quality, establish a corresponding relationship between the virtual image with image quality greater than the preset image quality or the virtual image with image quality greater than the preset image quality and the first prompt word and save it. Similarly, in the process of generating multiple backgrounds using the image generation model obtained by fine-tuning training, it is also possible to generate multiple virtual images of any theme (for example, a summer lotus pond) by adjusting the corresponding second prompt word and the position parameters of the additional elements for the background of the theme (for example, generating 15 summer lotus pond backgrounds), determine the background with image quality greater than the preset image quality, establish a corresponding relationship between the background with image quality greater than the preset image quality or the background with image quality greater than the preset image quality and the position parameters of the second prompt word and the additional elements and save it. Furthermore, the image generation model obtained by fine-tuning the training is used to generate a fused image including a virtual image and a background, and in the process of generating the fused image, the fusion parameters are adjusted to generate multiple different fused images, and the fused image whose image quality is greater than the preset image quality is determined among the multiple fused images, and the fusion parameters corresponding to the fused image whose image quality is greater than the preset image quality are saved. It should be noted that the position parameters of the additional elements can also be the same in the backgrounds of different background themes. In this case, only one position parameter needs to be saved, and there is no need to save the position parameter in correspondence with the background or the identifier of the background. The fusion parameters can be different with different combination relationships between the background and the virtual image (for example, the combination relationship 1 between the jumping virtual image and the summer lotus pond theme background corresponds to fusion parameter 1, and the combination relationship 2 between the jumping virtual image and the football field theme background corresponds to fusion parameter 2, etc.), or they can be the same in each combination relationship. When the fusion parameters are different with different combination relationships, the corresponding relationship between the fusion parameters and the combination relationship is established and saved. When the fusion parameters are the same in each combination relationship, only one fusion parameter can be saved.
[0082] Correspondingly, obtaining the first sub-generation parameter corresponding to the original virtual image in step 1012 may include: in the correspondence between the virtual image and the first prompt word, obtaining the first prompt word corresponding to the original virtual image, and determining any seed parameter within the preset seed parameter range as the first seed parameter; determining the obtained first prompt word and first seed parameter as the first sub-generation parameter corresponding to the original virtual image.
[0083] Acquiring the second sub-generation parameter corresponding to the original background in step 1012 may include: when the corresponding relationship between the position parameter and the background is established, in the corresponding relationship between the background and the second prompt word and the position parameter of the additional element, acquiring the second prompt word and the position parameter corresponding to the original background, and determining the acquired second prompt word and the position parameter as the second sub-generation parameter corresponding to the original background. When the corresponding relationship between the position parameter and the background is not established, in the corresponding relationship between the background and the second prompt word, acquiring the second prompt word corresponding to the original background, and determining the acquired second prompt word and the saved position parameter as the second sub-generation parameter.
[0084] The step 1012 of acquiring the first fusion parameter includes: in the case of establishing a corresponding relationship between the combination relationship and the fusion parameter, according to the combination relationship between the original virtual image and the original background, acquiring the corresponding fusion parameter in the corresponding relationship between the combination relationship and the fusion parameter, and determining the acquired fusion parameter as the first fusion parameter. In the case of not establishing a corresponding relationship between the combination relationship and the fusion parameter, determining the saved fusion parameter as the first fusion parameter.
[0085] Step 1013: determine the first sub-generation parameter, the second sub-generation parameter and the first fusion parameter as the generation parameters of the first target generalized image.
[0086] Therefore, after the image generation model is obtained through fine-tuning training, the image generation model is used to generate virtual images in different states and different backgrounds and the corresponding most stable generation parameters are saved. When an image generation request is received, a stable and differentiated initial image can be generated based on the most stable generation parameters and combined with the seed parameters.
[0087] Corresponding to the above steps 1011 to 1013, Figure 3 As shown, step 102 may include the following steps 1021 to 1023:
[0088] Step 1021: Generate a foreground image including a first target virtual image using a pre-trained image generation model according to a first sub-generation parameter.
[0089] In some embodiments, the first sub-generation parameter can be input into the image generation model, and the image generation model obtains a first initial feature set corresponding to the original virtual image in a preset feature space according to the first prompt word in the first sub-generation parameter; transforms at least one first initial feature in the first initial feature set according to the first seed parameter in the first sub-generation parameter to obtain a first target feature set; and combines the features in the first target feature set according to the first prompt word to obtain a foreground image containing the first target virtual image.
[0090] It is understandable that the image generation model will establish a huge feature space during the training process. The feature space includes the correspondence between each feature and attribute learned by the image generation model. Therefore, when the image generation model receives the first sub-generation parameter, it can obtain the first initial feature set corresponding to the original virtual image in the feature space according to the attributes of the original virtual image described by the first prompt word.
[0091] Thus, by transforming at least one of the first initial features in the first initial feature set according to the first seed parameter, a first target feature set is obtained; and by combining the features in the first target feature set according to the first prompt word, a foreground image including the first target virtual image is obtained, so that the first target virtual image is different from the original virtual image while maintaining the same overall style. For example, the original virtual image is a cartoon character, and the cartoon character's fingers point to the right. After transformation according to the first seed parameter, the cartoon character's fingers point to the left, etc., thereby improving the diversity of the target virtual image.
[0092] Step 1022: Generate a background image including the first target background by using the image generation model according to the second sub-generation parameter.
[0093] In some embodiments, the image generation model obtains a second initial feature set corresponding to the background theme of the original background in a preset feature space according to the second prompt word in the second sub-generation parameter; obtains a third initial feature set corresponding to the additional element in the preset feature space according to the attribute of the additional element in the second sub-generation parameter; transforms at least one second initial feature in the second initial feature set according to the second seed parameter to obtain a second target feature set; transforms at least one third initial feature in the third initial feature set according to the second seed parameter and the second prompt information to obtain a third target feature set; and, according to the position parameter in the second sub-generation parameter, combines each feature in the second target feature set and the third target feature set to obtain a background image containing the first target background. Wherein, the target area in the background image includes the image content composed of the features in the third target feature set, and the target area is the area corresponding to the position parameter, and the position parameter can be in any form such as coordinates.
[0094] Therefore, by transforming at least one second initial feature in the second initial feature set according to the second seed parameter, and transforming at least one third initial feature in the third initial feature set, and based on the second target feature set and the third target feature set obtained by the transformation, a background image including the first target background is generated, thereby ensuring that the first target background and the original background are different while maintaining the overall style consistent, thereby improving the diversity of the background.
[0095] Step 1023: fuse the foreground image and the background image according to the first fusion parameter through the image generation model to obtain an initial image.
[0096] In order to make the first target virtual image look like an original part of the initial image, rather than pasted into the background image, in some embodiments, the background may be redrawn. Specifically, the first fusion parameter may include a redrawing parameter and a projection parameter. Accordingly, in step 1023, the image generation model adds the foreground image to the background image to obtain a composite image; identifies the target contact area between the foreground image and the background image in the composite image; removes the background color of the composite image to obtain the image to be redrawn; redraws the background color of the image to be redrawn according to the redrawing parameter, and generates a projection in the target contact area according to the projection parameter to obtain the initial image.
[0097] Among them, the redrawing parameters may include redrawing area parameters, parameters of the degree of influence of the image to be redrawn on the initial image, etc. The degree of influence parameters are used by the image generation model to generate a background similar to the background image, that is, there is a difference between the background in the initial image and the target background in the background image. Therefore, the original background is first transformed to obtain the target background, and then a background different from the target background is generated based on the degree of influence parameters. Through the double change of the background, the difference between the backgrounds in different initial images is greatly improved, thereby improving the difference between the target promotion images.
[0098] The projection parameters may include the location information of the projection (e.g., the coordinates of the starting point and the end point, the radius of the circular area, etc.), the transparency of the projection, etc. The target contact area may be the contact area between the target virtual image and the additional elements in the target background. It should be noted that the projection may be within the target contact area or outside the target contact area. When the image generation model is redrawing the background color of the image to be redrawn, the target contact area may be used as a reference to generate a projection that matches the irradiation direction of the light source.
[0099] As an example, Figure 4 As shown, the target virtual image is a cartoon character, and the additional element is a circular base; the target area can be the contact area between the cartoon character's feet and the circular base when the cartoon character stands on the circular base ( Figure 4 The red area pointed by the red arrow in the figure), the light source shines from the upper left corner, and the target projection is located behind the right side of the target contact area.
[0100] It should be noted that the execution order of steps 1021 to 1023 is not limited to Figure 3In some embodiments, the pre-trained image generation model may have the ability to process tasks in parallel. Accordingly, steps 1021 to 1023 may respectively call the pre-trained image generation model, that is, the image generation model may be called in steps 1021 and 1022 respectively, so that the image generation model generates the foreground image and the background image in parallel. Afterwards, the image generation model is called in step 1023, and the foreground image, the background image and the first fusion parameter are input into the image generation model to obtain the initial image.
[0101] It can be seen that after adding the foreground image to the background image to obtain a composite image, redrawing the background of the composite image and generating a projection to obtain the initial image can not only enhance the difference between different initial images, but also make the initial image look more natural and have a better visual effect.
[0102] In order to enhance the customization of the promotional image, it is ensured that the large language model generates a target text that matches the task characteristics of the target object. In some implementations, reference texts are pre-set for each task included in the subject to be promoted, and a correspondence between the task characteristics and the reference texts is established, so that the first target text is generated based on the reference text in the correspondence. Specifically, Figure 5 As shown, step 103 may include the following steps 1031 to 1034:
[0103] Step 1031, obtaining a target reference text corresponding to the task feature described by the task attribute description information from a plurality of preset reference texts;
[0104] Specifically, according to the task feature, in the pre-established correspondence relationship between the task feature and the reference text, the corresponding reference text is searched, and the searched reference text is determined as the target reference text.
[0105] Step 1032, filling the task feature, the target reference text and the background theme of the target background into the preset prompt word template to obtain a third prompt word, where the third prompt word is used to prompt the large language model to generate a rule for the first target text;
[0106] Step 1033 , determining a parameter value of a target parameter of the large language model within a preset parameter value range, where the target parameter is used by the large language model to generate a first target text that is different from the historically generated text.
[0107] Specifically, a parameter value is randomly selected within a preset parameter value range, and the selected parameter value is determined as the parameter value of the target parameter. The target parameter may be a temperature parameter, and the temperature parameter is used for the large language model to generate text that is different from the historically generated text.
[0108] Step 1034: input the third prompt word and the parameter value into the large language model to obtain the first target text.
[0109] In some implementations, the preset prompt word template may be in the following form:
[0110] <|im_start|>system
[0111] you are a helpful assistant.<|im_end|>
[0112] <|im_start|>user
[0113] Refer to the following praise text written for the {job} position personnel, strictly follow the requirements below, and generate 1 praise text. The content cannot be the same;
[0114] Requirements: The generated praise text should not exceed 18 characters;
[0115] Requirements: Try to be relevant to the job responsibilities;
[0116] Requirements: Try to stick to the {topic} theme;
[0117] {Reference text}
[0118] <|im_end|>
[0119] <|im_start|>assistant.
[0120] Among them, {job} is used to fill in the task features, {topic} is used to fill in the background topic of the target background, and {reference text} is used to fill in the target reference text.
[0121] Take the target object as any employee of the subject to be promoted, and the tasks included in the subject to be promoted as various positions as an example for explanation. The task feature can be the position name. The corresponding relationship between some position names and reference texts is shown as follows:
[0122]
[0123]
[0124] When the target object's job title is technology-application-development and the background theme of the target background is summer theme, the target reference text obtained from the above correspondence is "Your application development has simply started the future!", "Code cannot speak, but every word is your sincerity!", "You are also very handsome when you maintain the application on a daily basis!" The job title, background theme, and target reference text are filled into the above preset prompt word template, and the third prompt word obtained is:
[0125] <|im_start|>system
[0126] you are a helpful assistant.<|im_end|>
[0127] <|im_start|>user
[0128] Refer to the following praise text written for personnel in the {Technology-Application-Development} position. Strictly follow the requirements below and try to generate a praise text for personnel in the {Technology-Algorithm-Search Relevance} position. The content cannot be the same;
[0129] Requirements: The generated praise text should not exceed 18 characters;
[0130] Requirements: Try to be relevant to the job responsibilities;
[0131] Requirements: Try to stick to the summer theme;
[0132] Reference text:
[0133] When you type code, my heart beats thousands of times for you!
[0134] The way you concentrate on writing code is breathtakingly beautiful!
[0135] You who are patiently testing are the coolest in the company!
[0136] <|im_end|>
[0137] <|im_start|>assistant
[0138] It should be pointed out that the preset prompt word templates, job titles and reference texts are not limited to the above-mentioned forms, and they can be set according to needs in actual applications.
[0139] It should be further pointed out that when the task attribute description information included in the image generation request does not include the job title of the target object, the step before step 1031 may also include: obtaining the corresponding job title in the correspondence relationship between the identifier and the job title according to the identifier of the target object included in the task attribute description information. The identifier of the target object may be at least one of a work number, a flower name of the target object in the subject to be promoted, and the like.
[0140] Thus, by filling the task characteristics, target reference text and background theme into the preset prompt word template, a third prompt word is obtained, and the third prompt word and the parameter value of the target parameter are input into the large language model to generate the first target text. This not only ensures that the first target text matches the task characteristics of the target object and the target background, but also ensures that there are differences between the first target text and the previously generated historical texts. Therefore, the exclusive customization of the first target text is greatly enhanced, and thus the customization of the target promotion image can be enhanced.
[0141] Considering the traditional method of prefabricating dissemination content, for example, the subject to be promoted is an enterprise, and there are 1,000 employees in the enterprise participating in the activity, if 1,000 background images and 1,000 texts are prepared in advance, then according to the Cartesian product combination, the number of pre-combined images will reach the billion level, and both the time cost and the storage cost are high. Based on this, in some embodiments of the present application, after obtaining the initial image and the first target text, a real-time image fusion engine is used to fuse the initial image and the first target text to obtain the first target promotion image. Specifically, Figure 6 As shown, step 104 may include the following steps 1041 and 1042:
[0142] Step 1041 , generating combined image data according to the initial image and the first target text according to a preset combined image template, where the combined image data includes a second fusion parameter.
[0143] Specifically, the initial image and the first target text are filled into a preset combined image template to obtain combined image data, wherein the preset combined image template may include a preset second fusion parameter, and the second fusion parameter may include position parameters, style parameters (such as font size, font color, etc.) of the first target text in the first target promotion image, etc.
[0144] In order to further enhance the sense of customization of the first target promotion image, in some embodiments, the preset combined image template may also include the identity information of the target object and the identity information of the first user to which the client belongs. Accordingly, in step 1041, combined image data may be generated according to the preset combined image template based on the initial image, the first target text, the identity information of the target object, the identity information of the first user, etc. The identity information may be the name of the target object, or a combination of a surname and a title, such as Mr. Wang, Mr. Wang, Ms. Wang, etc. It should be noted that when the target object is a group such as a working group in the subject to be promoted, the first identity information may be the name of each user included in the target object, or a combination of a surname and a title.
[0145] Step 1042, input the combined image data into a preset combined image engine, add the first target text to the initial image according to the second fusion parameter, and obtain the first target promotion image.
[0146] In some embodiments, the image combining engine has the capability of real-time batch generation, that is, it can process multiple image combining data in parallel at the same time. Thus, the image combining data is generated according to the initial image and the first target text, and the image combining engine performs image combining processing according to the image combining data to obtain the first target promotion image, which improves the exclusive customization of the first target promotion image and improves the synthesis efficiency of the first target promotion image, avoiding the problem of large storage space required for storing pre-made images.
[0147] In order to facilitate the target object to access the first target promotion image, in some embodiments, Figure 7 As shown, after step 104, the following steps 105 and 106 are also included:
[0148] Step 105: Save the first target promotion image to a preset storage area, and generate a first access address of the first target promotion image according to the storage location of the first target promotion image.
[0149] In some implementations, the first access address may be a URL (Uniform Resource Locator). The specific form of the first access address may be set as required in actual applications, and is not specifically limited in this application.
[0150] Step 106: Send the first access address to the target object, where the first access address is used by the target object to access the first target promotion image.
[0151] Specifically, the first access address may be sent to the second client of the target object. When the second client receives the first access address, it obtains the first target promotion image according to the first access address and displays the first target promotion image.
[0152] Therefore, by sending the first access address of the first target promotion image to the target object, the second client of the target object can render and display the first target promotion image just like rendering a normal image, without the need to develop a corresponding processing program for the display of the target promotion image. This reduces development costs while ensuring that the first target promotion image can be effectively displayed.
[0153] Furthermore, considering that in actual applications, the first user may have a need to confirm the first target promotion image, based on this, in some embodiments, before step 106, it may also include: the server sends the first access address to the first client, and executes step 106 when receiving the sending request sent by the first client. When the first client receives the first access address, it obtains and displays the first target promotion image according to the first access address, and sends a sending request to the server in response to the received sending instruction. The server sends the first access address to the target object according to the sending request.
[0154] Therefore, by sending the first access address to the first client and sending the first access address to the target object upon receiving the sending request sent by the first client, it is ensured that the first target promotion image can meet the needs of the first user.
[0155] Furthermore, in order to enhance the differences and interest between different promotional images, in some implementations, the following steps 1001 to 1003 may be included before step 101:
[0156] Step 1001, obtaining training samples, the training samples include a first training image with a label, a second training image with a label, and a training text; the label of the first training image is used to annotate the features of the original virtual image contained in the first training image, and the label of the second training image is used to annotate the features of the original background contained in the second training image. Any training text includes task description information, reference text, and extended text.
[0157] Specifically, multiple original virtual images can be designed in advance, and an image containing any original virtual image can be determined as a first training image, and the features of the original virtual image can be annotated in the first training image to obtain a label of the first training image. Similarly, multiple original backgrounds can be involved or obtained in advance, and an image containing any original background can be determined as a second training image, and the features of the original background can be annotated in the second training image to obtain a label of the second training image. In addition, for any task included in the subject to be promoted, determine the task description information and reference text, as well as the extended text that can be generated based on the task description information and reference text, that is, any training text can be an input-output text pair, wherein the input text includes description information and reference text, and the output text is an extended text. The task description information may include the task name (such as job title), responsibilities, positive comments, etc.
[0158] Step 1002: Perform a first fine-tuning training on the pre-trained first initial model using the first training sample and the second training sample to obtain an image generation model.
[0159] In some embodiments, FSL and LoRA technology can be used to perform first fine-tuning training on the pre-trained first initial model using the first training sample and the second training sample to obtain an image generation model. The specific process of performing the first fine-tuning training on the first initial model using FSL and LoRA technology can refer to the relevant technology, which will not be described in detail in this application.
[0160] Step 1003: Perform a second fine-tuning training on the pre-trained second initial model using the training text to obtain a large language model.
[0161] Among them, the process of the second fine-tuning training can refer to the fine-tuning training process of the existing large language model, which will not be described in detail in this application.
[0162] Therefore, by fine-tuning the pre-trained first initial model and the second initial model respectively, an image generation model and a large language model suitable for the subject to be promoted can be obtained, so that not only can the image generation model and the large language model be used to generate promotional images suitable for the subject to be promoted, but also the difference and customization between the promotional images can be improved.
[0163] Corresponding to the above-mentioned embodiment of the promotion image generation method, the present application also provides a promotion image generation method, Figure 8 A flowchart of a promotion image generation method provided in an embodiment of the present application, Figure 8 The method shown can be Figure 1 The client executes in Figure 8 As shown, the method includes the following steps 201-203.
[0164] Step 201 , in response to a start instruction of an image generation application, an image generation interface is displayed, wherein the image generation interface includes image generation options.
[0165] Step 202: In response to a trigger operation on an image generation option, an object list is displayed, wherein the object list includes identifiers of various objects included in the subject to be promoted.
[0166] Step 203, in response to the selection operation of any object, an image generation request is sent to the server, the image generation request includes task attribute description information of the selected object, the image generation request is used to request the server to generate a first target promotion image, and send the first access address of the first target promotion image to the client of the selected object, the selected object is the object to which the first target promotion image is to be promoted, and the task attribute description information is used to describe the attributes of the tasks contained in the subject to be promoted.
[0167] In some embodiments, the image generation application may be a small program embedded in the first application. For example, the subject to be promoted is an enterprise, the sender of the image generation request is the first user, the target object is the second user, and the first user and the second user are employees of the subject to be promoted. Fig. 9 As shown, a first application is installed and run in a client of a first user, and a search interface of the first application includes a search box. When the first user enters an application name of an image generation application (e.g., the name is "image generation application") in the search box and enters a start instruction, the first client responds to the start instruction, starts the image generation application and displays an image generation interface, which may include image generation options (e.g., Fig. 9 ), the promotional image options I received (such as Fig. 9 Received by me), the Promotional Images I sent option (e.g. Fig. 9 When the first user operates the image generation option (for example, click Fig. 9 In the example above, when the first client selects the "Generate Image" control in the promotion object list, the first client displays an object list (i.e., an object list interface) in response to the first user's triggering operation on the image generation option. The object list can be an object list of the first application or an object list of the image generation selection line. The object list includes the identifiers of the objects included in the promotion subject (e.g., the user's flower name in the promotion subject, etc.). When the first user selects the identifier of the second user in the object list (e.g., selecting Fig. 9 6), the first client sends an image generation request to the server in response to the first user's selection operation of the second user's identifier, and displays a waiting interface representing image production. It should be noted that the image generation application can also be an independent application, web application, etc.
[0168] In some real-time manner, in order to ensure that the first target promotion image meets the needs of the first user, such as Fig.10 As shown, after the first client sends an image generation request to the server, it can also include: receiving a first access address sent by the server, obtaining and displaying a first target promotion image according to the first access address, and sending a sending request to the server according to the first access address in response to the received sending instruction.
[0169] Correspondingly, Fig. 9As shown, the first client displays the first target promotion image in the confirmation interface, and the confirmation interface may include a send control and a change control. When the first user inputs a send instruction through the send control, the first client sends a send request to the server according to the first access address. When the first user inputs a change instruction through the change control, the first client re-sends an image generation request to the server, and the server regenerates the first target promotion image in the manner provided in any of the aforementioned embodiments.
[0170] Further, such as Fig.10 As shown, after the server sends the first access address to the second client of the target object, the second client displays the first target promotion image in response to the access operation to the first access address.
[0171] In some embodiments, a preset storage area for storing target promotion images may open access rights to each user included in the subject to be promoted. Accordingly, the second client responds to an access operation to the first access address, queries the first target promotion image from the preset storage area according to the first access address, and displays the first target promotion image.
[0172] In some embodiments, when the users included in the subject to be promoted do not have access rights to the preset storage area, the second client can respond to the access operation to the first access address, send an image acquisition request to the server according to the first access address, receive the first target promotion image sent by the server, and display it. Correspondingly, when the server receives the image acquisition request, it searches for the first target promotion image in the preset storage area according to the first access address in the image acquisition request, and sends it to the first client.
[0173] In some implementations, after receiving the first access address, the second client may determine that an access operation to the first access address is obtained when an opening instruction of a target dialog box is obtained, wherein the target dialog box is a dialog box between the first user and the second user.
[0174] It should be pointed out that the method by which the second client obtains and displays the first target promotion image and the method by which the access operation of the first access address is obtained are not limited to the above methods. They can be set as needed in actual applications and are not specifically limited in this application. Fig.10 This is for illustration only and not for limitation. The execution order of some operations can be interchanged or performed simultaneously. Fig.10 For the specific implementation methods of each step, please refer to the relevant description in the previous text, and the repeated parts will not be repeated here.
[0175] Considering that in actual applications, the first user may also be a target object, based on this, in some implementations, the method may further include:
[0176] A second access address sent by the server is received; in response to an access operation to the second access address, a second target promotion image is displayed; the second promotion image includes a second target virtual image, a second target background and a second target text.
[0177] The process of the first client acquiring and displaying the second target promotion image is the same as the process of the first client acquiring and displaying the first target promotion image, and reference may be made to the aforementioned related description, and the repeated parts will not be repeated here.
[0178] It can be seen that the users included in the subject to be promoted can send target promotion images to each other, which can not only promote the culture of the subject to be promoted, but also enhance the communication between users (such as between corporate employees).
[0179] Corresponding to the above-mentioned embodiment of the promotional image generation method, the present application also provides an embodiment of a promotional image generation device. Fig.11 is a schematic diagram of a promotion image generation device according to an exemplary embodiment. The device can be configured in Figure 1 The device is used to execute the promotion image generation method applied to the server provided in any of the above embodiments, such as Fig.11 As shown, the promotion image generating device includes:
[0180] The determination module 301 is used to determine the generation parameters of the first target promotion image to be generated in response to the image generation request sent by the first client, wherein the image generation request includes the task attribute description information of the target object to be promoted, and the task attribute description information is used to describe the attributes of the tasks included in the subject to be promoted;
[0181] The first generation module 302 is used to call the pre-trained image generation model to generate an initial image according to the generation parameters, wherein the initial image includes a first target virtual image and a first target background corresponding to the generation parameters; the first target virtual image is a preset image representation of the subject to be promoted;
[0182] The second generation module 303 is used to call the pre-trained large language model to generate the first target text according to the task features described in the task attribute description information and the semantic features of the first target background;
[0183] The fusion module 304 is used to fuse the initial image and the first target text to obtain a first target promotion image.
[0184] In some implementations, the determination module 301 is specifically configured to:
[0185] Determine an original virtual image and an original background corresponding to the first target promotional image;
[0186] Obtaining a first sub-generation parameter corresponding to the original virtual image, a second sub-generation parameter corresponding to the original background, and a first fusion parameter; the first sub-generation parameter is used to transform the original virtual image into a first target virtual image, the second sub-generation parameter is used to transform the original background into a first target background, and the first fusion parameter is used to fuse the first target virtual image and the first target background;
[0187] The first sub-generation parameter, the second sub-generation parameter and the first fusion parameter are determined as generation parameters of the first target generalized image.
[0188] In some implementations, the first generating module 302 is specifically configured to:
[0189] generating a foreground image including a first target virtual image according to the first sub-generation parameter;
[0190] generating a background image including the first target background according to the second sub-generation parameter;
[0191] The foreground image and the background image are fused according to the first fusion parameter to obtain an initial image.
[0192] In some implementations, the first sub-generation parameter includes a first prompt word and a first sub-parameter, the first prompt word is used to describe the attributes of the original avatar; the first generation module 302 is further specifically used to:
[0193] According to the first prompt word, a first initial feature set corresponding to the original virtual image is obtained in a preset feature space;
[0194] transforming at least one first initial feature in the first initial feature set according to the first seed parameter to obtain a first target feature set;
[0195] The features in the first target feature set are combined according to the first prompt word to obtain a foreground image including the first target virtual image.
[0196] In some implementations, the original background includes a background theme and additional elements, the second sub-generation parameters include a second prompt word, a second sub-parameter, and attributes and position parameters of the additional elements, and the second prompt word is used to describe the attributes of the background theme; the first generation module 302 is further specifically used to:
[0197] According to the second prompt word, a second initial feature set corresponding to the background theme is obtained in the preset feature space;
[0198] According to the attribute of the additional element, a third initial feature set corresponding to the additional element is obtained in the preset feature space;
[0199] transforming at least one second initial feature in the second initial feature set according to the second seed parameter to obtain a second target feature set;
[0200] transforming at least one third initial feature in the third initial feature set according to the second seed parameter and the second prompt information to obtain a third target feature set;
[0201] According to the position parameters, the features in the second target feature set and the third target feature set are combined to obtain a background image containing the first target background; the target area in the background image includes the image content constituted by the features in the third target feature set, and the target area is the area corresponding to the position parameters.
[0202] In some implementations, the first fusion parameter includes a redrawing parameter and a projection parameter, and the first generating module 302 is further specifically configured to:
[0203] Add the foreground image to the background image to obtain a composite image;
[0204] Identifying a target contact area between the foreground image and the background image in the image to be redrawn;
[0205] Remove the background color of the synthesized image to obtain the image to be redrawn;
[0206] The background color of the image to be redrawn is redrawn according to the redrawing parameters, and a projection is generated in the target contact area according to the projection parameters to obtain an initial image.
[0207] In some implementations, the determination module 301 is further specifically configured to:
[0208] Determine any one of the virtual images in the virtual image set as the original virtual image corresponding to the first target promotional image;
[0209] According to the matching relationship between the preset virtual image and the background set, determining a target background set that matches the original virtual image from among the preset multiple background sets;
[0210] Any background in the target background set is determined as the original background corresponding to the first target promotion image.
[0211] In some implementations, the semantic feature includes a background theme of the first target background, and the second generating module 303 is specifically configured to:
[0212] Obtaining a target reference text corresponding to the task feature from a plurality of preset reference texts;
[0213] Filling the task features, the target reference text and the background theme into the preset prompt word template to obtain a third prompt word, where the third prompt word is used to prompt the large language model to generate a rule for the first target text;
[0214] Determining a parameter value of a target parameter of the large language model within a preset parameter value range, the target parameter being used by the large language model to generate a first target text that is different from a historically generated text;
[0215] The third prompt word and the parameter value are input into the large language model to obtain the first target text.
[0216] In some implementations, the fusion module 304 is specifically configured to:
[0217] Generate combined image data according to a preset combined image template based on the initial image and the first target text, where the combined image data includes a second fusion parameter;
[0218] The combined image data is input into a preset combined image engine, and the first target text is added to the initial image according to the second fusion parameter to obtain a first target promotion image.
[0219] In some embodiments, the device further comprises a storage module and a sending module;
[0220] A saving module, configured to save the first target promotion image to a preset storage area after the fusion module fuses the initial image and the first target text to obtain the first target promotion image, and to generate a first access address of the first target promotion image according to the storage location of the first target promotion image;
[0221] The sending module is used to send a first access address to a target object, where the first access address is used by the target object to access a first target promotion image.
[0222] In some embodiments, the apparatus further comprises an acquisition module, a first training module, and a second training module;
[0223] An acquisition module is used to acquire training samples, wherein the training samples include a first training image with a label, a second training image with a label, and a training text; the label of the first training image is used to annotate the features of the original virtual image contained in the first training image, and the label of the second training image is used to annotate the features of the original background contained in the second training image, and any training text includes task description information, reference text, and extended text;
[0224] A first training module is used to perform a first fine-tuning training on the pre-trained initial model using the first training sample and the second training sample to obtain an image generation model;
[0225] In the second training module, the user uses the training text to perform a second fine-tuning training on the pre-trained second initial model to obtain the large language model.
[0226] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components illustrated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art may understand and implement it without creative work.
[0227] Corresponding to the above-mentioned embodiment of the promotional image generation method, the present application also provides an embodiment of a promotional image generation device. Fig.12 is a schematic diagram of a promotion image generation device according to an exemplary embodiment. The device can be configured in Figure 1 The device is used to execute the promotion image generation method of the application client provided in any of the above embodiments, such as Fig.12 As shown, the promotion image generating device includes:
[0228] A first display module 401 is used to display an image generation interface in response to a start instruction of an image generation application, wherein the image generation interface includes image generation options;
[0229] The second display module 402 is used to display an object list in response to a triggering operation on the image generation option, wherein the object list includes the identification of each object included in the subject to be promoted;
[0230] The sending module 403 is used to send an image generation request to the server in response to the selection operation of any object. The image generation request includes the task attribute description information of the object. The image generation request is used to request the server to generate a first target promotional image according to the promotional image generation method provided by any of the aforementioned embodiments, and send the first access address of the first target promotional image to the client of any selected object. The selected object is the object to which the first target promotional image is to be promoted. The task attribute description information is used to describe the attributes of the tasks included in the subject to be promoted.
[0231] In some embodiments, the device further comprises a receiving module and a display module;
[0232] The receiving module is used to receive the second access address sent by the server;
[0233] The display module is used to display a second target promotion image in response to an access operation to the second access address; the second promotion image includes a second target virtual image, a second target background and a second target text.
[0234] The promotional image generation device provided in the embodiment of the present application and the promotional image generation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0235] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0236] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components illustrated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art may understand and implement it without creative work.
[0237] Corresponding to the aforementioned embodiments of the promotional image generation method, the present application also provides embodiments of a promotional image generation system. Fig.13 FIG. 1 is a schematic diagram showing a structure of a promotion image generation system according to an exemplary embodiment. Fig.13 As shown, the promotion image generation system includes: a first client 501 and a server 502 .
[0238] The first client 501 is used to display an image generation interface in response to a start instruction of an image generation application, wherein the image generation interface includes an image generation option; in response to a trigger operation on the image generation option, display an object list, wherein the object list includes the identifiers of each object included in the subject to be promoted; in response to a selection operation on any object, send an image generation request to the server 502; the image generation request includes task attribute description information of any selected object, wherein the task attribute description information is used to describe the attributes of the task included in the subject to be promoted;
[0239] The server 502 is used to determine the generation parameters of the first target promotion image to be generated according to the image generation request; call the pre-trained image generation model to generate an initial image according to the generation parameters, and the initial image includes the first target virtual image and the first target background corresponding to the generation parameters; call the pre-trained large language model to generate the first target text according to the task features described by the task attribute description information and the semantic features of the first target background; fuse the initial image and the first target text to obtain the first target promotion image.
[0240] In some embodiments, Fig.14As shown, the system further includes a second client 503 of any selected object;
[0241] The server 502 is further configured to save the first target promotion image to a preset storage area, generate a first access address of the first target promotion image according to the storage location of the first target promotion image, and send the first access address to the second client 503;
[0242] The second client 503 is used to receive the first access address sent by the server 502, and display the first target promotion image in response to the access operation to the second access address.
[0243] The promotional image generation system provided in the embodiment of the present application and the promotional image generation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0244] It is understandable that the division of the above modules is only a division of logical functions. In actual implementation, the functions of the above modules can be integrated into hardware entities. For example, the functions of the aforementioned determination module 301, the first generation module 302, the second generation module 303, the fusion module 304, the first display module 401 and the second display module 402 can be integrated into the processor for implementation, and the function of the sending module 403 can be integrated into the transceiver for implementation, etc.
[0245] Based on this, some embodiments of the present application further provide an electronic device corresponding to the promotion image generation method provided in the aforementioned embodiment, and the electronic device can be configured as follows: Figure 1 The server or client shown is used to execute the above-mentioned promotion image generation method.
[0246] Fig.10 6 is a hardware structure diagram of an electronic device according to an exemplary embodiment, the electronic device includes: a communication interface 601, a processor 602, a memory 603 and a bus 604; wherein the communication interface 601, the processor 602 and the memory 603 communicate with each other through the bus 604. The processor 602 can execute the promotion image generation method described above by reading and executing the machine executable instructions corresponding to the control logic of the promotion image generation method in the memory 603. The specific content of the method is referred to the above embodiment, which will not be repeated here.
[0247] The memory 603 mentioned in the embodiment of the present application can be any electronic, magnetic, optical or other physical storage device, and can contain storage information, such as executable instructions, data, etc. Specifically, the memory 603 can be RAM (Random Access Memory), flash memory, storage drive (such as hard disk drive), any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 601 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0248] The bus 604 may be an ISA bus, a PCI bus or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 603 is used to store programs, and the processor 602 executes the programs after receiving execution instructions.
[0249] Processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in processor 602 or an instruction in software form. The above-mentioned processor 602 can be a general-purpose processor, including a network processor (Network Processor, referred to as NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware controls, etc. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined to execute.
[0250] The electronic device provided in the embodiment of the present application and the promotion image generation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0251] The embodiments of the present application also provide a computer-readable storage medium corresponding to the promotional image generation method provided in the aforementioned embodiments, on which a computer program (i.e., a program product) is stored. When the computer program is executed by a processor, it will execute the promotional image generation method provided in any of the aforementioned embodiments.
[0252] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0253] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the promotional image generation method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0254] The embodiments of the present application also provide a computer program product corresponding to the promotional image generation method provided in the aforementioned embodiments. The computer program product includes a computer program, and the computer program is executed by a processor to implement the promotional image generation method provided in the aforementioned embodiments.
[0255] The computer program product provided by the above-mentioned embodiments of the present application and the promotion image generation method provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0256] The solutions in this application specification and embodiments, if they involve the processing of personal information, will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0257] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0258] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0259] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A generalized image generation method, characterized in that: Applied to the server, the method includes: In response to an image generation request sent by the first client, determining generation parameters of a first target promotion image to be generated, wherein the image generation request includes task attribute description information of the target object to be promoted, wherein the task attribute description information is used to describe the attributes of the tasks included in the subject to be promoted; Calling a pre-trained image generation model to generate an initial image according to the generation parameters, wherein the initial image includes a first target virtual image and a first target background corresponding to the generation parameters, wherein the first target virtual image is a preset image representation of the subject to be promoted; Calling a pre-trained large language model to generate a first target text according to the task features described by the task attribute description information and the semantic features of the first target background; The initial image and the first target text are fused to obtain the first target promotion image.
2. The method according to claim 1, characterized in that: The step of determining generation parameters of the first target generalized image to be generated includes: Determining an original virtual image and an original background corresponding to the first target promotional image; Acquire a first sub-generation parameter corresponding to the original virtual image, a second sub-generation parameter corresponding to the original background, and a first fusion parameter; the first sub-generation parameter is used to transform the original virtual image into the first target virtual image, the second sub-generation parameter is used to transform the original background into the first target background, and the first fusion parameter is used to fuse the first target virtual image and the first target background; The first sub-generation parameter, the second sub-generation parameter and the first fusion parameter are determined as generation parameters of the first target generalized image.
3. The method according to claim 2, characterized in that The step of generating an initial image according to the generation parameters comprises: generating a foreground image including the first target virtual image according to the first sub-generation parameter; generating a background image including the first target background according to the second sub-generation parameter; The foreground image and the background image are fused according to the first fusion parameter to obtain an initial image.
4. The method according to claim 3, characterized in that The first sub-generation parameter includes a first prompt word and a first sub-parameter, wherein the first prompt word is used to describe the attribute of the original virtual image; The step of generating a foreground image including the first target virtual image according to the first sub-generation parameter includes: According to the first prompt word, obtaining a first initial feature set corresponding to the original virtual image in a preset feature space; transforming at least one first initial feature in the first initial feature set according to the first seed parameter to obtain a first target feature set; The features in the first target feature set are combined according to the first prompt word to obtain a foreground image including the first target virtual image.
5. The method according to claim 3, characterized in that: The original background includes a background theme and additional elements, the second sub-generation parameters include a second prompt word, a second sub-parameter, and the attributes and position parameters of the additional elements, and the second prompt word is used to describe the attributes of the background theme; The step of generating a background image including the first target background according to the second sub-generation parameter includes: According to the second prompt word, obtaining a second initial feature set corresponding to the background theme in a preset feature space; According to the attribute of the additional element, obtaining a third initial feature set corresponding to the additional element in the preset feature space; transforming at least one second initial feature in the second initial feature set according to the second seed parameter to obtain a second target feature set; transforming at least one third initial feature in the third initial feature set according to the second seed parameter and the second prompt information to obtain a third target feature set; According to the position parameters, the features in the second target feature set and the third target feature set are combined to obtain a background image containing the first target background; the target area in the background image includes image content constituted by the features in the third target feature set, and the target area is the area corresponding to the position parameters.
6. The method according to claim 3, characterized in that The first fusion parameters include a redrawing parameter and a projection parameter, and fusing the foreground image and the background image according to the first fusion parameters to obtain the initial image includes: Adding the foreground image to the background image to obtain a composite image; identifying a target contact area between the foreground image and the background image in the composite image; Removing the background color of the composite image to obtain the image to be redrawn; The background color of the image to be redrawn is redrawn according to the redrawing parameters, and a projection is generated in the target contact area according to the projection parameters to obtain the initial image.
7. The method according to claim 1, characterized in that The semantic features include the background theme of the first target background, and calling the pre-trained large language model to generate the first target text according to the task features described in the task attribute description information and the semantic features of the first target background includes: Acquire a target reference text corresponding to the task feature from a plurality of preset reference texts; Filling the task feature, the target reference text and the background theme into a preset prompt word template to obtain a third prompt word, wherein the third prompt word is used to prompt the large language model to generate a rule for the first target text; Determining a parameter value of a target parameter of the large language model within a preset parameter value range, wherein the target parameter is used by the large language model to generate a first target text different from a historically generated text; The third prompt word and the parameter value are input into the large language model to obtain the first target text.
8. The method according to any one of claims 1 to 7, characterized in that: After fusing the initial image and the first target text to obtain the first target promotion image, the method further includes: Saving the first target promotion image to a preset storage area, and generating a first access address of the first target promotion image according to the storage location of the first target promotion image; The first access address is sent to the target object, where the first access address is used by the target object to access the first target promotion image.
9. A generalized image generation method, characterized in that: Applied to a client, the method comprises: In response to a start instruction of the image generation application, displaying an image generation interface, wherein the image generation interface includes image generation options; In response to a triggering operation on the image generation option, displaying an object list, the object list including identifiers of various objects included in the subject to be promoted; In response to a selection operation on any object, an image generation request is sent to a server, the image generation request including task attribute description information of the object, the image generation request being used to request the server to generate a first target promotion image according to the method described in any one of claims 1 to 8, and to send a first access address of the first target promotion image to a client of the object, the object being the object to which the first target promotion image is to be promoted, and the task attribute description information being used to describe the attributes of the tasks contained in the subject to be promoted.
10. The method according to claim 9, characterized in that The method further comprises: Receiving a second access address sent by the server; In response to the access operation to the second access address, a second target promotion image is displayed; the second promotion image includes a second target virtual image, a second target background and a second target text.