Image generation method and device
By obtaining user's business scenario information and personalized information, generating emotional description statements and using image generation models, the problem of lack of diversity in badge generation is solved, personalized image generation is realized, and user experience is improved.
Patent Information
- Application Number
- CN202410116728.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2025-07-29
AI Technical Summary
The existing technology lacks diversity in generating badges and has poor user experience.
By obtaining user's business scenario information and personalized information, emotional description statements are generated, and a personalized image is generated based on the prompt words using the image generation model.
The generated images are more diverse and personalized, enhancing the user's sense of experience and belonging.
Smart Images

Figure CN120388104A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a method and device for image generation. Background Art
[0002] With the development of Internet technology, it has become increasingly common to use digital badges to authenticate users' skills or temperament preferences. Currently, one way to generate badges is to manually design a badge sequence and grant it to corresponding users according to specified rules; another way is to generate badges using users' preference selections. The badges obtained by the above methods lack diversity and the user experience is not good. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method and device for image generation, which can generate images corresponding to the user's emotional association by combining the user's business scenario information and personalized information with an image generation model, making the obtained images more diverse and personalized, and improving the user experience.
[0004] To achieve the above object, according to one aspect of the embodiments of the present invention, a method for image generation is provided, including:
[0005] Obtaining business scenario information and personalized information corresponding to a user;
[0006] Generating an emotion description statement according to the business scenario information;
[0007] Generating a prompt for an image generation model according to the business scenario information, the personalized information, and the emotion description statement; the prompt is an input to the image generation model;
[0008] Determining a target image corresponding to the user according to the image generation model and the prompt.
[0009] Optionally, generating an emotion description statement according to the business scenario information includes:
[0010] Generating the emotion description statement according to the business scenario information and a preset business rule, or
[0011] Generating the emotion description statement according to the business scenario information and a natural language processing model.
[0012] Optionally, generating a prompt for an image generation model according to the business scenario information, the personalized information, and the emotion description statement includes:
[0013] Constructing an execution instruction for instructing to generate a prompt for an image generation model;
[0014] Input the business scenario information, the personalized information, the emotional description statement, and the execution instruction into a natural language processing model to generate the prompt word.
[0015] Optionally, determining a target image corresponding to the user according to the image generation model and the prompt word includes:
[0016] Input a preset template shape and the prompt word into the image generation model to generate one or more candidate images, so that the user selects the target image from the one or more candidate images.
[0017] Optionally, the image generation model is a diffusion model or a generative adversarial network model.
[0018] Optionally, after determining the target image corresponding to the user according to the image generation model and the prompt word, it further includes:
[0019] Obtain the pixel information of the target image;
[0020] Generate a digital signature corresponding to the target image according to the emotional description statement and the pixel information of the target image to verify the target image according to the digital signature.
[0021] Optionally, the business scenario information includes one or more of the information of the browsed products, the information of the products added to the shopping cart, the information of the ordered products, and the information of the evaluated products.
[0022] According to still another aspect of the embodiments of the present invention, there is provided an image generation device, including:
[0023] An acquisition module, which acquires business scenario information and personalized information corresponding to a user;
[0024] A first generation module, which generates an emotional description statement according to the business scenario information;
[0025] A second generation module, which generates a prompt word for the image generation model according to the business scenario information, the personalized information, and the emotional description statement; the prompt word is the input of the image generation model;
[0026] A determination module, which determines a target image corresponding to the user according to the image generation model and the prompt word.
[0027] According to another aspect of the embodiments of the present invention, there is provided an electronic device, including:
[0028] One or more processors;
[0029] A storage device for storing one or more programs,
[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the image generation method provided by the present invention.
[0031] According to another aspect of the embodiments of the present invention, there is provided a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the image generation method provided by the present invention is implemented.
[0032] According to another aspect of the embodiments of the present invention, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, the image generation method provided by the present invention is implemented.
[0033] One embodiment of the above invention has the following advantages or beneficial effects: The image generation method according to the embodiments of the present invention obtains business scenario information and personalized information corresponding to a user, generates an emotion description statement according to the business scenario information, and then generates a prompt for an image generation model with the business scenario information, personalized information, and emotion description statement, and inputs the prompt into the image generation model to obtain a target image corresponding to the user. By combining the user's business scenario information and personalized information, and using the image generation model, this method automatically and intelligently generates personalized images for the user to represent the user's mood, making the obtained images more diverse and personalized, enhancing the value sense and sense of belonging of the images, and improving the user experience.
[0034] The further effects of the above non-conventional alternative manners will be described in conjunction with the specific embodiments hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings are used to better understand the present invention and do not constitute an improper limitation to the present invention. Among them:
[0036] Figure 1 is a schematic diagram of the main process of an image generation method according to an embodiment of the present invention;
[0037] Figure 2 is a schematic diagram of the main process of another image generation method according to an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of the main modules of an image generation device according to an embodiment of the present invention;
[0039] Figure 4 is an exemplary system architecture diagram to which the embodiments of the present invention can be applied;
[0040] Figure 5 is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing the embodiments of the present invention. Detailed implementation manners
[0041] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings. Various details of the embodiments of the present invention are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, descriptions of well-known functions and structures are omitted below for clarity and conciseness.
[0042] It should be noted that in the technical solutions of the present disclosure, in terms of the collection, gathering, updating, analysis, processing, use, transmission, storage, etc. of user personal information, they all comply with the provisions of relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. Necessary measures are taken for user personal information to prevent illegal access to user personal information data, and to safeguard user personal information security, network security, and national security.
[0043] Figure 1 is a schematic diagram of the main process of a method for image generation according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:
[0044] Step S101: Obtain business scenario information and personalized information corresponding to the user;
[0045] Step S102: Generate an emotion description statement according to the business scenario information;
[0046] Step S103: Generate a prompt for the image generation model according to the business scenario information, personalized information, and emotion description statement; the prompt is the input of the image generation model;
[0047] Step S104: Determine the target image corresponding to the user according to the image generation model and the prompt.
[0048] In the embodiments of the present invention, the business scenario information corresponding to the user is the behavior data of the user in the business scenario. For example, the business scenario can be an e-commerce shopping scenario, and the business scenario information includes one or more of the product information browsed, the product information added to the shopping cart, the product information ordered, and the product information evaluated, and can also include the product information collected or followed by the user. The product information browsed includes the products browsed by the user, the browsing time, the browsing times, etc. The product information added to the shopping cart includes the products added to the shopping cart by the user, the addition time, the price of the product at the time of addition, and the price reduction information, etc. The product information ordered includes the ordered products, the order time, the transaction price of the product, etc. The product information evaluated includes the evaluated products, the evaluation time, and the evaluation content, etc. The personalized information of the user can be the portrait data of the user, and the personalized information of the user can include information such as the gender, age group, color preference, and interest preference of the user.
[0049] In the embodiments of the present invention, generating an emotion description statement according to the business scenario information includes: generating the emotion description statement according to the business scenario information and a preset business rule, or generating the emotion description statement according to the business scenario information and a natural language processing model.
[0050] In the embodiments of the present invention, an emotion description statement can be generated according to the business scenario information and a preset business rule. The preset business rule includes a statement template corresponding to the behavior type. The corresponding behavior type is determined according to the business scenario information, the corresponding statement template is determined according to the behavior type, and the emotion description statement is generated according to the statement template. For example, for the behavior type of placing an order after a long period of waiting and watching, a behavior template corresponding to this behavior type can be used to generate the emotion description statement. For example, if a user has browsed the video game product A frequently in recent months, added the video game product A to the shopping cart and waited for purchase before the promotion, and placed an order to purchase when the video game product A was significantly reduced in price, according to the user's business scenario information, such as browsing records, adding to the shopping cart, placing an order to purchase, etc., the psychological trajectory of the user can be described automatically and intelligently, and a corresponding emotion description statement can be generated, such as "Finally bought the long-awaited video game product A".
[0051] In an embodiment of the present invention, according to business scenario information and a preset template, a prompt word for a corresponding natural language processing model can be obtained. The prompt word is input into the natural language processing model, so that the natural language processing model outputs a corresponding emotion description statement. The natural language processing model can be a large language model. A large language model (Large Language Model) is a deep learning model trained using a large amount of text data, which can generate natural language text and understand the meaning of natural language text. The large language model can be GPT-4, LLaMa-2, Palm2, etc., or ChatGPT, Bard, etc. The natural language processing model can also be a model trained by fine-tuning based on an open-source large model. For example, it is fine-tuned based on LLaMa (Large Language Model Meta AI, an open and efficient large basic language model) to train and generate a proprietary model specifically for the badge type field.
[0052] In an embodiment of the present invention, business scenario information can be obtained regularly through a scheduled task, and then an emotion description statement is generated according to the business scenario information. Furthermore, a target image of the user is obtained according to the emotion description statement to update the target image of the user regularly. The target image is an image used to reflect user characteristics, such as an image describing the user's mood or emotion, or a badge image reflecting the user's mood. Different badge images can be generated under different emotions or moods of the user, reflecting the diversity and personalization of the badge images, thereby improving the user experience.
[0053] For example, the prompt word obtained according to the business scenario and the preset template is as follows: "
[0054] You are a copywriting expert in the e-commerce field. You can accurately identify the user's mood experience after shopping based on the user's information records (browsing records, purchase records, order records, etc.) on the e-commerce website, and then give a short and interesting mood description statement for the user.
[0055] The following are the user's behavior records on the e-commerce website:
[0056] 1) In March, the user browsed multiple video game products in Store C: A, B, and C;
[0057] 2) In March, the user added video game product A to the shopping cart;
[0058] 3) In April and May, the user browsed video game product A in the shopping cart more than 10 times;
[0059] 4) In June, the price of video game product A dropped by 60 yuan, and the user immediately placed an order to purchase video game product A;
[0060] 5) In June, the user commented on video game product A: 'I've been looking forward to it for a long time and couldn't wait to play it continuously for two days.'
[0061] Please generate a mood record statement for the user after shopping by combining the user's operation records and social trends. Concisely describe the user's mood, express it from the perspective of the purchaser, and the requirement is that it must be less than 30 characters. The expression should be full of fun and diversity. Please carefully check the statement you generate to ensure there are no grammar errors and logical errors."
[0062] Input the above prompt into the large language model, and the generated mood description statements. The results obtained from multiple inputs are: 1. Long-awaited, finally owned! 2. Video game product A fills me with joy! 3. Finally got the long-awaited video game product A, so happy that I'm flying! Then, one or more prompt words for the image generation model can be selected from the obtained multiple mood description statements. Input one or more prompt words for the image generation model into the image generation model, and one or more candidate images can be obtained to determine the target image based on one or more candidate images.
[0063] In the embodiment of the present invention, as Figure 2 shown, generating prompt words for the image generation model according to business scenario information, personalized information, and mood description statements includes:
[0064] Step S201: Construct an execution instruction, which is used to instruct the generation of prompt words for the image generation model;
[0065] Step S202: Input the business scenario information, personalized information, mood description statement, and execution instruction into the natural language processing model to generate prompt words.
[0066] In the embodiment of the present invention, after generating a mood description statement according to the business scenario information, generating prompt words for the image generation model according to the business scenario information, personalized information, and mood description statement, and then inputting the prompt words into the image generation model, the user's target image can be obtained to describe the user's mood. Specifically, when generating prompt words for the image generation model, first construct an execution instruction, which is used to instruct the generation of prompt words for the image generation model, that is, the execution task of the natural language processing model is to generate and output prompt words for the image generation model, or the output of the natural language processing model is prompt words for the image generation model; then input the business scenario information, personalized information, mood description statement, and execution instruction into the natural language processing model to generate prompt words. Specifically, according to the business scenario information, personalized information, mood description statement, execution instruction, and preset template, the prompt words input into the natural language processing model are obtained, and the prompt words are input into the natural language processing model to generate prompt words for the image generation model.
[0067] For example, the prompt words of the natural language processing model obtained according to business scenario information, personalized information, mood description statements, execution instructions, and preset templates are as follows:
[0068] "You are an expert in using Stable Diffusion and can proficiently construct the prompt words of the model. The current requirement is for you to generate a set of prompt words for Stable Diffusion.
[0069] The requirements are as follows: Based on the user behavior records and personalized information in the e-commerce field, as well as the mood record statements, generate a mood commemorative badge for the purchased goods. The style of the badge should accurately reflect the user's mood.
[0070] The following are the user's behavior and mood records:
[0071] 1) In June, the price of video game product A dropped by 60 yuan, and the user immediately placed an order to purchase video game product A;
[0072] 2) In June, the user commented on video game product A: 'I've been looking forward to it for a long time and couldn't wait to play it continuously for two days';
[0073] 3) The mood description statement generated for the user is: Finally got the long-awaited video game product A, so happy!
[0074] The following is the user's personalized information:
[0075] 1) A post-00s young person who likes the second-generation culture and video games;
[0076] 2) Likes cool colors;
[0077] 3) Likes picture elements full of combat power;
[0078] Please generate the model prompt words that can generate a beautiful badge image in StableDiffusion according to the above behavior records, mood description statements, and user personalized information. The prompt words are described in English words and need to accurately describe the effect of the generated badge image. The image of the badge effect must be beautiful, full of imagination, and also describe the shape, theme elements, and color style of the badge image. Provide reverse prompt words if necessary to exclude negative situations with poor effects.
[0079] In the embodiment of the present invention, determining the target image corresponding to the user according to the image generation model and the prompt words includes:
[0080] Input a preset template shape and a prompt into an image generation model to generate one or more candidate images, enabling the user to select a target image from the one or more candidate images.
[0081] In an embodiment of the present invention, the image generation model is a diffusion model or a Generative Adversarial Network (GAN) model. The diffusion model can be a Stable Diffusion model or a related variant. The image generation model can also be a variational autoencoder, a flow-based generative model, etc.
[0082] In an embodiment of the present invention, the prompt can be input into the image generation model to generate one or more candidate images, or the preset template shape and the prompt can be input into the image generation model to generate one or more candidate images. The one or more candidate images can be obtained by inputting the prompt multiple times, and the prompt input each time can be the same or different. The user can select one of the one or more candidate images as the target image. The preset template shape can serve as the outline of the target image to control the shape type of the target image. For example, the target image can be a badge image, and the image generation model is a Stable Diffusion model (an artificial intelligence image generation model). The ControlNet plugin of Stable Diffusion can be used to first generate a canny or depth or hed border outline with a preset image, thereby controlling the shape of the generated badge image. Then, the prompt is used to control the generation of other information of the badge image to obtain the badge image. For example, input an image of a game character using the ControlNet plugin, use the canny (an edge detection algorithm) detection method to generate a border image of the corresponding protagonist image, input the prompt of the Stable Diffusion model, and combine the ControlNet plugin to control the shape of the generated badge image, generating a badge image that conforms to the description of the prompt and the expected shape.
[0083] In an embodiment of the present invention, after determining the target image corresponding to the user according to the image generation model and the prompt, it further includes:
[0084] Obtain the pixel information of the target image;
[0085] Generate a digital signature corresponding to the target image according to the emotion description statement and the pixel information of the target image to verify the target image according to the digital signature.
[0086] In an embodiment of the present invention, after determining the target image corresponding to the user, a digital signature can be added to the target image. Specifically, the pixel information of the target image can be obtained, and the pixel information of the target image includes the pixel values of each pixel point in the target image. A digital signature, that is, a public key digital signature, is generated according to the pixel information of the target image and the emotion description statement, and then the digital signature is written into the file information of the target image, so that the generated target image has uniqueness and authenticity. The platform using digital signature authentication verifies the target image uploaded by the user on the platform. For example, the badge image can be verified according to the digital signature, such as verifying whether the badge image uploaded by the user has been tampered with. If it has been tampered with, such as the pixel information of the badge image being smeared or the emotion description statement being tampered with, it cannot pass the digital signature authentication, thus ensuring the authenticity and uniqueness of the badge image.
[0087] In an embodiment of the present invention, information such as the geographical location of the user and the timestamp for generating the badge image can also be obtained, and a digital signature is generated according to the pixel information of the target image such as the badge image, the emotion description statement, the geographical location of the user, and the timestamp for generating the badge image.
[0088] The method for generating an image according to an embodiment of the present invention obtains the business scenario information and personalized information corresponding to the user, generates an emotion description statement according to the business scenario information, and then generates a prompt for the image generation model with the business scenario information, personalized information, and emotion description statement, and inputs the prompt into the image generation model to obtain the target image corresponding to the user. By combining the user's business scenario information and personalized information and using the image generation model, this method can automatically and intelligently generate a unique target image for the user, making the target image diverse and personalized, enhancing the sense of value and belonging of the target image, and improving the user experience.
[0089] According to another aspect of the embodiments of the present invention, as Figure 3 shown, an image generation device 300 is provided, including:
[0090] An acquisition module 301 that acquires business scenario information and personalized information corresponding to the user;
[0091] A first generation module 302 that generates an emotion description statement according to the business scenario information;
[0092] A second generation module 303 that generates a prompt for the image generation model according to the business scenario information, personalized information, and emotion description statement; the prompt is the input of the image generation model;
[0093] A determination module 304 that determines the target image corresponding to the user according to the image generation model and the prompt.
[0094] In an embodiment of the present invention, the business scenario information includes one or more of the information of the browsed commodities, the information of the commodities added to the shopping cart, the information of the commodities ordered, and the information of the evaluated commodities.
[0095] In an embodiment of the present invention, the first generation module 302 is further configured to: generate an emotion description statement according to the business scenario information and a preset business rule, or generate an emotion description statement according to the business scenario information and a natural language processing model.
[0096] In an embodiment of the present invention, the second generation module 303 is further configured to: construct an execution instruction for instructing to generate a prompt word of an image generation model; input the business scenario information, the personalized information, the emotion description statement, and the execution instruction into the natural language processing model to generate a prompt word.
[0097] In an embodiment of the present invention, the determination module 304 is further configured to: input a preset template shape and the prompt word into the image generation model to generate one or more candidate images for the user to select a target image from the one or more candidate images.
[0098] In an embodiment of the present invention, the image generation model is a diffusion model or a generative adversarial network model.
[0099] In an embodiment of the present invention, the determination module 304 is further configured to: after determining a target image corresponding to the user according to the image generation model and the prompt word, obtain pixel information of the target image; generate a digital signature corresponding to the target image according to the emotion description statement and the pixel information of the target image to verify the target image according to the digital signature.
[0100] According to another aspect of the embodiments of the present invention, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the image generation method provided by the present invention.
[0101] According to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the image generation method provided by the present invention is implemented.
[0102] According to still another aspect of the embodiments of the present invention, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, the image generation method provided by the present invention is implemented.
[0103] Figure 4 An exemplary system architecture 400 to which the image generation method or the image generation device according to the embodiments of the present invention can be applied is shown.
[0104] AsFigure 4 As shown, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used to provide a medium for communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0105] Users can use the terminal devices 401, 402, 403 to interact with the server 405 via the network 404 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0106] The terminal devices 401, 402, 403 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop portable computers, and desktop computers, etc.
[0107] The server 405 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 401, 402, 403 (for example only). The background management server may analyze and process the collected user business scenario information and personalized information to obtain a target image corresponding to the user. Specifically, the background management server first generates an emotion description statement according to the business scenario information, then generates a prompt for the image generation model according to the business scenario information, personalized information, and emotion description statement, and then inputs the prompt into the image generation model to generate a target image corresponding to the user, and feeds back the target image to the terminal device so that the terminal device displays the target image.
[0108] It should be noted that the method for image generation provided by the embodiments of the present invention is generally executed by the server 405. Correspondingly, the device for image generation is generally set in the server 405.
[0109] It should be understood that Figure 4 the numbers of terminal devices, networks, and servers in
[0110] are merely illustrative. According to actual needs, there may be any number of terminal devices, networks, and servers. Figure 5 Figure 5 The terminal device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0111] AsFigure 5 As shown, computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage section 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0112] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read from it can be installed into the storage section 508 as needed.
[0113] Specifically, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, the above functions defined in the system of the present invention are executed.
[0114] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, as well as the combination of blocks in a block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0116] The modules involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as: a processor includes an acquisition module, a first generation module, a second generation module, and a determination module. Among them, the names of these modules do not constitute a limitation on the module itself in some cases. For example, the acquisition module can also be described as "a module for acquiring business scenario information and personalized information corresponding to a user".
[0117] As another aspect, the present invention also provides a computer-readable medium. The computer-readable medium can be included in the device described in the above embodiments; or it can exist alone and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: acquiring business scenario information and personalized information corresponding to a user; generating an emotion description statement according to the business scenario information; generating a prompt for an image generation model according to the business scenario information, personalized information, and the emotion description statement; the prompt is an input to the image generation model; and determining a target image corresponding to the user according to the image generation model and the prompt.
[0118] According to the technical solution of the embodiments of the present invention, in the method for image generation, by acquiring business scenario information and personalized information corresponding to a user, generating an emotion description statement according to the business scenario information, then generating a prompt for an image generation model from the business scenario information, personalized information, and the emotion description statement, and inputting the prompt into the image generation model, a target image corresponding to the user is obtained. By combining the user's business scenario information and personalized information and using the image generation model, this method can automatically and intelligently generate an image with a unique mood for the user, making the generated image diverse and personalized, enhancing the sense of value and belonging of the image, and improving the user experience.
[0119] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for image generation, characterized in that, including: Obtain business scenario information and personalized information corresponding to the user; Generate an emotion description statement according to the business scenario information; Generate a prompt for the image generation model according to the business scenario information, the personalized information, and the emotion description statement; The prompt is the input of the image generation model; Determine a target image corresponding to the user according to the image generation model and the prompt.
2. The method according to claim 1, wherein Generating an emotion description statement according to the business scenario information includes: Generating the emotion description statement according to the business scenario information and a preset business rule, or Generating the emotion description statement according to the business scenario information and a natural language processing model.
3. The method according to claim 1, wherein Generating a prompt for the image generation model according to the business scenario information, the personalized information, and the emotion description statement includes: Construct an execution instruction for instructing to generate a prompt for the image generation model; Input the business scenario information, the personalized information, the emotion description statement, and the execution instruction into a natural language processing model to generate the prompt.
4. The method according to claim 3, wherein Determining a target image corresponding to the user according to the image generation model and the prompt includes: Input a preset template shape and the prompt into the image generation model to generate one or more candidate images, so that the user selects the target image from the one or more candidate images.
5. The method according to claim 1, characterized in that, The image generation model is a diffusion model or a generative adversarial network model.
6. The method according to any one of claims 1 to 5, characterized in that, After determining the target image corresponding to the user according to the image generation model and the prompt, it further includes: Obtain the pixel information of the target image; Generate a digital signature corresponding to the target image according to the emotion description statement and the pixel information of the target image to verify the target image according to the digital signature.
7. The method according to claim 1, wherein The business scenario information includes one or more of the browsed product information, the added-to-cart product information, the ordered product information, and the evaluated product information.
8. An image generation device, characterized in that, including: An acquisition module that acquires business scenario information and personalized information corresponding to the user; A first generation module that generates an emotion description statement according to the business scenario information; A second generation module that generates a prompt for the image generation model according to the business scenario information, the personalized information, and the emotion description statement; The prompt is the input of the image generation model; A determination module that determines a target image corresponding to the user according to the image generation model and the prompt.
9. An electronic device, characterized in that, including: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, The program, when executed by the processor, implements the method according to any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the method according to any one of claims 1-7.