Image generation method and device, electronic equipment and storage medium
By configuring the generated prompt information in the image generation method, searching the material package library to generate target images, the problem of quickly customizing images in fields such as e-commerce is solved, and reasonable image matching and high-quality visual effects are achieved.
Patent Information
- Application Number
- CN202411472772.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-07
AI Technical Summary
In specific scenarios, especially in the e-commerce field, it is difficult for the existing technology to effectively assist users in achieving reasonable image matching and visual effects of images.
By displaying the image generation page, the configuration generates prompt information, and the target material package is retrieved in the material package library based on this information. The material package contains a variety of materials and layout plans, and there is a matching relationship between the materials to generate the target image.
The generated images are achieved to be close to user needs, the materials are properly matched, and have better visual effects, meeting the needs of image customization.
Smart Images

Figure CN119273796A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an image generation method, device, electronic device and storage medium. Background Art
[0002] In the digital age, image generation technology, as a major breakthrough in the field of artificial intelligence, has greatly enriched users' content creation experience and brought unprecedented innovation momentum to all walks of life. At present, people hope to apply this technology to specific scenarios for image customization. For example, in the e-commerce field, merchants hope to use image generation technology to customize posters for product and event promotion. How to assist users to quickly customize images in specific scenarios is a problem that needs to be solved urgently. Summary of the invention
[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image generating method, an apparatus, an electronic device and a storage medium.
[0004] In a first aspect, the present disclosure provides an image generation method, comprising:
[0005] Displaying an image generation page, wherein the image generation page includes a generation prompt information configuration item;
[0006] In response to a configuration operation on the configuration item for generating prompt information, determining to generate prompt information;
[0007] Based on the generated prompt information, searching in a material package library to obtain a target material package; the material package library includes a plurality of material packages; the material package includes a plurality of materials and a layout scheme of the plurality of materials; in the same material package, at least some of the materials are of different categories; the materials in the same material package have a matching relationship;
[0008] A target image is generated based on the target material package and the generation prompt information.
[0009] In a second aspect, the present disclosure further provides an image generating device, comprising:
[0010] A display module, used to display an image generation page, wherein the image generation page includes a generation prompt information configuration item;
[0011] A determination module, configured to determine to generate prompt information in response to a configuration operation on the configuration item for generating prompt information;
[0012] A retrieval module, configured to search in a material package library based on the generated prompt information to obtain a target material package; the material package library includes a plurality of material packages; the material package includes a plurality of materials and a layout scheme of the plurality of materials; in the same material package, at least some of the materials are of different categories; the materials in the same material package have a matching relationship;
[0013] A generation module is used to generate a target image based on the target material package and the generation prompt information.
[0014] In a third aspect, the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] A storage device for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0018] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the method described above when the program is executed by a processor.
[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0020] The technical solution provided by the disclosed embodiment is to obtain the target material package by setting a search in the material package library based on the generated prompt information; the material package library includes multiple material packages; the material package includes multiple materials and the layout scheme of multiple materials; in the same material package, at least some of the materials are of different categories; there is a matching relationship between the materials in the same material package; based on the target material package and the generated prompt information, the target image is generated. In essence, before the image is generated, the material package that is suitable for the current image customization needs is first retrieved; in the process of image generation, the target image is generated by referring to the material package, so that the generated target image can be close to the user's image customization needs, and the materials in the target image are reasonably matched, with better visual effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0023] Figure 1 A flowchart of an image generation method provided by an embodiment of the present disclosure;
[0024] Figure 2-Figure 7 Schematic diagrams of several display interfaces improved according to the embodiments of the present disclosure;
[0025] Figure 8 is a structural schematic diagram of an image generating device in an embodiment of the present disclosure;
[0026] Fig. 9 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] Figure 1 This is a flowchart of an image generation method provided in an embodiment of the present disclosure. This embodiment is applicable to the case where image generation is performed in a client. The method can be executed by an image generation device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc. Alternatively, this embodiment is applicable to the case where image generation is performed in a server. The method can be executed by an image generation device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.
[0030] like Figure 1 As shown, the method may specifically include:
[0031] S110: displaying an image generation page, where the image generation page includes generation prompt information configuration items.
[0032] The image generation page may be, for example, a working interface for generating an image.
[0033] The generation prompt information may be, for example, guiding information or instructions provided by a user in a task of automatically generating an image, which is used to guide a graphics generation system (including but not limited to an image generation model) to generate a target image. The target image may be, for example, an image generated using the image generation method provided by the present application. Optionally, the generation prompt information may include prompt text and / or prompt image.
[0034] In the image generation page, the generation prompt information configuration items are used to help users fill in, supplement, specify, or confirm the information required for image generation, thereby ensuring smooth image generation. These generation prompt information configuration items can be displayed in the form of text input boxes, file upload boxes, check boxes, or radio buttons.
[0035] For example, Figure 2 The page in generates the image page. Figure 2 In the prompt text input box and prompt image upload box, both are configuration items for generating prompt information.
[0036] S120: In response to a configuration operation on a configuration item for generating prompt information, determine to generate prompt information.
[0037] Configuration operations for generating prompt information configuration items may include, for example, one or more of the following: filling in prompt text in a text input box, uploading a prompt image through a file upload box, changing the state of a check box or a radio button (such as adjusting the state of a check box or a radio button from a selected state to an unchecked state, or adjusting the state of a check box or a radio button from an unchecked state to a selected state).
[0038] S130, based on the generated prompt information, searching in the material package library to obtain a target material package; the material package library includes multiple material packages; the material package includes multiple materials and layout plans of the multiple materials; in the same material package, at least some materials are of different categories; and there is a matching relationship between materials in the same material package.
[0039] A material package can be a collection of multiple materials and their layout schemes. The materials in each material package are not only diverse in quantity, but also in categories, and there is a certain matching relationship between these materials to ensure coordination and consistency, and together constitute a design work with good visual effects. Material categories can include background images, main images, decorative stickers, text titles, charts, brand logos, QR codes, barcodes, and buttons. The material categories in different material packages may be exactly the same, partially the same, or completely different. In the same material package, the types of different materials can be the same or different. There is a matching relationship between the materials in the same material package, which means that in the same material package, the materials are matched with each other in terms of color, style, theme, etc., and the materials in the material package are arranged according to the layout scheme given by the material package, which can together constitute a harmonious and unified overall design.
[0040] For example, a certain material package is used to design a holiday promotion poster, which includes the following: 1. Background image: a green background image. 2. Main image: a Christmas tree. 3. Text title: "Christmas Sale" title style. 4. Decorative stickers: Christmas gifts, snowflakes and other Christmas atmosphere decorative stickers. 5. Button: a button style with the words "Learn more". 6. Layout plan: the background image is located at the bottom layer, the text title, main image and button are located at the top layer, arranged in sequence in the vertical direction and displayed in the center. The decorative stickers are located on both sides of the main image.
[0041] In practice, the material package library includes multiple material packages, and different material packages may be suitable for different usage scenarios. For example, in e-commerce, some material packages are suitable for customizing Christmas promotional posters, while others are suitable for Black Friday promotional posters. Or, some material packages are suitable for customizing promotional posters for commodity products, while others are suitable for promotional posters for service products. Different material packages may be suitable for the same usage scenario, but the materials or material layout schemes used are different. For example, material package 1 and material package 2 are both used to customize Christmas promotional posters, but material package 1 includes material A, and material package 2 does not include material A.
[0042] The essence of this step is to select a material package that is suitable for the current image customization requirements from the material package library according to the generated prompt information.
[0043] There are many methods for implementing this step, which are not limited in this application. Exemplarily, each material package in the material package library has corresponding description information; the description information is used to describe the characteristics of the material package. Exemplarily, the description information of the material package can describe the usage scenario of the material package and / or the characteristics of the material. The characteristics of the material may include at least one of the following: type, format, resolution, size, color, style, content and purpose. The implementation method of this step includes: calculating the similarity between the generated prompt information and the description information of each material package in the material package library; based on the similarity between the generated prompt information and the description information of each material package, determining the correlation between each material package and the generated prompt information; and taking the material package with a correlation greater than or equal to the first correlation threshold as the target material package. The first correlation threshold is used to measure whether a certain material package is taken as the target material package.
[0044] S140: Generate a target image based on the target material package and the generation prompt information.
[0045] The above technical solution obtains the target material package by setting up a search in the material package library based on the generated prompt information; the material package library includes multiple material packages; the material package includes multiple materials and the layout scheme of multiple materials; in the same material package, at least some of the materials are of different categories; there is a matching relationship between the materials in the same material package; based on the target material package and the generated prompt information, the target image is generated. Its essence is that before the image is generated, the material package that is suitable for the current image customization needs is first retrieved; in the process of image generation, the target image is generated by referring to the material package, so that the generated target image can be close to the user's image customization needs, and the materials in the target image are reasonably matched and have a better visual effect.
[0046] Based on the above technical solutions, S140 can be optionally replaced by: determining a material package adjustment strategy based on the target material package and generating prompt information; the material package adjustment strategy includes an adjustment strategy for the material and / or material layout; adjusting the target material package based on the material package adjustment strategy; and obtaining a target image based on the adjusted target material package.
[0047] The adjustment strategy for the material may be, for example, a strategy for adjusting the content, color, style, size, etc. of the material. The adjustment strategy for the material layout may be, for example, a strategy for adjusting the relative position of the material in the image and whether to use a certain material in the material package.
[0048] For example, a generated prompt message includes a prompt text, the content of which is "The title is displayed in a text input box with a black background and a white border, and the content is 'Merry Christmas'". In the target material package, the text title is a black background with a white border, and the text content is "Christmas Sale". Based on this, the determined material package adjustment strategy includes: replacing the text title "Christmas Sale" in the target material package with "Merry Christmas".
[0049] By setting the target material package and generating prompt information, the material package adjustment strategy is determined; based on the material package adjustment strategy, the target material package is adjusted; based on the adjusted target material package, the target image is obtained. Its essence is to adjust the target material package before the image is generated, so that the adjusted target material package is closer to the user's image customization needs, thereby improving the user's satisfaction with the final generated target image.
[0050] On the basis of the above technical solution, further, the method for constructing a material package library may include: obtaining sample generation prompt information; searching in the first material library based on the sample generation prompt information to obtain multiple target first materials, the first material library includes multiple first materials, and the multiple first materials are independent of each other; combining the multiple target first materials to obtain a sample image; determining a quality score of the sample image; and adding the materials and material layouts used by the sample images with a quality score greater than or equal to a score threshold as a material package to the material package library.
[0051] The sample generation prompt information is similar to the generation prompt information mentioned above, including prompt text and / or prompt image. The main difference lies in the different application links. Specifically, the sample generation prompt information is used in the material package construction link, while the generation prompt information is used in the image customization link according to user needs.
[0052] The first material library is a collection of first materials. Multiple first materials are independent of each other, which means that there is no matching relationship between different materials. In other words, there is no pre-designed coordination and consistency requirement between the first materials in the first material library. These materials may not match each other in terms of color, style, theme, etc. If multiple first materials are used in combination, additional adjustment and design work may be required to make the resulting image have a better visual effect, or no matter how the adjustment and design are done, a better visual effect may not be obtained.
[0053] The target first material is a material selected from the first material library and has a correlation with the sample generation prompt information. Exemplarily, each first material in the first material library has a description information corresponding thereto; the description information is used to describe the characteristics of the first material. The characteristics of the first material may include, for example, at least one of the following: usage scenario, type, format, resolution, size, color, style, content, and purpose. The implementation method of this step includes: calculating the similarity between the sample generation prompt information and the description information of each first material in the first material library; determining the correlation between each first material and the sample generation prompt information based on the similarity between the sample generation prompt information and the description information of each first material; and taking the first material whose correlation is greater than or equal to the second correlation threshold as the target first material. The second correlation threshold is used to measure whether to take a certain first material as the target first material. The "second correlation threshold" here is independent of the "first correlation threshold" mentioned in the previous text, so the specific values of the two can be the same or different.
[0054] “Combining multiple target first materials to obtain a sample image” includes: arranging each target first material to obtain a sample image. This step is to use multiple target first materials for layout design. Therefore, this step includes at least two meanings: one is to determine the relative position relationship between different first materials; the other is to determine whether to use a certain target first material.
[0055] Because it is possible that when multiple materials are combined, no matter how they are adjusted and designed, a design with a better visual effect cannot be obtained, it is necessary to score the quality of the sample images. The purpose of scoring the quality of the sample images is to determine whether the materials used to constitute the sample images match each other in terms of color, style, theme, etc., and whether the sample images have a better visual effect.
[0056] The score threshold is predetermined to measure whether to construct a material package based on the sample image in the future. This application does not limit the specific value of the score threshold.
[0057] By adopting the above-mentioned method for constructing the material package library, high-quality materials can be constructed, so that the customized images in the image customization link have a high quality level, and the stability of image quality customization is improved.
[0058] On the basis of the above technical solution, optionally, in some embodiments, optionally, the image generation page also includes an image publishing platform option, and the method also includes: determining the target publishing platform in response to a selection operation on the image publishing platform option; determining the target specification attributes based on the target publishing platform; S140 may include: generating a target image based on the target material package, generating prompt information and target specification attributes.
[0059] The image publishing platform option may be, for example, an option for representing a platform for publishing images. The image publishing platform may be, for example, a tool or website for displaying, sharing, or disseminating images. After uploading an image to the image publishing platform, other people may access and view the image. Figure 2 The image generation page in includes two image publishing platform options, namely, image publishing platform option 1 and image publishing platform option 2. The two image publishing platform options refer to different image publishing platforms.
[0060] The target publishing platform refers to the image publishing platform indicated by the image publishing platform option selected by the user. In other words, the target publishing platform is the platform where the user hopes to publish the subsequently generated target image (customized target image).
[0061] The target specification attributes may be, for example, parameters describing basic information and quality characteristics of the target image to be generated. Exemplarily, the target specification attributes include at least one of the following: image resolution, image size, and image format.
[0062] In practice, different image publishing platforms may allow users to upload different image specifications. "Determine the target specification attributes based on the target publishing platform" means that the image specifications allowed by the platform are determined according to the platform that the user wants to publish, and the image is generated based on this as a constraint to ensure that the target image finally generated meets the requirements of the platform selected by the user, which is convenient for users to quickly publish images and avoid problems caused by inconsistent specifications, thereby improving user satisfaction. In addition, compared to the solution in which users first query the specifications allowed by the platform and then make corresponding settings on the image generation page in order to meet the requirements of the image publishing platform, by setting the image generation page to include the image publishing platform option, the system automatically determines the target platform and target image specifications after the user selects the image publishing platform option, which can reduce the user's manual adjustment of specifications and improve the efficiency of image customization.
[0063] In another embodiment, optionally, the generated prompt information includes a prompt image, and the image generation page also includes a role configuration item corresponding to the prompt image; the method also includes: determining the role of the prompt image in response to a configuration operation on the role configuration item; generating a target image based on a target material package and generating prompt information, including: generating a target image based on the target material package, generating prompt information and the role of the prompt image.
[0064] The role of the prompt image may refer to the specific function and position of the prompt image in the final generated target image. For example, the role of the prompt image may be a background image, a main image, a decorative image, a geographic location icon, and a text box background in the target image.
[0065] By setting the role of the prompt image to be used when generating the target image, and using this as a constraint condition to generate the image, the customized target image can better meet the user's usage requirements.
[0066] Based on the above technical solution, there are multiple opportunities to display the image generation page, and this application does not limit this. In one embodiment, optionally, S110 may include: in response to a trigger operation on the image customization function entrance in the first target page, displaying the image generation page; or, in response to an edit operation on the first image displayed in the image display page, displaying the image generation page, and using the first image as a prompt image in the generated prompt information.
[0067] The first target page may, for example, include a page with an image customization function entrance. The image customization function entrance may, for example, be a link, icon, or option that can quickly take the user to the image generation page. Exemplarily, there is a website or an application that has an image customization function, and the first target page may, for example, be any page on the website or application that includes an image customization function entrance. Exemplarily, the first target page may be the homepage of the website or application. Here, the homepage refers to the first page that is presented when the website or application is opened. It usually contains the core information and functions of the website or application, and is intended to provide users with a clear navigation starting point and a comprehensive overview. Exemplarily, Figure 3 This is the homepage of an application provided in an embodiment of the present disclosure. The application is used to create multimedia files. The application has multiple multimedia file creation functions, and the homepage includes multiple options, such as "background generation", "remove background", "shadow generation" and "poster customization". Each of these options corresponds to a functional module. The "poster customization" functional module uses the image generation method provided in this application to customize the image. The homepage is the first target page, and the "poster customization" option is the image customization function entrance mentioned in this application.
[0068] Figure 4 The page in is another page of a certain application, and the navigation bar of the page includes a "poster customization" option. The function corresponding to the "poster customization" option uses the image generation method provided by the present application. Figure 4 The page in is also the first target page, and the "Poster Customization" option is the entrance to the image customization function mentioned in this application.
[0069] The image display page can be, for example, a page for collectively displaying created images. The image display page can specifically be a page of historical images created by users based on a website or application, or it can be a result display page of images created by one or several image creation functions based on a website or application in the previous time, or it can be an information flow page for collectively displaying images created by different creators. In practice, in addition to displaying images, the image display page can also be used to display other information, such as created videos and / or created texts. The present application does not impose any restrictions on this. The first image is the image displayed on the image display page. The editing operation on the first image displayed on the image display page can, for example, be an operation for indicating that the user edits the first image displayed on the image display page. The present application does not impose any restrictions on what specific operation the editing operation on the first image displayed on the image display page is.
[0070] For example, the user previously created 10 multimedia files based on the multimedia file creation function of the application program, see Figure 5 The 10 multimedia files include 6 videos and 4 images. These multimedia files are displayed on the image display page. Figure 5 In the image 3, the editing options corresponding to the image 3 are displayed. If the user clicks the editing option corresponding to the image 3, see Figure 6 , the image generation page is displayed. Further, image 3 is used as a prompt image in generating prompt information.
[0071] In practice, this application does not limit the specific layout of the image generation page. For example, the image generation page can be set to include a first area and a second area; the first area is used to display the generation prompt information configuration options before the target image is generated, and after the target image is generated, the identification information of the target image is displayed; the second area is used to display the selected target image after receiving a selection operation on the target image in the first area.
[0072] For example, if you enter the image generation page through the image customization function entrance in the first target page, the display Figure 2 The image generation page in the image generation page. The image generation page includes a first area and a second area, which are arranged on the left and right. Since there is no traceable previous image when entering the image generation page in this way, before the target image is generated, the first area is used to display the generation prompt information configuration items and the image publishing platform options. The second area displays a blank canvas. If the user configures the generation prompt information configuration items and the image publishing platform options, and clicks the generation option, assuming that a total of 4 target images (images 1 to 4) are generated, see Figure 7, the identification information of the four target images is displayed in the first area. At this time, the second area can display a blank canvas, or it can display one of the target images (such as image 3) by default. If the user further clicks on the identification information of other images in the first area, such as the user clicks on the identification information of image 1, image 1 is displayed in the second area. Figure 7 The page in shows multiple images, which can also be regarded as an image display page.
[0073] The user can continue to edit image 3. For example, see Figure 7 , when image 3 is selected, click the "Edit" option in the first area (equivalent to the editing operation of the first image displayed in the image display page), and display Figure 6 . Figure 6 The page is still generated for the image. At this time, the default image 3 can be set as the prompt image. Figure 6 The first area in includes generating prompt information configuration items and role configuration items corresponding to the prompt image.
[0074] By setting the first area to display the generation prompt information configuration options before the target image is generated, and displaying the identification information of the target image after the target image is generated, the reuse of the first area can be achieved. During the whole process, the size of the second area will not be compressed, ensuring a better display of the image effect.
[0075] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0076] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0077] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0078] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0079] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0080] Figure 8 Schematic diagram of the structure of an image generating device in an embodiment of the present disclosure. The image generating device provided in the embodiment of the present disclosure can be configured in a client, or can be configured in a server. Figure 8 , the image generating device specifically comprises:
[0081] A display module 310, used to display an image generation page, wherein the image generation page includes a generation prompt information configuration item;
[0082] A determination module 320, configured to determine to generate prompt information in response to a configuration operation on the configuration item for generating prompt information;
[0083] The retrieval module 330 is used to search in the material package library based on the generated prompt information to obtain a target material package; the material package library includes multiple material packages; the material package includes multiple materials and a layout scheme of the multiple materials; in the same material package, at least some of the materials are of different categories; the materials in the same material package have a matching relationship;
[0084] The generating module 340 is used to generate a target image based on the target material package and the generating prompt information.
[0085] Furthermore, the generating module 340 is used to:
[0086] Determining a material package adjustment strategy based on the target material package and the generation prompt information; the material package adjustment strategy includes an adjustment strategy for the material and / or material layout;
[0087] Based on the material package adjustment strategy, adjusting the target material package;
[0088] Based on the adjusted target material package, a target image is obtained.
[0089] Furthermore, the device also includes a building block for:
[0090] Get sample generation prompt information;
[0091] Based on the sample generation prompt information, searching in a first material library to obtain a plurality of target first materials, wherein the first material library includes a plurality of first materials, and the plurality of first materials are independent of each other;
[0092] Combining the plurality of target first materials to obtain a sample image;
[0093] determining a quality score of the sample image;
[0094] The materials and layouts of the materials used by the sample images whose quality scores are greater than or equal to the score threshold are taken as a material package and added to the material package library.
[0095] Furthermore, the image generation page also includes an image publishing platform option, and the device also includes a constraint acquisition module for:
[0096] In response to a selection operation on the image publishing platform option, determining a target publishing platform;
[0097] Based on the target publishing platform, determining the target specification attribute;
[0098] The generating module is used for:
[0099] A target image is generated based on the target material package, the generation prompt information and the target specification attribute.
[0100] Furthermore, the generated prompt information includes a prompt image, and the image generation page also includes a role configuration item corresponding to the prompt image; the device also includes a constraint acquisition module, which is used to:
[0101] In response to a configuration operation on the role configuration item, determining a role of the prompt image;
[0102] The generating module is used for:
[0103] A target image is generated based on the target material package, the generation prompt information, and the character of the prompt image.
[0104] Furthermore, the display module is used to:
[0105] In response to a triggering operation on an image customization function entry in the first target page, displaying an image generation page; or,
[0106] In response to an editing operation on a first image displayed in an image display page, an image generation page is displayed, and the first image is used as a prompt image in generating prompt information.
[0107] Furthermore, the image generation page includes a first area and a second area; the first area is used to display generation prompt information configuration options before the target image is generated, and to display identification information of the target image after the target image is generated; the second area is used to display the selected target image after receiving a selection operation on the target image in the first area.
[0108] The image generation device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image generation method provided in the embodiment of the method of the present disclosure, and has execution steps and beneficial effects, which will not be repeated here.
[0109] Fig. 9 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig. 9 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0110] like Fig. 9 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the image generation method of the embodiment described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0111] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Fig. 9 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0112] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby realizing the image generation method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0113] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may 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 disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may 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 the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0114] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.
[0115] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0116] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0117] Displaying an image generation page, wherein the image generation page includes a generation prompt information configuration item;
[0118] In response to a configuration operation on the configuration item for generating prompt information, determining to generate prompt information;
[0119] Based on the generated prompt information, searching in a material package library to obtain a target material package; the material package library includes a plurality of material packages; the material package includes a plurality of materials and a layout scheme of the plurality of materials; in the same material package, at least some of the materials are of different categories; the materials in the same material package have a matching relationship;
[0120] A target image is generated based on the target material package and the generation prompt information.
[0121] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0122] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0125] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0126] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0127] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0128] one or more processors;
[0129] A memory for storing one or more programs;
[0130] When the one or more programs are executed by the one or more processors, the one or more processors implement any image generating method provided in the present disclosure.
[0131] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image generating method as described in any one of the present disclosure is implemented.
[0132] The embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the image generation method as described above is implemented.
[0133] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0134] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image generation method, characterized in that: include: Displaying an image generation page, wherein the image generation page includes a generation prompt information configuration item; In response to a configuration operation on the configuration item for generating prompt information, determining to generate prompt information; Based on the generated prompt information, searching in a material package library to obtain a target material package; the material package library includes a plurality of material packages; the material package includes a plurality of materials and a layout scheme of the plurality of materials; in the same material package, at least some of the materials are of different categories; the materials in the same material package have a matching relationship; A target image is generated based on the target material package and the generation prompt information.
2. The method according to claim 1, characterized in that The generating a target image based on the target material package and the generating prompt information includes: Determining a material package adjustment strategy based on the target material package and the generation prompt information; the material package adjustment strategy includes an adjustment strategy for the material and / or material layout; Based on the material package adjustment strategy, adjusting the target material package; Based on the adjusted target material package, a target image is obtained.
3. The method according to claim 1, characterized in that The method for constructing the material package library includes: Get sample generation prompt information; Based on the sample generation prompt information, searching in a first material library to obtain a plurality of target first materials, wherein the first material library includes a plurality of first materials, and the plurality of first materials are independent of each other; Combining the plurality of target first materials to obtain a sample image; determining a quality score of the sample image; The materials and layouts of the materials used by the sample images whose quality scores are greater than or equal to the score threshold are taken as a material package and added to the material package library.
4. The image generation method according to claim 1, characterized in that: The image generation page also includes an image publishing platform option, and the method further includes: In response to a selection operation on the image publishing platform option, determining a target publishing platform; Determining target specification attributes based on the target publishing platform; The generating a target image based on the target material package and the generating prompt information includes: A target image is generated based on the target material package, the generation prompt information and the target specification attribute.
5. The image generation method according to claim 1, characterized in that: The generated prompt information includes a prompt image, and the image generation page also includes a role configuration item corresponding to the prompt image; the method also includes: In response to a configuration operation on the role configuration item, determining a role of the prompt image; The generating a target image based on the target material package and the generating prompt information includes: A target image is generated based on the target material package, the generation prompt information, and the character of the prompt image.
6. The image generation method according to claim 1, characterized in that: The display image generation page includes: In response to a triggering operation on an image customization function entry in the first target page, displaying an image generation page; or, In response to an editing operation on a first image displayed in an image display page, an image generation page is displayed, and the first image is used as a prompt image in generating prompt information.
7. The image generation method according to claim 1, characterized in that: The image generation page includes a first area and a second area; the first area is used to display generation prompt information configuration options before the target image is generated, and to display identification information of the target image after the target image is generated; the second area is used to display the selected target image after receiving a selection operation on the target image in the first area.
8. An image generating device, characterized in that: include: A display module, used to display an image generation page, wherein the image generation page includes a generation prompt information configuration item; A determination module, configured to determine to generate prompt information in response to a configuration operation on the configuration item for generating prompt information; A retrieval module, configured to search in a material package library based on the generated prompt information to obtain a target material package; the material package library includes a plurality of material packages; the material package includes a plurality of materials and a layout scheme of the plurality of materials; in the same material package, at least some of the materials are of different categories; the materials in the same material package have a matching relationship; A generation module is used to generate a target image based on the target material package and the generation prompt information.
9. An electronic device, characterized in that: The electronic device comprises: 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 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Image generation method and apparatus, electronic device, and storage medium
WO2026086568A1