Image generation method and device, electronic equipment and storage medium

By expanding the original text provided by the user, using the expansion text to generate images to solve the problem of image generation quality and accuracy caused by the quality of the user's input text, and achieve higher quality image generation.

CN119379860APending Publication Date: 2025-01-28BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411413179.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When generating images, the quality and accuracy of image generation models of existing text generation models are affected due to the uneven quality of the text provided by users.

Method used

By determining the target expansion template, including multiple extensions, the original text is expanded, the expansion text is obtained, and the target image is generated based on the extension text.

Benefits of technology

Improve the quality of the original text, thereby improving the quality and accuracy of the final image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379860A_ABST
    Figure CN119379860A_ABST
Patent Text Reader

Abstract

The invention relates to an image generation method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining an original text; determining a target expansion template; the target expansion template comprises a plurality of expansion angles; expanding the original text according to an expansion angle included in the expansion template to obtain an expanded text; and generating a target image based on the extended text. The essence of the method is that an original text provided by a user is expanded and optimized to improve the quality of the original text, so that the quality and the accuracy of a finally generated image are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In the digital age, image generation technology, as an important breakthrough in the field of artificial intelligence, has greatly enriched users' content creation experience and brought unprecedented innovation momentum to many industries. However, this technology still has certain limitations. In the current technical field, common text-based graph models mainly rely on text directly input by users as the basis for generating images. In practical applications, due to the uneven quality of text provided by users, there may be problems such as unclear expressions, missing or inaccurate key information, which will directly affect the quality and accuracy of images generated by image generation models. Summary of the invention

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image generating method, an apparatus, an electronic device and a storage medium.

[0004] In a first aspect, the present disclosure provides an image generation method, comprising: obtaining original text;

[0005] Determine a target extension template; the target extension template includes multiple extension angles;

[0006] Expanding the original text according to the expansion angle included in the expansion template to obtain an expanded text;

[0007] Based on the extended text, a target image is generated.

[0008] In a second aspect, the present disclosure further provides an image generating device, comprising:

[0009] The acquisition module is used to obtain the original text;

[0010] A template determination module, used to determine a target extension template; the target extension template includes a plurality of extension angles;

[0011] An expansion module, used for expanding the original text according to the expansion angle included in the expansion template to obtain an expanded text;

[0012] An image generation module is used to generate a target image based on the extended text.

[0013] In a third aspect, the present disclosure further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image generating method as described above.

[0017] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image generating method as described above.

[0018] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0019] The technical solution provided by the embodiment of the present disclosure determines the target extension template by setting; the target extension template includes multiple extension angles; according to the extension angles included in the extension template, the original text is extended to obtain the extended text; based on the extended text, the target image is generated. Its essence is to expand and optimize the original text provided by the user to improve its quality, thereby improving the quality and accuracy of the final generated image. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0022] Figure 1 A flowchart of an image generation method provided by an embodiment of the present disclosure;

[0023] Figure 2-Figure 3 Schematic diagram of two electronic device display interfaces provided by embodiments of the present disclosure;

[0024] Figure 4 is a structural schematic diagram of an image generating device in an embodiment of the present disclosure;

[0025] Figure 5 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0028] Figure 1 This is a flowchart of an image generation method provided in an embodiment of the present disclosure. This embodiment is applicable to the case where image generation is performed in a client. The method can be executed by an image generation device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc. Alternatively, this embodiment is applicable to the case where image generation is performed in a server. The method can be executed by an image generation device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.

[0029] like Figure 1 As shown, the method may specifically include:

[0030] S110, obtaining original text.

[0031] The original text may be, for example, text input by a user.

[0032] S120, determining a target extension template; the target extension template includes multiple extension angles.

[0033] The target extension template may be, for example, a template for extending the original text, which indicates the specific direction of the extension by means of the extension angle. For example, for a certain original text, the target extension template determined for it includes three extension angles, namely, subject description, background description, and image style. Under the guidance of the target extension template, the original text may be subsequently extended from these three extension angles.

[0034] There are many methods for implementing this step, and this application does not limit this. Exemplarily, in one embodiment, the method for implementing this step may include: determining target usage scenario information; and determining a target extension template based on the target usage scenario information.

[0035] The target usage scenario information may be, for example, a user's usage scenario for the generated image. For example, the target usage scenario may be a promotional scenario for a certain thing, a scenario as a social media sharing material, a scene as a photographic work, a scene as a game screen, a scene of forming an image with a specific style (such as a cartoon style, watercolor style, oil painting style, clay style, etc.), etc.

[0036] “Determine the target extension template based on the target usage scenario information” may include, for example: providing multiple candidate extension models; different candidate extension models correspond to different usage scenario information; and determining the target extension template from multiple candidate extension models according to the target usage scenario information. The candidate extension template is an extension template designed in advance according to a specific usage scenario. Since the specific usage scenarios are different, the candidate extension template is customized according to the specific usage scenarios. It can better serve the usage requirements of specific scenarios.

[0037] “Determining a target extension template from a variety of candidate extension models based on target usage scenario information” can make the target extension template used match the user's desired usage scenario, thereby improving the subsequent image generation quality and accuracy.

[0038] S130. Expand the original text according to the expansion angle included in the expansion template to obtain an expanded text.

[0039] Expanding the original text means supplementing and improving the original text. After the original text is expanded, the amount of information in the expanded text is greater than that in the original text.

[0040] There are many methods for implementing this step, and this application does not limit this. For example, in one embodiment, the expansion angle has a preset word library corresponding to it; the implementation method of this step may include: for any expansion angle, extracting a first reference text related to the expansion angle from the original text; determining a second reference text related to the expansion angle from the preset word library; expanding based on the first reference text and / or the second reference text to obtain description information corresponding to the expansion angle; sorting the description information corresponding to each expansion angle to obtain an expansion text.

[0041] Optionally, extracting the first reference text related to the expansion angle from the original text may include: performing semantic understanding on the original text to obtain a semantic understanding result; and extracting the first reference text related to the expansion angle from the original text based on the semantic understanding result.

[0042] The semantic understanding of the original text can be implemented using a model with semantic understanding function. The model with semantic understanding function can perform a comprehensive and in-depth analysis of the original text, clarify the overall meaning of the original text, the meaning of each word in the original text, and understand the relationship between entities in the original text. By semantically understanding the original text, the electronic device can understand which characters or phrases in the original text correspond to a specific expansion angle in the target expansion template, and the phrase is the first reference text related to the expansion angle.

[0043] The extended angle has a corresponding preset word library, which means that for a certain extended angle, the phrases in the corresponding preset word library are phrases that can describe the extended angle. Exemplarily, if a certain extended angle is an image style. The phrases in the word library corresponding to the extended angle may include professional photography, tranquility, grandeur, high resolution, focus on subject, deep depth of field, 8K, 4K, realistic, etc. "Determine a second reference text related to the extended angle from the preset word library", for example, one or more phrases in the preset word library corresponding to the extended angle can be selected as the second reference text.

[0044] “Extending based on the first reference text and / or the second reference text to obtain description information corresponding to the extended angle” may include, for example: for any extended angle, if the first reference text related thereto is obtained, the first reference text is used as the description information corresponding to the extended angle. If the first reference text related thereto is not obtained, the second reference text is used as the description information corresponding to the extended angle. Alternatively, for any extended angle, both the first reference text and the second reference text are used as the description information corresponding to the extended angle.

[0045] “Organize the description information corresponding to each extended angle to obtain the extended text” may include, for example: aggregating the description information corresponding to each extended angle, and the result of the aggregation is the extended text. Optionally, in the process of aggregating, necessary grammar correction, supplementation and improvement may be performed on each description information to make it coherent and fluent.

[0046] In some scenarios, optionally, arranging the description information corresponding to each extended angle to obtain the extended text may include: arranging the description information corresponding to each extended angle in a preset arrangement order to obtain the extended text.

[0047] The preset arrangement order is used to limit the order in which the description information corresponding to each expansion angle is arranged in the expansion text.

[0048] By arranging the description information corresponding to each expansion angle according to a preset arrangement order, an extended text is obtained. The purpose is to unify the arrangement order of the description information corresponding to each expansion angle in the extended text, so as to improve the accuracy of image generation when the target image is generated with the help of an image generation model in the subsequent process.

[0049] S140: Generate a target image based on the extended text.

[0050] There are many implementation methods for this step, which are not limited in this application. Exemplarily, the implementation method for this step may include: inputting the extended text into an image generation model (such as a text-to-image model or an image-to-image model) so that the image generation model generates a target image.

[0051] Exemplarily, if the original text is "snow-capped mountains and glaciers". The target extension template includes four extension angles, namely "subject position description", "background description", "image style" and "negative phrase". Based on the target extension template, the descriptive information corresponding to the "subject position description" extension angle includes "placed on a wooden platform", the descriptive information corresponding to the "background description" extension angle includes "the background shows tranquil snow-capped mountains and glaciers", the descriptive information corresponding to the "image style" extension angle includes "professional photography, tranquil, majestic, high resolution, focused subject, deep depth of field, 8K, realistic", and the descriptive information corresponding to the "negative phrase" extension angle includes "people, beach items, summer theme". These descriptive information are subsequently summarized to obtain the extended text.

[0052] In the above technical solution, a target extension template is determined by setting; the target extension template includes multiple extension angles; the original text is extended according to the extension angles included in the extension template to obtain the extended text; based on the extended text, the target image is generated. Its essence is to expand and optimize the original text provided by the user to improve its quality, thereby improving the quality and accuracy of the final generated image.

[0053] In the above technical solution, optionally, S120 may include: displaying an image generation information configuration page, the image generation information configuration page includes an image generation model tag; different image generation model tags correspond to different image generation models, and any image generation model has corresponding usage scenario information; in response to the selection operation of the target image generation model in the image generation information configuration page, the usage scenario information corresponding to the target image generation model is used as the target usage scenario information; based on the target usage scenario information, the target extension template is determined. S140 may include: inputting the extension text into the target image generation model to obtain the target image.

[0054] The image generation information configuration page may be, for example, a page for configuring input information of an image generation model. Figure 2 In the image generation information configuration page, you can configure the image generation prompt information, image generation model, precision, image ratio, etc.

[0055] The image generation model tag is information used to distinguish one image generation model from other image generation models. Exemplarily, the image generation model tag may include an icon, name, version number, serial number, etc. of the image generation model.

[0056] The selection operation of the target image generation model in the image generation information configuration page may be, for example, a user's selection operation of a certain image generation model label in the image generation information configuration page. The image generation model corresponding to the image generation model label selected by the user is the target image generation model. The selection operation may be, for example, a click operation or a slide operation.

[0057] For example, see Figure 2 , the image generation information configuration page includes 4 image generation model tags, which represent 4 different image generation models. Image generation model 1 corresponds to usage scenario information 1, image generation model 2 corresponds to usage scenario information 2, image generation model 3 corresponds to usage scenario information 3, and image generation model 4 corresponds to usage scenario information 4. If the user clicks the tag of image generation model 2, usage scenario information 2 is used as the target usage scenario information, and the original text is subsequently expanded using the expansion template corresponding to the target usage scenario information.

[0058] In practice, the quality of the original text input by the user is poor, and the target usage scenario information may not be accurately determined based on the original text alone. This setting is to further determine the target usage scenario information with the help of the image generation model selected by the user, which can improve the accuracy of determining the target usage scenario information and thus improve the quality of the subsequently generated images.

[0059] In another embodiment, optionally, S120 may include: displaying an image generation room selection page, the image generation room selection page including an image generation room label; different image generation rooms correspond to different usage scenario information; in response to a selection operation of a target image generation room in the image generation room selection page, displaying an image generation prompt information configuration page corresponding to the target image generation room; using the usage scenario information corresponding to the target image generation room as the target usage scenario information; and determining a target extension template based on the target usage scenario information. S140 may include: in the target image generation room, generating a target image based on the extended text.

[0060] A room, for example, can be a space used for image generation. Different rooms are set up differently according to different usage scenarios. Each image generation room has a corresponding image generation prompt information configuration page. In the image generation prompt information configuration page corresponding to each image generation room, input information of the image generation model can be configured. However, since the settings of different image generation rooms are determined according to usage scenarios, in practice, different image generation rooms can use different image generation models.

[0061] The image generation room label may be, for example, information that distinguishes one image generation room from other image generation rooms. Exemplarily, the image generation room label may include the name, number, or usage scenario description information of the image generation room.

[0062] The selection operation of the target image generation room in the image generation room selection page may be, for example, a user's selection operation of a certain image generation room label in the image generation room selection page. The image generation room corresponding to the image generation room label selected by the user is the target image generation room. The selection operation may be, for example, a click operation or a slide operation.

[0063] For example, see Figure 3 The image generation room selection page includes three image generation room tags, among which image generation room 1 is used to meet the requirement that the generated image is used as a poster, image generation room 2 is used to meet the requirement that the generated image has a clay style, and image generation room 3 is used to meet the requirement that the generated image has an oil painting style. If the user selects image generation room 2, the image generation prompt information configuration page corresponding to image generation room 2 is displayed, and the clay special effect is used as the target usage scenario information. The original text is subsequently expanded using the expansion template corresponding to the target usage scenario information.

[0064] Similarly, in practice, the quality of the original text input by the user is poor, and the target usage scenario information may not be accurately determined based on the original text alone. This setting is to further derive the target usage scenario information with the help of the image generation room, which can improve the accuracy of determining the target usage scenario information and thus improve the quality of the subsequently generated images.

[0065] Based on the above technical solution, optionally, S130 may include: displaying descriptive information corresponding to the extended angle; in response to a modification instruction for the descriptive information corresponding to the extended angle, updating the extended text based on the modified descriptive information corresponding to the extended angle indicated by the modification instruction; S140 may include: generating a target image based on the updated extended text.

[0066] The modification instruction for the description information corresponding to the extended angle may be, for example, an instruction generated by a user modifying the description information corresponding to one or some of the extended angles. Since the extended text can be regarded as the result of arranging and splicing the description information corresponding to multiple extended angles, when part or all of the description information corresponding to the extended angle is modified, the description information corresponding to the extended angle in the extended text before the modification is replaced with the modified description information corresponding to the extended angle to obtain the updated extended text.

[0067] In some scenarios, updating the extended text also includes grammatical correction, improvement, and optimization of the extended text formed after the replacement operation.

[0068] This setting can, on the one hand, assist users in learning how to improve the input quality of original text by displaying descriptive information corresponding to the expanded angle; on the other hand, it allows users to more effectively modify the prompt information input into the image generation model according to their own needs, thereby improving the quality and accuracy of image generation.

[0069] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0070] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0071] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0072] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0073] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0074] Figure 4 Schematic diagram of the structure of an image generating device in an embodiment of the present disclosure. The image generating device provided in the embodiment of the present disclosure can be configured in a client, or can be configured in a server. Figure 4 , the image generating device specifically comprises:

[0075] An acquisition module 310 is used to acquire the original text;

[0076] The template determination module 320 is used to determine a target extension template; the target extension template includes multiple extension angles;

[0077] An expansion module 330, configured to expand the original text according to the expansion angle included in the expansion template to obtain an expanded text;

[0078] The image generation module 340 is used to generate a target image based on the extended text.

[0079] Furthermore, the template determination module 320 is used to:

[0080] Determine target usage scenario information;

[0081] Based on the target usage scenario information, a target extension template is determined.

[0082] Furthermore, the template determination module 320 is used to:

[0083] Displaying an image generation information configuration page, the image generation information configuration page including an image generation model tag; different image generation model tags correspond to different image generation models, and the image generation models have corresponding usage scenario information;

[0084] In response to a selection operation of a target image generation model in the image generation information configuration page, using usage scenario information corresponding to the target image generation model as target usage scenario information;

[0085] The image generation module 340 is used to: input the extended text into the target image generation model to obtain a target image.

[0086] Furthermore, the template determination module 320 is used to:

[0087] Displaying an image generation room selection page, the image generation room selection page including an image generation room label; different image generation rooms correspond to different usage scenario information;

[0088] In response to a selection operation of a target image generation room in the image generation room selection page, displaying an image generation prompt information configuration page corresponding to the target image generation room;

[0089] Using the usage scenario information corresponding to the target image generation room as target usage scenario information;

[0090] The image generation module 340 is used to generate a target image based on the extended text in the target image generation room.

[0091] Furthermore, the expansion angle has a preset vocabulary corresponding thereto; the expansion module 330 is used to:

[0092] For any of the extended angles, extract a first reference text related to the extended angle from the original text; determine a second reference text related to the extended angle from the preset word library; perform expansion based on the first reference text and / or the second reference text to obtain description information corresponding to the extended angle;

[0093] The description information corresponding to each of the extension angles is sorted to obtain an extended text.

[0094] Further, the expansion module 330 is used to:

[0095] Performing semantic understanding on the original text to obtain a semantic understanding result;

[0096] Based on the semantic understanding result, a first reference text related to the expansion angle is extracted from the original text.

[0097] Further, the expansion module 330 is used to:

[0098] The description information corresponding to each of the extension angles is arranged in a preset arrangement order to obtain an extended text.

[0099] Furthermore, the device also includes a correction module, which is used to:

[0100] Displaying description information corresponding to the expansion angle;

[0101] In response to a modification instruction for the description information corresponding to the extended angle, updating the extended text based on the modified description information corresponding to the extended angle indicated by the modification instruction;

[0102] The image generation module 340 is used to generate a target image based on the updated extended text.

[0103] The image generation device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image generation method provided in the embodiment of the method of the present disclosure, and has execution steps and beneficial effects, which will not be repeated here.

[0104] Figure 5 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 5 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0105] like Figure 5 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the image generation method of the embodiment described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0106] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Figure 5 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0107] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby realizing the image generation method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0108] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0109] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.

[0110] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0111] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0112] Get the original text;

[0113] Determine a target extension template; the target extension template includes multiple extension angles;

[0114] Expanding the original text according to the expansion angle included in the expansion template to obtain an expanded text;

[0115] Based on the extended text, a target image is generated.

[0116] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0117] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0119] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0120] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0122] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0123] one or more processors;

[0124] A memory for storing one or more programs;

[0125] When the one or more programs are executed by the one or more processors, the one or more processors implement any image generating method provided in the present disclosure.

[0126] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image generating method as described in any one of the present disclosure is implemented.

[0127] The embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the image generation method as described above is implemented.

[0128] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0129] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image generation method, characterized in that: include: Get the original text; Determine the target extension template; The target expansion template includes multiple expansion angles; Expanding the original text according to the expansion angle included in the expansion template to obtain an expanded text; Based on the extended text, a target image is generated.

2. The method according to claim 1, characterized in that The determining of the target extension template includes: Determine target usage scenario information; Based on the target usage scenario information, a target extension template is determined.

3. The method according to claim 2, characterized in that The determining of the target usage scenario information includes: Displaying an image generation information configuration page, the image generation information configuration page including an image generation model tag; different image generation model tags correspond to different image generation models, and the image generation models have corresponding usage scenario information; In response to a selection operation of a target image generation model in the image generation information configuration page, using usage scenario information corresponding to the target image generation model as target usage scenario information; The generating a target image based on the extended text includes: inputting the extended text into the target image generation model to obtain the target image.

4. The method according to claim 2, characterized in that: The determining of the target usage scenario information includes: Displaying an image generation room selection page, the image generation room selection page including an image generation room label; different image generation rooms correspond to different usage scenario information; In response to a selection operation of a target image generation room in the image generation room selection page, displaying an image generation prompt information configuration page corresponding to the target image generation room; Using the usage scenario information corresponding to the target image generation room as target usage scenario information; The generating a target image based on the extended text includes: generating a target image based on the extended text in the target image generating room.

5. The method according to claim 1, characterized in that The expansion angle has a preset word library corresponding thereto; the original text is expanded according to the expansion angle included in the expansion template to obtain the expanded text, including: For any of the extended angles, extract a first reference text related to the extended angle from the original text; determine a second reference text related to the extended angle from the preset word library; perform expansion based on the first reference text and / or the second reference text to obtain description information corresponding to the extended angle; The description information corresponding to each of the extension angles is sorted to obtain an extended text.

6. The method according to claim 5, characterized in that The step of extracting a first reference text related to the expansion angle from the original text comprises: Performing semantic understanding on the original text to obtain a semantic understanding result; Based on the semantic understanding result, a first reference text related to the expansion angle is extracted from the original text.

7. The method according to claim 5, characterized in that The description information corresponding to each of the extension angles is sorted to obtain an extension text, including: The description information corresponding to each of the extension angles is arranged in a preset arrangement order to obtain an extended text.

8. The method according to claim 5, characterized in that Also includes: Displaying description information corresponding to the expansion angle; In response to a modification instruction for the description information corresponding to the extended angle, updating the extended text based on the modified description information corresponding to the extended angle indicated by the modification instruction; The step of generating a target image based on the extended text includes: A target image is generated based on the updated extended text.

9. An image generating device, characterized in that: include: The acquisition module is used to obtain the original text; A template determination module, used for determining a target extension template; The target expansion template includes multiple expansion angles; An expansion module, used for expanding the original text according to the expansion angle included in the expansion template to obtain an expanded text; An image generation module is used to generate a target image based on the extended text.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Special-effect template generation method and apparatus, and electronic device and storage medium

    WO2026171241A1