Image generation method and device, equipment and storage medium

By analyzing and editing the diffused images and intermediate materials of the images, a second image with similar styles is generated, which solves the problem of low image production efficiency in the prior art, and simplifies and improves image generation.

CN119722865APending Publication Date: 2025-03-28BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411755529.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-28

Smart Images

  • Figure CN119722865A_ABST
    Figure CN119722865A_ABST
Patent Text Reader

Abstract

The invention provides an image generation method and device, equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps of obtaining a first image; in response to an analysis operation on the first image, displaying a diffusion image and an analysis result of the first image on the editing interface, the analysis result comprising a plurality of intermediate materials in the diffusion image, and the plurality of intermediate materials being image materials generated based on the plurality of first materials; in response to an editing operation on any intermediate material in the editing interface, displaying a diffusion image containing the edited intermediate material in the editing interface; and in response to an image generation operation on the editing interface, generating at least one second image based on the diffusion image. According to the technical scheme, at least one image with a similar style can be quickly generated according to one template image, a designer does not need to spend a lot of time in manually searching and editing materials, the operation of making the image is simplified, and the image generation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an image generation method, device, equipment and storage medium. Background Art

[0002] Since images can convey rich information intuitively, they can usually be used to promote items and convey information, such as promotional posters, event promotional images, etc. At present, in the process of making the above-mentioned types of images, designers usually select appropriate template images from the template library according to design requirements. Template images usually refer to images that meet the design needs of the public, such as layout and materials. Then designers import template images in the editor and manually search and edit materials. Designers need to spend a lot of time on material adjustment, resulting in low efficiency in image production. Summary of the invention

[0003] The present disclosure provides an image generation method, device, equipment and storage medium, which can simplify the operation of generating images and improve the efficiency of image generation. The technical solution of the present disclosure is as follows:

[0004] According to one aspect of an embodiment of the present disclosure, there is provided an image generating method, including:

[0005] Acquire a first image, where the first image includes a plurality of first materials;

[0006] In response to the analysis operation on the first image, displaying a diffusion image and an analysis result of the first image on an editing interface, wherein the analysis result includes a plurality of intermediate materials in the diffusion image, and the plurality of intermediate materials are image materials generated based on the plurality of first materials;

[0007] In response to an editing operation on any intermediate material in the editing interface, displaying a diffusion image including the edited intermediate material in the editing interface;

[0008] In response to an image generation operation in the editing interface, at least one second image is generated based on the diffusion image, the at least one second image includes a plurality of second materials, and the plurality of second materials are image materials generated based on the plurality of intermediate materials.

[0009] According to another aspect of an embodiment of the present disclosure, there is provided an image generating device, including:

[0010] An acquisition unit is configured to acquire a first image, wherein the first image includes a plurality of first materials;

[0011] a display unit configured to display a diffusion image and a parsing result of the first image on an editing interface in response to a parsing operation on the first image, wherein the parsing result includes a plurality of intermediate materials in the diffusion image, and the plurality of intermediate materials are image materials generated based on the plurality of first materials;

[0012] The display unit is further configured to, in response to an editing operation on any intermediate material in the editing interface, display a diffusion image including the edited intermediate material in the editing interface;

[0013] The first generating unit is configured to generate at least one second image based on the diffusion image in response to an image generating operation in the editing interface, wherein the at least one second image includes a plurality of second materials, and the plurality of second materials are image materials generated based on the plurality of intermediate materials.

[0014] In some embodiments, the first generating unit is further configured to generate an intermediate material corresponding to the first material based on any first material in the first image, and the similarity between the intermediate material and the first material is greater than a preset value; and to generate a diffusion image of the first image based on the intermediate material corresponding to each first material in the first image.

[0015] In some embodiments, the first generating unit is further configured to generate a diffusion image of the first image based on the at least one text material and each intermediate material corresponding to the first material when the first image also includes at least one text material, and the parsing result includes the multiple intermediate materials and the at least one text material.

[0016] In some embodiments, the editing interface includes a preview area and an editing area, the preview area is used to display the diffusion image, and the editing area is used to display the analysis result.

[0017] In some embodiments, the display unit is configured to respond to a replacement operation on any intermediate material in the editing area by displaying the replaced intermediate material in the editing area and displaying a diffuse image containing the replaced intermediate material in the preview area, wherein the replaced intermediate material is an image material that has been historically generated by this terminal in the editing interface.

[0018] In some embodiments, the parsing result includes the plurality of intermediate materials and at least one text material in the first image;

[0019] The display unit is further configured to perform at least one of the following:

[0020] When any material is selected in the preview area, in response to a drag operation on the material, the movement of the material is displayed in the preview area;

[0021] When any material is selected in the preview area, in response to a zooming operation on the material, zooming the material displayed in the preview area based on the zooming operation;

[0022] When any material is selected in the preview area, in response to a rotation operation on the material, displaying the material rotation in the preview area;

[0023] When any material is selected in the preview area, in response to a layer adjustment operation on the material, the layer where the material is located after adjustment is displayed in the editing area, the diffusion image is displayed in the preview area, and the corresponding layer in the diffusion image displays the material.

[0024] In some embodiments, the apparatus further comprises:

[0025] A second generating unit is configured to generate at least one candidate material corresponding to any intermediate material in the diffusion image in response to a material generating operation on the intermediate material;

[0026] The display unit is further configured to display on the editing interface that the intermediate material is replaced by any of the candidate materials.

[0027] In some embodiments, the second generating unit is configured to, in response to a material generating operation on any intermediate material in the diffusion image, obtain a description text of the intermediate material, wherein the description text is used to describe the content of the intermediate material; and generate at least one candidate material corresponding to the intermediate material based on the description text of the intermediate material.

[0028] In some embodiments, the display unit is configured to display at least one candidate material corresponding to the intermediate material; in response to a selection operation on any candidate material, the intermediate material is displayed on the editing interface to be replaced with the selected candidate material.

[0029] In some embodiments, the first generating unit is configured to obtain a plurality of intermediate materials in the diffusion image in response to an image generating operation in the editing interface; generate at least one second material corresponding to any intermediate material obtained; and generate the at least one second image based on at least one second material corresponding to each intermediate material in the diffusion image, wherein the second materials included in different second images are not completely the same.

[0030] In some embodiments, the display unit is further configured to display at least one second image; in response to an interactive operation on any second image, display an editing control of the second image, wherein the editing control is used to start an editor after being triggered, and the editor is used to edit the second image; in response to a triggering operation on the editing control of any second image, display the second image in the editing interface provided by the editor.

[0031] In some embodiments, the display unit is further configured to display the edited material on an editing interface provided by the editor in response to an editing operation on any material in the second image.

[0032] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:

[0033] one or more processors;

[0034] A memory for storing program codes executable by the processor;

[0035] The processor is configured to execute the program code to implement the above-mentioned image generation method.

[0036] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When a program code in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device is enabled to perform the above-mentioned image generating method.

[0037] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, which implements the above-mentioned image generating method when executed by a processor.

[0038] The disclosed embodiment provides an image generation method, which can analyze the first image after determining a first image that meets the design requirements, obtain and display a diffuse image of the first image and multiple intermediate materials in the diffuse image. Designers can simply adjust the position and size of the intermediate materials according to design requirements to obtain an edited diffuse image, and then intelligently generate at least one second image with a similar style based on the edited diffuse image. Using the above method, at least one second image with a similar style can be quickly generated based on a relatively satisfactory first image, without the need for designers to spend a lot of time manually searching for and editing materials with similar styles, which simplifies the operation of making images and improves image generation efficiency.

[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0041] Figure 1 It is a schematic diagram of an implementation environment of an image generating method according to an exemplary embodiment.

[0042] Figure 2 The figure is a flowchart of an image generating method according to an exemplary embodiment.

[0043] Figure 3 is a flowchart of another image generating method according to an exemplary embodiment.

[0044] Figure 4 It is a schematic diagram showing a loading animation according to an exemplary embodiment.

[0045] Figure 5 It is a schematic diagram of an editing interface according to an exemplary embodiment.

[0046] Figure 6 It is a schematic diagram of editing material according to an exemplary embodiment.

[0047] Figure 7 It is a schematic diagram of a parameter configuration interface according to an exemplary embodiment.

[0048] Figure 8 is a schematic diagram of a second image according to an exemplary embodiment.

[0049] Fig. 9 The figure is a block diagram of an image generating device according to an exemplary embodiment.

[0050] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0051] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0053] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the first image involved in this disclosure was obtained with full authorization.

[0054] Figure 1 FIG. 1 is a schematic diagram of an implementation environment of an image generation method according to an exemplary embodiment. Figure 1 The implementation environment specifically includes: a terminal 101 and a server 102. The terminal 101 can be connected to the server 102 via a wireless network or a wired network.

[0055] Terminal 101 can be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, and a laptop computer.

[0056] In some embodiments, a target application is installed or running on the terminal 101. The target application is any type of application with an image editing function, such as an image editing application, a video editing application, etc. The user can import any image into the target application through the terminal 101, and edit the image through the image editing function provided by the target application. The target application is associated with the server 102, and the server 102 provides background services.

[0057] The terminal 101 may generally refer to one of a plurality of terminals. This embodiment is described by taking the terminal 101 as an example. Those skilled in the art may know that the number of the above terminals may be more or less. For example, the above terminals may be several, or the above terminals may be dozens or hundreds, or a greater number. The embodiment of the present disclosure does not limit the number and device type of the terminals.

[0058] Server 102 can be an independent physical server, or a server cluster or distributed file system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0059] In some embodiments, the server 102 is directly or indirectly connected to the terminal 101 through wired or wireless communication, which is not limited in the embodiments of the present disclosure. Optionally, the number of the above-mentioned servers 102 may be more or less, which is not limited in the embodiments of the present disclosure. Of course, the server 102 may also include other functional servers to provide more comprehensive and diversified services. Among them, the server 102 undertakes the main computing work, and the terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work, and the terminal 101 undertakes the main computing work; or, the server 102 or the terminal 101 can each undertake the computing work independently, which is not limited in the embodiments of the present disclosure.

[0060] Figure 2 is a flowchart of an image generating method according to an exemplary embodiment. Figure 2 As shown, taking the method executed by a terminal as an example, the method includes the following steps:

[0061] In step 201, the terminal obtains a first image, where the first image includes a plurality of first materials.

[0062] In the disclosed embodiment, the first image is an image in any format. For example, the format of the first image may be PNG (Portable Network Graphics), JPEG (Joint Photographic Experts Group), etc. The first image may be an image stored locally, or an image downloaded from the Internet by the terminal, which is not limited in the disclosed embodiment. The first image may include multiple materials, such as text materials and image materials. The following description is made by taking the multiple first materials included in the first image as image materials as an example.

[0063] In some embodiments, according to the layout of the first image, the multiple first materials in the first image can be divided into foreground materials and background materials. The foreground material refers to the image element located in the main part of the image, and the foreground material usually includes the main content expressed by the image. The background material refers to the part of the first image located behind the main body (that is, the foreground material), and the background material can set off the foreground material, create an atmosphere, and provide environmental information. For example, in a portrait photography work, the person itself is the foreground material, and the wall, curtains, or blurred scenery behind the person are all background materials.

[0064] In step 202, in response to the analysis operation on the first image, the terminal displays a diffusion image and an analysis result of the first image on an editing interface, where the analysis result includes a plurality of intermediate materials in the diffusion image.

[0065] In the disclosed embodiment, in response to the analysis operation of the first image, the terminal analyzes the first image to obtain multiple first materials in the first image. Among them, since the foreground material usually blocks part of the background material, in the process of analyzing the first image, for the first material belonging to the foreground material, the terminal can segment the first image to separate the complete first material from the first image by performing image segmentation on the first image; for the first material belonging to the background material, the terminal can segment the unblocked part of the first material from the first image by image segmentation, but cannot segment the blocked part of the first material.

[0066] In order to obtain the complete background material, after the terminal obtains the background material, the terminal can generate the intermediate material corresponding to the background material based on the background material. The intermediate material refers to an image generated based on the image features of the background material, such as style features, content features, etc.; or an image obtained by processing multiple pixels in the background material based on the image features of the background material. Optionally, the above-mentioned processing of pixels includes but is not limited to: interpolation, filling and other processing, so as to fill the incomplete background material and obtain a complete intermediate material. The similarity between the intermediate material and the background material is greater than a preset value. For example, the color style and main body outline of the intermediate material and the background material are the same, but the attributes of a certain dimension of the picture are different. The dimension includes but is not limited to color, brightness, etc. For example, due to the different colors and brightness of some pixels in the image, the partial content presented by the image is different, such as the size of the character's eyes is different, the position of the character's hair accessories is different, etc. In addition, in order to avoid using unauthorized image materials, after the terminal obtains the foreground material, the terminal can also generate the intermediate material corresponding to the foreground material based on the foreground material.

[0067] After the terminal obtains the multiple intermediate materials, it splices the multiple intermediate materials according to the layout of the first image to obtain a diffuse image of the first image. The diffuse image includes the multiple intermediate materials, and the multiple intermediate materials in the diffuse image correspond to the multiple first materials in the first image. Then, the terminal displays the diffuse image and the multiple intermediate materials in the diffuse image on the editing interface, so that the intermediate materials in the diffuse image can be edited according to the material editing function provided by the editing interface.

[0068] In step 203, in response to an editing operation on any intermediate material in the editing interface, the terminal displays a diffusion image including the edited intermediate material in the editing interface.

[0069] In the disclosed embodiment, the position, size, angle, etc. of any intermediate material in the diffuse image can be adjusted through editing operations in the editing interface so that the layout of the diffuse image meets the design requirements. For example, by dragging an intermediate material in the extended image in the editing interface, the position of the intermediate material in the diffuse image can be adjusted; by scaling the intermediate material in the diffuse image in the editing interface, the size of the intermediate material can be adjusted. Furthermore, the terminal can display the diffuse image containing the edited intermediate material in the editing interface so as to preview the editing effect of the material in real time, thereby realizing visual editing of the material.

[0070] In step 204, in response to the image generation operation in the editing interface, the terminal generates at least one second image based on the diffusion image.

[0071] In the disclosed embodiment, the editing interface also provides an image generation function, based on which AI (Artificial Intelligence) models such as text-generated images and image-generated images can be used to intelligently generate at least one second image similar in style to the diffusion image. The second image includes a plurality of second materials, and the plurality of second materials are image materials generated based on a plurality of intermediate materials. The plurality of second materials in the second image correspond one-to-one to the plurality of intermediate materials in the diffusion image. The second image has a similar style to the diffusion image, for example, the color style, layout, main body outline, etc. of the two are the same, but the picture details of the two are slightly different.

[0072] The disclosed embodiment provides an image generation method, which can analyze the first image after determining a first image that meets the design requirements, obtain and display a diffuse image of the first image and multiple intermediate materials in the diffuse image. Designers can simply adjust the position and size of the intermediate materials according to design requirements to obtain an edited diffuse image, and then intelligently generate at least one second image with a similar style based on the edited diffuse image. Using the above method, at least one second image with a similar style can be quickly generated based on a relatively satisfactory first image, without the need for designers to spend a lot of time manually searching for and editing materials with similar styles, which simplifies the operation of making images and improves image generation efficiency.

[0073] In some embodiments, the process of generating the diffusion image of the first image includes:

[0074] Based on any first material in the first image, generate an intermediate material corresponding to the first material, where the similarity between the intermediate material and the first material is greater than a preset value;

[0075] A diffusion image of the first image is generated based on the intermediate material corresponding to each first material in the first image.

[0076] In the embodiment of the present disclosure, by generating an intermediate material corresponding to each first material and generating a diffuse image based on the multiple intermediate materials, it is possible to ensure that each image material in the diffuse image has a similar style to the corresponding first material in the first image, thereby ensuring that the overall style of the diffuse image and the first image is also relatively similar, thereby improving the accuracy of generating the diffuse image.

[0077] In some embodiments, generating a diffusion image of the first image based on the intermediate material corresponding to each first material in the first image includes:

[0078] When the first image further includes at least one text material, a diffusion image of the first image is generated based on the at least one text material and an intermediate material corresponding to each first material, and the parsing result includes multiple intermediate materials and at least one text material.

[0079] In the embodiment of the present disclosure, by generating a diffuse image based on the text material of the first image and multiple generated intermediate materials when the first image includes text material, it is possible to ensure that the diffuse image and the first image have the same text material, thereby avoiding the loss of text information in the first image during the process of generating the diffuse image, and ensuring the accuracy of the generated diffuse image.

[0080] In some embodiments, the editing interface includes a preview area and an editing area, the preview area is used to display the diffusion image, and the editing area is used to display the analysis result.

[0081] In the disclosed embodiment, a diffuse image and multiple materials in the diffuse image are displayed in different areas of the editing interface, which not only enables quick editing of multiple materials in the diffuse image in the editing area, but also enables presentation of the material editing effects in the preview area, thereby providing an efficient and convenient visual editing method.

[0082] In some embodiments, in response to an editing operation on any intermediate material in the editing interface, a diffusion image including the edited intermediate material is displayed in the editing interface, including:

[0083] In response to a replacement operation on any intermediate material in the editing area, the replaced intermediate material is displayed in the editing area, and a diffuse image containing the replaced intermediate material is displayed in the preview area. The replaced intermediate material is an image material that has been historically generated by this terminal in the editing interface.

[0084] In the disclosed embodiment, by supporting the replacement of intermediate materials in the editing area, the intermediate materials in the diffuse image can be efficiently and conveniently replaced with other image materials that meet the design requirements, which not only meets the personalized design requirements, but also simplifies the material editing operation and improves the material editing efficiency.

[0085] In some embodiments, the parsing result includes a plurality of intermediate materials and at least one text material in the first image;

[0086] The method further comprises at least one of the following:

[0087] When any material is selected in the preview area, in response to a drag operation on the material, the material movement is displayed in the preview area;

[0088] When any material is selected in the preview area, in response to a zoom operation on the material, the material displayed in the preview area is zoomed based on the zoom operation;

[0089] When any material is selected in the preview area, in response to a rotation operation on the material, the material rotation is displayed in the preview area;

[0090] When any material is selected in the preview area, in response to the layer adjustment operation on the material, the layer where the adjusted material is located is displayed in the editing area, and the diffusion image is displayed in the preview area, and the corresponding layer in the diffusion image displays the material.

[0091] In the disclosed embodiments, it is possible to support convenient and quick adjustment of the position, size, angle and layer of the material in the preview area, and the adjustment process of the material can be displayed in real time in the preview area, thereby realizing visual editing of the material and improving the efficiency of material editing.

[0092] In some embodiments, the method further comprises:

[0093] In response to a material generation operation on any intermediate material in the diffusion image, generating at least one candidate material corresponding to the intermediate material;

[0094] The editing interface shows that the intermediate material is replaced by any candidate material.

[0095] In the disclosed embodiment, at least one candidate material similar in style to any intermediate material can be generated, and the intermediate material can be displayed in the editing interface as being replaced by any candidate material. This not only can conveniently and intuitively display the effect after the material replacement, but also can meet personalized design needs. There is no need for users to manually search for and replace materials with similar styles, which simplifies the material editing operation and improves the material editing efficiency.

[0096] In some embodiments, in response to a material generation operation on any intermediate material in the diffusion image, generating at least one candidate material corresponding to the intermediate material includes:

[0097] In response to a material generation operation on any intermediate material in the diffusion image, obtaining a description text of the intermediate material, where the description text is used to describe the content of the intermediate material;

[0098] At least one candidate material corresponding to the intermediate material is generated based on the description text of the intermediate material.

[0099] In the embodiment of the present disclosure, by generating at least one candidate material corresponding to the intermediate material based on the description text of the intermediate material, it can ensure that the candidate material and the intermediate material are relatively similar in terms of presented content, color style, etc., thereby ensuring the similarity between the candidate material and the intermediate material and improving the accuracy of generating candidate materials.

[0100] In some embodiments, the editing interface displays that the intermediate material is replaced with any candidate material, including:

[0101] displaying at least one candidate material corresponding to the intermediate material;

[0102] In response to a selection operation on any candidate material, the intermediate material displayed on the editing interface is replaced with the selected candidate material.

[0103] In the embodiments of the present disclosure, by displaying at least one candidate material corresponding to the intermediate material before replacing the intermediate material, it is possible to support the selection of the candidate material displayed after replacement according to design requirements, thereby ensuring that the candidate material displayed after replacement meets the design requirements, eliminating the need for users to manually search for the replaced material, and improving material editing efficiency.

[0104] In some embodiments, in response to an image generation operation in the editing interface, generating at least one second image based on the diffusion image includes:

[0105] In response to an image generation operation in the editing interface, a plurality of intermediate materials in the diffusion image are acquired;

[0106] For any intermediate material obtained, generating at least one second material corresponding to the intermediate material;

[0107] At least one second image is generated based on at least one second material corresponding to each intermediate material in the diffusion image, and the second materials included in different second images are not completely the same.

[0108] In the disclosed embodiment, when the layout of the edited diffusion image meets the design requirements, multiple second images with the same layout and similar style are generated by means of the image generation function provided by the editing interface, so that the user can select a suitable second image from the multiple second images. With the above method, the user does not need to manually search for materials of similar style, nor does the user need to manually create images, which simplifies the operation of creating images and improves the efficiency of image creation.

[0109] In some embodiments, the method further comprises:

[0110] displaying at least one second image;

[0111] In response to an interactive operation on any second image, an editing control of the second image is displayed, wherein the editing control is used to trigger and then start an editor, and the editor is used to edit the second image;

[0112] In response to a triggering operation on an editing control of any second image, the second image is displayed in an editing interface provided by the editor.

[0113] In the embodiment of the present disclosure, by displaying the editing controls of the second image, a method for quickly entering the editor to edit the second image can be provided, without the need for the user to manually start the editor or manually import the second image into the editor, thereby shortening the interactive link in the editing process and improving editing efficiency.

[0114] In some embodiments, the method further comprises:

[0115] In response to an editing operation on any material in the second image, the edited material is displayed on an editing interface provided by the editor.

[0116] In the embodiments of the present disclosure, by supporting editing of edits in the editor, a rich variety of editing functions can be provided, thereby further meeting personalized editing needs.

[0117] Above Figure 2 The figure shows a process of an image generation method of the present disclosure. The image generation scheme provided by the present disclosure is further described below. Figure 3is a flowchart of another image generation method according to an exemplary embodiment. Figure 3 As shown, taking the method executed by a terminal as an example, the method includes the following steps:

[0118] In step 301, the terminal obtains a first image, where the first image includes a plurality of first materials.

[0119] In the embodiment of the present disclosure, step 301 is the same as the above step 201 and will not be described again here.

[0120] It should also be noted that the terminal can display an image upload page and obtain the uploaded first image through the image upload page. In addition, in order to improve the efficiency of obtaining the first image, the terminal can also display a first prompt message on the image upload page, and the first prompt message is used to prompt several supported methods of uploading images, such as click upload, drag upload, paste upload, etc. The terminal can also display a second prompt message on the image upload page, and the second prompt message is used to prompt the formats of the images supported for upload, such as PNG format, JPEG format, etc. Accordingly, in response to the image upload operation on the image upload page, the terminal obtains the uploaded first image.

[0121] In step 302, in response to the analysis operation on the first image, the terminal displays a diffusion image and an analysis result of the first image on an editing interface, where the analysis result includes a plurality of intermediate materials in the diffusion image.

[0122] In an embodiment of the present disclosure, after the terminal acquires the first image, it can automatically parse the first image to acquire multiple first materials in the first image. Accordingly, the parsing operation of the first image is also the operation of uploading the first image. Alternatively, after the terminal acquires the first image, the parsing control is displayed, and in response to the triggering operation of the parsing control, the terminal parses the first image to acquire multiple first materials in the first image. Then, the terminal generates multiple corresponding intermediate materials based on the acquired multiple first materials, and a diffuse image of the first image can be obtained by splicing the multiple intermediate materials. Then, the terminal displays the diffuse image and the multiple intermediate materials in the diffuse image in the editing interface, so that the intermediate materials in the diffuse image can be edited according to the material editing function provided by the editing interface.

[0123] In some embodiments, before displaying the diffusion image, the terminal may display a loading animation, which is used to prompt that the first image is being parsed, or that a diffusion image is being generated based on the parsing result. Optionally, the loading animation can also prompt the parsing progress of the first image or the generation progress of the diffusion image. For example, the loading animation can be a progress bar, a rotating ring, etc., which is not limited in the embodiments of the present disclosure. Figure 4 is a schematic diagram showing a loading animation according to an exemplary embodiment. Figure 4 As shown, in response to the parsing operation of the first image 401, the terminal displays a loading animation 402. The loading animation 402 includes a prompt text and a circle whose length can increase. The prompt text is used to prompt that the first image 401 is being parsed, and the length of the circle can indicate the parsing progress of the first image 401.

[0124] The following describes a process of generating a diffusion image of the first image based on a plurality of first materials in the first image.

[0125] In some embodiments, the terminal generates an intermediate material corresponding to any first material in the first image, and the similarity between the intermediate material and the first material is greater than a preset value to ensure that the styles of the two are relatively similar. The preset value may be a preset numerical value, which is not limited in the embodiments of the present disclosure. Then the terminal generates a diffuse image of the first image based on the intermediate material corresponding to each first material in the first image. For example, the terminal splices multiple intermediate materials according to the layout information of the first image to obtain a diffuse image of the first image. The layout information can indicate the position, layer, etc. of each first material in the first image. By generating an intermediate material corresponding to each first material and generating a diffuse image based on multiple intermediate materials, it can be ensured that each image material in the diffuse image has a similar style to the corresponding first material in the first image, thereby ensuring that the overall style of the diffuse image and the first image is also relatively similar, thereby improving the accuracy of generating the diffuse image.

[0126] Optionally, the terminal can generate an intermediate material corresponding to any first material according to an AI model such as a text-generated graph model and a graph-generated graph model. For example, for any first material, the terminal first inputs the first material into an image recognition model, and the image recognition model recognizes the content in the first material, and outputs a description text of the first material. Among them, the description text is used to describe the content of the first material. For example, the description text includes a plurality of keywords for describing the content of the first material. Then, the terminal inputs the description text of the first material into the text-generated graph model, and the text-generated graph model outputs at least one intermediate material that conforms to the content described in the description text according to the description text. Or the terminal can input the first material into the graph-generated graph model, and the graph-generated graph model outputs an intermediate material that is relatively similar to the first material according to the input first material and the description text. Alternatively, the terminal can also input the first material and the description text of the first material into the graph-generated graph model, so that the graph-generated graph model can refer to the description text to generate the intermediate material corresponding to the first material. The terminal adopts a similar method to generate the intermediate material corresponding to each first material in the first image.

[0127] In some embodiments, when the first image also includes at least one text material, the terminal can generate a diffuse image of the first image based on the at least one text material and the intermediate material corresponding to each first material. For example, the terminal splices at least one text material and multiple intermediate materials according to the layout information of the first image to obtain a diffuse image of the first image. Therefore, the diffuse image includes not only multiple intermediate materials, but also at least one text material. Correspondingly, the parsing result displayed on the configuration interface also includes multiple intermediate materials and at least one text material. By generating a diffuse image based on the text material of the first image and the generated multiple intermediate materials when the first image includes text material, it can be ensured that the diffuse image and the first image have the same text material, thereby avoiding the loss of text information in the first image during the generation of the diffuse image, and ensuring the accuracy of the generated diffuse image.

[0128] In step 303, in response to an editing operation on any intermediate material in the editing interface, the terminal displays a diffusion image including the edited intermediate material in the editing interface.

[0129] In the disclosed embodiment, not only does it support editing of any intermediate material in the editing interface, but it can also display a diffuse image containing the edited intermediate material in the editing interface to present the editing effect in the editing interface, thereby realizing visual editing of the material.

[0130] In some embodiments, the editing interface includes a preview area and an editing area, the preview area is used to display the diffuse image, and the editing area is used to display the parsing results. Therefore, the terminal displays the diffuse image in the preview area of ​​the editing interface, and displays multiple materials in the diffuse image in the editing area, so that the materials in the diffuse image can be edited in the editing area. Among them, the multiple materials in the diffuse image include but are not limited to: text materials and intermediate materials. By displaying the diffuse image and the multiple materials in the diffuse image in different areas of the editing interface, not only can the multiple materials in the diffuse image be quickly edited in the editing area, but the material editing effect can also be presented in the preview area, providing an efficient and convenient visual editing method.

[0131] Figure 5 is a schematic diagram of an editing interface according to an exemplary embodiment. Figure 5 As shown, the upper area in the editing interface is the preview area, and the lower area is the editing area. The preview area displays a diffuse image 501 of the first image. Figure 4 It can be seen that the first image 401 and the diffuse image 501 have the same layout, text material and image material of similar style. The editing area displays a plurality of text materials 502 in the diffuse image and a plurality of image materials (ie, intermediate materials) 503 in the diffuse image.

[0132] Optionally, in response to an editing operation on any text material in the editing area, the terminal displays the edited text material in the editing area and displays a diffuse image including the edited text material in the preview area. Figure 5 As shown, when the text material "XX%" is edited to "50%", the position of the text material in the editing area and the position of the text material in the preview area will both display the text material in the "50%" style, that is, the edited text material is displayed. Alternatively, when the text material "XXX" is deleted in the editing area, the terminal cancels the display of "XXX" in the preview area, thereby deleting the text material in the diffuse image.

[0133] In addition, in addition to editing the text material in the diffuse image in the editing area, the embodiment of the present disclosure also supports replacing the intermediate material in the diffuse image in the editing area. The process of replacing any intermediate material in the editing area is described below.

[0134] In some embodiments, in response to a replacement operation of any intermediate material in the editing area, the terminal displays the replaced intermediate material in the editing area, and displays a diffuse image containing the replaced intermediate material in the preview area, thereby realizing synchronous replacement of the intermediate material in the editing area and the preview area. Wherein, the replaced intermediate material is an image material that has been historically generated by the terminal in the editing interface. Optionally, in response to a replacement operation of any intermediate material in the editing area, the terminal displays a material selection interface, and the material selection interface includes at least one image material that has been historically generated by the terminal in the editing interface. In response to a selection operation of any image material in the material selection interface, the terminal determines the selected image material as the replaced intermediate material, thereby displaying the replaced intermediate material in the editing area, and displaying a diffuse image containing the replaced intermediate material in the preview area. Wherein, the replacement operation can be a triggering operation of any image material in the editing area, such as a long press operation, a double-click operation, etc. By supporting the replacement of the intermediate material in the editing area, the intermediate material in the diffuse image can be efficiently and conveniently replaced with other image materials that meet the design requirements, which not only meets the personalized design requirements, but also simplifies the material editing operation and improves the material editing efficiency.

[0135] It should be noted that the image materials that have been historically generated by this terminal in the editing interface are, that is, the image materials that have been generated by this terminal according to the material generation function provided by the editing interface. Correspondingly, in addition to providing the material editing function, the editing interface also provides a material generation function. Through the material generation function, it is possible to intelligently generate image materials with a similar style to any image material on the editing page. For ease of description, the image materials generated according to the material generation function will be referred to as intelligent materials below. Therefore, the image materials that have been historically generated by this terminal in the editing interface are, that is, intelligent materials generated based on the material generation function provided by the editing interface. Optionally, the terminal can generate intelligent materials through AI models such as text-generated image models and image-generated image models. The process of generating intelligent materials by the terminal through the AI ​​model is the same as the process of generating intermediate materials introduced in the above step 302, and will not be repeated here.

[0136] The above content mainly introduces the process of editing materials in the editing area of ​​the editing interface. In the embodiment of the present disclosure, it is also supported to edit materials in the preview area of ​​the editing interface. Accordingly, in the case where the diffuse image includes multiple intermediate materials and at least one text material, any material in the diffuse image can be selected in the preview area, and then the position, size, angle, layer, etc. of the selected material can be adjusted in the preview area. The process of editing materials in the preview area is explained below through the following steps (1)-(4).

[0137] (1) When any material is selected in the preview area, in response to a drag operation on the material, the terminal displays the movement of the material in the preview area. Optionally, the terminal can display the movement of the material along the dragging track of the drag operation in the preview area, thereby adjusting the position of the material in the diffuse image by dragging the material.

[0138] (2) When any material is selected in the preview area, in response to a zoom operation on the material, the terminal zooms the material displayed in the preview area based on the zoom operation. The zoom operation may be a trigger operation on a zoom control, or a two-finger zoom operation on the terminal screen. Optionally, when any material is selected, the terminal displays a zoom control for the material, and in response to a sliding operation on the zoom control, when the sliding direction of the sliding operation is a first direction, the terminal displays the material larger; when the sliding direction of the sliding operation is a second direction, the terminal displays the material smaller. The first direction and the second direction are opposite directions.

[0139] (3) When any material is selected in the preview area, in response to a rotation operation on the material, the terminal displays the rotation of the material in the preview area. Optionally, when any material is selected, the terminal displays a rotation control for the material. The rotation operation may be a sliding operation on the rotation control, the rotation direction of the material is consistent with the sliding direction of the rotation control, and the rotation angle of the material is positively correlated with the sliding distance of the rotation control.

[0140] (4) When any material is selected in the preview area, in response to a layer adjustment operation on the material, the terminal displays the layer where the material is located after the adjustment in the editing area, and displays a diffusion image in the preview area, and the corresponding layer in the diffusion image displays the material. The layer adjustment operation is used to adjust the layer where the material is located. Optionally, when any material is selected, the terminal displays a layer adjustment control for the material so that the layer where the material is located can be adjusted through the layer adjustment control, such as adjusting the layer where the material is located to the bottom layer, the top layer, or any intermediate layer.

[0141] Figure 6 is a schematic diagram showing an editing material according to an exemplary embodiment. Figure 6 As shown, when the intermediate material 601 is selected in the preview area, the terminal displays multiple circular controls in the rectangular area outside the intermediate material 601. The circular controls located at the vertex positions of the rectangular area can be zoom controls. By dragging the circular controls at any vertex position, the intermediate material 601 can be zoomed. The circular control 602 located above the rectangular area is a rotation control. By dragging the rotation control, the intermediate material 601 can be rotated in the preview area. In addition, when the intermediate material 601 is selected in the preview area, the terminal can also display a layer adjustment control 603 and a layer label "Layer 1" of the intermediate material 601 in the preview area. The layer label can indicate the layer where the intermediate material 601 is located.

[0142] Through the above steps (1)-(4), the position, size, angle and layer of the material can be adjusted conveniently and quickly in the preview area, and the adjustment process of the material can be displayed in real time in the preview area, thereby realizing visual editing of the material and improving the efficiency of material editing.

[0143] The above content mainly introduces the process of editing materials in the preview area of ​​the editing interface. Since the editing interface also provides a material generation function, image materials similar to the style of any intermediate material displayed in the editing interface can be generated based on the material generation function. Taking any intermediate material as an example, the following steps (1)-(2) are used to illustrate the process of the terminal generating an image material corresponding to the intermediate material based on the material generation function provided by the editing interface.

[0144] (1) In response to a material generation operation for any intermediate material in the diffusion image, the terminal generates at least one candidate material corresponding to the intermediate material, wherein the candidate material is an image material that is relatively similar to the intermediate material, for example, the color style and main body outline of the two are the same, but the picture details are different.

[0145] Alternatively, if Figure 5 As shown, in the editing area of ​​the editing interface, in response to a triggering operation on an editing control corresponding to any intermediate material, the terminal triggers a material generation operation of the intermediate material, thereby generating at least one candidate material corresponding to the intermediate material. The editing control corresponding to the intermediate material is the control with the word "Edit" displayed on the right side of the intermediate material in the editing area.

[0146] In some embodiments, in response to a material generation operation for any intermediate material in a diffusion image, the terminal obtains a description text of the intermediate material. The description text is used to describe the content of the intermediate material. For example, the description text includes a plurality of keywords for describing the content of the intermediate material. Then, the terminal generates at least one candidate material corresponding to the intermediate material based on the description text of the intermediate material. For example, the terminal inputs the description text of the intermediate material into a text-generated graph model, and the text-generated graph model outputs at least one candidate material that conforms to the content described in the description text according to the description text. Or the terminal may input the intermediate material and the description text of the intermediate material into a graph-generated graph model, and the graph-generated graph model outputs at least one candidate material that is relatively similar to the intermediate material according to the input intermediate material and the description text. By generating at least one candidate material corresponding to the intermediate material according to the description text of the intermediate material, it is possible to ensure that the candidate material and the intermediate material are relatively similar in terms of the content, color style, etc. presented, thereby ensuring the similarity between the candidate material and the intermediate material, and improving the accuracy of generating the candidate material.

[0147] In some embodiments, the terminal inputs the intermediate material into the image recognition model, the image recognition model recognizes the content in the intermediate material, and outputs the description text of the intermediate material. Alternatively, the terminal can also obtain the description text input by the user. In response to the material generation operation of any intermediate material in the extended image, the terminal displays a text input control and a prompt text, and the prompt text is used to prompt the input of the description text based on the text input control. Then, the terminal obtains the description text entered in the text input control. Or after the terminal obtains the description text output by the image recognition model, the terminal displays the description text in the text input control to support appropriate editing of the description text according to specific material generation requirements. In response to the editing operation in the text input control, the terminal obtains the edited description text.

[0148] In some embodiments, when the terminal generates candidate materials through an AI (Artificial Intelligence) model such as a text-generated image model or a picture-generated image model, in response to a material generation operation on any intermediate material in the first image, the terminal displays a parameter configuration interface. The parameter configuration interface is used to obtain a description text of the intermediate material and to configure parameters of the AI ​​model. For example, the AI ​​model used to generate the candidate material can be selected in the parameter configuration interface, and the style, screen ratio and other parameters of the candidate material output by the AI ​​model can also be configured in the parameter configuration interface.

[0149] For example, Figure 7 is a schematic diagram of a parameter configuration interface according to an exemplary embodiment. Figure 7 As shown, the parameter configuration interface includes a text input control 701, which is used to obtain a description text. In addition, the parameter configuration interface also includes multiple selectable models, reference types of models, and multiple selectable screen ratios. By configuring the reference type of the model, the reference weights of different contents of the input image can be limited in the process of the graph generation model generating intelligent materials with reference to the input image. For example, when the reference type is selected as a style reference, the reference weight of the style of the input image is higher, so that the graph generation model can refer to the style of the input image more, ensuring that the output candidate material has a more similar style to the input image. By configuring the screen ratio, the size of the candidate material output by the model can be limited, thereby ensuring that the size of the candidate material meets the design requirements.

[0150] (2) The terminal displays in the editing interface that the intermediate material is replaced by any candidate material. Optionally, the terminal displays in the editing area of ​​the editing interface that the intermediate material is replaced by any candidate material, and displays a diffuse image including the replaced candidate material in the preview area of ​​the editing interface. If the terminal generates a candidate material corresponding to the intermediate material in the above step (1), the replaced candidate material is also the candidate material. If the terminal generates multiple candidate materials corresponding to the intermediate material in the above step (1), the replaced candidate material can be any one of the candidate materials.

[0151] In some embodiments, the terminal generates at least one candidate material corresponding to the intermediate material, and the terminal can also display the at least one candidate material. In response to the selection operation of any candidate material, the terminal displays in the editing interface that the intermediate material is replaced with the selected candidate material. By displaying at least one candidate material corresponding to the intermediate material before replacing the intermediate material, it is possible to support the selection of the candidate material displayed after replacement according to the design requirements, thereby ensuring that the candidate material displayed after replacement meets the design requirements, without the need for the user to manually search for the replaced material, thereby improving the material editing efficiency.

[0152] Through the above steps (1)-(2), at least one candidate material with a similar style to any intermediate material can be generated, and the intermediate material can be displayed on the editing interface as being replaced by any candidate material. This can not only conveniently and intuitively display the effect after the material is replaced, but also meet personalized design needs. There is no need for users to manually search for and replace materials with similar styles, which simplifies the material editing operation and improves the material editing efficiency.

[0153] The above steps 301-303 mainly introduce the process of the terminal generating a diffuse image of the first image and editing the intermediate material in the diffuse image. In some embodiments, the editing interface also provides an image generation function, based on which AI models such as Wenshengtu and Tushengtu can be used to intelligently generate at least one second image with a similar style to the diffuse image. Therefore, when the layout of the edited diffuse image meets the design requirements, multiple second images with the same layout and similar style can also be generated with the help of the image generation function provided by the editing interface. The following steps 304-306 illustrate the process of the terminal generating at least one second image based on the diffuse image.

[0154] In step 304, in response to the image generation operation in the editing interface, the terminal obtains a plurality of intermediate materials in the diffusion image.

[0155] In the embodiment of the present disclosure, the image generation operation in the editing interface may be a triggering operation on the generation control of the editing interface. Figure 5 As shown, a generation control is displayed below the editing interface, and the generation control is marked with the words "Generate Now". In response to the triggering operation of the generation control, the terminal obtains multiple intermediate materials in the diffusion image displayed on the editing interface. In addition, when the diffusion image includes at least one text material, the terminal can also synchronously obtain at least one text material in the diffusion image.

[0156] In step 305, for any intermediate material obtained, the terminal generates at least one second material corresponding to the intermediate material.

[0157] In the embodiment of the present disclosure, after the terminal obtains any intermediate material, the terminal can obtain the description text of the intermediate material. Then, the terminal generates at least one second material corresponding to the intermediate material according to the description text of the intermediate material. The process of the terminal generating the second material according to the description text is the same as the process of generating the candidate material according to the description text introduced in the above step 303, and will not be repeated here.

[0158] In step 306, the terminal generates at least one second image based on at least one second material corresponding to each intermediate material in the diffusion image, and the second materials included in different second images are not completely the same.

[0159] In the disclosed embodiment, after the terminal obtains at least one second material corresponding to each intermediate material in the diffuse image, for each intermediate material, the terminal selects a corresponding second material, and then the terminal splices the second material corresponding to each intermediate material with the text material in the diffuse image according to the layout information of the diffuse image to obtain a second image. The second image has a similar style to the diffuse image, for example, the color style, layout, main body outline, etc. of the two are the same, but the picture details of the two are slightly different. Since each intermediate material corresponds to at least one second material, different second images can be generated if different second materials are selected. The diffuse image includes 1 intermediate material, and the intermediate material corresponds to 4 second materials: second material 1, second material 2, second material 3, and second material 4. The terminal can splice each second material corresponding to the intermediate material with the text material in the diffuse image to obtain 4 second images.

[0160] Figure 8 is a schematic diagram of a second image according to an exemplary embodiment. Figure 8 As shown, each second image includes image material 801 and image material 802, and image material 801 is consistent with the above Figure 6 The style of the intermediate material 601 in the diffuse image shown is relatively similar, and the image material 801 is similar to the above Figure 4 The styles of the corresponding first materials in the shown first image are also relatively similar.

[0161] When the layout of the edited diffusion image meets the design requirements, multiple second images with the same layout and similar style are generated by using the image generation function provided by the editing interface, so that the user can select a suitable second image from the multiple second images. With the above method, the user does not need to manually search for materials with similar styles, nor does the user need to manually create images, which simplifies the operation of creating images and improves the efficiency of image creation.

[0162] In some embodiments, the terminal can also display at least one second image generated. In response to an interactive operation on any second image, the terminal displays an editing control for the second image. Among them, the interactive operation includes but is not limited to a trigger operation, a cursor hover operation, etc. The editing control is used to start the editor after triggering. The editor can be any editing application installed or run on the terminal, and the editor provides rich editing functions. In response to a trigger operation on the editing control of any second image, the terminal starts the editor and displays the second image in the editing interface provided by the editor so that the second image can be edited in the editor. By displaying the editing control of the second image, a method of quickly entering the editor to edit the second image can be provided, without the user manually starting the editor, and without the user manually importing the second image into the editor, shortening the interactive link in the editing process and improving editing efficiency.

[0163] Optionally, in response to an interactive operation on any second image, the terminal can also display a save control for the second image. The save control is used to save the second image to a local storage space after being triggered. The edit control and save control for the second image can both be displayed in a floating manner on the upper layer of the second image.

[0164] In some embodiments, in response to an editing operation on any material in the second image in the editor, the terminal displays the edited material in the editing interface provided by the editor. Optionally, the material editing operation includes but is not limited to: adding material, deleting material, adjusting the parameters, position, layer of the material, etc. Among them, the parameters of the material include but are not limited to: transparency, brightness, contrast, saturation, blur, sharpness, etc. By supporting editing in the editor, a rich variety of editing functions can be provided, thereby further meeting personalized editing needs.

[0165] In addition, the editor also has a material generation function. Similar to the material generation function introduced in the above steps, in response to the material generation operation of any image material in the second image in the editor, the terminal generates at least one third material corresponding to the image material, and then the terminal displays the image material in the editing interface provided by the editor to be replaced by any third material. Among them, any of the above-mentioned image materials can be the image material originally included in the second image, or it can be the image material newly added in the editor, and the embodiment of the present disclosure is not limited to this. Alternatively, the terminal displays at least one third material in the editing interface provided by the editor. In response to the selection operation of any third material, the terminal displays the image material in the editing interface provided by the editor to be replaced by the selected third material. By supporting the re-generation of intelligent materials corresponding to any image material in the editor, it is possible to continue to generate intelligent materials with a style similar to that of any image material when it does not meet the design requirements until the generated intelligent materials meet the design requirements.

[0166] The disclosed embodiment provides an image generation method, which can analyze the first image after determining a first image that meets the design requirements, obtain and display a diffuse image of the first image and multiple intermediate materials in the diffuse image. Designers can simply adjust the position and size of the intermediate materials according to design requirements to obtain an edited diffuse image, and then intelligently generate at least one second image with a similar style based on the edited diffuse image. Using the above method, at least one second image with a similar style can be quickly generated based on a relatively satisfactory first image, without the need for designers to spend a lot of time manually searching for and editing materials with similar styles, which simplifies the operation of making images and improves image generation efficiency.

[0167] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0168] Fig. 9 FIG. 1 is a block diagram of an image generating device according to an exemplary embodiment. Fig. 9 As shown, the device includes: an acquisition unit 901, a display unit 902 and a first generation unit 903.

[0169] An acquisition unit 901 is configured to acquire a first image, where the first image includes a plurality of first materials;

[0170] The display unit 902 is configured to display a diffusion image and a parsing result of the first image on an editing interface in response to a parsing operation on the first image, wherein the parsing result includes a plurality of intermediate materials in the diffusion image, and the plurality of intermediate materials are image materials generated based on the plurality of first materials;

[0171] The display unit 902 is further configured to display a diffusion image including the edited intermediate material in the editing interface in response to an editing operation on any intermediate material in the editing interface;

[0172] The first generating unit 903 is configured to generate at least one second image based on the diffusion image in response to an image generating operation in the editing interface, wherein the at least one second image includes a plurality of second materials, and the plurality of second materials are image materials generated based on a plurality of intermediate materials.

[0173] In some embodiments, the first generation unit 903 is further configured to generate an intermediate material corresponding to the first material based on any first material in the first image, and the similarity between the intermediate material and the image material is greater than a preset value; and generate a diffusion image of the first image based on the intermediate material corresponding to each first material in the first image.

[0174] In some embodiments, the first generation unit 903 is also configured to generate a diffusion image of the first image based on at least one text material and an intermediate material corresponding to each first material when the first image also includes at least one text material, and the parsing result includes multiple intermediate materials and at least one text material.

[0175] In some embodiments, the editing interface includes a preview area and an editing area, the preview area is used to display the diffusion image, and the editing area is used to display the analysis result.

[0176] In some embodiments, the display unit 902 is configured to display a material selection interface in response to a replacement operation on any intermediate material in the editing area, display the replaced intermediate material in the editing area, and display a diffuse image containing the replaced intermediate material in the preview area, wherein the replaced intermediate material is an image material that has been historically generated by this terminal in the editing interface.

[0177] In some embodiments, the parsing result includes a plurality of intermediate materials and at least one text material in the first image;

[0178] The display unit 902 is further configured to perform at least one of the following:

[0179] When any material is selected in the preview area, in response to a drag operation on the material, the movement of the intermediate material is displayed in the preview area;

[0180] When any material is selected in the preview area, in response to a zoom operation on the material, the material displayed in the preview area is zoomed based on the zoom operation;

[0181] When any material is selected in the preview area, in response to a rotation operation on the material, the material rotation is displayed in the preview area;

[0182] When any material is selected in the preview area, in response to the layer adjustment operation on the material, the layer where the adjusted material is located is displayed in the editing area, and the diffusion image is displayed in the preview area, and the corresponding layer in the diffusion image displays the material.

[0183] In some embodiments, the apparatus further comprises:

[0184] A second generating unit is configured to generate at least one candidate material corresponding to any intermediate material in response to a material generating operation on any intermediate material in the diffusion image;

[0185] The display unit 902 is further configured to display on the editing interface that the intermediate material is replaced with any candidate material.

[0186] In some embodiments, the second generation unit is configured to obtain a description text of the intermediate material in response to a material generation operation on any intermediate material in the diffusion image, where the description text is used to describe the content of the intermediate material; and generate at least one candidate material corresponding to the intermediate material based on the description text of the intermediate material.

[0187] In some embodiments, the display unit 902 is configured to display at least one candidate material corresponding to the intermediate material; in response to a selection operation on any candidate material, the intermediate material is displayed on the editing interface to be replaced with the selected candidate material.

[0188] In some embodiments, the first generation unit 903 is configured to obtain multiple intermediate materials in the diffusion image in response to an image generation operation in the editing interface; for any intermediate material obtained, generate at least one second material corresponding to the intermediate material; based on the at least one second material corresponding to each intermediate material in the diffusion image, generate at least one second image, and the second materials included in different second images are not exactly the same.

[0189] In some embodiments, the display unit 902 is further configured to display at least one second image; in response to an interactive operation on any second image, display an editing control of the second image, wherein the editing control is used to start an editor after being triggered, and the editor is used to edit the second image; in response to a triggering operation on the editing control of any second image, display the second image in the editing interface provided by the editor.

[0190] In some embodiments, the display unit 902 is further configured to display the edited material in the editing interface provided by the editor in response to an editing operation on any material in the second image.

[0191] The disclosed embodiment provides an image generation device, which can analyze the first image after determining a first image that meets the design requirements, obtain and display a diffuse image of the first image and multiple intermediate materials in the diffuse image. Designers can simply adjust the position and size of the intermediate materials according to design requirements to obtain an edited diffuse image, and then intelligently generate at least one second image with a similar style based on the edited diffuse image. Using the above method, at least one second image with a similar style can be quickly generated based on a relatively satisfactory first image, without the need for designers to spend a lot of time manually searching for and editing materials with similar styles, thereby simplifying the operation of making images and improving image generation efficiency.

[0192] It should be noted that the image generation device provided in the above embodiment is only illustrated by the division of the above functional units. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device is divided into different functional units to complete all or part of the functions described above. In addition, the image generation device provided in the above embodiment and the image generation method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0193] Regarding the image generating device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0194] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. Generally, the electronic device 1000 includes: a processor 1001 and a memory 1002 .

[0195] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0196] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one program code, which is used to be executed by the processor 1001 to implement the image generation method provided by the method embodiment of the present disclosure.

[0197] In some embodiments, the electronic device 1000 may further optionally include: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002 and the peripheral device interface 1003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1003 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007 and a power supply 1008.

[0198] The peripheral device interface 1003 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, and the peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral device interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0199] The radio frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1004 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1004 can communicate with other electronic devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1004 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.

[0200] The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to collect touch signals on the surface or above the surface of the display screen 1005. The touch signal can be input to the processor 1001 as a control signal for processing. At this time, the display screen 1005 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1005 can be one, and the front panel of the electronic device 1000 is set; in other embodiments, the display screen 1005 can be at least two, which are respectively set on different surfaces of the electronic device 1000 or are folded; in some other embodiments, the display screen 1005 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 1000. Even, the display screen 1005 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0201] The camera assembly 1006 is used to capture images or videos. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the electronic device, and the rear camera is arranged on the back of the electronic device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0202] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1001 for processing, or input them into the radio frequency circuit 1004 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 1000. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1007 may also include a headphone jack.

[0203] The power supply 1008 is used to power various components in the electronic device 1000. The power supply 1008 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1008 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0204] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the electronic device 1000, and the electronic device 1000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0205] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1002 including instructions, and the instructions can be executed by a processor 1001 of an electronic device 1000 to complete the above-mentioned image generation method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0206] A computer program product comprises a computer program, and when the computer program is executed by a processor, the image generating method is implemented.

[0207] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0208] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image generation method, characterized in that: The method comprises: Acquire a first image, where the first image includes a plurality of first materials; In response to the analysis operation on the first image, displaying a diffusion image and an analysis result of the first image on an editing interface, wherein the analysis result includes a plurality of intermediate materials in the diffusion image, and the plurality of intermediate materials are image materials generated based on the plurality of first materials; In response to an editing operation on any intermediate material in the editing interface, displaying a diffusion image including the edited intermediate material in the editing interface; In response to an image generation operation in the editing interface, at least one second image is generated based on the diffusion image, the at least one second image includes a plurality of second materials, and the plurality of second materials are image materials generated based on the plurality of intermediate materials.

2. The image generation method according to claim 1, characterized in that: The process of generating the diffusion image of the first image includes: Based on any first material in the first image, generating an intermediate material corresponding to the first material, wherein the similarity between the intermediate material and the first material is greater than a preset value; A diffusion image of the first image is generated based on an intermediate material corresponding to each of the first materials in the first image.

3. The image generation method according to claim 2, characterized in that: The step of generating a diffusion image of the first image based on the intermediate material corresponding to each of the first materials in the first image includes: In the case where the first image further includes at least one text material, a diffusion image of the first image is generated based on the at least one text material and each intermediate material corresponding to the first material, and the parsing result includes the multiple intermediate materials and the at least one text material.

4. The image generation method according to claim 1, characterized in that: The editing interface includes a preview area and an editing area, the preview area is used to display the diffusion image, and the editing area is used to display the analysis result.

5. The image generation method according to claim 4, characterized in that: In response to an editing operation on any intermediate material in the editing interface, displaying a diffusion image including the edited intermediate material in the editing interface includes: In response to a replacement operation on any intermediate material in the editing area, the replaced intermediate material is displayed in the editing area, and a diffuse image containing the replaced intermediate material is displayed in the preview area. The replaced intermediate material is an image material that has been historically generated by this terminal in the editing interface.

6. The image generation method according to claim 4, characterized in that: The parsing result includes the plurality of intermediate materials and at least one text material in the first image; The method further comprises at least one of the following: When any material is selected in the preview area, in response to a drag operation on the material, the movement of the material is displayed in the preview area; When any material is selected in the preview area, in response to a zooming operation on the material, zooming the material displayed in the preview area based on the zooming operation; When any material is selected in the preview area, in response to a rotation operation on the material, displaying the material rotation in the preview area; When any material is selected in the preview area, in response to a layer adjustment operation on the material, the layer where the material is located after adjustment is displayed in the editing area, the diffusion image is displayed in the preview area, and the corresponding layer in the diffusion image displays the material.

7. The image generation method according to claim 1, characterized in that: The method further comprises: In response to a material generation operation on any intermediate material in the diffusion image, generating at least one candidate material corresponding to the intermediate material; The editing interface displays that the intermediate material is replaced by any of the candidate materials.

8. The image generation method according to claim 7, characterized in that: The step of generating at least one candidate material corresponding to any intermediate material in the diffusion image in response to the material generating operation includes: In response to a material generation operation on any intermediate material in the diffusion image, obtaining a description text of the intermediate material, wherein the description text is used to describe the content of the intermediate material; At least one candidate material corresponding to the intermediate material is generated based on the description text of the intermediate material.

9. The image generation method according to claim 7, characterized in that: The displaying in the editing interface that the intermediate material is replaced with any of the candidate materials includes: Displaying at least one candidate material corresponding to the intermediate material; In response to a selection operation on any candidate material, the editing interface displays that the intermediate material is replaced with the selected candidate material.

10. The image generation method according to claim 1, characterized in that: The generating at least one second image based on the diffusion image in response to the image generating operation in the editing interface comprises: In response to an image generation operation in the editing interface, acquiring a plurality of intermediate materials in the diffusion image; For any intermediate material obtained, generating at least one second material corresponding to the intermediate material; The at least one second image is generated based on at least one second material corresponding to each intermediate material in the diffusion image, and the second materials included in different second images are not completely the same.

11. The image generation method according to claim 1, characterized in that: The method further comprises: displaying the at least one second image; In response to an interactive operation on any second image, an editing control of the second image is displayed, wherein the editing control is used to trigger and then start an editor, and the editor is used to edit the second image; In response to a triggering operation on an editing control of any second image, the second image is displayed on an editing interface provided by the editor.

12. The image generation method according to claim 11, characterized in that: The method further comprises: In response to an editing operation on any material in the second image, the edited material is displayed on an editing interface provided by the editor.

13. An image generating device, characterized in that: The device comprises: An acquisition unit is configured to acquire a first image, wherein the first image includes a plurality of first materials; a display unit configured to display a diffusion image and a parsing result of the first image on an editing interface in response to a parsing operation on the first image, wherein the parsing result includes a plurality of intermediate materials in the diffusion image, and the plurality of intermediate materials are image materials generated based on the plurality of first materials; The display unit is further configured to, in response to an editing operation on any intermediate material in the editing interface, display a diffusion image including the edited intermediate material in the editing interface; The first generating unit is configured to generate at least one second image based on the diffusion image in response to an image generating operation in the editing interface, wherein the at least one second image includes a plurality of second materials, and the plurality of second materials are image materials generated based on the plurality of intermediate materials.

14. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing program code executable by the processor; The processor is configured to execute the program code to implement the image generating method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image generating method according to any one of claims 1 to 12.