Image generation method and device, electronic apparatus and storage medium
The interactive image generation method using large-scale language models addresses the limitations of current image generation technologies by allowing multiple rounds of user interaction, enhancing efficiency and convenience in image processing tasks.
Patent Information
- Application Number
- JP2024098388
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-03
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-23
AI Technical Summary
Current image generation technologies, such as 'Text to Image' models, require high usage conditions and optimized prompts, leading to low efficiency and high costs, and do not support multiple rounds of interaction with users, making it difficult to meet user requirements.
An interactive image generation method that allows users to engage in multiple rounds of interaction with an image processing system using natural language, leveraging large-scale language models to understand user requests and perform image generation or editing tasks without specialized training.
Enhances image processing efficiency and convenience by enabling users to iteratively refine image results through natural language dialogue, reducing usage requirements and improving versatility.
Smart Images

Figure 2024150438000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of artificial intelligence, in particular to technical fields such as natural language processing, deep learning, and large-scale language models, and more particularly to an image generation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. [Background technology]
[0002] Artificial Intelligence (AI) is a field that studies how computers can imitate some human thought processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.), and includes both hardware and software technologies. AI hardware technologies generally include sensors, AI-dedicated chips, cloud computing, distributed storage, big data processing, etc., while AI software technologies mainly include computer vision technology, voice recognition technology, natural language processing technology, machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] A large language model (LLM, also called a large-scale model) is a deep learning model trained using a large amount of text data, which can generate natural language text or understand the meaning of natural language text. Large-scale language models are one of the important paths to artificial intelligence because they can handle multiple types of natural language tasks, such as dialogue, question answering, text classification, and text generation. Some large-scale language models also have multimodal data processing capabilities, and can process multimodal data, such as text, images, and videos.
[0004] The approaches described in this section are not necessarily approaches that have been previously conceived or adopted. Unless otherwise noted, it should not be believed that any approach described in this section constitutes prior art merely by virtue of its inclusion in this section. Similarly, unless otherwise noted, it should not be believed that any problem addressed in this section is an admission of prior art. Summary of the Invention
[0005] The present disclosure provides image generation methods and apparatus, electronic devices, computer readable storage media and computer program products.
[0006] According to one aspect of the present disclosure, there is provided an image generation method, the method including: obtaining current interaction data, where the current interaction data includes user input data of a current round of interaction and historical interaction data of a historical round of interaction; determining a request type of the user in the current round of interaction based on the current interaction data; and in response to the request type being an image processing request, determining an action sequence for realizing the image processing request, where the action sequence includes at least one image processing action; generating a target image by executing the action sequence; and generating response data corresponding to the user input data based on the target image.
[0007] According to one aspect of the present disclosure, an image generation device is provided, the device including: an acquisition module configured to acquire current interaction data, where the current interaction data includes user input data of a current round of interaction and historical interaction data of a historical round of interaction; a first determination module configured to determine a request type of the user in the current round of interaction based on the current interaction data; a second determination module configured to determine an action sequence for realizing the image processing request in response to the request type being an image processing request, where the action sequence includes at least one image processing action; an execution module configured to generate a target image by executing the action sequence; and a generation module configured to generate response data corresponding to the user input data based on the target image.
[0008] According to one aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-mentioned method.
[0009] According to one aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method described above.
[0010] According to one aspect of the present disclosure, there is provided a computer program product comprising computer program instructions which, when executed by a processor, implements the method described above.
[0011] According to one or more embodiments of the present application, interactive image generation can be realized, improving the efficiency and convenience of image generation.
[0012] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, and are not intended to limit the scope of protection of the present disclosure. Other features of the present disclosure will be easily understood from the following description. [Brief description of the drawings]
[0013] The drawings illustratively illustrate the examples, constitute a part of the specification, and together with the written description serve to explain exemplary embodiments of the examples. The illustrated examples are for illustrative purposes only and are not intended to limit the scope of the claims. In all the drawings, the same reference numerals refer to similar, but not necessarily identical, elements. [Figure 1] FIG. 1 is a schematic diagram illustrating an example system capable of implementing various methods described herein, according to embodiments of the present disclosure. [Diagram 2] FIG. 1 is a schematic diagram illustrating an interactive image processing system according to an embodiment of the present disclosure. [Diagram 3] 1 is a flow chart illustrating an image generation method according to an embodiment of the present disclosure. [Figure 4] FIG. 2 is a schematic diagram illustrating an image generation process according to an embodiment of the present disclosure. [Diagram 5] FIG. 1 is a schematic diagram illustrating an image generation effect according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a block diagram showing a configuration of a training device for a text generation model according to an embodiment of the present disclosure. [Figure 7] FIG. 1 is a block diagram illustrating the structure of an exemplary electronic device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, exemplary embodiments of the present disclosure will be described in conjunction with the drawings, but various details in the embodiments of the present disclosure contained therein are for the purpose of aiding understanding, and therefore should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the following description omits descriptions of known functions and structures.
[0015] In this application, unless otherwise specified, the terms "first," "second," and the like, used to describe various elements are not intended to limit the location, timing, or importance of these elements. Such terms are used only to distinguish one element from another. In some instances, a first element and a second element may refer to the same instance of an element, or in some cases, may refer to different instances based on the contextual description.
[0016] The terms used in the description of various examples of the present disclosure are intended only to describe specific examples and are not intended to be limiting. Unless otherwise clearly indicated by the context, there is no particular limitation on the number of elements, and the elements may be one or more. In addition, the term "and / or" used in the present disclosure covers any and all possible combinations of the listed items. "Plurality" means more than one.
[0017] In the technical solution disclosed herein, the acquisition, storage and application of relevant user personal information shall all comply with the provisions of relevant laws and regulations and shall not violate public order and good customs.
[0018] Image processing tasks can be divided into image generation tasks and image editing tasks.
[0019] Regarding image generation tasks, the AIGC (AI Generated Content) technology field has attracted everyone's attention in a short time, as it shows great potential in image generation. At present, AI algorithms can complete image creation within minutes, which is disrupting the production methods of image production industries.
[0020] However, the current mainstream image generation scheme is a technology that uses a text to image model to generate an image based on the input text, i.e., a "text to image" technology, where the text input by a human is called a "prompt" (prompt word). Text to image models include a text to image model based on a generative adversarial network (GAN), a text to image model based on a transformer, and a text to image model based on diffusion generation. In order for text to image technology to be able to obtain relatively ideal results, it is necessary to provide clear and finely optimized prompts. Therefore, this mainstream technology has high conditions of use in abstraction, which leads to low efficiency and high cost in image processing. At the same time, it cannot support multiple rounds of interaction, which often makes it difficult to meet user requirements.
[0021] Image editing tasks are usually realized by using traditional image editing tools (e.g., software such as PhotoShop®, CorelDRAW®, etc.). Users independently complete actions such as adding content, deleting content, extracting content, adjusting image size and color, etc. by selecting and using corresponding functions in the image editing tool. Users need professional training to use the image editing tool, which reduces the efficiency of image editing, increases the cost, and is difficult to meet users' requirements.
[0022] From the above, it can be seen that the image processing solutions in the related art lack versatility, have high usage conditions, and do not support or facilitate multiple rounds of interaction with users, which results in low image processing efficiency, high costs, and difficulty in meeting user requirements.
[0023] In response to the above problems, the embodiment of the present disclosure provides an interactive image generation method, in which a user can complete image processing by interacting with an image processing system through multiple rounds of interactive interaction, which is easy to use and does not require additional learning costs, and greatly improves the efficiency and convenience of image processing. Hereinafter, the embodiment of the present disclosure will be described in detail with reference to the drawings.
[0024] 1 illustrates a schematic diagram of an example system 100 in which various methods and apparatus described herein may be implemented, according to embodiments of the present disclosure. With reference to FIG. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0025] In an embodiment of the present disclosure, the servers 101, 102, 103, 104, 105, 106 and / or 120 may execute one or more services or software applications that enable the image generation method to be implemented.
[0026] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized and virtualized environments. In some embodiments, these services may be provided as web-based or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and / or 106 in a Software-as-a-Service (SaaS) model.
[0027] In the configuration shown in FIG. 1, the server 120 may include one or more assemblies that implement the functions performed by the server 120. These assemblies may include software assemblies, hardware assemblies, or a combination thereof that may be executed on one or more processors. Users operating the client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these assemblies. It should be understood that a variety of different system configurations are possible and may differ from the system 100. Thus, FIG. 1 is an example of a system for implementing the various methods described herein and is not intended to be limiting.
[0028] Client devices 101, 102, 103, 104, 105, and / or 106 may provide an interface through which a user of the client device may interact with the client device. The client device may also output information to the user through the interface. Although only six client devices are shown in FIG. 1, one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0029] The client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as portable handheld devices, general purpose computers (e.g., personal computers or laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, in-vehicle equipment, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT® Windows, APPLE® iOS, UNIX®-like operating systems, Linux® or Linux®-like operating systems, and may include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android®, and the like. Portable handheld devices may include mobile phones, intelligent phones, tablets, personal digital assistants (PDAs), and the like. Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, and the like. The client devices may run a variety of applications, such as Internet-related applications, communication applications (eg, email applications), short message service (SMS) applications, and may use a variety of communication protocols.
[0030] Network 110 may be any type of network known to those skilled in the art that may use any one of a number of available protocols (including, but not limited to, TCP / IP, SNA, IPX, etc.) to support data communications. By way of example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token loop, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, Wi-Fi), and / or any combination of these and / or other networks.
[0031] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of virtualized logical storage devices to maintain the server's virtual storage devices). In various embodiments, server 120 may execute one or more services or software applications that provide the functionality described below.
[0032] The computing units in server 120 may run one or more operating systems, including any of the operating systems listed above and any commercial server operating system. Server 120 may also run any one of a variety of additional server applications and / or mid-tier applications, such as an HTTP server, an FTP server, a CGI server, a JAVA server, a database server, etc.
[0033] In some embodiments, server 120 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0034] In some embodiments, the server 120 may be a server of a distributed system or a server incorporating blockchain. The server 120 may be a cloud server, or an intelligent cloud computing server or an intelligent cloud host equipped with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, and solves the defects of the traditional physical host and virtual private server (VPS) services, such as high management difficulty and low business scalability.
[0035] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data or other information. For example, one or more of databases 130 may be used to store information such as audio files or video files. Databases 130 may be located in a variety of locations. For example, a database used by server 120 may be local to server 120 or may be remote from server 120 and in communication with server 120 over a network or a dedicated connection. Databases 130 may be of a variety of types. In some embodiments, a database used by server 120 may be a relational database. One or more of these databases may store, update, and retrieve data from the database and from the database in response to instructions.
[0036] In some embodiments, one or more of databases 130 may be used by an application to store data for the application. The databases used by the application may be various types of databases, such as a key-value repository, an object repository, a general-purpose repository supported by a file system, etc.
[0037] The system 100 of FIG. 1 can be configured and operated in a variety of ways to accommodate the application of the various methods and apparatus described in accordance with this disclosure.
[0038] FIG. 2 shows a schematic diagram of interactive image processing according to an embodiment of the present disclosure.
[0039] 2, a user 210 can interact with an image processing system 220 via a client device (e.g., client devices 101-106 shown in FIG. 1). The image processing system 220 may be, for example, an application located on a server (e.g., server 120 shown in FIG. 1).
[0040] In each round of interaction, the user 210 sends input data 230 of the current round to the image processing system 220. The image processing system 220 responds to the input data 230, determines the image processing request of the user, and performs corresponding image processing actions to obtain a target image that meets the user's request. Furthermore, the image processing system 220 can generate textual interpretation data of the target image, and feed back the target image and the interpretation data to the user as response data 240.
[0041] The user 210 can have multiple rounds of interaction with the image processing system 220. Correspondingly, the image processing system 220 can gradually understand the user's requirements in the process of multiple rounds of interaction, and satisfy the user's requirements through its own image generation and image editing capabilities.
[0042] In the embodiment of the present disclosure, the user 210 expresses his / her image processing request in natural language (specifically, it can be expressed in the manner of voice input or text input) without needing any technical background, and without needing to learn specific technical knowledge, such as learning how to construct and optimize prompt words for Text to Image. In addition to natural language, various images can also be input as auxiliary ways to express requests, as necessary, so as to be understandable. For example, the user can input or specify an image in the dialogue interface and express the image processing request in the manner of text. Some examples of request texts to be matched with images are shown below.
[0043] 1. Create it in the style of this image.
[0044] 2. Refer to the actions of the person in this image and create them.
[0045] 3. Adjust the images generated in the previous round to make the screen look more vivid.
[0046] In addition, the user can evaluate the image processing results fed back by the system and further express optimization requirements. In this way, the user 210 can gradually iterate the image processing results to satisfy his / her requirements, while the image processing system 220 can also record the user's evaluation content as a basis for self-optimization, such as the optimization of a large-scale language model, an image processing model called by each image processing action, etc.
[0047] Users can express different image processing requirements, and accordingly the image processing system 220 has different image processing capabilities. As shown in Figure 2, image processing can be divided into two types: image creation and image editing.
[0048] Image generation refers to the image processing system 220 creating an image according to a user's request, and mainly includes three methods: 1. Text to Image: Generate a new image using a natural language prompt. This is usually the most common image generation request. 2. Image to Image: An image is used as input to generate a new image, for example, extracting a line drawing. 3. Text and image blending for image generation: Take both natural language and image(s) as input and generate a new image, e.g. draw an image based on a text prompt, following the style of reference image A and the composition of reference image B.
[0049] Image editing refers to obtaining a new image by making specified changes to an existing image (usually an image generated by the interaction of a historical round). As can be understood, image editing essentially belongs to image generation, since image editing results in a new image. Image editing operations include, but are not limited to, the following five types:
[0050] 1. Adding new content: Add a new element to a specified position on the image, and in case of natural language interaction, the position of the added new content can be automatically determined by the system (e.g., when adding a moon to an image, the position of the moon can be automatically selected).
[0051] 2. Remove Content: Remove specified content from the image, may be specified by position or content.
[0052] 3. Modify content: Modify the color, shape, style, etc. of the specified content within the image.
[0053] 4. Content Extraction: Extract content elements such as background and foreground from an image.
[0054] 5. Whole Image Adjustments: Adjust the entire image rather than targeting specific content or areas, e.g. change the style, improve the resolution, correct the aspect ratio, etc.
[0055] In the process of image editing, interaction methods can include not only methods based on natural language (e.g., deleting the sun in an image), but also methods based on interactive manipulation of the image (e.g., using a screen swipe gesture to paint the area where new content needs to be added).
[0056] It should be noted that unlike conventional image editing tools, each image editing capability in the image processing system 220 essentially involves creating an entire image or a portion of an image. For example, while a conventional "cut out" function can extract a specified content from an image, the "content extraction" function of the present system can separate the extracted content and then complement the background by creating an image.
[0057] 3 shows a flowchart of an image generating method 300 according to an embodiment of the present disclosure. An execution subject of each step of the method 300 is typically a server, for example, the server 120 shown in FIG. 1. More specifically, the method 300 can be executed by a server based on an image processing system (for example, the image processing system 220 shown in FIG. 2) located in the server. In some embodiments, an execution subject of the method 300 may be a client device, for example, the client devices 101-106 shown in FIG. 1.
[0058] As shown in FIG. 3, the method 300 includes steps S310 to S350.
[0059] In step S310, current interaction data is obtained, where the current interaction data includes user input data of interactions in a current round and historical interaction data of interactions in historical rounds.
[0060] In step S320, a user request type in the current round of interaction is determined based on the current interaction data.
[0061] In step S330, in response to the request type being an image processing request, an action sequence for implementing the image processing request is determined, where the action sequence includes at least one image processing action.
[0062] In step S340, a target image is generated by executing an action sequence.
[0063] In step S350, response data corresponding to the user input data is generated based on the target image.
[0064] According to an embodiment of the present disclosure, an interactive image generation method is provided, which allows a user to have multiple rounds of interaction with an image processing system in a dialog manner.
[0065] In each round of interaction, based on the current user input data and context information (i.e., historical interaction data), automatically identify the user's image processing request, execute the corresponding action sequence to obtain the target image, and feed the target image back to the user as the response data of the current round of interaction.
[0066] Users do not need specialized learning and can complete image processing by conducting multiple rounds of natural language dialogue with the system, greatly reducing the conditions of use and improving the efficiency and convenience of image processing.
[0067] Each step of the method 300 is described in detail below.
[0068] With respect to step S310, it should be understood that each historical round of interaction includes historical input data of the user and historical response data fed back by the image processing system in response to the historical input data.
[0069] According to some embodiments, the current dialogue data, the user input data, and the historical dialogue data in step S310 may each include at least one of text, voice, or image. It should be appreciated that if the current dialogue data, the user input data, and the historical dialogue data are voice, speech recognition technology can be used to convert the voice into text, thereby simplifying subsequent data processing steps and improving computational efficiency.
[0070] According to some embodiments, step S320 may include steps S321 and S322.
[0071] In step S321, first input data for inputting to the first language model is determined based on the current dialogue data.
[0072] In step S322, the first input data is input to the first language model to obtain the request type output by the first language model.
[0073] The first language model is a large-scale language model, which usually includes an N-layer Transformer network with an encoder and a decoder. The large-scale language model is obtained by pre-training using a large amount of natural language data. Pre-training allows the large-scale language model to have a large amount of a priori knowledge and common sense, which improves its performance in various tasks.
[0074] According to the above embodiment, using a pre-trained large-scale language model to identify user requirements can improve the accuracy and flexibility of requirement identification.
[0075] According to some embodiments, in step S321, the current dialogue data may be directly taken as the first input data.
[0076] According to some other embodiments, in step S321, a preset first template may be used to generate the first input data. Specifically, step S321 may include steps S3211 and S3212.
[0077] In step S3211, a preset first template is obtained, the first template including first guide information for guiding the first language model to identify a request type and a first slot to be filled.
[0078] In step S3212, the first input data is obtained by filling the first slot with the current interaction data.
[0079] According to the above embodiment, guiding the large-scale language model to identify the user's request using the preset first template can improve the accuracy of request identification.
[0080] According to some embodiments, the first template can include a first slot for filling the current dialogue data and a first slot for filling the candidate request type, which can guide the large-scale language model to select a suitable request type from among multiple candidate request types based on the current dialogue data, and avoid the large-scale language model generating unknown request types that adversely affect subsequent image processing steps.
[0081] For example, the first template may be “Based on the above dialogue content, please select a suitable request type with “__”. The underlines in the first template indicate the first slots to be filled, where the first first slot is for filling the current dialogue data, and the second second slot is for filling multiple candidate request types. The non-underlined characters in the first template are the first guide information.
[0082] According to some embodiments, after the first input data is inputted into the first language model, the first language model can not only identify and output a request type, but also extract and output target data for realizing the request type from the current dialogue data. As can be seen, for different request types, different data contents may require attention. For example, the current dialogue data may include user chat data such as "I'm bored, let's chat", and these chat data belong to redundant information that does not require attention for image processing requests. According to the above embodiments, by extracting target data, irrelevant information in the current dialogue data can be filtered, thereby improving the efficiency and accuracy of image processing.
[0083] Table 1 below shows some example request types and their corresponding target data.
[0084] [Table 1]
[0085] According to some embodiments, step S320 may include step S323.
[0086] In step S323, the current dialogue data is input into the classification model to obtain the request type output by the classification model.
[0087] The classification model may be, for example, a text classification model, an image classification model, etc. The classification model can map text or image format data in the current dialogue data to one of multiple candidate request types. The classification model may be, for example, a neural network model. Compared with a large-scale language model, the classification model has a smaller number of parameters, making the model lighter. The classification model can be utilized to quickly determine the request type.
[0088] If the request type determined in step S320 is an image processing request, the action sequence that needs to be executed to realize the image processing request is further determined.
[0089] In the embodiment of the present disclosure, the image processing request refers to a request related to image processing. For example, among the multiple request types shown in Table 1, an image generation request, an image editing request, an image optimization request, and an image creation evaluation request are all image processing requests.
[0090] An action sequence must contain at least one image processing action, and at least one image processing action in an action sequence must be executed in a certain order. Two examples of action sequences are shown below: 1. First, optimize the user's prompt, then generate four image results, and finally select the best one and feedback to the user. 2. First, identify the area specified by the user's edit request, then redraw it by completing the partial screen.
[0091] According to some embodiments, step S330 may include steps S331 and S332.
[0092] In step S331, second input data for input to a second language model is determined based on the image processing request.
[0093] In step S332, the second input data is input to the second language model to obtain an action sequence output by the second language model.
[0094] The second language model is a pre-trained large-scale language model. In some embodiments, the second language model is the same large-scale language model as the first language model. According to the above embodiments, using the pre-trained large-scale language model to generate action sequences can improve the accuracy and flexibility of action sequence planning.
[0095] According to some embodiments, step S330 may include steps S333 to S335.
[0096] In step S333, a preset second template is obtained, where the second template includes second guide information for guiding a second language model to generate the action sequence and second slots to be filled. The second template may be, for example, "How to realize __?", where the underline indicates the second slot for filling an image processing request, and other characters are second guide information.
[0097] In step S335, the image processing request is filled into the second slot to obtain second input data for input to the second language model.
[0098] In step S336, the second input data is input to the second language model to obtain the action sequence output by the second language model.
[0099] According to the above embodiment, automatically planning action sequences using a large-scale language model has high accuracy and flexibility.
[0100] According to some embodiments, a correspondence relationship between a plurality of image processing requirements and a plurality of action sequences can be preset. Accordingly, in step S330, an action sequence for implementing the image processing requirements can be determined based on the preset correspondence relationship between a plurality of image processing requirements and a plurality of action sequences. This allows the action sequence to be quickly obtained without the need for extra calculation.
[0101] It should be noted that in the above preset correspondence, one image processing request can correspond to multiple action sequences, accordingly, in step S330, one of the multiple action sequences corresponding to the image processing request can be selected, and then executed in step S340.
[0102] An action sequence includes at least one image processing action. Table 2 shows some examples of image processing actions.
[0103] [Table 2-1] [Table 2-2]
[0104] According to some embodiments, step S340 may include: extracting target data for implementing the image processing request from the current interaction data; and for any one of the image processing actions in the action sequence, determining input parameter values of the image processing action according to the target data; and executing the image processing action according to the input parameter values to obtain a result image of the image processing action. The input parameters of each image processing action may, for example, refer to Table 2 above.
[0105] According to the above embodiment, key target data can be extracted from the current dialogue data and image processing actions can be performed using the target data, thereby filtering out irrelevant information and improving the efficiency and accuracy of image processing.
[0106] According to some embodiments, the target data can be obtained by extracting it from a first language model, that is, in step S320, the first input data is inputted into the first language model to obtain an image processing request outputted by the first language model and target data for realizing the image processing request.
[0107] According to some embodiments, image processing actions can be performed by invoking corresponding image processing models, for example, an image generation action can be completed by invoking a cross-modal image generation model, and an image editing action can be completed by invoking a cross-modal image editing model to obtain a resultant image.
[0108] The cross-modal image generation model takes text and image as input, and image as output, and the input is the condition for image generation. The embodiment of the present disclosure does not have strict requirements for the specific implementation of the cross-modal image generation model. In the current technology, the most effective model is the cross-modal image generation model based on the diffusion generation model. With the development of technology, this model can be replaced by a more effective model. It should be noted that this model is not a general "Text to Image" model. The input end of this model can be text, image, and a mixture thereof, and the image can be a reference image, a cushion image, or a feature image, and the input format is flexible.
[0109] The cross-modal image editing model takes text, images, and editing options as inputs, and performs editing changes specified on the input images. The embodiments of the present disclosure are not strict on the specific implementation requirements of the cross-modal image editing model, and different editing options can even correspond to different editing models. However, the capabilities provided by the image editing model need to be able to cover the selectable editing actions in the action flow plan.
[0110] In the above two models, both need to process text input, i.e., understand the text input as a text vector, and participate in subsequent calculations, where the understanding capability of a large-scale language model needs to be used.
[0111] In step S350, response data corresponding to the user input data is generated based on the target image.
[0112] According to some embodiments, the target image may be fed back to the user as direct response data.
[0113] According to some other embodiments, the response data includes a target image and interpretation data of the target image, such as a description of the target image, a process and logic of generating the target image by the system, etc. Compared with only the target image as the response data, feeding back the target image and the interpretation data together to the user can more effectively interpret the content of the target image and the process and logic of generating the target image by the system, thereby facilitating the user to subsequently intentionally optimize the target image.
[0114] According to some embodiments, step S350 may include steps S351 and S352.
[0115] In step S351, a target image and a preset third template are input into a third language model to obtain interpretation data for interpreting the target image, which is output by the third language model, where the third template is used to guide the third language model to generate the interpretation data.
[0116] In step S352, the target image and the interpretation data are used as the response data.
[0117] The third language model is a large-scale language model with cross-modal data processing capabilities of images and text. That is, the input and data of the large-scale language model may be images, text, or a mixture of both. According to the above embodiment, using a large-scale language model with cross-modal data processing capabilities of images and text to generate response data can improve the efficiency and consistency of response data generation.
[0118] According to some embodiments, the third language model may be the same model as the first or second language model described above.
[0119] According to some embodiments, the third template may be, for example, "Please describe the content and artistry of this image and ask users for their impressions and optimization directions for this image."
[0120] According to some embodiments, in step S351, the action sequence, the target image, and the third template are input together into a third language model, so that the third language model combines the image processing result and the action flow process to generate interpretation data, and the system-generated process and logic can be more effectively interpreted by the user, thereby facilitating the user to intentionally optimize the target image in the next round of interaction.
[0121] According to some embodiments, step S350 may include steps S353 to S355.
[0122] In step S353, the target image is input to an Image to Text model to obtain a description text of the target image output by the Image to Text model.
[0123] In step S354, the description text is input into a fourth language model to obtain interpretation data for interpreting the target image, the interpretation data being output by the fourth language model, the fourth language model being a pre-trained large-scale language model.
[0124] In step S355, the target image and the interpretation data are used as the response data.
[0125] According to the above embodiment, firstly, the image to text model is used to generate the description text of the target image, and then the large-scale language model is used to generate the response data. The embodiment can be applied to the large-scale language model that only has the single-modal (text) data processing capability.
[0126] According to some embodiments, the Image to Text model can be implemented as a Transformer structure that includes an Image Encoder and a Text Decoder.
[0127] According to some embodiments, the fourth language model may be the same as the first, second or third language model described above.
[0128] 4 shows a schematic diagram of an image generation process according to an embodiment of the present disclosure. As shown in FIG. 4, the image generation process includes steps S461 to S464.
[0129] In step S461, in each round of dialogue, the current interaction context 410 between the user and the image processing system (i.e., current dialogue data) is obtained, and the user's request expressed by the interaction context 410 is understood using the large-scale language model 420. In this way, multiple rounds of requirement understanding are realized.
[0130] In step S462, the large-scale language model 420 plans an action flow (ie, an action sequence) based on the user's requirements understood in step S461.
[0131] In step S463, the cross-modal image generation model 430 and / or the cross-modal image editing model 440 are called to execute the action flow, thereby obtaining a target image.
[0132] In step S464, the large scale language model 420 generates description data corresponding to the target image, and feeds back the target image and its description data to the user 450.
[0133] 5 shows a schematic diagram of an image generation effect according to an embodiment of the present disclosure. In the embodiment shown in FIG. 5, a user has multiple rounds of interaction with an image processing system.
[0134] In the first round of interaction, the user inputs the content 500 into the interaction interface, "Create an image of your choice." In response to the content 500, the image processing system generates a target image 512 and its interpretation data, "I have created an image, which can be found at images / aaa.png," using the method 300 according to an embodiment of the present disclosure. The combination of the target image 512 and its interpretation data is the response 510 of the user input content 500.
[0135] In the second round of dialogue, the user inputs content 520 into the dialogue interface, "Tell me about Star Wars what you know." In response to the content 520, the image processing system uses the method 300 according to an embodiment of the present disclosure to generate a target image 532 and its interpretation data, "I have generated one image about Star Wars, which can be found at images / bbb.png. In response to your question, Star Wars is a science fiction film that depicts the battles and adventures of various forces in the galaxy." The combination of the target image 532 and its interpretation data is the response 530 of the user input content 520.
[0136] In the third round of dialogue, the user inputs content 540 into the dialogue interface, "Change the background of the Star Wars image I just created to a starry sky." In response to the content 540, the image processing system uses the method 300 according to an embodiment of the present disclosure to generate a target image 552 and its interpretation data, "I used an image editing tool to change the background of the Star Wars image to a starry sky. The path of the new image is image / ccc.png." The combination of the target image 552 and its interpretation data is the response 550 of the user input content 540.
[0137] In the fourth round of interaction, the user inputs content 560 into the interaction interface, "Make the colors in the entire image more vivid." In response to the content 560, the image processing system uses the method 300 according to an embodiment of the present disclosure to generate a target image 572 and its interpretation data, "I made the colors in the image more vivid with an image editing tool. The path of the new image is image / ddd.png." The combination of the target image 572 and its interpretation data is the response 570 of the user input content 560.
[0138] In the fifth round of dialogue, the user inputs content 580 into the dialogue interface: "No, I meant to make the colors in that Star Wars image more vivid." In response to the content 580, the image processing system uses the method 300 according to an embodiment of the present disclosure to generate a target image 592 and its interpretation data: "Okay, I used an image editing tool to make the colors in the Star Wars image more vivid. The path of the new image is image / eee.png." The combination of the target image 592 and its interpretation data is the response 590 to the user input content 580.
[0139] According to an embodiment of the present disclosure, the image processing system can engage in multiple rounds of interaction with the user without limiting the number of rounds, and during the interaction process, continuously guide the user to express complete and accurate actual requirements, and through multiple steps, gradually approach an ideal result that meets the user's requirements, thereby completing both image generation tasks and image editing tasks, greatly improving the versatility of AI image creation applications.
[0140] The image processing system according to the embodiment of the present disclosure significantly reduces the conditions for use of AI image creation because, due to the capabilities of large-scale language models, users can communicate with the system in natural language without the need for special learning.
[0141] In each step or module using the large-scale language model, the use effect of the large-scale language model can be further improved by methods such as prompt optimization, in-context (context example) learning, etc. For example, first, when no context example is used, the large-scale language model can be called up to evaluate the processing effect of the large-scale language model on various types of tasks. For a task type with poor performance, the processing effect of the large-scale language model on this type of task can be improved by constructing a context example.
[0142] According to an embodiment of the present disclosure, there is further provided an image generating device. Fig. 6 shows a block diagram of a configuration of an image generating device 600 according to an embodiment of the present disclosure. As shown in Fig. 6, the device 600 includes an acquisition module 610, a first determination module 620, a second determination module 630, an execution module 640, and a generation module 650.
[0143] The acquisition module 610 is configured to acquire current interaction data, where the current interaction data includes user input data of interactions in a current round and historical interaction data of interactions in a historical round.
[0144] A first determination module 620 is configured to determine a request type of the user in the current round of interaction based on the current interaction data.
[0145] The second determination module 630 is configured to determine, in response to the request type being an image processing request, an action sequence for realizing the image processing request, where the action sequence includes at least one image processing action.
[0146] The execution module 640 is configured to execute the action sequence to generate a target image.
[0147] A generation module 650 is configured to generate response data corresponding to the user input data based on the target image.
[0148] According to an embodiment of the present disclosure, an interactive image generation method is provided, which allows a user to have multiple rounds of interaction with an image processing system in a dialog manner.
[0149] In each round of interaction, based on the current user input data and context information (i.e., historical interaction data), automatically identify the user's image processing request, execute the corresponding action sequence to obtain the target image, and feed the target image back to the user as the response data of the current round of interaction.
[0150] Users do not need specialized learning and can complete image processing by conducting multiple rounds of natural language dialogue with the system, greatly reducing the conditions of use and improving the efficiency and convenience of image processing.
[0151] According to some embodiments, the first determination module includes a first determination unit configured to determine first input data for inputting into a first language model based on the current dialogue data, and a first input unit configured to input the first input data into the first language model to obtain the request type output by the first language model.
[0152] According to some embodiments, the first determination unit includes an acquisition subunit configured to acquire a preset first template, where the first template includes first guide information for guiding the first language model to identify the request type and a first slot to be filled, and a filling subunit configured to acquire the first input data by filling the first slot with the current dialogue data.
[0153] According to some embodiments, the first determination module includes a second input unit configured to input the current interaction data into a classification model to obtain the request type output by the classification model.
[0154] According to some embodiments, the second determination module includes an obtaining unit configured to obtain a preset second template, where the second template includes second guide information for guiding a second language model to generate the action sequence and second slots to be filled, a filling unit configured to obtain second input data for inputting into the second language model by filling the image processing request into the second slots, and a third input unit configured to obtain the action sequence output by the second language model by inputting the second input data into the second language model.
[0155] According to some embodiments, the second determination module includes a second determination unit configured to determine an action sequence for realizing the image processing request based on a correspondence relationship between a plurality of preset image processing requests and a plurality of action sequences.
[0156] According to some embodiments, the execution module includes an extraction unit configured to extract target data for realizing the image processing request from the current interaction data, a third determination unit configured to determine, for any one image processing action in the action sequence, input parameter values of the image processing action based on the target data, and an execution unit configured to execute the image processing action based on the input parameter values to obtain a result image of the image processing action.
[0157] According to some embodiments, the generation module includes a fourth input unit configured to obtain interpretation data for interpreting the target image output by a third language model by inputting the target image and a preset third template into a third language model, where the third template is used to guide the third language model to generate the interpretation data, and a fourth determination unit configured to determine the target image and the interpretation data as the response data.
[0158] According to some embodiments, the generation module includes a fifth input unit configured to obtain a description text of the target image output by the Image to Text model by inputting the target image into an Image to Text model, a sixth input unit configured to obtain interpretation data for interpreting the target image output by the fourth language model by inputting the description text into a fourth language model, and a fifth determination unit configured to determine the target image and the interpretation data as the response data.
[0159] It should be understood that each module or unit of the apparatus 600 shown in Fig. 6 may correspond to each step in the method 300 described with reference to Fig. 3. Thus, the operations, features and advantages described for the method 300 above apply equally to the apparatus 600 and the modules and units included therein. For the sake of brevity, some operations, features and advantages will not be described here.
[0160] Although particular functionality is discussed above with reference to particular modules, it should be noted that the functionality of each module discussed herein may be split into multiple modules and / or at least some of the functionality of multiple modules may be combined into a single module.
[0161] It should also be understood that various techniques may be described herein in the general context of software hardware elements or program modules. With respect to each unit described in FIG. 6 above, it may be implemented in hardware or in hardware in combination with software and / or firmware. For example, these units may be implemented as computer program code / instructions configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, these units may be implemented as hardware logic / circuitry. For example, in some embodiments, one or more of the modules 610-650 may be implemented together in a System on Chip (SoC). The SoC may include an integrated circuit chip (e.g., a processor (e.g., including a Central Processing Unit (CPU), microcontroller, microprocessor, Digital Signal Processor (DSP), etc.), memory, one or more communication interfaces, and / or one or more components in other circuits) that may optionally execute received program code and / or include embedded firmware to perform functions.
[0162] According to an embodiment of the present disclosure, there is further provided an electronic device including at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, which instructions, when executed by the at least one processor, cause the at least one processor to perform an image generation method according to an embodiment of the present disclosure.
[0163] According to an embodiment of the present disclosure, there is further provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform an image generating method according to an embodiment of the present disclosure.
[0164] According to an embodiment of the present disclosure, there is provided a computer program product including computer program instructions which, when executed by a processor, implements an image generation method according to an embodiment of the present disclosure.
[0165] Next, referring to FIG. 7, a block diagram of an electronic device 700 functioning as a server or client of the present disclosure will be described, which is an example of a hardware device applicable to each aspect of the present disclosure. The electronic device represents various forms of digital electronic computers, such as laptop computers, desktop computers, stages, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components, their connections, and their functions shown herein are merely exemplary and do not limit the implementation of the present disclosure as described and / or claimed herein.
[0166] 7, the electronic device 700 includes a computing unit 701, which can perform various appropriate operations and processes according to a computer program stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0167] The components in the electronic device 700 are connected to an I / O interface 705, and include an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 may be any type of device capable of inputting information to the electronic device 700, and the input unit 706 may generate input numeric or character information and key signal inputs related to user settings and / or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track board, a track ball, a control lever, a microphone, and / or a remote control. The output unit 707 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 709 enables the electronic device 700 to exchange information / data with other devices via a computer network, e.g., the Internet, and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, e.g., a Bluetooth device, an 802.11 device, a Wi-Fi device, a WiMAX device, a cellular communication device, and / or the like.
[0168] The computing unit 701 may be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 701 may include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that execute machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 executes each of the methods and processes described above, such as method 300. For example, in some embodiments, the method 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, some or all of the computer program may be loaded and / or installed in the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, it may perform the method 300 and one or more steps of the method 300 described above. Alternatively, in other embodiments, the computing unit 701 is configured to perform the method 300 in any other suitable manner (eg, using firmware).
[0169] Various embodiments of the systems and techniques described herein above may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that may be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0170] The program code implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer or other programmable data processing apparatus, so that when executed by the processor or controller, the program code performs the functions / operations specified in the flow diagrams and / or block diagrams. The program code may be entirely executed on a machine, partly executed on a machine, partly executed on a machine and partly executed on a remote machine as a separate software package, or entirely executed on a remote machine or server.
[0171] In the context of the present disclosure, a machine-readable medium may be a tangible medium, which may include or store a program for use in or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection with one or more leads, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0172] To provide for interaction with a user, a computer may implement the systems and techniques described herein and include a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) through which a user may provide input to the computer. Other types of devices may also be provided for providing interaction with a user, for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback) and may receive input from the user in any form (including sound input, speech input, or tactile input).
[0173] The systems and techniques described herein may be implemented in a computing system including a backstage component (e.g., as a data server), a middleware component (e.g., an application server), a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with the system or technique embodiment), or any combination of the backstage component, middleware component, or front-end component. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0174] The computer system may include a client side and a server. The client side and the server are generally remote from each other and usually interact with each other via a communication network. The relationship between the client side and the server is generated by running computer programs having a client side-server relationship with each other on corresponding computers. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0175] It should be understood that the steps may be reordered, added, or removed using the various forms of flow described above. For example, the steps described in this disclosure may be performed in parallel, sequentially, or in a different order, and the present disclosure is not limited thereto as long as the technical solutions disclosed in this disclosure can achieve the desired results.
[0176] Although the embodiments or examples of the present application have been described with reference to the drawings, it should be understood that the above methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the scope of the claims and their equivalents after grant. Various elements of the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, each step may be performed in a different order from the order described in this disclosure. Furthermore, various elements of the embodiments or examples may be combined in various ways. It is important to note that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear later in this disclosure.
Claims
1. 1. A method for generating an image, comprising: obtaining current interaction data, where the current interaction data includes user input data of a current round of interactions and historical interaction data of historical rounds of interactions; determining a user request type in the current round of interaction based on the current interaction data; in response to the request type being an image processing request, determining an action sequence for implementing the image processing request, wherein the action sequence includes at least one image processing action; generating a target image by executing the action sequence; generating response data corresponding to the user input data based on the target image.
2. determining a user request type in the current round of interaction based on the current interaction data, determining first input data for input to a first language model based on the current dialogue data; The method of claim 1 , further comprising: inputting the first input data into the first language model to obtain the request type output by the first language model.
3. determining first input data for input to a first language model based on the current dialogue data, Obtaining a preset first template, where the first template includes first guide information for guiding the first language model to identify the request type and a first slot to be filled; and obtaining the first input data by filling the first slot with the current interaction data.
4. determining a user request type in the current round of interaction based on the current interaction data, The method of claim 1 , comprising inputting the current interaction data into a classification model to obtain the request type output by the classification model.
5. Determining a sequence of actions for implementing the image processing requirements includes: obtaining a preset second template, where the second template includes second guide information for guiding a second language model to generate the action sequence and second slots to be filled; filling the image processing request into the second slot to obtain second input data for input to the second language model; and inputting the second input data into the second language model to obtain the action sequence output by the second language model.
6. Determining a sequence of actions for implementing the image processing requirements includes: The method of claim 1 , further comprising determining an action sequence for implementing the image processing requirements based on a correspondence between a plurality of preset image processing requirements and a plurality of action sequences.
7. Executing the action sequence to generate a target image includes: extracting target data for implementing the image processing request from the current dialogue data; For any one image processing action in the action sequence, determining input parameter values for the image processing actions based on the target data; and performing the image processing action based on the input parameter values to obtain a resultant image of the image processing action.
8. generating response data corresponding to the user input data based on the target image, inputting the target image and a preset third template into a third language model to obtain interpretation data for interpreting the target image, the interpretation data being output by the third language model, wherein the third template is used to guide the third language model to generate the interpretation data; The method of claim 1 , further comprising providing the target image and the interpretation data as the response data.
9. generating response data corresponding to the user input data based on the target image, inputting the target image into an Image to Text model to obtain a descriptive text of the target image output by the Image to Text model; inputting the description text into a fourth language model to obtain interpretation data for interpreting the target image, the interpretation data being output by the fourth language model; The method of claim 1 , further comprising providing the target image and the interpretation data as the response data.
10. 1. An image generating device, comprising: an acquisition module configured to acquire current interaction data, where the current interaction data includes user input data of interactions in a current round and historical interaction data of interactions in a historical round; a first determination module configured to determine a user request type in the current round of interaction based on the current interaction data; a second determination module configured, in response to the request type being an image processing request, to determine an action sequence for implementing the image processing request, where the action sequence includes at least one image processing action; an execution module configured to execute the action sequence to generate a target image; a generation module configured to generate response data corresponding to the user input data based on the target image.
11. The first determination module includes: a first determination unit configured to determine first input data for inputting into a first language model based on the current dialogue data; and a first input unit configured to input the first input data to the first language model to obtain the request type output by the first language model.
12. The first determination unit comprises: an acquiring subunit configured to acquire a preset first template, where the first template includes first guide information for guiding the first language model to identify the request type and a first slot to be filled; and a filling subunit configured to fill the first slot with the current interaction data to obtain the first input data.
13. The first determination module includes: The apparatus of claim 10 , further comprising a second input unit configured to input the current interaction data into a classification model to obtain the request type output by the classification model.
14. The second determination module includes: an acquiring unit configured to acquire a preset second template, where the second template includes second guide information for guiding a second language model to generate the action sequence and second slots to be filled; a filling unit configured to fill the image processing request into the second slot to obtain second input data for input to the second language model; and a third input unit for inputting the second input data into the second language model to obtain the action sequence output by the second language model.
15. The second determination module includes: The apparatus according to claim 10 , further comprising: a second determining unit configured to determine an action sequence for implementing the image processing requests based on a correspondence relationship between a plurality of preset image processing requests and a plurality of action sequences.
16. The execution module includes: an extraction unit configured to extract target data for implementing the image processing request from the current interaction data; a third determination unit configured to determine, for any one image processing action in the action sequence, input parameter values of the image processing action based on the target data; and an execution unit configured to perform the image processing action based on the input parameter values to obtain a result image of the image processing action.
17. The generating module includes: a fourth input unit configured to input the target image and a preset third template into a third language model to obtain interpretation data for interpreting the target image, the interpretation data being output by the third language model, where the third template is used to guide the third language model to generate the interpretation data; The apparatus of claim 10 , further comprising a fourth determination unit configured to determine the target image and the interpretation data as the response data.
18. The generating module includes: a fifth input unit configured to input the target image into an Image to Text model to obtain a descriptive text of the target image output by the Image to Text model; a sixth input unit configured to input the description text into a fourth language model to obtain interpretation data for interpreting the target image, the interpretation data being output by the fourth language model; The apparatus of claim 10 , further comprising a fifth determination unit configured to determine the target image and the interpretation data as the response data.
19. An electronic device, At least one processor; and a memory communicatively coupled to the at least one processor, wherein: The memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, cause the at least one processor to execute the method according to any one of claims 1 to 9.
20. A non-transitory computer readable storage medium having computer instructions stored thereon, the computer instructions causing a computer to perform the method of any one of claims 1 to 9.
21. A computer program product comprising computer program instructions which, when executed by a processor, implements the method of any one of claims 1 to 9.
