Image generation method and device and storage medium

By acquiring the image generation model at the terminal and generating images locally, the problem of poor signaling resource occupation and user experience caused by multiple interactions between the terminal and the cloud server in the prior art is solved, and more efficient image generation and better user experience are achieved.

CN119904536APending Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311402594.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing AI painting technology requires terminals and cloud servers to interact multiple times, occupy signaling resources, reduce image generation efficiency, and lead to poor user experience.

Method used

When the terminal determines the image generation parameters in response to user input operations, if the terminal does not store the image generation model, the image generation model data information is obtained from the cloud server and the target image is generated through the model.

Benefits of technology

Reduce the number of interactions between terminals and cloud servers, avoid occupying signaling resources, improve image generation efficiency, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904536A_ABST
    Figure CN119904536A_ABST
Patent Text Reader

Abstract

The invention relates to an image generation method and device and a storage medium. The method is applied to a terminal and comprises the steps that in response to input operation of a user, image generation parameters are determined, and the input operation is used for requesting operation for generating a target image corresponding to the image generation parameters; when it is determined that the image generation model is not stored in the terminal, data information of the image generation model is acquired from a cloud server; obtaining the image generation model according to the data information; and generating a target image through the image generation model according to the image generation parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Current artificial intelligence (AI) painting technologies are mostly based on text (prompt) provided by the user and the selected (or specified, or determined by application intelligence) style, and a large number of algorithms are used on cloud servers to generate corresponding images.

[0003] In the related technology, the terminal can send the user's intention to the cloud server, the cloud server calculates and generates an image corresponding to the intention, and sends the generated image to the terminal so that the terminal can display it to the user. If the generated image does not show the user's intention to the greatest extent, the terminal can re-request the cloud server to generate a new image, and the cloud server will send the generated new image to the terminal for display. The above process is repeated until an image that meets the user's intention is obtained.

[0004] However, the above process requires the terminal and the cloud server to interact multiple times, which occupies a large amount of signaling resources, reduces the efficiency of image generation, and leads to poor user experience. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present disclosure provides an image generating method, an apparatus and a storage medium.

[0006] According to a first aspect of an embodiment of the present disclosure, there is provided an image generation method, the method being applied to a terminal, comprising:

[0007] determining image generation parameters in response to an input operation of a user, wherein the input operation is used to request an operation of generating a target image corresponding to the image generation parameters;

[0008] When it is determined that the terminal does not store the image generation model, acquiring data information of the image generation model from the cloud server;

[0009] According to the data information, obtaining the image generation model;

[0010] A target image is generated by the image generation model according to the image generation parameters.

[0011] Optionally, in response to an input operation of a user, determining an image generation parameter comprises:

[0012] Sending an image generation request determined according to the input operation to the cloud server; the image generation request is used to request the cloud server to determine image generation parameters according to the image generation request;

[0013] Receive the image generation parameters sent by the cloud server.

[0014] Optionally, the acquiring data information of the image generation model from the cloud server includes:

[0015] In a case where it is determined that the terminal does not store the image generation model, determining whether the terminal supports the operation of the image generation model;

[0016] When it is determined that the terminal supports the operation of the image generation model, data information of the image generation model is obtained from a cloud server.

[0017] Optionally, the determining whether the terminal supports the operation of the image generation model includes:

[0018] Obtaining device parameters of the terminal;

[0019] In a case where it is determined that the device parameter is a target device parameter, it is determined that the terminal supports the operation of the image generation model.

[0020] Optionally, the method further comprises:

[0021] In the case where it is determined that the device parameters are non-target device parameters, a prompt message is generated and displayed, where the prompt message is used to prompt the user that the target image cannot be generated.

[0022] Optionally, the acquiring data information of the image generation model from the cloud server includes:

[0023] In the case where it is determined that the terminal does not store the image generation model, sending query request information to the cloud server, the query request information is used to request the cloud server to query and send the image generation number to be used;

[0024] When the number of times the image is generated is greater than a predetermined number threshold, data information of the image generation model is obtained from a cloud server.

[0025] Optionally, the method further comprises:

[0026] When the number of image generation times is less than the predetermined number threshold, a target image generation request is sent to the cloud server, and the target image generation request is used to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model, and send the target image to the terminal.

[0027] Optionally, generating a target image by using the image generation model according to the image generation parameters includes:

[0028] The image generation parameters are used as input of the image generation model to obtain the target image output by the image generation model.

[0029] According to a second aspect of an embodiment of the present disclosure, there is provided an image generation method, which is applied to a cloud server and includes:

[0030] In a case where the terminal does not store the image generation model, data information of the image generation model is sent to the terminal.

[0031] Optionally, the method further comprises:

[0032] Before sending the data information of the image generation model to the terminal, receiving an image generation request sent by the terminal; the image generation request is used to request the cloud server to determine image generation parameters according to the image generation request;

[0033] The image generation parameters are sent to the terminal.

[0034] Optionally, the method further comprises:

[0035] receiving query request information sent by the terminal, wherein the query request information is a request message sent by the terminal to request the cloud server to query and send the number of image generation times to be used when it is determined that the terminal does not store the image generation model;

[0036] When the number of times the image is generated is greater than a predetermined number threshold, confirmation information is sent to the terminal, where the confirmation information is used to instruct the terminal to obtain device parameters and to prompt the user that the cloud server cannot generate the target image.

[0037] Optionally, the method further comprises:

[0038] In a case where the number of image generation times is less than the predetermined number threshold, receiving a target image generation request sent by the terminal, the target image generation request being a request message in which the terminal requests the cloud server to generate the target image corresponding to the image generation parameters through the image generation model;

[0039] The target image is sent to the terminal.

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

[0041] a determination module configured to determine image generation parameters in response to an input operation of a user, wherein the input operation is used to request an operation of generating a target image corresponding to the image generation parameters;

[0042] an acquisition module, configured to acquire data information of the image generation model from a cloud server when it is determined that the terminal does not store the image generation model;

[0043] A first receiving module is configured to obtain the image generation model according to the data information;

[0044] A generation module is configured to generate a target image through the image generation model according to the image generation parameters.

[0045] Optionally, the determining module includes:

[0046] A first sending submodule is configured to send an image generation request determined according to the input operation to the cloud server; the image generation request is used to request the cloud server to determine an image generation parameter according to the image generation request;

[0047] The receiving submodule is configured to receive the image generation parameters sent by the cloud server.

[0048] Optionally, the acquisition module includes:

[0049] a determination submodule, configured to determine whether the terminal supports the operation of the image generation model when it is determined that the terminal does not store the image generation model;

[0050] The first acquisition submodule is configured to acquire data information of the image generation model from a cloud server when it is determined that the terminal supports the operation of the image generation model.

[0051] Optionally, the determination submodule is configured to obtain device parameters of the terminal; and when it is determined that the device parameters are target device parameters, determine that the terminal supports the operation of the image generation model.

[0052] Optionally, the determination submodule is further configured to generate and display a prompt message when it is determined that the device parameter is a non-target device parameter, wherein the prompt message is used to prompt the user that the target image cannot be generated.

[0053] Optionally, the acquisition module includes:

[0054] A second sending submodule is configured to send query request information to the cloud server when it is determined that the terminal does not store the image generation model, wherein the query request information is used to request the cloud server to query and send the number of image generation times to be used;

[0055] The second acquisition submodule is configured to acquire data information of the image generation model from the cloud server when the number of image generation times is greater than a predetermined number threshold.

[0056] Optionally, the acquisition module further includes:

[0057] The third sending submodule is configured to send a target image generation request to the cloud server when the number of image generation times is less than the predetermined number threshold, and the target image generation request is used to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model, and send the target image to the terminal.

[0058] Optionally, the generation module is configured to use the image generation parameters as input of the image generation model to obtain the target image output by the image generation model.

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

[0060] The first sending module is configured to send data information of the image generation model to the terminal when the terminal does not store the image generation model.

[0061] Optionally, the device further comprises:

[0062] A second receiving module is configured to receive an image generation request sent by the terminal before sending the data information of the image generation model to the terminal; the image generation request is used to request the cloud server to determine the image generation parameters according to the image generation request;

[0063] The second sending module is configured to send the image generation parameter to the terminal.

[0064] Optionally, the device further comprises:

[0065] A third receiving module is configured to receive query request information sent by the terminal, where the query request information is a request message sent by the terminal to request the cloud server to query and send the number of image generation times to be used when it is determined that the terminal does not store the image generation model;

[0066] The third sending module is configured to send confirmation information to the terminal when the number of image generation times is greater than a predetermined number threshold, wherein the confirmation information is used to instruct the terminal to obtain device parameters and to prompt the user that the cloud server cannot generate the target image.

[0067] Optionally, the device further comprises:

[0068] a fourth receiving module, configured to receive a target image generation request sent by the terminal when the number of image generation times is less than the predetermined number threshold, the target image generation request being a request message for the terminal to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model;

[0069] The fourth sending module is configured to send the target image to the terminal.

[0070] According to a fifth aspect of an embodiment of the present disclosure, there is provided an image generating device, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to implement the steps of the image generating method provided in the first aspect of the present disclosure when executed.

[0071] According to a sixth aspect of an embodiment of the present disclosure, there is provided an image generating device, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to implement the steps of the image generating method provided in the second aspect of the present disclosure when executed.

[0072] According to a seventh aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image generation method provided in the first aspect of the present disclosure are implemented.

[0073] According to an eighth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image generation method provided in the second aspect of the present disclosure are implemented.

[0074] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0075] The terminal responds to the user's input operation to determine the image generation parameters, and the input operation is used to request the operation of generating the target image corresponding to the image generation parameters; when it is determined that the terminal does not store the image generation model, the data information of the image generation model is obtained from the cloud server; the image generation model is obtained according to the data information; and the target image is generated according to the image generation parameters. In this way, when it is determined that the image generation model is not stored in the terminal, the image generation model can be requested to be downloaded and installed from the cloud server so that the image generation can be performed locally in the terminal, which can reduce the number of interactions between the terminal and the cloud server, avoid occupying signaling resources, improve the efficiency of image generation, and thus improve the user experience.

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

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

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

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

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

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

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

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

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

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

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

[0087] Fig.10 is based on Fig. 9 The illustrated embodiment shows a block diagram of a determination module.

[0088] Fig.11 is based on Fig. 9 The illustrated embodiment shows a block diagram of an acquisition module.

[0089] Fig.12 is based on Fig. 9 The illustrated embodiment shows a block diagram of an acquisition module.

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

[0091] Fig.14is based on Fig.13 The illustrated embodiment shows a block diagram of an image generating device.

[0092] Fig.15 is based on Fig.13 The illustrated embodiment shows a block diagram of an image generating device.

[0093] Fig.16 It is a block diagram of a device for image generation according to an exemplary embodiment. DETAILED DESCRIPTION

[0094] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0095] First, the application scenarios of the present disclosure are introduced. The present disclosure can be applied to the application scenarios of AI image generation through terminals. At present, the user's intention is usually obtained through a cloud server, and a large number of algorithms are applied to generate corresponding images. In related technologies, the terminal and the cloud server need to interact multiple times, which occupies a large amount of signaling resources, reduces the efficiency of image generation, and leads to poor user experience.

[0096] In order to solve the above problems, the present disclosure provides an image generation method, device and storage medium, wherein the terminal determines the image generation parameters in response to the user's input operation, and the input operation is used to request the operation of generating a target image corresponding to the image generation parameters; when it is determined that the terminal does not store the image generation model, the data information of the image generation model is obtained from the cloud server; the image generation model is obtained according to the data information; and the target image is generated by the image generation model according to the image generation parameters. In this way, when it is determined that the image generation model is not stored in the terminal, the image generation model can be requested to be downloaded and installed from the cloud server so that the image generation can be performed locally in the terminal, which can reduce the number of interactions between the terminal and the cloud server, avoid occupying signaling resources, improve the efficiency of image generation, and thus improve the user experience.

[0097] Figure 1 is a flowchart of an image generating method according to an exemplary embodiment. Figure 1 As shown, the method is used in a terminal and includes the following steps.

[0098] The terminal may include a handheld device with wireless communication function, a vehicle-mounted device, a wearable device, a computing device, a virtual reality (VR) head-mounted display device (also called a VR head display) or other display devices, and various forms of user equipment (UE), mobile station (MS), terminal, terminal equipment and other display devices. For example, the terminal may be a mobile phone, a laptop computer, a tablet computer, etc.

[0099] It should be noted that in the present disclosure, the terminal may be illustrated by taking a mobile phone as an example, and the specific form of the mobile device is not limited. The cloud server may be a cloud server in a cloud computing system, or a virtual machine on the cloud server.

[0100] In step S11 , image generation parameters are determined in response to an input operation by a user.

[0101] The input operation is used to request the generation of a target image corresponding to the image generation parameters.

[0102] In a possible implementation, the user's input operation may include the user inputting the user's input information through the input keyboard of the terminal, or issuing a voice command to call up a voice control program of the terminal, parsing the voice command through the voice control program to obtain the user's input information, and then parsing the input information through the terminal to obtain the user's intention included in the input information input by the user, and then determining the image generation parameters corresponding to the user's intention based on the user's intention.

[0103] In another possible implementation, the user inputs the user's input information through the input keyboard of the terminal, or through the voice command issued, and then the input information or voice command can be sent to the cloud server through the terminal, so that the cloud server obtains the user's input information according to the voice command, and the input information may include text information, and then the cloud server can parse the text information to obtain the user's intention, and then determine the image generation parameters corresponding to the user's intention according to the user's intention.

[0104] In step S12, when it is determined that the terminal does not store the image generation model, data information of the image generation model is obtained from the cloud server.

[0105] Optionally, when it is determined that the terminal does not store the image generation model, the terminal may obtain data information of the image generation model by sending a model offline request to the cloud server, where the model offline request is used to request the cloud server to send data information of the image generation model to the terminal.

[0106] In this step, after obtaining the image generation parameters determined according to the user's input operation, the terminal may first search for an image generation model from the data stored locally in the terminal, wherein the image generation model may generate a target image corresponding to the user's intention based on the image generation parameters. If the image generation model is not found from the data stored locally in the terminal, the terminal may send a model offline request to the cloud server to request the cloud server to send data information of the image generation model to the terminal.

[0107] In step S13, the image generation model is obtained according to the data information.

[0108] In step S14, a target image is generated by the image generation model according to the image generation parameters.

[0109] Optionally, the image generation parameters can be used as inputs of the image generation model to obtain the target image output by the image generation model. The image generation model can adopt the AI ​​Wensheng graph model in the relevant technology, and the specific steps of generating an image through the AI ​​Wensheng graph model can adopt the methods in the relevant technology, and the specific contents are not repeated here.

[0110] By adopting the above technical solution, the terminal determines the image generation parameters in response to the user's input operation, and the input operation is used to request the operation of generating the target image corresponding to the image generation parameters; when it is determined that the terminal does not store the image generation model, the data information of the image generation model is obtained from the cloud server; the image generation model is obtained according to the data information; and the target image is generated by the image generation model according to the image generation parameters. In this way, when it is determined that the image generation model is not stored in the terminal, the image generation model can be requested to be downloaded and installed from the cloud server so that the image generation can be performed locally in the terminal, which can reduce the number of interactions between the terminal and the cloud server, avoid occupying signaling resources, improve the efficiency of image generation, and thus improve the user experience.

[0111] In some embodiments, Figure 2 As shown, the above step S11 may include the following steps.

[0112] In step S111, an image generation request determined according to the input operation is sent to the cloud server.

[0113] The image generation request is used to request the cloud server to determine image generation parameters according to the image generation request.

[0114] Optionally, the user can issue a voice command to call up the voice control program of the terminal, and the voice control program can parse the voice command to obtain the user's image generation request, and then send the image generation request to the cloud server so that the cloud server can parse the image generation request and obtain corresponding image generation parameters.

[0115] For example, when the mobile phone is in standby mode, the user can issue a voice command "Hello, Xiao Ai" to wake up the voice control program of the mobile phone. After the voice control program of the mobile phone is in operation, the user continues to issue a voice command "draw a picture of fallen leaves". After obtaining the voice information of "draw a picture of fallen leaves", the voice control program of the mobile phone can directly parse and obtain the image generation request of "draw a picture of fallen leaves", or directly send the voice information of "draw a picture of fallen leaves" to the cloud server, and then the cloud server parses the voice information of "draw a picture of fallen leaves" to obtain the image generation request of "draw a picture of fallen leaves". Among them, the image generation request can also directly use the text information input by the user or the text information corresponding to the voice command issued by the user.

[0116] In step S112, the image generation parameters sent by the cloud server are received.

[0117] For example, after the cloud server obtains an image generation request of "drawing a picture of fallen leaves", key information such as "drawing", "fallen leaves", and "picture" can be identified from the image generation request, and these key information can be used as image generation parameters.

[0118] It should be noted that the image generation parameters may include the basic elements of the image composition, which may be: points, lines, shapes, colors, structures, light and shade, space, materials, textures, etc. In addition, the image generation parameters may also be the style of the image, such as abstract painting, oil painting, cartoon, ink painting, etc. Or, the image generation parameters may also be the main content of the image, such as characters (such as popular characters, famous characters, specific characters, etc.), scenes (such as war scenes, sports scenes, four seasons scenes, etc.), scenery (such as mountains, waterfalls, deserts, etc.), etc. That is, as long as it is an element that helps to form an image, it can be determined as an image generation parameter.

[0119] For example, after the cloud server obtains an image generation request of "drawing a picture of fallen leaves", key information such as "drawing", "fallen leaves", and "picture" can be identified from the image generation request, and these key information can be used as image generation parameters.

[0120] For another example, a user's voice command may be "Please generate a photo in the style of an oil painting. The photo includes blue sky, white clouds, mountains, and rivers." After the cloud server receives the image generation request of "Please generate a photo in the style of an oil painting. The photo includes blue sky, white clouds, mountains, and rivers," the cloud server can extract the user's intention of generating a photo and identify the keywords "oil painting style," "blue sky, white clouds," "mountains," and "rivers" as image generation parameters.

[0121] By adopting the above technical solution, the image generation parameters can be determined through the cloud server.

[0122] In some embodiments, Figure 3 As shown, the above step S12 may include the following steps.

[0123] In step S121, when it is determined that the terminal does not store the image generation model, it is determined whether the terminal supports the operation of the image generation model.

[0124] Considering that the image generation model itself occupies a large amount of storage space and running memory, it is necessary to determine the device parameters of the terminal to prevent the image generation model from being unable to run on the terminal.

[0125] Optionally, when it is determined that the terminal does not store the image generation model, the device parameters of the terminal may be acquired first.

[0126] The device parameters may include hardware parameters of the terminal and software environment information of the terminal. For example, the hardware parameters of the terminal may be the processor type of the terminal and the memory space size of the terminal.

[0127] In a specific implementation, the hardware parameter may include at least one or more combinations of the terminal's memory information, screen resolution, CPU information, and GPU information, for example, the number of CPU cores, CPU main frequency, GPU main frequency, GPU cache space size, etc. Those skilled in the art will appreciate that this is only an example, and in a specific application, other hardware parameters may also be used, without limitation.

[0128] And in a specific implementation, the software environment parameter may be an operating environment parameter of the application. For example, taking a terminal with an Android system installed as an example, the software environment parameter may be an Android system version number, system kernel information, device name, etc. It should be noted that this is only an example, and in other embodiments, there may be more software environment parameters, which are not limited to this.

[0129] Then, when it is determined that the device parameter is the target device parameter, it can be determined that the terminal supports the operation of the image generation model.

[0130] Wherein, when it is determined that the hardware parameters of the terminal and the software environment information of the terminal both meet the requirements for the operation of the image generation model, the satisfied device parameters can be used as the target device parameters.

[0131] In step S122, when it is determined that the terminal supports the operation of the image generation model, data information of the image generation model is obtained from the cloud server.

[0132] Optionally, when it is determined that the terminal supports the operation of the image generation model, the terminal may obtain data information of the image generation model by sending a model offline request to the cloud server.

[0133] By adopting the above technical solution, when it is determined that the terminal does not store the image generation model, it can first be determined whether the terminal can support the operation of the image generation model. This can avoid the situation where the image generation model is directly downloaded and installed when the hardware parameters or software environment parameters of the terminal do not meet the requirements, causing the terminal to crash.

[0134] It should be noted that, when it is determined that the device parameter is a non-target device parameter, a prompt message is generated and displayed, and the prompt message is used to prompt the user that the target image cannot be generated.

[0135] That is to say, when it is determined that the hardware parameters of the terminal and the software environment information of the terminal cannot meet the requirements for the operation of the image generation model, a prompt message can be displayed on the display interface of the terminal to prompt the user that the cloud server cannot generate the target image. For example, after the user inputs, a pop-up window can pop up on the display interface of the terminal, and the pop-up window prompts "Unable to generate image".

[0136] In some embodiments, Figure 4 As shown, the above step S12 may include the following steps.

[0137] In step S123, when it is determined that the terminal does not store the image generation model, a query request message is sent to the cloud server.

[0138] The query request information is used to request the cloud server to query and send the number of image generation times to be used.

[0139] In step S124, when the number of times the image is generated is greater than a predetermined number threshold, data information of the image generation model is obtained from the cloud server.

[0140] Optionally, when determining that the number of times the image is generated is greater than a predetermined number threshold, the terminal may obtain data information of the image generation model by sending a model offline request to the cloud server.

[0141] In step S125, when the number of image generation times is less than the predetermined number threshold, a target image generation request is sent to the cloud server, and the target image generation request is used to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model, and send the target image to the terminal.

[0142] By adopting the above technical solution, when it is determined that the terminal does not store the image generation model, it can first be determined whether the cloud server still meets the usage conditions to avoid the cloud server from being unable to be used normally.

[0143] In some embodiments, when it is determined that the terminal does not store the image generation model, it can also first determine whether the cloud server is in an available state. If the cloud server is in an unavailable state, it can then be determined whether the device parameters of the terminal can support the operation of the image generation model. If it is determined that the device parameters of the terminal can support the operation of the image generation model, a model offline request is sent to the cloud server.

[0144] For example, when it is determined that the terminal does not store the image generation model, the terminal may first send a query request message to the cloud server to determine the number of image generation times to be used by the cloud server, and then, when the number of image generation times is greater than a predetermined number threshold, determine that the cloud server is in an available state; when the number of image generation times is less than the predetermined number threshold, determine that the cloud server is in an unavailable state.

[0145] When it is determined that the cloud server is in an available state, a target image generation request can be sent directly to the cloud server. The target image generation request is used to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model, and send the target image to the terminal.

[0146] When it is determined that the cloud server is in an available state, the device parameters of the terminal can be obtained, including the terminal hardware parameters and software environment parameters of the terminal. When it is determined that the hardware parameters of the terminal and the software environment information of the terminal meet the requirements for the operation of the image generation model, a model offline request can be sent to the cloud server. When it is determined that the hardware parameters of the terminal or the software environment information of the terminal do not meet the requirements for the operation of the image generation model, the terminal can generate and display a prompt message, which is used to prompt the user that the cloud server cannot generate the target image.

[0147] Figure 5 is a flowchart of an image generating method according to an exemplary embodiment. Figure 5 As shown, the method is used in a cloud server and includes the following steps.

[0148] It should be noted that, in the present disclosure, the cloud server may be a cloud server in a cloud computing system, or may be a virtual machine on a cloud server.

[0149] In step S21, when the terminal does not store the image generation model, data information of the image generation model is sent to the terminal.

[0150] Optionally, it may be determined first whether the terminal stores the image generation model. If the terminal does not store the image generation model, data information of the image generation model is sent to the terminal.

[0151] Optionally, when determining that the number of times the image is generated is greater than a predetermined number threshold, the terminal may obtain data information of the image generation model by sending a model offline request to the cloud server.

[0152] The model offline request is a request message sent by the terminal for requesting the cloud server to send data information of the image generation model to the terminal when it is determined that the terminal does not store the image generation model.

[0153] By adopting the above technical solution, when it is determined that the image generation model is not stored in the terminal, a request can be made to download and install the image generation model from the cloud server so that the image generation can be performed locally on the terminal. This can reduce the number of interactions between the terminal and the cloud server, avoid occupying signaling resources, improve the efficiency of image generation, and thus enhance the user experience.

[0154] In some embodiments, Figure 6 As shown, the method also includes the following steps.

[0155] In step S22, before sending the data information of the image generation model to the terminal, an image generation request sent by the terminal is received.

[0156] The image generation request is used to request the cloud server to determine image generation parameters according to the image generation request.

[0157] Optionally, the user can issue a voice command to call up the voice control program of the terminal, and the voice control program can parse the voice command to obtain the user's image generation request, and then send the image generation request to the cloud server so that the cloud server can parse the image generation request and obtain corresponding image generation parameters.

[0158] In step S23, the image generation parameters are sent to the terminal.

[0159] By adopting the above technical solution, the image generation parameters can be determined through the cloud server.

[0160] In some embodiments, Figure 7 As shown, step S21 may include the following steps.

[0161] In step S211, the query request information sent by the terminal is received.

[0162] The query request information is a request message sent by the terminal to request the cloud server to query and send the number of image generation times to be used when the terminal determines that the terminal does not store the image generation model.

[0163] In step S212, when the number of times the image is generated is greater than a predetermined number threshold, confirmation information is sent to the terminal.

[0164] The confirmation information is used to instruct the terminal to obtain device parameters and to prompt the user that the cloud server cannot generate the target image.

[0165] In step S213, when the number of times the image is generated is less than the predetermined number threshold, a target image generation request sent by the terminal is received; and the target image is sent to the terminal.

[0166] The target image generation request is a request message in which the terminal requests the cloud server to generate the target image corresponding to the image generation parameters through the image generation model.

[0167] By adopting the above technical solution, when it is determined that the terminal does not store the image generation model, it can first be determined whether the cloud server still meets the usage conditions to avoid the cloud server from being unable to be used normally.

[0168] Figure 8 is a flowchart of an image generating method according to an exemplary embodiment. Figure 8 As shown, the method is used in a terminal and a cloud server and includes the following steps.

[0169] In step S31, the terminal sends an image generation request determined according to the input operation to the cloud server.

[0170] The image generation request is used to request the cloud server to determine image generation parameters according to the image generation request.

[0171] In step S32, the cloud server receives the image generation request sent by the terminal.

[0172] In step S33, the cloud server sends the image generation parameters to the terminal.

[0173] In step S34, the terminal receives the image generation parameters sent by the cloud server.

[0174] In step S35, the terminal sends a query request message to the cloud server.

[0175] The query request information is used to request the cloud server to query and send the number of image generation times to be used.

[0176] In step S36, the cloud server receives the query request information sent by the terminal.

[0177] When the number of times the image is generated is less than the predetermined number threshold, executing step S37;

[0178] If the number of times the image is generated is greater than a predetermined number threshold, executing steps S38-S39;

[0179] In step S37, a target image generation request sent by the terminal is received, where the target image generation request is a request message for the terminal to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model; and the target image is sent to the terminal.

[0180] In step S38, the cloud server sends confirmation information to the terminal.

[0181] The confirmation information is used to instruct the terminal to obtain device parameters and to prompt the user that the cloud server cannot generate the target image.

[0182] In step S39, the terminal obtains the device parameters of the terminal.

[0183] If it is determined that the device parameter is the target device parameter, continue to execute steps S310-S315;

[0184] When it is determined that the device parameter is a non-target device parameter, a prompt message is generated and displayed, where the prompt message is used to prompt the user that the target image cannot be generated.

[0185] In step S310, when determining that the device parameter is the target device parameter, the terminal determines that the terminal supports the operation of the image generation model.

[0186] In step S311, the terminal sends a model offline request to the cloud server.

[0187] In step S312, the cloud server receives the model offline request sent by the terminal.

[0188] In step S313, the cloud server sends data information of the image generation model to the terminal according to the model offline request.

[0189] In step S314, the terminal receives the data information sent by the cloud server and obtains the image generation model.

[0190] In step S315, the terminal generates a target image using the image generation model according to the image generation parameters.

[0191] By adopting the above technical solution, the terminal responds to the user's input operation to determine the image generation parameters, and the input operation is the operation of the user requesting to generate the target image corresponding to the image generation parameters; when it is determined that the terminal does not store the image generation model, a model offline request is sent to the cloud server, and the model offline request is used to request the cloud server to send the data information of the image generation model to the terminal; the data information sent by the cloud server is received to obtain the image generation model; and the target image is generated by the image generation model according to the image generation parameters. In this way, when it is determined that the image generation model is not stored in the terminal, a request can be made to download and install the image generation model from the cloud server so as to generate the image locally in the terminal, which can reduce the number of interactions between the terminal and the cloud server, avoid occupying signaling resources, improve the efficiency of image generation, and thus improve the user experience.

[0192] Fig. 9 is a block diagram of an image generating device according to an exemplary embodiment. Fig. 9 The device includes a determining module 401, a first sending module 402, a first receiving module 403 and a generating module 404.

[0193] The determination module 401 is configured to determine the image generation parameters in response to an input operation of a user, where the input operation is used to request an operation of generating a target image corresponding to the image generation parameters;

[0194] The acquisition module 402 is configured to acquire data information of the image generation model from the cloud server when it is determined that the terminal does not store the image generation model;

[0195] The first receiving module 403 is configured to obtain the image generation model according to the data information;

[0196] The generation module 404 is configured to generate a target image through the image generation model according to the image generation parameters.

[0197] Fig.10 is based on Fig. 9 The embodiment shown is a block diagram of a determination module. Fig.10 , the determination module 401 includes:

[0198] The first sending submodule 4011 is configured to send an image generation request determined according to the input operation to the cloud server; the image generation request is used to request the cloud server to determine image generation parameters according to the image generation request;

[0199] The receiving submodule 4012 is configured to receive the image generation parameters sent by the cloud server.

[0200] Fig.11 is based on Fig. 9 The embodiment shown is a block diagram of an acquisition module. Fig.11 , the acquisition block 402 includes:

[0201] The determination submodule 4021 is configured to determine whether the terminal supports the operation of the image generation model when it is determined that the terminal does not store the image generation model;

[0202] The first acquisition submodule 4022 is configured to acquire data information of the image generation model from the cloud server when it is determined that the terminal supports the operation of the image generation model.

[0203] Optionally, the determination submodule 4021 is configured to obtain device parameters of the terminal; and when it is determined that the device parameters are target device parameters, it is determined that the terminal supports the operation of the image generation model.

[0204] Optionally, the determination submodule 4021 is further configured to generate and display a prompt message when it is determined that the device parameter is a non-target device parameter, wherein the prompt message is used to prompt the user that the target image cannot be generated.

[0205] Fig.12 is based on Fig. 9 The embodiment shown is a block diagram of an acquisition module. Fig.12 , the acquisition module 402 includes:

[0206] The second sending submodule 4023 is configured to send a query request message to the cloud server when it is determined that the terminal does not store the image generation model, wherein the query request message is used to request the cloud server to query and send the image generation times to be used;

[0207] The second acquisition submodule 4024 is configured to send a model offline request to the cloud server when the number of times the image is generated is greater than a predetermined number threshold.

[0208] Optionally, the acquisition module 402 further includes:

[0209] The third sending submodule 4025 is configured to send a target image generation request to the cloud server when the number of image generation times is less than the predetermined number threshold, and the target image generation request is used to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model, and send the target image to the terminal.

[0210] Optionally, the generation module 404 is configured to use the image generation parameters as input of the image generation model to obtain the target image output by the image generation model.

[0211] Fig.13 is a block diagram of an image generating device according to an exemplary embodiment. Fig.13 , the device includes a first sending module 501.

[0212] The first sending module 501 is configured to send data information of the image generation model to the terminal when the terminal does not store the image generation model.

[0213] Fig.14 is based on Fig.13 The embodiment shown is a block diagram of an image generation device. Fig.14 , the device further comprises:

[0214] The second receiving module 502 is configured to receive an image generation request sent by the terminal before sending the data information of the image generation model to the terminal; the image generation request is used to request the cloud server to determine the image generation parameters according to the image generation request;

[0215] The second sending module 503 is configured to send the image generation parameter to the terminal.

[0216] Fig.15 is based on Fig.13 The embodiment shown is a block diagram of an image generation device. Fig.15 , the device further comprises:

[0217] The second receiving module 504 is configured to receive query request information sent by the terminal, where the query request information is a request message sent by the terminal to request the cloud server to query and send the number of image generation times to be used when it is determined that the terminal does not store the image generation model;

[0218] The second sending module 505 is configured to send confirmation information to the terminal when the number of times the image is generated is greater than a predetermined number threshold, wherein the confirmation information is used to instruct the terminal to obtain device parameters and to prompt the user that the cloud server cannot generate the target image.

[0219] Optionally, the device further comprises:

[0220] The third receiving module 506 is configured to receive a target image generation request sent by the terminal when the number of image generation times is less than the predetermined number threshold, the target image generation request being a request message for the terminal to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model;

[0221] The third sending submodule 507 is configured to send the target image to the terminal.

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

[0223] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the steps of the image generating method provided by the present disclosure.

[0224] Fig.16 1 is a block diagram of a device 1600 for image generation according to an exemplary embodiment. For example, the device 1600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0225] Reference Fig.16 , the device 1600 may include one or more of the following components: a processing component 1602 , a memory 1604 , a power component 1606 , a multimedia component 1608 , an audio component 1610 , an input / output interface 1612 , a sensor component 1614 , and a communication component 1616 .

[0226] The processing component 1602 generally controls the overall operation of the device 1600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1602 may include one or more processors 1620 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1602 may include one or more modules to facilitate the interaction between the processing component 1602 and other components. For example, the processing component 1602 may include a multimedia module to facilitate the interaction between the multimedia component 1608 and the processing component 1602.

[0227] The memory 1604 is configured to store various types of data to support the operation of the device 1600. Examples of such data include instructions for any application or method operating on the device 1600, contact data, phone book data, messages, pictures, videos, etc. The memory 1604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0228] The power supply component 1606 provides power to the various components of the device 1600. The power supply component 1606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1600.

[0229] The multimedia component 1608 includes a screen that provides an output interface between the device 1600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1608 includes a front camera and / or a rear camera. When the device 1600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0230] The audio component 1610 is configured to output and / or input audio signals. For example, the audio component 1610 includes a microphone (MIC), and when the device 1600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1604 or sent via the communication component 1616. In some embodiments, the audio component 1610 also includes a speaker for outputting audio signals.

[0231] The input / output interface 1612 provides an interface between the processing component 1602 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0232] The sensor assembly 1614 includes one or more sensors for providing various aspects of the status assessment of the device 1600. For example, the sensor assembly 1614 can detect the open / closed state of the device 1600, the relative positioning of components, such as the display and keypad of the device 1600, the sensor assembly 1614 can also detect the position change of the device 1600 or a component of the device 1600, the presence or absence of user contact with the device 1600, the orientation or acceleration / deceleration of the device 1600, and the temperature change of the device 1600. The sensor assembly 1614 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1614 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1614 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0233] The communication component 1616 is configured to facilitate wired or wireless communication between the device 1600 and other devices. The device 1600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0234] In an exemplary embodiment, the device 1600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0235] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1604 including instructions, and the instructions can be executed by the processor 1620 of the device 1600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

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

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

Claims

1. An image generation method, characterized in that: The method is applied to a terminal, comprising: determining image generation parameters in response to an input operation of a user, wherein the input operation is used to request an operation of generating a target image corresponding to the image generation parameters; When it is determined that the terminal does not store the image generation model, acquiring data information of the image generation model from the cloud server; According to the data information, obtaining the image generation model; A target image is generated by the image generation model according to the image generation parameters.

2. The method according to claim 1, characterized in that The determining of the image generation parameters in response to the user's input operation comprises: Sending an image generation request determined according to the input operation to the cloud server; the image generation request is used to request the cloud server to determine image generation parameters according to the image generation request; Receive the image generation parameters sent by the cloud server.

3. The method according to claim 1, characterized in that The acquiring of data information of the image generation model from the cloud server includes: In a case where it is determined that the terminal does not store the image generation model, determining whether the terminal supports the operation of the image generation model; When it is determined that the terminal supports the operation of the image generation model, data information of the image generation model is obtained from a cloud server.

4. The method according to claim 3, characterized in that The determining whether the terminal supports the operation of the image generation model includes: Obtaining device parameters of the terminal; In a case where it is determined that the device parameter is a target device parameter, it is determined that the terminal supports the operation of the image generation model.

5. The method according to claim 4, characterized in that The method further comprises: In the case where it is determined that the device parameters are non-target device parameters, a prompt message is generated and displayed, where the prompt message is used to prompt the user that the target image cannot be generated.

6. The method according to claim 1, characterized in that The acquiring of data information of the image generation model from the cloud server includes: In the case where it is determined that the terminal does not store the image generation model, sending query request information to the cloud server, the query request information is used to request the cloud server to query and send the image generation number to be used; When the number of times the image is generated is greater than a predetermined number threshold, data information of the image generation model is obtained from a cloud server.

7. The method according to claim 6, characterized in that The method further comprises: When the number of image generation times is less than the predetermined number threshold, a target image generation request is sent to the cloud server, and the target image generation request is used to request the cloud server to generate the target image corresponding to the image generation parameters through the image generation model, and send the target image to the terminal.

8. The method according to any one of claims 1 to 7, characterized in that: Generating a target image by using the image generation model according to the image generation parameters comprises: The image generation parameters are used as input of the image generation model to obtain the target image output by the image generation model.

9. An image generation method, characterized in that: The method is applied to a cloud server and includes: In a case where the terminal does not store the image generation model, data information of the image generation model is sent to the terminal.

10. The method according to claim 9, characterized in that The method further comprises: Before sending the data information of the image generation model to the terminal, receiving an image generation request sent by the terminal; the image generation request is used to request the cloud server to determine image generation parameters according to the image generation request; The image generation parameters are sent to the terminal.

11. The method according to claim 10, characterized in that The method further comprises: receiving query request information sent by the terminal, wherein the query request information is a request message sent by the terminal to request the cloud server to query and send the number of image generation times to be used when it is determined that the terminal does not store the image generation model; When the number of times the image is generated is greater than a predetermined number threshold, confirmation information is sent to the terminal, where the confirmation information is used to instruct the terminal to obtain device parameters and to prompt the user that the cloud server cannot generate the target image.

12. The method according to claim 11, characterized in that The method further comprises: In a case where the number of image generation times is less than the predetermined number threshold, receiving a target image generation request sent by the terminal, the target image generation request being a request message in which the terminal requests the cloud server to generate the target image corresponding to the image generation parameters through the image generation model; The target image is sent to the terminal.

13. An image generating device, characterized in that: include: a determination module configured to determine image generation parameters in response to an input operation of a user, wherein the input operation is used to request an operation of generating a target image corresponding to the image generation parameters; an acquisition module, configured to acquire data information of the image generation model from a cloud server when it is determined that the terminal does not store the image generation model; A first receiving module is configured to obtain the image generation model according to the data information; A generation module is configured to generate a target image through the image generation model according to the image generation parameters.

14. An image generating device, characterized in that: include: The first sending module is configured to send data information of the image generation model to the terminal when the terminal does not store the image generation model.

15. An image generating device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of the method according to any one of claims 1 to 8 when executed.

16. An image generating device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the steps of the method described in any one of claims 9-12 when executed.

17. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

18. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 9 to 12 are implemented.