Image generation method and device, electronic equipment, storage medium and program product
By automatically generating images that match the user input text, the problem of low matching accuracy between drawings and text in the prior art is solved, and the drawing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202510236336.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-13
- Filing Date
- 2024-07-12
- Publication Date
- 2025-06-17
AI Technical Summary
In the prior art, when users publish text content, the matching accuracy between the pictures and text is low, and the user needs to select pictures from the picture gallery by themselves, which is inefficient and cannot meet the needs of users.
In response to the user's touch operation, the interface including the text editing area is displayed, the text input by the user is obtained, and the image matching the text is automatically generated, and displayed on the interface including the image and the text editing area, the image is updated as the text changes.
It improves the matching accuracy between text and images, reduces the burden on users when selecting pictures, improves the efficiency of pictures, meets users' needs, and improves the user experience.
Smart Images

Figure CN120163891A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to an image generation method, apparatus, electronic device, storage medium, and program product. Background Art
[0002] With the development of Internet technology, Internet communities have gradually emerged and become an indispensable part of people's lives. People can communicate, discuss, publish and share content in Internet communities. For example, users can publish content such as text, images, audio and video.
[0003] Currently, when a user publishes content, such as publishing text, the user can simply publish the text content, but this way makes the published content relatively single; or after the user enters the text, the user can select an image from a locally preset image library in the system as a picture for the text. Although this way can increase the diversity of the content to a certain extent, there are still problems such as low matching accuracy between the picture and the text, and the need for the user to select the picture in the library by themselves, with low efficiency and unable to meet the user's needs. Summary of the Invention
[0004] Embodiments of this application provide an image generation method, apparatus, electronic device, storage medium, and program product, which improve the matching accuracy between text and images, and do not require the user to match pictures by themselves, ensuring that the new first image displayed on the second interface meets the user's wishes, with high efficiency and improved user experience.
[0005] In a first aspect, embodiments of this application provide an image generation method, which includes:
[0006] In response to a first touch operation, display a first interface, where the first interface includes a first text editing area;
[0007] Obtain a first text input in the first text editing area, and obtain a first image described by the first text;
[0008] Display a second interface, where the second interface includes a first image and a second text editing area, and the second text editing area is used to display the first text;
[0009] Wherein, when the first text displayed in the second text editing area is edited and modified to change, the first image displayed in the second interface changes following the change of the first text.
[0010] In a second aspect, embodiments of this application provide an image generation apparatus, which includes: a transceiver unit and a response unit;
[0011] The response unit is configured to, in response to a first touch operation, display a first interface, where the first interface includes a first text editing area;
[0012] A transceiver unit, configured to obtain a first text input in a first text editing area and obtain a first image described by the first text;
[0013] A response unit, further configured to display a second interface, the second interface includes a first image and a second text editing area, and the second text editing area is configured to display the first text;
[0014] Wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method as in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method as in the first aspect.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer is operable to cause the computer to execute the method as in the first aspect.
[0018] Implementing the embodiments of the present application has the following beneficial effects:
[0019] By responding to the first touch operation, a first interface including a first text editing area is displayed, by obtaining the first text input in the first text editing area, and obtaining the first image described by the first text, a second interface including the first image and a second text editing area is displayed, and the second text editing area is used to display the first text; wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text. In other words, for different texts, the corresponding images described by the texts can be obtained and displayed, ensuring the matching accuracy between the text and the image. And when the text is a text to be published, an image matching the text to be published can be obtained. Not only does it not require the user to prepare the matching picture by themselves, nor does it require the user to select a matching picture from the pre-set picture library in the target application program, but an image related to the first text is intelligently generated based on the text input by the user for the user to select, that is, it ensures the matching accuracy between the text and the image, improves the efficiency of matching pictures, meets the needs of users, enriches the interaction process between the user and the device when generating pictures from text, and increases the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 Schematic diagram of an image generation system provided by an embodiment of the present application;
[0022] Figure 2 Schematic flowchart of an image generation method provided by an embodiment of the present application;
[0023] Figure 3 Schematic diagram of a first initial interface provided by an embodiment of the present application;
[0024] Figure 4 Schematic diagram of a second initial interface provided by an embodiment of the present application;
[0025] Figure 5 Schematic diagram of a first interface provided by an embodiment of the present application;
[0026] Figure 6 Schematic diagram of a third initial interface provided by an embodiment of the present application;
[0027] Figure 7 Schematic diagram of a fourth initial interface provided by an embodiment of the present application;
[0028] Figure 8 Schematic diagram of a second interface provided by an embodiment of the present application;
[0029] Figure 9a Schematic flowchart of another image generation method provided by an embodiment of the present application;
[0030] Figure 9b Schematic diagram of another second interface provided by an embodiment of the present application;
[0031] Figure 10a Schematic diagram of another second interface provided by an embodiment of the present application;
[0032] Figure 10b Schematic diagram of modifying text based on a second text editing area provided by an embodiment of the present application;
[0033] Figure 11a Schematic diagram of another second interface provided by an embodiment of the present application;
[0034] Figure 11bA schematic diagram of refreshing and displaying an image provided by an embodiment of the present application;
[0035] Figure 12 Another schematic diagram of a second interface provided by an embodiment of the present application;
[0036] Figure 13 A schematic diagram of triggering the display of a third interface provided by an embodiment of the present application;
[0037] Figure 14 A schematic diagram of triggering the return from the third interface to the second interface provided by an embodiment of the present application;
[0038] Figure 15 A schematic diagram of triggering the display of a fourth interface provided by an embodiment of the present application;
[0039] Figure 16 A schematic diagram of triggering the display of a fifth interface provided by an embodiment of the present application;
[0040] Figure 17 A schematic diagram of synchronizing text provided by an embodiment of the present application;
[0041] Figure 18 A schematic diagram of not synchronizing text provided by an embodiment of the present application;
[0042] Figure 19 A schematic diagram of triggering the display of a sixth interface with synchronized text provided by an embodiment of the present application;
[0043] Figure 20 A schematic diagram of triggering the display of a sixth interface with unsynchronized text provided by an embodiment of the present application;
[0044] Figure 21a Another schematic diagram of triggering the return from the third interface to the second interface provided by an embodiment of the present application;
[0045] Figure 21b Another schematic diagram of synchronizing text provided by an embodiment of the present application;
[0046] Figure 21c Another schematic diagram of not synchronizing text provided by an embodiment of the present application;
[0047] Figure 22 A block diagram of the functional units of an image generation device provided by an embodiment of the present application;
[0048] Figure 23 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0050] The terms "first", "second", "third", "fourth", etc. in the description, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0051] Referring to
[0052] Referring to Figure 1 , Figure 1 is a schematic diagram of an image generation system provided for an embodiment of the present application. The system includes an image generation device (also referred to as a text-to-image device) and a server; wherein, the image generation device can be a user device, such as a laptop computer, a tablet computer, a smart phone, etc., which is not limited in the present application. The image generation device is installed with a target application program. When the user performs a first touch operation on the target application program, an image corresponding thereto is generated based on the image generation method of the present application. Specifically:
[0053] The image generation device can respond to the first touch operation, display a first interface, and the first interface includes a first text editing area; obtain the first text input in the first text editing area, and obtain the first image described by the first text; display a second interface, and the second interface includes the first image and a second text editing area, and the second text editing area is used to display the first text; wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text.
[0054] It should be noted that after obtaining the first image corresponding to the first text input by the user, the first text and the first image can also be published based on the user's touch operation, or the user can also save the first image (for example, save it to the local album, remote storage space, etc.).
[0055] It can be seen that in the embodiment of the present application, by responding to the first touch operation, a first interface including a first text editing area is displayed, the first text input in the first text editing area is obtained, and the first image described by the first text is obtained, and a second interface including the first image and a second text editing area is displayed, and the second text editing area is used to display the first text; wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text. In other words, for different texts, the corresponding images described by the texts can be obtained and displayed, ensuring the matching accuracy between the text and the image. And when the text is a text to be published, an image matching the text to be published can be obtained, which not only does not require the user to prepare the matching picture by themselves, nor does it require the user to select a matching picture from the preset picture library in the target application, but intelligently generates an image related to the first text for the user to select based on the text input by the user, that is, it not only ensures the matching accuracy between the text and the image, but also improves the efficiency of matching pictures, meets the user's needs, enriches the interaction process between the user and the device when generating images from text, and increases the user experience.
[0056] Refer to Figure 2 , Figure 2 which is a schematic flowchart of an image generation method provided by an embodiment of the present application. This method is applied to an image generation device, and this method includes but is not limited to steps 201 - 203:
[0057] 201: Respond to the first touch operation and display a first interface, where the first interface includes a first text editing area.
[0058] 202: Obtain the first text input in the first text editing area and obtain the first image described by the first text.
[0059] 203: Display a second interface, where the second interface includes the first image and a second text editing area, and the second text editing area is used to display the first text.
[0060] Wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text.
[0061] For the convenience of understanding steps 201 - 203, the present application will be explained below in combination with specific graphical examples.
[0062] In step 201, the first touch operation includes an operation for triggering the display of the first interface. When the trigger logic for the target application to trigger the display of the first interface is set differently, the specific operation process included in the first touch operation adapts to the set trigger logic, and this application does not make any restrictions. Exemplarily, under a certain trigger logic of the first interface, the first touch operation by the user on the target application installed on the image generation device mainly includes the following related operation processes:
[0063] Figure 3 This is a schematic diagram of a first initial interface provided by an embodiment of this application. When the user touches the first initial function button in the first initial interface as shown in Figure 3 (where the first initial function button is used to trigger various types of publishing methods, and this application does not limit the specific format of the first initial function button), in response to this touch operation, the second initial interface is displayed. Figure 4 This is a schematic diagram of a second initial interface provided by an embodiment of this application. The second initial interface includes a second initial function button and a third initial function button (where the third function button is used to trigger the text type publishing among various types of publishing methods, and this application does not limit the specific formats of the second initial function button and the third initial function button). The second initial interface also defaults to display the interface corresponding to the second initial function button (for example, Figure 4 if the example of the second initial function button shown is "Album", then the second initial interface will correspondingly display multiple images in the local album, such as Figure 4 the nine-square grid shown); when the user touches the third initial function button, in response to this touch operation, that is, after responding to all the first touch operations of the user, the first interface is displayed. Figure 5 This is a schematic diagram of a first interface provided by an embodiment of this application. The first interface includes a first text editing area (such as Figure 5 the first text editing area shown); Optionally, the first interface may further include Figure 4 the second initial function button and the third initial function button shown; Of course, in an alternative embodiment, the first text editing area may further include a first prompt text, which is used to prompt the user to input text in the first text editing area (this application does not limit the specific content of the first prompt text), refer to Figure 6 , Figure 6 This is a schematic diagram of a third initial interface (i.e., the first interface including the first prompt text) provided by an embodiment of this application. The third initial interface includes a second initial function button and a third initial function button, and the first prompt text in the first text editing area of the third initial interface is "Click here and share your thoughts".
[0064] Exemplarily, under another triggering logic of the first interface, the first touch operation performed by the user on the target application installed on the image generation device mainly includes: indicating a voice input operation for displaying the first interface; in other words, the image generation device can display the first interface when the target application detects the user's voice input operation and the input voice is used to indicate the display of the first interface. For example, the user can input a voice such as "Please open the first interface" or "Open the trigger interface for text-to-image", etc.
[0065] After the first interface is displayed, the user can perform text input based on the first text editing area, so that the corresponding image described by the input text can be obtained and displayed subsequently; that is, the image generation device can obtain the first text input in the first text editing area and obtain the first image described by the first text (i.e., perform step 202). The first text input in the first text editing area is the first text input based on the first text editing area. For example, it can be directly input in the first text editing area, or it can be input in the text input page displayed after triggering the first text editing area, etc. This application does not make any restrictions.
[0066] Taking the input of the first text in the text input page displayed after triggering the first text editing area as an example, after the user completes the input operation of the first text, the displayed text input page (also called the fourth initial page) can be as Figure 7 shown. At this time, the image generation device also obtains the first text. Figure 7 This is a schematic diagram of a fourth initial interface provided by an embodiment of the present application. The fourth initial interface includes the (input) first text (i.e., Figure 7 the shown "The weather is nice today"), the fourth initial function button (i.e., Figure 7 the shown "Next step") and the return component. Among them, the return component is used to return to the first interface, and the fourth initial function button is used to trigger the display of the second interface; that is to say, when the fourth initial function button is triggered, the image generation device can display the second interface; before displaying the second interface, the image generation device can obtain the first image described by the first text; Exemplarily, the first image described by the first text can be obtained after the first text is obtained. For example, it can be obtained after the first text is obtained and the fourth initial function button is detected to be triggered (this embodiment of the present application will use this method as an example for subsequent elaboration). That is, the image generation device can, in response to the fourth initial function button being triggered, obtain the first image described by the first text and display the second interface. Please refer to Figure 8 This is a schematic diagram of a second interface provided by an embodiment of the present application. Figure 8The second interface shown includes a first image and a second text editing area, and the second text editing area is used to display the first text. For example, the second text editing area specifically displays Figure 7 the first text shown, that is, "The weather is nice today". It should be noted that the above Figures 3 - 8 shown image interface is only an example, and does not represent the name, sorting, arrangement, distribution method, etc. that limit its specific content. As long as the interface that can implement the related functions of the method embodiment of the present application is within the protection scope of the present application.
[0067] The following describes the related process of obtaining the first image described by the first text.
[0068] In an alternative embodiment, the first image described by the first text may be generated based on the content of the first text and the number of emotion words included in the first text. In a feasible embodiment, the process of the image generation device obtaining the first image described by the first text may be generated by the image generation device according to the first text, or may be requested by the image generation device for other devices to execute. For example, it may be requested for the server to execute. Based on this, the manner in which the image generation device obtains the first image described by the first text may include: sending a first request message to the server, where the first request message includes the first text, and the first request message is used to request to generate the first image described by the first text; receiving a first response message from the server for the first request message, where the first response message includes the first image. Based on this, please refer to Figure 9a , which is a schematic flowchart of another image generation method provided by the embodiment of the present application; the image generation device displays a first interface in response to a first touch operation, and the first interface includes a first text editing area; obtains the first text input in the first text editing area, and sends a first request message to the server, where the first request message includes the first text, and the first request message is used to request to generate the first image described by the first text; receives a first response message from the server for the first request message, where the first response message includes the first image; displays a second interface, and the second interface includes a first image and a second text editing area, and the second text editing area is used to display the first text; where when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text.
[0069] In an alternative embodiment, the first image may be generated according to a first text type corresponding to the first text. The second interface further includes a plurality of text type function buttons, and the text type function button corresponding to the first text type among the plurality of text type function buttons is in a selected state. Among them, one text type function button corresponds to one text type, and the text type function button is used to be selected to trigger obtaining and displaying an image generated according to the text type corresponding to the corresponding text type function button.
[0070] Please refer to Figure 9b , which is a schematic diagram of another second interface provided by an embodiment of the present application. Figure 9b The displayed second interface, in addition to including all the contents in the second interface shown above Figure 8 (which will not be elaborated here and can be referred to Figure 8 for description), further includes a plurality of text type function buttons (that is, Figure 9b the 3 types shown, corresponding to "Notepad", "Share Feelings", and "Want to Complain" respectively. The present application does not limit the number and format of the text type function buttons), and the text type function button corresponding to the first text type among the 3 text type function buttons is in a selected state (assuming that the text type function button corresponding to the first text type is Figure 9b "Share Feelings" shown, then the "Share Feelings" button is in a selected state, for example, it has an underline, is highlighted, magnified, etc. below, and the present application does not make any restrictions). It should be noted that if subsequently, Figure 9b based on this, when the user switches and touches among the plurality of text type function buttons, at this time, it is determined which text type function button is in a selected state based on the user's touch, that is, which text type function button the user touches, and correspondingly, that text type function button is in a selected state.
[0071] In an alternative implementation manner, the first image may be generated according to the first text and a first text type corresponding to the first text. The first image conforms to (i.e., is related to) the content of the first text, and the first text type conforms; the related process of generating the first image according to the first text and the first text type corresponding to the first text may be executed by an image generation device. Based on this, when the image generation device obtains the first image described by the first text, it may generate the first image according to the first text and the first text type corresponding to the first text.
[0072] Exemplarily, it can be implemented by invoking an image generation model. That is, the image generation device can input the first text and the first text type into the image generation model, and the image generation model generates the first image. The image generation model can be a machine learning model, a neural network model, a deep learning model, etc. in the field of artificial intelligence, and this application does not make any restrictions. Exemplarily, the image generation model can be jointly trained using sample texts, multiple text types corresponding to multiple text type function buttons, and reference images of the sample texts under multiple text types. During the training process, the sample text and any text type can be used as the input to the image generation model to be trained, and the reference image of the sample text under this text type can be used as the expected output to train the image generation model to be trained.
[0073] For another example, during the process of the image generation device generating the first image according to the first text and the first text type corresponding to the first text, the following process can also be executed: extract the semantic features of the first text, generate a main image expressing the semantics indicated by the corresponding semantic features according to the semantic features of the first text, and render the main image using the rendering materials corresponding to the first text type to obtain the first image. The extraction of semantic features can be implemented by selecting a feature extraction model. The feature extraction model can be an existing or trained machine learning model, neural network model, deep learning model, etc. in the field of artificial intelligence that can implement semantic feature extraction, and this application does not make any restrictions.
[0074] In a feasible implementation manner, the first text type corresponding to the first text is determined from multiple text types corresponding to multiple text type function buttons provided by the target application. Optionally, the first text type corresponding to the first text can be randomly selected from multiple text types, or the first text type corresponding to the first text can be the default text type among multiple text types, or the first text type corresponding to the first text can be determined from multiple text types according to the content of the first text. For example, according to the proportion of emotion words in the first text and the preset correspondence between the proportion of emotion words and text types, the text type corresponding to the proportion of emotion words in the first text can be selected as the first text type corresponding to the first text, and so on. It should be noted that if Figure 9b On this basis, if the user switches and touches multiple text type function buttons, at this time, the text type function button in the selected state is determined based on the user's touch. That is, which text type function button the user touches, and correspondingly, that text type function button is in the selected state. Accordingly, the image corresponding to the first text can be generated based on the text type corresponding to the text type function button in the selected state.
[0075] In a feasible implementation manner, the process by which the image generation device obtains the first image described in the first text, which can be requested by the image generation device to be executed by other devices, for example, can be requested to be executed by the server. Based on this, the manner in which the image generation device obtains the first image described in the first text may include: sending a first request message to the server, where the first request message includes the first text, and the first request message is used to request the generation of a first image that conforms to the content of the first text and the first text type; receiving a first response message for the first request message from the server, where the first response message includes the first image. Among them, the process by which the server generates the first image in response to the first request message according to the first text and the first text type corresponding to the first text is similar to the process by which the above image generation device generates the first image according to the first text and the first text type corresponding to the first text, and will not be elaborated here.
[0076] In an alternative embodiment, the first text is in an editable state. After step 203, the image generation device may further: obtain a second text obtained by modifying the first text in the second text editing area; obtain a second image that is related to the content of the second text and conforms to the first text type; re-display the second image as the new first image on the second interface, and re-display the second text as the new first text in the second text editing area, where the text type function button corresponding to the first text type in the second interface is in a selected state. Among them, the second image is generated according to the first text type, specifically, it can be generated according to the second text and the first text type. Based on this, the process by which the image generation device obtains the second image that is related to the content of the second text and conforms to the first text type is similar to the process of obtaining the first image described in the first text above, and will not be elaborated here; that is, different texts can be adjusted to generate images adapted to the text type corresponding to the same selected text type function button. Exemplarily, based on Figure 9b the example given, if the user clicks to complete the modification operation of the first text in the second text editing area shown in Figure 9b , the image generation device then obtains the modified second text. By obtaining the second image that is related to the content of the second text and conforms to the first text type, the second image can be re-displayed as the new first image on the second interface, and the second text can be re-displayed as the new first text in the second text editing area, obtaining another second interface. Figure 10a FIG. is a schematic diagram of another second interface provided by an embodiment of the present application. Figure 10aThe image displayed on the second interface shown is the second image, and the text displayed in the second text editing area is the second text, namely "Travel Bar", and the text type function button in the selected state is still the text type function button corresponding to the first text type, namely "Share Feelings" (i.e., with an underline).
[0077] In an alternative embodiment, the user can modify the text displayed in the second text editing area. When the text displayed in the second text editing area is edited and modified to change, the image displayed on the second interface changes accordingly; optionally, the text can be directly modified in the second text editing area, or the text can be modified through the first pop-up window displayed after triggering the second text editing area, etc., and the present application does not make any restrictions. Exemplarily, for the case of modifying the text through the first pop-up window displayed after triggering the second text editing area (the subsequent embodiments of the present application will take this case as an example when modifying the text based on the second text editing area), based on Figure 9b the second interface shown, taking the modification of the first text in the second text editing area as an example, please refer to Figure 10b, is a schematic diagram of modifying text based on a second text editing area provided by an embodiment of the present application; after detecting a trigger operation on the second text editing area (for example, it can include operations such as clicking, long - pressing, double - clicking, etc.), the image generation device can display a first pop - up window. The first pop - up window can include an editing area for modifying text, a confirmation component for indicating confirmation of modification, and a cancellation component for indicating cancellation of modification; among them, the first pop - up window can be as shown by the label 1001, the editing area for modifying text can be as shown by the label 1002, and the text in the second text editing area is displayed, specifically showing the first text "The weather is nice today", the confirmation component for indicating confirmation of modification can be as shown by the label 1003, and is displayed as "Finish", the cancellation component for indicating cancellation of modification can be as shown by the label 1004, and is displayed as "Cancel"; optionally, the confirmation component can be in a triggerable state after the first window is displayed to support the confirmation component being triggered, or the confirmation component can also be in a non - triggerable state after the first window is displayed and adjusted to a triggerable state after the text in the editing area shown by the label 1002 is modified. Among them, the triggerable state and the non - triggerable state can be distinguished in terms of display effects. For example, the confirmation component in the triggerable state is highlighted to distinguish it from the confirmation component in the non - triggerable state. If the user modifies the first text "The weather is nice today" to the second text "Let's travel" in the editing area shown by the label 1002 and triggers the confirmation component 1003, the image generation device can obtain the second text (after modifying the first text in the second text editing area); and obtain a second image that is relevant to the content of the second text and conforms to the type of the first text; and re - display the second image as the new first image on the second interface, and re - display the second text as the new first text in the second text editing area. At this time, the second interface can be as shown by the label 1005.
[0078] In a feasible implementation manner, if the image generation device obtains the second image that is relevant to the content of the second text and conforms to the type of the first text by requesting the server, based on this, after step 203, the image generation device can also: obtain the second text after modifying the first text in the second text editing area; send a second request message to the server, where the second request message includes the second text, and the second request message is used to request to generate a second image that conforms to the content of the second text and the type of the first text; receive a second response message for the second request message from the server, where the second response message includes the second image; re - display the second image as the new first image on the second interface, and re - display the second text as the new first text in the second text editing area, where the text type function button corresponding to the first text type in the second interface is in a selected state.
[0079] In an alternative embodiment, after performing step 203, the image generation device may further: in response to a second touch operation on the text type function button corresponding to the second text type, obtain a third image that matches the content of the first text and conforms to the second text type, where the text type function button corresponding to the second text type is any one of the multiple text type function buttons other than the text type function button corresponding to the first text type; display the third image as the new first image on the second interface, where the text type function button corresponding to the second text type on the second interface is in a selected state. The second touch operation on the text type function button corresponding to the second text type may include a selection operation on the text type function button corresponding to the second text type; the third image is generated according to the second text type, specifically, it may be generated according to the first text and the second text type. Based on this, the related process of the image generation device obtaining the third image that matches the content of the first text and conforms to the second text type is similar to the related process of obtaining the first image described by the first text above, and will not be elaborated here; that is, by switching the selected text type function button, images adapted to the text types corresponding to different text type function buttons can be generated for the same text. Exemplarily, based on Figure 9b the example given, when the user performs a second touch operation on the text type function button corresponding to the second text type, assuming that the user touches the "want to complain" function button, by obtaining a third image that matches the content of the first text and conforms to the second text type, the third image can be displayed as the new first image on the second interface to obtain another second interface. Figure 11a FIG. is a schematic diagram of another second interface provided by an embodiment of the present application. At this time Figure 11a the image displayed on the second interface shown is the third image, the text displayed in the second text editing area is the first text "The weather is nice today", and the text type function button in the selected state is the "want to complain" function button (i.e., with an underline).
[0080] In a feasible implementation manner, if the third image obtained by the image generation device, which conforms to the content of the first text and the second text type, is obtained by requesting the server, based on this, after step 203, the image generation device may further: in response to a second touch operation on the text type function button corresponding to the second text type, send a third request message to the server, where the third request message includes the first text, and the third request message is used to request the generation of a third image that conforms to the content of the first text and the second text type; receive a third response message from the server for the third request message, where the third response message includes the third image, where the text type function button corresponding to the second text type is any one of the multiple text type function buttons other than the text type function button corresponding to the first text type; re-display the third image as the new first image on the second interface, where the text type function button corresponding to the second text type on the second interface is in a selected state.
[0081] In a feasible implementation manner, there is a refresh component corresponding to any text type function button in a selected state, and this refresh component is used to refresh and display the image on the second interface. The refreshed image is generated according to the text type corresponding to the selected text type function button. Specifically, it can be generated according to the text in the second text editing area and the text type corresponding to the selected text type function button. This process is similar to the related process of generating the first image according to the first text and the first text type, and will not be elaborated here. Exemplarily, based on Figure 9b the example given, taking the first image displayed on the second interface as an example for refresh display, at this time, the text type function button in the selected state is the text type function button corresponding to the first text type; the image generation device may: in response to a trigger operation on the refresh component of the text type function button corresponding to the first text type, obtain a new first image that conforms to the content of the first text and the first text type, and display the new first image on the second interface; please refer to Figure 11b , which is a schematic diagram of refreshing and displaying an image provided by an embodiment of the present application. Among them, the refresh component can be indicated by the label 1101, and the second interface after refreshing and displaying the first image can be indicated by the label 1102.
[0082] In an alternative embodiment, the second interface may further include a fifth initial function button, where the fifth initial function button can be used to perform operations related to the images and text in the second interface. For example, the fifth initial function button can be triggered to save the images and text in the second interface, or the fifth initial function button can be triggered to publish the images and text in the second interface, and so on. Optionally, the images in the second interface can be displayed in the image display area of the second interface. The second interface may further include a return component, which can be used to return to the first interface; Based on Figure 9b the example given, refer to Figure 12 , Figure 12 which is a schematic diagram of another second interface provided by an embodiment of the present application. Figure 12 The second interface shown in Figure 9b includes all the contents in the second interface shown, which will not be elaborated here and can be referred to Figure 9b for the description. The fifth initial function button is displayed as "Next".
[0083] The following describes the content related to publishing the images and text in the second interface.
[0084] In a feasible implementation manner, the image generation device may further: in response to a third touch operation, display a third interface, where the third interface includes a third text editing area and an image preview area. The third text editing area is used to display the text in the second text editing area, and the image preview area is used to display the images in the second interface. The third text editing area supports modifying the displayed text. The third interface further includes a first function button, and the first function button is used to support publishing the text in the third text editing area and the images in the image preview area. Among them, the third touch operation includes an operation for triggering the display of the third interface, such as a triggering operation on the fifth initial function button in the second interface. Optionally, the images in the second interface can be displayed in the image preview area in the form of thumbnails. By triggering the images in the image preview area, operations such as previewing, canceling previewing, and deleting images of the corresponding images can be realized. Further optionally, the image preview area may further include an image addition component for adding images. By triggering the image addition component, the addition of images can be realized. For example, images can be selected from the (local or remote) storage space of the image generation device to realize image addition, or the image shooting can be triggered and the added image obtained by shooting can be realized, and so on. The embodiments of the present application do not make limitations.
[0085] Exemplarily, taking the triggering of the display of the third interface after executing step 203 as an example, that is, taking the triggering of the display of the third interface by the second interface displaying the first image and the first text as an example; Based on Figure 12 the example given, refer to Figure 13, which is a schematic diagram of triggering the display of a third interface provided in an embodiment of the present application. The third interface can be shown as marked 1301. The third text editing area of the third interface displays the first text "The weather is good today", the image preview area displays the first image, and the first function button is displayed as "Publish".
[0086] In an optional embodiment, the third interface may further include a second function button, and the second function button is used to return the third interface to the second interface, and the second interface may further include a plurality of text type function buttons. The image generating device may display the second interface in response to the user's touch operation on the second function button; exemplarily, based on Figure 13 For an example, see Figure 14 , Figure 14 A schematic diagram of triggering a return to a second interface from a third interface provided in an embodiment of the present application, wherein the third interface may be as indicated by a mark 1401, and the second interface returned to display may be as indicated by a mark 1402. The third interface as indicated by a mark 1401 includes Figure 13 All the contents in it will not be repeated here, including the second function button.
[0087] In an optional embodiment, the third interface also includes a second function button, which is used to return the third interface to the second interface. The second interface also includes multiple text type function buttons. If the text displayed on the third interface has not been modified, the image generating device can also: display the second interface in response to a touch operation on the second function button; in response to a fourth touch operation in the second text editing area, display the first pop-up window information and obtain a fourth image that is consistent with the content of the third text and consistent with the text type function button in a selected state in the second interface, wherein the first pop-up window information is used to prompt that the image is being generated, and the third text is the text displayed in the second text editing area that has been edited and modified; display the fourth interface, the fourth interface includes a fourth image, and the second text editing area in the fourth interface displays the third text; in other words, after returning from the third interface to the second interface, the image generating device can modify the text in the second text editing area again based on the second text editing area, and update the image in the second interface to display the image described by the changed text. Among them, the fourth touch operation in the second text editing area includes a text modification operation based on the second text editing area; the relevant process of obtaining a fourth image that is consistent with the content of the third text and is consistent with the text type function button in the selected state in the second interface (that is, consistent with the text type corresponding to the text type function button in the selected state in the second interface) is similar to the relevant process of obtaining the first image described by the first text mentioned above, and will not be repeated here.
[0088] For example, based on Figure 14 For an example, seeFigure 15 This is a schematic diagram for triggering the display of a fourth interface provided by an embodiment of the present application. Among them, the second interface displayed by the image generation device in response to a touch operation on the second function button can be as marked by 1501. The first pop-up window displayed by triggering the second text editing area can be as marked by 1502, and the first text "The weather is nice today" is displayed. If the first text is modified to the third text "It will rain tomorrow" in the first pop-up window, when the confirmation component in the first pop-up window is triggered, the first pop-up window information is displayed and the fourth image that conforms to the content of the third text and the text type function button in the selected state in the second interface is obtained, and the fourth interface is displayed. Among them, the displayed first pop-up window information can be as marked by 1503, and the displayed fourth interface can be as marked by 1504. The fourth interface includes the fourth image, and the third text "It will rain tomorrow" is displayed in the second text editing area in the fourth interface. Among them, the first pop-up window information is used to prompt that an image is being generated, that is, it is used to display the image generation progress. The specific content of the first pop-up window information can be set according to specific requirements, and the embodiments of the present application do not make restrictions. Of course, optionally, the image generation device may not display the first pop-up window information in response to the fourth touch operation in the second text editing area, but directly display the fourth interface after obtaining the fourth image.
[0089] In a feasible implementation manner, if the image generation device obtains the fourth image that conforms to the content of the third text and the text type function button in the selected state in the second interface by requesting the server, based on this, when the image generation device obtains the fourth image that conforms to the content of the third text and the text type function button in the selected state in the second interface, it can send a fourth request message to the server. Among them, the fourth request message includes the third text, and the fourth request message is used to request to generate the fourth image that conforms to the content of the third text and the text type function button (corresponding text type) in the selected state in the second interface; receive a fourth response message for the fourth request message from the server, where the fourth response message includes the fourth image.
[0090] In an alternative embodiment, after the third text is displayed in the second text editing area of the fourth interface, the image generating device may further perform the following steps: If the third text is obtained by first returning from the third interface to the second interface to modify the text in the second interface, in response to the third touch operation, display the fifth interface and display the second pop-up message, where the fifth interface includes the fourth image, the third text editing area of the fifth interface displays the same text as the third text editing area of the third interface, and the second pop-up message is used to ask whether to synchronize the modification when the text changes; when a touch operation on the synchronization modification function button in the second pop-up message is received, update and display the text displayed in the third text editing area of the fifth interface as the third text; when a touch operation on the non-synchronization modification function button in the second pop-up message is received, keep the text displayed in the third text editing area of the fifth interface unchanged. Among them, the third touch operation includes an operation for triggering the display of the third interface, for example, it can be a triggering operation on the fifth initial function button.
[0091] Exemplarily, based on Figure 15 the example given, if the third text "It will rain tomorrow" is obtained by first returning from the third interface to the second interface to modify the first text, that is, "The weather is nice today", refer to Figure 16 , which is a schematic diagram for triggering the display of the fifth interface provided by an embodiment of the present application; among them, the fourth interface can be shown as marked by 1601, and the fifth interface displayed in response to the third touch operation (for example, in response to the touch on the fifth initial function button) can be shown as marked by 1602. The fifth interface includes the fourth image, and the third text editing area of the fifth interface displays the same text as the third text editing area of the third interface, that is, the first text "The weather is nice today". The second pop-up message can be shown as marked by 1603, including the synchronization prompt message "The text has changed. Do you want to synchronize the modification?" (The synchronization prompt message can be set according to requirements, and the present application does not limit it), the synchronization modification function button (displayed as "Synchronize") and the non-synchronization modification function button (displayed as "Do not synchronize").
[0092] Please refer to Figure 17 , which is a schematic diagram for synchronizing text provided by an embodiment of the present application. Among them, the fifth interface can be shown as marked by 1701. When a touch operation on the synchronization modification function button in the second pop-up message is received, update and display the text displayed in the third text editing area of the fifth interface as the third text "It will rain tomorrow". The new fifth interface obtained at this time can be shown as marked by 1702. Please refer to Figure 18, which is a schematic diagram of asynchronous text provided by an embodiment of the present application. The fifth interface can be as shown by the label 1801. When a touch operation on the asynchronous modification function button in the second pop-up message is received, the text displayed in the third text editing area of the fifth interface remains unchanged as the first text "The weather is nice today", and the fifth interface displayed at this time can be as shown by the label 1802.
[0093] In an alternative embodiment, after the third text is displayed in the second text editing area of the fourth interface, the image generation device can further perform the following steps: If the third text is not obtained by modifying the text in the second interface when returning from the third interface to the second interface for the first time, when the third touch operation is received, obtain the fifth touch operation on the second pop-up message in the case of modifying the text in the second interface when returning from the third interface to the second interface for the first time; If the fifth touch operation is a touch on the synchronous modification function button, in response to the third touch operation, display the sixth interface, which includes the fourth image, and the text displayed in the third text editing area of the sixth interface is updated to the third text; If the fifth touch operation is a touch on the asynchronous modification function button, in response to the third touch operation, display the sixth interface, and the text displayed in the third text editing area of the sixth interface remains unchanged.
[0094] Exemplarily, based on Figure 15 the given example, if the third text "It will rain tomorrow" is not obtained by modifying the first text, that is, "The weather is nice today", when returning from the third interface to the second interface for the first time, refer to Figure 19 , which is a schematic diagram of the sixth interface for triggering the display of synchronous text provided by an embodiment of the present application; wherein, the fourth interface can be as shown by the label 1901. If the fifth touch operation is a touch on the synchronous modification function button, the sixth interface displayed in response to the third touch operation (for example, in response to the touch on the fifth initial function button) can be as shown by the label 1902. The sixth interface includes the fourth image, and the text displayed in the third text editing area of the sixth interface is updated to the third text "It will rain tomorrow", that is, the text in the second text editing area is synchronized. Refer to Figure 20 , which is a schematic diagram of the sixth interface for triggering the display of asynchronous text provided by an embodiment of the present application; wherein, the fourth interface can be as shown by the label 2001. If the fifth touch operation is a touch on the asynchronous modification function button, the sixth interface displayed in response to the third touch operation (for example, in response to the touch on the fifth initial function button) can be as shown by the label 2002. The text displayed in the third text editing area of the sixth interface remains unchanged as the first text "The weather is nice today", that is, the text in the second text editing area is not synchronized.
[0095] It can be known that if the synchronous modification function button is selected, when the text in the second text editing area and the text in the third text editing area jump from one text editing area to the other, if the texts are inconsistent, the text displayed in the other text editing area that is jumped to will be synchronously displayed as the text in one of the text editing areas.
[0096] In an optional embodiment, the third interface further includes a second function button, and the second function button is used to return the third interface to the second interface. The second interface further includes a plurality of text type function buttons. If the text displayed on the third interface is modified to a fourth text, the image generation device can further perform the following operations: in response to a touch operation on the second function button, display the second interface; when the second text editing area in the second interface is triggered, display a second pop-up message, and the second pop-up message is used to inquire whether to synchronously modify when the text changes; if a touch operation on the synchronous modification function button in the second pop-up message is received, display a first pop-up window; the fourth text is displayed in the first pop-up window; when a sixth touch operation on the first pop-up window is detected, obtain a fifth image that conforms to the content of the fourth text and conforms to the text type function button in the selected state in the second interface; display a new second interface, the new second interface includes the fifth image, and the fourth text is displayed in the second text editing area in the new second interface; when a seventh touch operation on the first pop-up window is detected, display the second interface. In an optional implementation manner, if a touch operation on the non-synchronous modification function button in the second pop-up message is received, display a first pop-up window; the text displayed in the second text editing area in the second interface is displayed in the first pop-up window; when a seventh touch operation on the first pop-up window is detected, display the second interface.
[0097] In an optional embodiment, if the text displayed on the third interface is modified to the fourth text "I love summer", please refer to Figure 21a , which is another schematic diagram of triggering the return from the third interface to the second interface provided by the embodiment of the present application. Among them, the third interface can be marked as 2101, and the returned second interface can be marked as 2102; in the case where the text displayed on the third interface is modified to the fourth text, in the second interface returned from the third interface, the text displayed in the second text editing area remains unchanged.
[0098] Please refer to Figure 21b, which is another schematic diagram of synchronizing text provided by the embodiment of the present application. The second interface displayed by the image generation device in response to the touch operation on the second function button can be as shown by the label 2111; the second pop-up window information displayed when the second text editing area in the second interface is triggered can be as shown by the label 2112 (similar to the first pop-up window information, not elaborated here). At this time, the text displayed in the first pop-up window is still the text in the second text editing area, that is, the first text "The weather is nice today"; if a touch operation on the synchronization modification function button in the second pop-up window information is received, the first pop-up window displayed can be as shown by the label 2113, and the fourth text "I love summer" is displayed in the first pop-up window; when the sixth touch operation on the first pop-up window is detected, the fifth image that conforms to the content of the fourth text and the text type function button in the selected state in the second interface is obtained and a new second interface is displayed. The new second interface can be as shown by the label 2114, where the new second interface includes the fifth image, and the fourth text "I love summer" is displayed in the second text editing area of the new second interface; among them, the sixth touch operation on the first pop-up window includes a confirmation operation on the text modified in the first pop-up window. For example, it can include a trigger operation on the confirmation component in the first pop-up window. Since the first text displayed in the first pop-up window is synchronously updated to the fourth text (that is, the text in the first pop-up window is modified), when the modification is confirmed, the image generation device can regenerate an appropriate image (that is, the fifth image) based on the modified text. Further, when the seventh touch operation on the first pop-up window is detected, the second interface is displayed; the seventh touch operation on the first pop-up window includes a cancellation operation on the text modified in the first pop-up window. For example, it can include a trigger operation on the cancellation component in the first pop-up window. Since the first text displayed in the first pop-up window is synchronously updated to the fourth text (that is, the text in the first pop-up window is modified), when the modification is cancelled, the text displayed in the first pop-up window is restored to the text before the modification, that is, the first text. Based on this, the image generation device can display the second interface. At this time, the image in the second interface is the first image, and the text in the second text editing area is the first text. It can be known that if the synchronization modification function button is selected, when the text in the second text editing area and the text in the third text editing area jump from one text editing area to another, if the texts are inconsistent, the text displayed in the other text editing area that jumps to will be synchronously displayed as the text in this one text editing area.
[0099] Please refer to Figure 21c, which is a schematic diagram of another asynchronous text provided by the embodiment of the present application. The second interface displayed by the image generation device in response to the touch operation on the second function button can be as shown by the label 2121; the second pop-up window information displayed when the second text editing area in the second interface is triggered can be as shown by the label 2122 (similar to the first pop-up window information, not elaborated here). At this time, the text displayed in the first pop-up window is still the text in the second text editing area, that is, the first text "The weather is nice today"; if a touch operation on the asynchronous modification function button in the second pop-up window information is received, the displayed first pop-up window can be as shown by the label 2123, and the text displayed in the first pop-up window is the text displayed in the second text editing area of the second interface, that is, the first text "The weather is nice today"; the second interface displayed when the seventh touch operation on the first pop-up window is detected can be as shown by the label 2124; among them, the seventh touch operation on the first pop-up window includes an operation to cancel the modification of the text in the first pop-up window, for example, it can include a trigger operation on the cancel component in the first pop-up window. Further optionally, when the user completes the eighth touch operation in the first pop-up window (such as clicking "Finish" after modifying the first text), the sixth image corresponding to the text after the modification of the first text can be obtained. For example, a sixth request message can be sent to the server, and the sixth request message includes the text after the modification of the first text, and then a sixth response message is received from the server, and the sixth response message includes the sixth image corresponding to the text after the modification of the first text; in response to the sixth response message, a new second interface is obtained. At this time, the second interface includes the sixth image, and the second text editing area displays the text after the modification of the first text.
[0100] Based on the above description, if the image generation device obtains the fifth image that conforms to the content of the fourth text and the text type function button in the selected state in the second interface by requesting the server, based on this, when the image generation device obtains the fifth image that conforms to the content of the fourth text and the text type function button in the selected state in the second interface, a fifth request message can be sent to the server, where the fifth request message includes the fourth text, and the fifth request message is used to request the generation of the fifth image that conforms to the content of the fourth text and the text type function button (the corresponding text type) in the selected state in the second interface; receive a fifth response message from the server for the fifth request message, where the fifth response message includes the fifth image.
[0101] Generally speaking, the present application Figures 3 - 21c The image interfaces shown are only examples, and do not limit the names, contents, arrangements, quantities, shapes, etc. of the elements on the interface. As long as the interface can implement the relevant functions of the method embodiment of the present application, it is within the protection scope of the present application.
[0102] Based on the above description, if the image generation device obtains a target image that conforms to the content of the target text and the target text type among multiple text types by requesting the server, based on this, when the image generation device obtains a target image that conforms to the content of the target text and the target text type among multiple text types, it can: send a target request message to the server, where the target request message includes the target text, and the target request message is used to request the generation of a target image that conforms to the content of the target text and the target text type; receive a target response message for the target request message from the server, where the target response message includes the target image. The target text can be any text, and the target text type can be any text type among multiple text types. The related process of obtaining a target image that conforms to the content of the target text and the target text type among multiple text types is similar to the related process of obtaining the first image described by the first text, and is similar to the related process of obtaining the first image that conforms to the content of the first text and the first text type, which will not be elaborated here.
[0103] It can be seen that in the embodiment of the present application, by responding to the first touch operation, a first interface including a first text editing area is displayed, by obtaining the first text input in the first text editing area, and by obtaining the first image described by the first text, a second interface including the first image and a second text editing area is displayed, and the second text editing area is used to display the first text; wherein, when the first text displayed in the second text editing area is edited and modified to change, the first image displayed in the second interface changes following the change of the first text. In other words, corresponding images described by different texts can be obtained and displayed, ensuring the matching accuracy between the text and the image. And when the text is a text to be published, an image matching the text to be published can be obtained. Not only does it not require the user to prepare the illustration by themselves, nor does it require the user to select an illustration from the pre-set picture library in the target application program, but it intelligently generates an image related to the first text for the user to select based on the text input by the user, which not only ensures the matching accuracy between the text and the image, but also improves the illustration efficiency, meets the user's needs, enriches the interaction process between the user and the device when generating images from text, and increases the user experience.
[0104] Refer to Figure 22 , Figure 22 It is a block diagram of the functional units of an image generation device provided by an embodiment of the present application, and the image generation device can be the above-mentioned target application program. The image generation device 2200 includes: a transceiver unit 2201 and a response unit 2202;
[0105] The response unit 2202 is configured to display a first interface in response to the first touch operation, and the first interface includes a first text editing area;
[0106] A transceiver unit 2201, configured to obtain a first text input in a first text editing area, and obtain a first image described by the first text;
[0107] A response unit 2202 is further configured to display a second interface, the second interface including the first image and a second text editing area, and the second text editing area is configured to display the first text;
[0108] Wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text.
[0109] In a specific implementation, the transceiver unit 2201 and the response unit 2202 described in the embodiments of the present invention may execute the implementation manners described in all embodiments of the image generation method provided by the embodiments of the present invention, which will not be elaborated herein.
[0110] Refer to Figure 23 , Figure 23 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may be the above image generation device, and the above image generation apparatus may be deployed in the electronic device to implement the implementation manners described in all embodiments of the image generation method provided by the embodiments of the present invention. As Figure 23 shown, the electronic device 2300 includes a transceiver 2301, a processor 2302, and a memory 2303. They are connected through a bus 2304. The memory 2303 is configured to store computer programs and data, and may transmit the data stored in the memory 2303 to the processor 2302.
[0111] The processor 2302 is configured to read the computer program in the memory 2303 and perform the following operations:
[0112] In response to a first touch operation, display a first interface, the first interface including a first text editing area;
[0113] Obtain a first text input in the first text editing area, and obtain a first image described by the first text;
[0114] Display a second interface, the second interface including the first image and a second text editing area, and the second text editing area is configured to display the first text;
[0115] Wherein, when the first text displayed in the second text editing area is edited and modified to generate a change, the first image displayed in the second interface changes following the change of the first text.
[0116] In a specific implementation, the transceiver 2301, the processor 2302, and the memory 2303 described in the embodiments of the present invention can execute the implementation manners described in all embodiments of the image generation method provided by the embodiments of the present invention, which will not be elaborated herein.
[0117] It should be understood that the electronic devices in the present application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, palmtop computers, laptop computers, mobile Internet devices MID (Mobile Internet Devices), or wearable devices, etc. The above-mentioned electronic devices are only examples and not exhaustive, including but not limited to the above-mentioned electronic devices. In practical applications, the above-mentioned electronic devices may also include: intelligent vehicle terminals, computer devices, and so on.
[0118] The embodiments of the present application also provide a computer-readable storage medium storing a computer program, and the computer program is executed by a processor to implement some or all of the steps of any one of the image generation methods described in the above method embodiments.
[0119] The embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any one of the image generation methods described in the above method embodiments.
[0120] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, 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 optional embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0121] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not elaborated in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] In several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0123] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0124] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software program module.
[0125] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application. And the aforementioned memory includes: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical disks and other various media that can store program codes.
[0126] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory. The memory can include: flash drives, read-only memories (abbreviation: ROM), random access memories (abbreviation: RAM), magnetic disks, or optical disks, etc.
[0127] The above has introduced the embodiments of the present application in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. An image generation method, characterized in that: The method comprises: In response to the first touch operation, displaying a first interface, wherein the first interface includes a first text editing area; Acquire a first text input in the first text editing area, and acquire a first image described by the first text; Displaying a second interface, the second interface including the first image, multiple text type function buttons and a refresh component, the first image being generated according to the first text and the text type corresponding to the text type function button in a selected state; In response to a trigger operation on the refresh component, a new first image is generated according to the first text and the text type corresponding to the text type function button in the selected state, and the new first image is displayed on the second interface.
2. The method according to claim 1, characterized in that The second interface also includes a second text editing area, which is used to display the first text; when the first text displayed in the second text editing area is edited and modified and changes, the first image displayed in the second interface changes along with the change of the first text.
3. The method according to claim 2, characterized in that The first text is in an editable state, and the method further includes: Acquire a second text after modifying the first text in the second text editing area; generating a second image according to the second text and the text type corresponding to the text type function button in the selected state; The second image is displayed as the new first image on the second interface, and the second text is displayed as the new first text in the second text editing area.
4. The method according to any one of claims 1 to 3, characterized in that: The first text is in an editable state, the second interface further includes a fifth initial function button, and the method further includes: In response to a third touch operation on the fifth initial function button, a third interface is displayed, wherein the third interface includes a third text editing area and an image preview area, the third text editing area is used to display the first text, the image preview area is used to display the first image, the third text editing area supports modification of the displayed text, and the third interface also includes a first function button, and the first function button is used to support publishing the text in the third text editing area and the image in the image preview area.
5. The method according to claim 4, characterized in that The third interface further includes a second function button, and the second function button is used to return the third interface to the second interface. If the text displayed on the third interface is not modified, the method further includes: In response to a touch operation on the second function button, displaying the second interface; In response to a fourth touch operation in the second text editing area, displaying a first pop-up window message, and generating a fourth image according to the third text and the text type corresponding to the text type function button in a selected state, wherein the first pop-up window message is used to prompt that an image is being generated, and the third text is the text displayed in the second text editing area after being edited and modified; A fourth interface is displayed, wherein the fourth interface includes the fourth image, and a second text editing area in the fourth interface displays the third text.
6. The method according to claim 5, characterized in that After the third text is displayed in the second text editing area in the fourth interface, the method further includes: If the third text is obtained by modifying the text in the second interface by returning from the third interface to the second interface for the first time, in response to the third touch operation, a fifth interface is displayed, and a second pop-up window message is displayed, wherein the fifth interface includes the fourth image, the third text editing area of the fifth interface displays the same text as the third text editing area of the third interface, and the second pop-up window message is used to inquire whether the text needs to be modified synchronously if it has changed; If a touch operation is received on the synchronous modification function button in the second pop-up window information, the text displayed in the third text editing area of the fifth interface is updated and displayed as the third text; If a touch operation is received on the asynchronous modification function button in the second pop-up window information, the text displayed in the third text editing area of the fifth interface remains unchanged.
7. The method according to claim 6, characterized in that The method further comprises: If the third text is not obtained by modifying the text in the second interface for the first time by returning from the third interface to the second interface, when the third touch operation is received, obtaining a fifth touch operation for the second pop-up window information when the text in the second interface is modified for the first time by returning from the third interface to the second interface; If the fifth touch operation is a touch on the synchronous modification function button, in response to the third touch operation, a sixth interface is displayed, the sixth interface includes the fourth image, and the text displayed in the third text editing area of the sixth interface is updated to be displayed as the third text; If the fifth touch operation is a touch on the asynchronous modification function button, in response to the third touch operation, the sixth interface is displayed, and the text displayed in the third text editing area of the sixth interface remains unchanged.
8. The method according to claim 4, characterized in that The third interface further includes a second function button, and the second function button is used to return the third interface to the second interface. If the text displayed on the third interface is modified to a fourth text, the method further includes: In response to a touch operation on the second function button, displaying the second interface; When the second text editing area in the second interface is triggered, a second pop-up window message is displayed, wherein the second pop-up window message is used to inquire whether the text needs to be modified synchronously after the text is changed; If a touch operation is received on the synchronous modification function button in the second pop-up window information, the first pop-up window is displayed; and the fourth text is displayed in the first pop-up window; When a sixth touch operation on the first pop-up window is detected, a fifth image is generated according to the fourth text and the text type corresponding to the text type function button in the selected state in the second interface; Displaying a new second interface, wherein the new second interface includes the fifth image, and a second text editing area in the new second interface displays the fourth text; When a seventh touch operation on the first pop-up window is detected, the second interface is displayed.
9. The method according to claim 8, characterized in that The method further comprises: If a touch operation is received for the asynchronous modification function button in the second pop-up window information, a first pop-up window is displayed; the first pop-up window displays the text displayed in the second text editing area in the second interface; When a seventh touch operation on the first pop-up window is detected, the second interface is displayed.
10. An image generation method, characterized in that: The method comprises: In response to the first touch operation, displaying a first interface, wherein the first interface includes a first text editing area; Acquire a first text input in the first text editing area, and acquire a first image described by the first text; A second interface is displayed, wherein the second interface includes the first image and multiple text type function buttons, wherein the first image is generated according to the first text and the text type corresponding to the text type function button in a selected state.
11. The method according to claim 10, characterized in that The text type function button in the selected state is a first text type function button, and the method further includes: In response to a second touch operation on a second text type function button, generating a third image according to the text types corresponding to the first text and the second text type function button, wherein the second text type function button is any one of the plurality of text type function buttons except the first text type function button; The third image is displayed as a new first image on the second interface, wherein the second text type function button in the second interface is in a selected state.
12. An image generating device, characterized in that: The device comprises: a transceiver unit and a response unit; The response unit is configured to display a first interface in response to a first touch operation, wherein the first interface includes a first text editing area; The transceiver unit is used to obtain the first text input in the first text editing area, and obtain the first image described by the first text; The response unit is further used to display a second interface, wherein the second interface includes the first image, multiple text type function buttons and a refresh component, wherein the first image is generated according to the first text and the text type corresponding to the text type function button in a selected state; The response unit is also used to generate a new first image according to the first text and the text type corresponding to the text type function button in the selected state in response to the trigger operation of the refresh component, and display the new first image on the second interface.
13. An image generating device, characterized in that: The device comprises: a transceiver unit and a response unit; The response unit is configured to display a first interface in response to a first touch operation, wherein the first interface includes a first text editing area; The transceiver unit is used to obtain the first text input in the first text editing area, and obtain the first image described by the first text; The response unit is further used to display a second interface, which includes the first image and multiple text type function buttons, and the first image is generated according to the text type corresponding to the first text and the text type function button in the selected state.
14. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method as described in any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 11.
16. A computer program product, characterized in that The computer program product comprises a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Retrieval image acquisition method, device and equipment and readable storage medium
CN111859004A
Image generation method and device, electronic equipment and readable storage medium
CN114549695A
Image processing method and related device
CN116304146A
Method for generating target object, electronic device, and storage medium
US20220300697A1