Electronic device and method for generating image by using conversation history

By using AI models to analyze conversation history and context, the electronic device generates contextually relevant images for messaging, addressing the limitations of pre-specified images in conventional systems.

WO2026155369A1PCT designated stage Publication Date: 2026-07-23SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SAMSUNG ELECTRONICS CO LTD
Filing Date
2025-12-02
Publication Date
2026-07-23

Smart Images

  • Figure KR2025020365_23072026_PF_FP_ABST
    Figure KR2025020365_23072026_PF_FP_ABST
Patent Text Reader

Abstract

An electronic device according to an embodiment comprises a communication circuit, a display, a memory storing instructions, and at least one processor, wherein the instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: acquire, by using at least one message application, conversation history information including a received message received from a designated user and / or a sent message transmitted to the designated user; identify an event for transmitting a message to the designated user through a first message application; identify a keyword associated with the conversation history information by using a first artificial intelligence model; acquire an image on the basis of the keyword and at least a portion of context information about the electronic device by using a second artificial intelligence model; and display the image as at least a portion of the message through the display.
Need to check novelty before this filing date? Find Prior Art

Description

Image generation method using electronic devices and conversation history

[0001] Various embodiments of the present invention relate to a method for generating an image using an electronic device and conversation history.

[0002] Thanks to the remarkable advancements in information and communication technology and semiconductor technology, the distribution and use of various electronic devices are increasing rapidly. Electronic devices are being developed to allow users to carry them around and communicate. The term "electronic device" may refer to a device that performs specific functions according to an installed program, such as mobile communication terminals, tablet PCs, smartphones, wearable electronic devices, video / audio devices, desktop / laptop computers, or vehicle navigation systems.

[0003] An electronic device may provide an interactive messaging service (or application) that allows a user to exchange messages with another party. Through the messaging application, the electronic device may enable the user to select a party to converse with and exchange conversation messages with that party. For example, the electronic device may use the messaging application to display messages received from the other party on a conversation screen and to transmit conversation messages entered by the user to the other party.

[0004] A conventional electronic device can provide an image that may be included in a reply message when a user inputs a reply message through a message application. For example, the electronic device may display at least one image (e.g., a sticker or a sticker image) that may be included in a reply message when a user inputs a reply message through a message application.

[0005] The method of displaying at least one image that can be included in a reply message in this manner uses pre-specified images regardless of the user's conversation history and context, and thus may not accurately reflect the user's conversation history and context.

[0006] According to one embodiment of the present disclosure, an electronic device capable of generating (or acquiring) and recommending an image suitable for the conversation history and situation with the other party using an artificial intelligence (AI) model when sending and receiving conversation messages with the other party through a message application, and a method for generating an image using conversation history can be provided.

[0007] An electronic device according to one embodiment of the present disclosure may include a communication circuit, a display, a memory for storing commands, and at least one processor. When the commands are executed individually or collectively by the at least one processor, the electronic device may obtain conversation history information including a received message received from a designated user and / or a transmitted message sent to the designated user using at least one message application. When the commands are executed individually or collectively by the at least one processor, the electronic device may identify an event for sending a message to the designated user through a first message application. When the commands are executed individually or collectively by the at least one processor, the electronic device may use a first artificial intelligence model to identify a keyword associated with the conversation history information. When the commands are executed individually or collectively by the at least one processor, the electronic device may use a second artificial intelligence model to obtain an image based on the keyword and at least a portion of context information regarding the electronic device. When the above commands are executed individually or collectively by the at least one processor, the electronic device may be able to display the image through the display as at least part of the message.

[0008] A method for generating an image using conversation history according to one embodiment of the present disclosure may include an operation of acquiring conversation history information including a received message received from a designated user and / or a transmitted message transmitted to said designated user using at least one message application. The method may include an operation of identifying an event for transmitting a message to said designated user through a first message application. The method may include an operation of identifying a keyword associated with said conversation history information using a first artificial intelligence model. The method may include an operation of acquiring an image based on said keyword and at least a portion of context information regarding said electronic device using a second artificial intelligence model. The method may include an operation of displaying said image as at least a portion of said message through said display.

[0009] According to one embodiment of the present disclosure, an electronic device may include a communication circuit, a display, a memory for storing commands, and at least one processor. When the commands are executed individually or collectively by the at least one processor, the electronic device may be able to identify text to be transmitted to a designated user through a message application. When the commands are executed individually or collectively by the at least one processor, the electronic device may be able to obtain conversation history information including a received message received from the designated user and / or a transmitted message transmitted to the designated user. When the commands are executed individually or collectively by the at least one processor, the electronic device may be able to generate a plurality of images including a first image object corresponding to the text and a second image object corresponding to the conversation history information using at least one artificial intelligence model. When the commands are executed individually or collectively by the at least one processor, the electronic device may be able to display the plurality of images on the user interface of the message application through the display. When the above commands are executed individually or collectively by the at least one processor, the electronic device may be able to transmit a selected image among the plurality of images to the designated user through a communication circuit.

[0010] FIG. 1 is a block diagram of an electronic device in a network environment according to one embodiment.

[0011] FIG. 2 is a block diagram of an electronic device according to one embodiment.

[0012] FIG. 3 is a flowchart illustrating the operation of generating and transmitting an image using conversation history information according to one embodiment.

[0013] FIG. 4 is a diagram showing examples of a first prompt and a second prompt when generating an image using a first artificial intelligence model and a second artificial intelligence model in an electronic device according to one embodiment.

[0014] FIG. 5 is a diagram illustrating an example of generating an image based on at least one keyword based on conversation history information according to one embodiment and situation information of an electronic device.

[0015] FIG. 6 is a diagram illustrating an example of generating an image based on at least one keyword and situation information of an electronic device based on conversation history information and a user input message according to one embodiment.

[0016] FIG. 7 is a diagram illustrating an example of generating an image based on conversation history information according to one embodiment, at least one keyword based on a message recommended by an electronic device, and context information of an electronic device.

[0017] FIG. 8 is a diagram illustrating an example of generating an image based on at least one keyword based on conversation history information and a user input message according to one embodiment, situation information of an electronic device, and a selected image.

[0018] FIG. 9 is a diagram showing an example of displaying a recommended image based on conversation history information according to one embodiment.

[0019] FIG. 1 is a block diagram of an electronic device (101) in a network environment (100) according to one embodiment. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with an electronic device (102) through a first network (198) (e.g., a short-range wireless communication network) or may communicate with at least one of an electronic device (104) or a server (108) through a second network (199) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (101) may communicate with the electronic device (104) through the server (108). According to one embodiment, the electronic device (101) may include a processor (120), memory (130), input module (150), sound output module (155), display module (160), audio module (170), sensor module (176), interface (177), connection terminal (178), haptic module (179), camera module (180), power management module (188), battery (189), communication module (190), subscriber identification module (196), or antenna module (197). In some embodiments, at least one of these components (e.g., connection terminal (178)) may be omitted from the electronic device (101), or one or more other components may be added. In some embodiments, some of these components (e.g., sensor module (176), camera module (180), or antenna module (197)) may be integrated into a single component (e.g., display module (160)).

[0020] The processor (120) can control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) by executing software (e.g., a program (140)), and can perform various data processing or operations. According to one embodiment, as at least part of the data processing or operations, the processor (120) can store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in volatile memory (132), process the commands or data stored in volatile memory (132), and store the resulting data in non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) that can operate independently or together with it (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor). For example, if the electronic device (101) includes a main processor (121) and an auxiliary processor (123), the auxiliary processor (123) may be configured to use lower power than the main processor (121) or to be specialized for a designated function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as part thereof.

[0021] The auxiliary processor (123) may control at least some of the functions or states associated with at least one component of the electronic device (101) (e.g., display module (160), sensor module (176), or communication module (190)) on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. According to one embodiment, the auxiliary processor (123) (e.g., image signal processor or communication processor) may be implemented as part of another functionally related component (e.g., camera module (180) or communication module (190)). According to one embodiment, the auxiliary processor (123) (e.g., neural network processing unit) may include a hardware structure specialized for processing an artificial intelligence model. The artificial intelligence model may be generated through machine learning. Such learning may be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or through a separate server (e.g., server (108)). The learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model may include a plurality of artificial neural network layers.An artificial neural network may be a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to the hardware structure, the artificial intelligence model may include a software structure, either additionally or substantially.

[0022] The memory (130) can store various data used by at least one component of the electronic device (101) (e.g., processor (120) or sensor module (176)). The data may include, for example, input data or output data for software (e.g., program (140)) and related commands. The memory (130) may include volatile memory (132) or non-volatile memory (134).

[0023] The program (140) may be stored as software in memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).

[0024] The input module (150) can receive commands or data to be used for a component of the electronic device (101) (e.g., processor (120)) from outside the electronic device (101) (e.g., user). The input module (150) may include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

[0025] The sound output module (155) can output a sound signal to the outside of the electronic device (101). The sound output module (155) may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as multimedia playback or recording playback. The receiver may be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from the speaker or as part thereof.

[0026] The display module (160) can visually provide information to an external (e.g., user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling said device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of the force generated by said touch.

[0027] The audio module (170) can convert sound into an electrical signal or, conversely, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150) or output sound through the sound output module (155) or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphones) connected directly or wirelessly to the electronic device (101).

[0028] The sensor module (176) can detect the operating state of the electronic device (101) (e.g., power or temperature) or the external environmental state (e.g., user state) and generate an electrical signal or data value corresponding to the detected state. According to one embodiment, the sensor module (176) may include, for example, a gesture sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biosensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

[0029] The interface (177) may support one or more specified protocols that can be used for the electronic device (101) to be connected directly or wirelessly to an external electronic device (e.g., electronic device (102)). According to one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0030] The connection terminal (178) may include a connector through which the electronic device (101) can be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0031] The haptic module (179) can convert an electrical signal into a mechanical stimulus (e.g., vibration or movement) or an electrical stimulus that the user can perceive through tactile or kinesthetic senses. According to one embodiment, the haptic module (179) may include, for example, a motor, a piezoelectric element, or an electric stimulation device.

[0032] The camera module (180) can capture still images and video. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.

[0033] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented, for example, as at least part of a power management integrated circuit (PMIC).

[0034] The battery (189) can supply power to at least one component of the electronic device (101). According to one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0035] The communication module (190) can support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between an electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may include one or more communication processors that operate independently of the processor (120) (e.g., application processor) and support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., cellular communication module, short-range wireless communication module, or GNSS (global navigation satellite system) communication module) or a wired communication module (194) (e.g., LAN (local area network) communication module, or power line communication module). The corresponding communication module among these communication modules can communicate with an external electronic device (104) through a first network (198) (e.g., a short-range communication network such as Bluetooth, WiFi (wireless fidelity) direct, or IrDA (infrared data association)) or a second network (199) (e.g., a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can identify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) using subscriber information (e.g., International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module (196).

[0036] The wireless communication module (192) can support 5G networks and next-generation communication technologies following 4G networks, for example, new radio access technology. NR access technology can support high-speed transmission of high-capacity data (enhanced mobile broadband (eMBB)), minimization of terminal power and connection of multiple terminals (massive machine type communications (mMTC)), or high reliability and low latency (ultra-reliable and low-latency communications (URLLC)). The wireless communication module (192) can support a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate, for example. The wireless communication module (192) can support various technologies for securing performance in the high-frequency band, such as beamforming, massive MIMO (multiple-input and multiple-output), full-dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large-scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), external electronic device (e.g., electronic device (104)), or network system (e.g., second network (199)). According to one embodiment, the wireless communication module (192) can support a Peak data rate (e.g., 20 Gbps or more) for realizing eMBB, loss coverage (e.g., 164 dB or less) for realizing mMTC, or U-plane latency (e.g., downlink (DL) and uplink (UL) each 0.5 ms or less, or round trip 1 ms or less) for realizing URLLC.

[0037] An antenna module (197) can transmit a signal or power to or from an external source (e.g., an external electronic device). According to one embodiment, the antenna module (197) may include an antenna comprising a radiator made of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). According to one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as a first network (198) or a second network (199), may be selected from the plurality of antennas, for example, by a communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device through the selected at least one antenna. According to some embodiments, in addition to the radiator, other components (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as part of the antenna module (197).

[0038] According to various embodiments, the antenna module (197) may form a mmWave antenna module. According to one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent to a first surface (e.g., bottom surface) of the printed circuit board and capable of supporting a specified high frequency band (e.g., mmWave band), and a plurality of antennas (e.g., array antennas) disposed on or adjacent to a second surface (e.g., top surface or side surface) of the printed circuit board and capable of transmitting or receiving a signal of the specified high frequency band.

[0039] At least some of the above components can be connected to each other via a communication method between peripheral devices (e.g., bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)) and exchange signals (e.g., commands or data) with each other.

[0040] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) through a server (108) connected to a second network (199). Each of the external electronic devices (102, or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations performed on the electronic device (101) may be performed on one or more of the external electronic devices (102, 104, or 108). For example, if the electronic device (101) needs to perform a function or service automatically or in response to a request from a user or another device, the electronic device (101) may request one or more external electronic devices to perform at least part of the function or service instead of performing the function or service itself or additionally. One or more external electronic devices that receive the above request may execute at least part of the requested function or service, or additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may provide the result as is or additionally processed as at least part of the response to the request. For this purpose, for example, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used. The electronic device (101) may provide ultra-low latency services using, for example, distributed computing or mobile edge computing. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server using machine learning and / or neural networks. According to one embodiment, the external electronic device (104) or the server (108) may be included within a second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.

[0041] In the following detailed description, reference numbers in the drawings may be assigned identically or omitted for configurations that can be easily understood through prior embodiments, and detailed descriptions thereof may also be omitted. An electronic device according to one embodiment disclosed in this document may be implemented by selectively combining configurations of different embodiments, and a configuration of one embodiment may be replaced by a configuration of another embodiment. For example, it should be noted that the present invention is not limited to specific drawings or embodiments.

[0042] FIG. 2 is a block diagram of an electronic device according to one embodiment.

[0043] Referring to FIG. 2, an electronic device (201) according to one embodiment (e.g., the electronic device (101) of FIG. 1) may include a processor (220), memory (230), a display (260), and a communication circuit (290). The electronic device (201) according to one embodiment is not limited thereto and may be configured to include various additional components or to exclude some of the components. The electronic device (201) according to one embodiment may further include all or part of the electronic device (101) shown in FIG. 1.

[0044] A processor (220) according to one embodiment (e.g., processor (120) of FIG. 1) may include a central processing unit (CPU) or an application processor (AP), and may include a hardware structure specialized for processing artificial intelligence (AI) models (e.g., an AI chip).

[0045] A processor (220) according to one embodiment (e.g., processor (120) of FIG. 1) may include one or more processors. One or more processors according to one embodiment may include a general-purpose processor such as a CPU, AP, DSP (digital signal processor), etc., a graphics-dedicated processor such as a GPU, VPU (vision processing unit), or an artificial intelligence-dedicated processor such as an NPU. One or more processors may be controlled to process input data according to a predefined operation rule stored in memory (230) or at least one artificial intelligence model (e.g., a first artificial intelligence model (232) and a second artificial intelligence model (234)). Alternatively, if one or more processors are artificial intelligence-dedicated processors, the artificial intelligence-dedicated processors may be designed with a hardware structure specialized for processing a specific artificial intelligence model.

[0046] A predefined operation rule or artificial intelligence model according to one embodiment may be created through learning. Here, being created through learning means that a predefined operation rule or artificial intelligence model configured to perform a desired characteristic (or purpose) is created by a basic artificial intelligence model being trained using a number of learning data by a learning algorithm. Such learning may be performed on the device itself where the artificial intelligence according to the present disclosure is executed, or it may be performed through a separate server and / or system. Examples of learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but are not limited to the examples described above. The first artificial intelligence model (232) and / or the second artificial intelligence model (234) may be composed of a plurality of neural network layers. Each of the plurality of neural network layers has a plurality of weight values ​​and performs neural network operations through operations between the operation result of the previous layer and the plurality of weights. Multiple weights possessed by multiple neural network layers can be optimized based on the learning results of the artificial intelligence model. For example, multiple weights can be updated so that the loss or cost value obtained from the artificial intelligence model during the learning process is reduced or minimized.Artificial neural networks may include deep neural networks (DNNs), such as Convolutional Neural Networks (CNNs), Deep Neural Networks (DNNs), Recurrent Neural Networks (RNNs), Restricted Boltzmann Machines (RBMs), Deep Belief Networks (DBNs), Bidirectional Recurrent Deep Neural Networks (BRDNNs), or Deep Q-Networks, but are not limited to the examples mentioned above.

[0047] A processor (220) according to one embodiment can perform overall control operations of an electronic device (201). A processor (220) according to one embodiment can execute commands stored in memory (230) individually or collectively to enable the electronic device (201) to perform an image generation operation (or method or process) using the conversation history information of the present disclosure.

[0048] A processor (220) according to one embodiment can exchange messages (e.g., send and receive) between a user of an electronic device (201) and a user of an external electronic device (e.g., electronic device (102) of FIG. 1) (e.g., a counterpart or a designated user) using at least one message application through a communication circuit (290). For example, the message application may be a chatting application, an instant message application, an SMS (short message service) message application, a SNS (social network service) application, an email application, a content sharing service application (e.g., a comment window of a content sharing service application), or any other application capable of exchanging messages in a manner that converses with a counterpart.

[0049] A processor (220) according to one embodiment may execute a message application (e.g., one of the plurality of message applications or a first application when a plurality of message applications are installed on an electronic device) based on user input. A processor (220) according to one embodiment may display a user interface (e.g., a message application screen or a conversation screen) for exchanging messages with a designated user through a display (260) based on the execution of the message application. A processor (220) according to one embodiment may initiate an operation (or method or process) for performing image generation using the conversation history information of the present disclosure when the execution of the message application is executed or the message application screen is displayed. A message application screen according to one embodiment may include a conversation history display area that displays at least a portion of conversation history information including at least one message exchanged with a designated user, and an input area for inputting a message to be transmitted to a designated user.

[0050] A processor (220) according to one embodiment may acquire (and / or store) conversation history information (or conversation history) including received messages received from a designated user and / or transmitted messages sent to a designated user during a designated period through at least one application using at least one message application. The conversation history information according to one embodiment may include messages exchanged between a user of the electronic device (201) and a designated user through one message application or through multiple message applications during a designated period. The conversation history information according to one embodiment may include at least one message included in a message application screen displayed through a display (260). The transmitted message and / or received message according to one embodiment may include text (e.g., characters), images (e.g., photos, videos, emoticons, and / or AI images), and / or audio (e.g., music or voice).

[0051] According to one embodiment, the processor (220) may obtain messages received and / or transmitted through the first message application and messages received and / or transmitted through the second message application as conversation history information with the designated user when the user exchanges messages with the designated user through the first message application and the second message application. According to one embodiment, the processor (220) may receive a message from the designated user using the first message application through the first network (e.g., a mobile network or a cellular network including 4G and 5G), and may transmit a message to the designated user using the second message application through the second network (e.g., a Wi-Fi network or a Bluetooth network).

[0052] According to one embodiment, the processor (220) can obtain conversation history information corresponding to conversations with multiple users, including a designated user, when a user is conversing with multiple users, including a designated user, through a message application.

[0053] A processor (220) according to one embodiment can identify an event for sending a message while displaying a message application screen through a display (260). When user input (e.g., touch input) is received for an input area of ​​a message application screen, the processor (220) according to one embodiment can call a keyboard function and further display a keyboard (or keyboard area) on the message application screen through the display (260). Based on the call of the keyboard function, the processor (220) according to one embodiment can identify an event for sending a message to a designated user corresponding to the conversation partner. When conversing with multiple users, the processor (220) according to one embodiment can infer (or predict) the designated user to whom the user of the electronic device (201) wishes to send a message in a predetermined manner (the most recently conversed user) based on conversation history information, and identify an event for sending a message to the designated user. When conversing with multiple users, the processor (220) according to one embodiment can perform an image generation process for each of the multiple users and allow the user to select from the generated images.

[0054] A processor (220) according to one embodiment may identify at least one keyword associated with conversation history information with a designated user by using a first artificial intelligence model (232) based on event identification for sending a message to a designated user. A processor (220) according to one embodiment may generate a prompt (e.g., a first prompt) requesting at least one keyword associated with conversation history information with a designated user and input it into the first artificial intelligence model (232), and may identify (or obtain) at least one keyword associated with conversation history information with a designated user by using the first artificial intelligence model (232).

[0055] A processor (220) according to one embodiment can identify at least one keyword associated with a message entered by a user through a keyboard function and conversation history information with a designated user based on event identification for sending a message to a designated user using a first artificial intelligence model (232). A processor (220) according to one embodiment can generate a prompt (e.g., a first prompt) requesting at least one keyword associated with a message entered by a user through a keyboard function and conversation history information with a designated user, and input it into the first artificial intelligence model (232), and can identify (or obtain) at least one keyword associated with a message entered by a user through a keyboard function and conversation history information with a designated user using the first artificial intelligence model (232).

[0056] A processor (220) according to one embodiment may identify at least one keyword associated with conversation history information with a designated user and a message recommended for transmission by an electronic device (201) by using a first artificial intelligence model (232) based on event identification for transmitting a message to a designated user. A processor (220) according to one embodiment may generate a prompt (e.g., a first prompt) requesting at least one keyword associated with conversation history information with a designated user and a message recommended for transmission by an electronic device (201) and input it into the first artificial intelligence model (232), and may identify (or obtain) at least one keyword associated with conversation history information with a designated user and a message recommended for transmission by an electronic device (201) by using the first artificial intelligence model (232).

[0057] A processor (220) according to one embodiment may generate a first prompt requesting at least one keyword associated with information (e.g., biometric information (e.g., exercise status, emotion, heart rate information, and / or blood sugar information) received from an external electronic device (e.g., external electronic device (102) of FIG. 1) (e.g., wearable electronic device, IoT device, in-vehicle electronic device, and / or other electronic device) connected via communication (e.g., short-range wireless communication) with the electronic device (201), and input this to a first artificial intelligence model (232). A processor (220) according to one embodiment may use the first artificial intelligence model (232) to identify (or obtain) at least one keyword associated with information received from an external electronic device connected via communication with the electronic device (201) and information associated with the conversation history information with the designated user.

[0058] A processor (220) according to one embodiment may specify the priority of information used to request at least one keyword. For example, if the conversation history information with a designated user (e.g., “I wake up”) and the message entered by the user through the keyboard function (or the message recommended by the electronic device (201)) (e.g., “I’m a bit tired”) are conflicting, the processor (220) may specify a higher priority for the message entered by the user (or the message recommended by the electronic device (201)) and include information in the first prompt to prioritize the message entered by the user (or the message recommended by the electronic device (201)) in generating at least one keyword.

[0059] A first prompt according to one embodiment may include conversation history information with a designated user and a plurality of keywords (or a plurality of candidate keywords). A processor (220) according to one embodiment may obtain a plurality of keywords for a plurality of groups (or categories) based on conversation history information with a designated user and generate a first prompt including conversation history information with a designated user and a plurality of keywords. The plurality of groups may include a topic group, an emotion group, a situation group, and / or other designated groups. A topic group may include keywords representing a conversation topic obtained from conversation history information with a designated user. An emotion group may include keywords representing an emotion obtained from conversation history information with a designated user. A situation group may include keywords representing a situation obtained from conversation history information with a designated user.

[0060] A processor (220) according to one embodiment may generate a first prompt including conversation history information with a designated user and a plurality of keywords, input (or transmit) it to a first artificial intelligence model (232), and use the first artificial intelligence model (232) to identify (or obtain) at least one keyword associated with the conversation history information with the designated user. A processor (220) according to one embodiment may display the identified (or obtained) at least one keyword through a display (260). A processor (220) according to one embodiment may edit and use the at least one keyword displayed through the display (260) based on user input.

[0061] The first artificial intelligence model (232) according to one embodiment may be an artificial intelligence model trained to generate text information based on an input (e.g., a first prompt). The first artificial intelligence model (232) according to one embodiment may include a large language model (LM), which is an artificial neural network-based language model that has learned a large amount of text data through prior training. The LLM according to one embodiment may include a large amount of parameters (e.g., more than 10 billion) and may use a transformer artificial neural network structure based on an attention mechanism. The attention mechanism may be a technique that helps the artificial intelligence model focus (attention) on important parts within the input data. The attention mechanism can be used to predict output data by predicting the extent to which some of the time-series input data (e.g., input data or input data of some layers of the neural network) contribute to the intermediate or final output of the neural network. While Recurrent Neural Network (RNN) structures that process each element of a sequence sequentially suffer from degraded prediction performance when there is information dependency over long time series distances, the attention mechanism can account for information dependency over long time series distances by controlling the degree of weight concentration (attention) within the overall (or partial) context of the input data. The transformer can be composed of an encoder-decoder structure. The encoder processes input data to output compressed information (e.g., contextual representation), and the decoder processes the compressed information to output data in token units. Each of the encoder and decoder may include an independent attention network, and may include a cross-attention network connecting the encoder and decoder.The training of an LLM according to one embodiment may include pre-training and / or fine-tuning. Pre-training is a process of enabling the LLM to acquire general linguistic knowledge using a large amount of text data, and may include, for example, self-supervised learning that predicts the next word using the previous word sequence of a text sequence. Fine-tuning is a process of training the LLM to be suitable for a specific domain (e.g., chatbot, translation, summarization, Q&A) or task, and the LLM may be further supervised (or adaptive) using a dataset suitable for the domain purpose based on a pre-trained model. The LLM may perform tasks using text input containing natural language called a prompt. For example, fine-tuning may be omitted during LLM training. To improve the performance of the task desired by the user, the prompt to be input into the LLM can be controlled. Examples of the task and / or guides for performing the task may be additionally provided in the prompt, such as in-context learning or zero-shot / few-shot learning. Examples of publicly available LLMs include BERT (Bidirectional Encoder Representations from Transformer) and GPT (generative pre-trained transformer). In one embodiment, the term 'LLM' may refer to the language neural network model itself, but it may also refer to a model of an LLM-based application (e.g., chatbot, translation, summarization, text classification, sentence generation). For example, an LLM-based chatbot such as ChatGPT or an LLM-based translator may also be referred to as 'LLM'. 'LLM' may include an inference engine utilizing an LLM neural network model.For example, "inputting an input prompt into an LLM" may mean "inputting an input prompt into an inference engine based on an LLM." For example, "the output of the LLM for the input prompt" may mean the output information of the last neural network layer of the LLM (or output information modified through additional processing) obtained when the input prompt is input into an inference engine based on an LLM.

[0062] A processor (220) according to one embodiment may obtain context information for an electronic device (201) based on the identification of an event for transmitting a message to a designated user. The context information for an electronic device (201) according to one embodiment may include the location (or place) of the electronic device (201) (or user of the electronic device (201)), the time at which the event for transmitting a message from the electronic device (201) was identified, the weather, and / or other information related to the electronic device (201) and the context of the electronic device (201).

[0063] A processor (220) according to one embodiment may display an image generated based on at least one keyword (or at least one keyword edited based on user input) and / or at least part of context information regarding an electronic device (201) using a second artificial intelligence model (234) on a message application screen through a display (260). A processor (220) according to one embodiment may obtain images generated differently depending on user interface elements (e.g., size, color, style, and / or other elements) provided differently depending on the message application, even if the at least one keyword and context information regarding the electronic device (201) are the same.

[0064] A processor (220) according to one embodiment may input (or transmit) a prompt (e.g., a second prompt) requesting image generation using at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201) to a second artificial intelligence model (234). A processor (220) according to one embodiment may obtain at least one image (one or a plurality of images) generated through the second artificial intelligence model (234) based on the input (or transmission) of the second prompt to the second artificial intelligence model (234).

[0065] A processor (220) according to one embodiment may input (or transmit) a second prompt requesting image generation to a second artificial intelligence model (234) by further utilizing at least one keyword (or at least one keyword edited based on user input) and / or context information for the electronic device (201) and a specified (or selected) image (e.g., an image selected from among images given or received included in conversation history information or an image selected by the user from an album) (or image style). For example, the processor (220) may include in the second prompt a phrase requesting image generation using an image selected from among images given or received included in conversation history information or an image selected by the user from an album. A processor (220) according to one embodiment can obtain at least one image (one or a plurality of images) generated through the second artificial intelligence model (234) based on input (or transmission) of at least one keyword (or at least one keyword edited based on user input) to the second artificial intelligence model (234), context information about the electronic device (201), and a second prompt requesting image generation using a specified (or selected) image.

[0066] A processor (220) according to one embodiment may input (or transmit) a second prompt requesting image generation to a second artificial intelligence model (234) by using a pre-specified (or pre-defined) image style in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information regarding the electronic device (201). A processor (220) according to one embodiment may obtain an image style selected by a user among a plurality of image styles as pre-specified image style information to be used for image generation. The plurality of image styles according to one embodiment may further include cartoon, illustration, pixel art, photograph, animation, text, emoticon, minimalism, watercolor, 3D graphics, user-specified character, and / or other styles. For example, cartoon may be an image style in which the image is expressed as a simple and cute character like a cartoon. Illustration may be an image style in which the image is expressed in detail and artistically. Pixel art may be an image style in which the image is expressed as dot graphics. Photograph can be an image style where the image is displayed like a photograph of a real object (e.g., a person or animal). Animation can be an image style where the image is displayed in a moving form (e.g., a GIF). Text can be an image style where the image is displayed in the form of text or speech bubbles. Emoticons can be an image style where the image is displayed as simple facial expressions or gestures representing emotions or situations. Minimalism can be an image style where the image is displayed with a simple and clean design. Watercolor style can be an image style where the image is displayed like a watercolor painting. 3D graphics can be an image style where the image is displayed three-dimensionally, such as in 3D. Custom characters can be an image style where the image is displayed using a character pre-defined by the user.A processor (220) according to one embodiment can acquire at least one image (one or a plurality of images) generated through the second artificial intelligence model (234) based on the input (or transmission) of a second prompt requesting image generation using at least one keyword (or at least one keyword edited based on user input), context information about the electronic device (201), and preset image style information to the second artificial intelligence model (234).

[0067] A processor (220) according to one embodiment may specify the priority of information used to request image generation. For example, if at least one keyword (e.g., “I am going to Gangnam Station”) and context information (e.g., “Current location information (Paris)”) are conflicting, the processor (220) may specify a higher priority for the context information and include information in the second prompt to prioritize the context information when generating the image.

[0068] A processor (220) according to one embodiment may generate an image (e.g., picture, photograph, or video) including a graphic object representing at least one keyword and / or context information about an electronic device (201) using a second artificial intelligence model (234). For example, if the second prompt includes the first keyword, the processor (220) may generate a first image corresponding to the first keyword (e.g., including a graphic object representing (or expressing) the first keyword) through the second artificial intelligence model (234). For example, if the second prompt includes the second keyword, the processor (220) may generate a second image corresponding to the second keyword (e.g., including a graphic object representing (or expressing) the second keyword) through the second artificial intelligence model (234).

[0069] A processor (220) according to one embodiment may use a second artificial intelligence model (234) to identify a response (or answer or reaction) of a designated user to a previously generated image before generating an image that includes a graphic object representing contextual information about at least one keyword and / or an electronic device (201), and may generate an image by taking into account the designated user's response to the previously generated image. For example, if the designated user's response to the previously generated image is a positive response, the processor (220) may generate an image similar to the previously generated image, and if the designated user's response to the previously generated image is a negative response, the processor (220) may generate an image different from the previously generated image.

[0070] A processor (220) according to one embodiment may generate an image including a graphic object representing situational information about at least one keyword and an electronic device (201) and audio including a sound representing situational information about at least one keyword and an electronic device (201) by using the second artificial intelligence model (234) when the second artificial intelligence model (234) is a model capable of generating audio.

[0071] A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing information (e.g., biometric information (e.g., exercise status, emotion, heart rate information, and / or blood glucose information) received from an external electronic device (e.g., external electronic device (102) of FIG. 1) connected to the electronic device (201) via communication (e.g., short-range wireless communication) in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information for the electronic device (201). A processor (220) according to one embodiment may generate an image using the second artificial intelligence model (234) by utilizing context information for at least one keyword and / or the electronic device (201) and information received from the external electronic device.

[0072] A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by utilizing the user's emotional state information in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information regarding the electronic device (201). A processor (220) according to one embodiment may obtain the user's emotional state information by analyzing the words and / or sentence structure of the text entered by the user. A processor (220) according to one embodiment may obtain the user's emotional state information by obtaining the user's voice and analyzing the tone, intonation, and / or speed of the user's voice. A processor (220) according to one embodiment may obtain the user's emotional state information by analyzing the content used by the user on the electronic device (201) (e.g., emoticons used by the user and / or content used by the user). A processor (220) according to one embodiment may obtain information on the user's emotional state by analyzing the user's biometric information (e.g., blood pressure, body temperature, heart rate, blood sugar, and / or changes in blood flow) received through a biometric sensor included in an electronic device (201) or by being sensed from an external electronic device (e.g., 102) (e.g., a smart watch or a smart ring). For example, the user's emotional state information may include a happy emotional state, a sad emotional state, an angry emotional state, a surprised emotional state, and / or other emotional states. A processor (220) according to one embodiment may generate an image using a second artificial intelligence model (234) with contextual information regarding at least one keyword and / or the electronic device (201) and the user's emotional state information. A processor (220) according to one embodiment may generate an image with a bright and cheerful atmosphere when the user is in a happy emotional state. A processor (220) according to one embodiment may generate an image with a quiet and emotional atmosphere when the user is in a sad emotional state.A processor (220) according to one embodiment can generate an image with intense color contrast or dynamic movement when the user is in an angry emotional state.

[0073] A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing a photo and / or image associated with a designated user's account in addition to context information regarding at least one keyword (or at least one keyword edited based on user input) and / or an electronic device (201). For example, the photo and / or image associated with the designated user's account may include a face image of the designated user. A processor (220) according to one embodiment may use the second artificial intelligence model (234) to generate an image in which the graphic object represents context information regarding at least one keyword and / or an electronic device (201), and the graphic object is outpainted or inpainted on the photo and / or image associated with the designated user's account.

[0074] A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing personal information about a designated user (or personal information learned about a designated user) (e.g., the designated user's nationality, language, favorite food, and / or other designated user information) in addition to at least one keyword (or at least one keyword edited based on user input) and / or contextual information about the electronic device (201). A processor (220) according to one embodiment may obtain an image generated using at least one keyword (or at least one keyword edited based on user input), contextual information about the electronic device (201), and / or personal information about a designated user (or personal information learned about a designated user) (e.g., the designated user's nationality, language, favorite food, age, and / or other designated user information) through the second artificial intelligence model (234). For example, the processor (220) can obtain an image generated in relation to Korean food if the conversation history information includes “Let’s eat something delicious tonight,” at least one keyword is “food to eat today,” and the designated user likes Korean food. For example, the processor (220) can obtain an image generated in relation to representative German food (e.g., sausage and / or beer) if the conversation history information includes “Let’s eat something delicious tonight,” at least one keyword is “food to eat today,” and the designated user’s language is German or their nationality is German.For example, the processor (220) can obtain an image generated in relation to a representative German food that a minor can eat (e.g., a soft drink instead of beer) if the conversation history information includes “Let’s eat something delicious tonight (or in German, “Lass uns heute Abend etwas Leckeres essen”)”, at least one keyword is “food to eat today”, the language of the designated user is German or the nationality is German and the age of the designated user is a minor.

[0075] A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing a meme retrieved based on conversation history information in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information regarding the electronic device (201). For example, the processor (220) may determine a meme corresponding to (or suitable for) the answer (or response) to the most recent conversation content among the memes retrieved based on conversation history information, and input a second prompt containing the determined meme into the second artificial intelligence model (234). A processor (220) according to one embodiment may generate an image by using the second artificial intelligence model (234) that includes a graphic object representing at least one keyword and / or context information regarding the electronic device (201), and further includes graphic or character information included in the meme.

[0076] The generated image according to one embodiment may include a graphic object (e.g., a first graphic object) representing at least one of the location or time of context information for the electronic device (201) used to generate the image. The image according to one embodiment may include a graphic object (e.g., a second graphic object) representing at least a part of a photograph or text symbol when the conversation history information for obtaining at least one keyword used to generate the image includes a photograph or text symbol.

[0077] A processor (220) according to one embodiment may display at least one image generated through a second artificial intelligence model (234) on a display (260) in an area related to the keyboard function of a message application screen (e.g., the area around the keyboard area or an area adjacent to the keyboard area).

[0078] A processor (220) according to one embodiment may display multiple images by arranging them according to priority (e.g., by listing them) when multiple images are generated through a second artificial intelligence model (234). For example, the processor (220) may identify an image containing characters among multiple images with a relatively higher priority than other images and display the image containing characters at a designated location (e.g., top or left) in an area related to keyboard functions. For example, the processor (220) may identify an image containing a designated user's face image among multiple images with a relatively higher priority than other images and display the image containing the designated user's face image at the top or left of an area related to keyboard functions. For example, the processor (220) may identify an image similar to an image included in conversation history information among multiple images with a relatively higher priority than other images and display the image similar to an image included in conversation history information at the top or left of an area related to keyboard functions.

[0079] A processor (220) according to one embodiment may select an image to be transmitted as part of a message through user input from among at least one image displayed around a keyboard area. When an image to be transmitted as part of a message is selected from among at least one image, the processor (220) according to one embodiment may delete other images other than the selected image from the electronic device (201). A processor (220) according to one embodiment may transmit the image selected to be transmitted as part of a message to a designated user based on user input.

[0080] A processor (220) according to one embodiment may store metadata in memory (230) together (or associated with each other) that includes at least a portion of the transmitted image and the information used to generate the transmitted image (e.g., conversation history information, at least one keyword, context information, specified user information, application information, number of uses, characters used, text messages transmitted together with (or associated with) the image, a first prompt, and / or a second prompt).

[0081] A processor (220) according to one embodiment can store a transmitted image in a clipboard. A processor (220) according to one embodiment can move to another application and / or another screen and perform paste based on user input for the transmitted image.

[0082] According to one embodiment, at least some or all of the first artificial intelligence model (232) and the second artificial intelligence model (234) may be included in an external device (e.g., a server (108)). According to one embodiment, the processor (220) may use at least some or all of the first artificial intelligence model (232) and the second artificial intelligence model (234) included in the external device through communication via a communication circuit (290) when at least some or all of the first artificial intelligence model (232) and the second artificial intelligence model (234) are included in the external device.

[0083] According to one embodiment, the first artificial intelligence model (232) and the second artificial intelligence model (234) may correspond to functional elements included in a single artificial intelligence model. When the first artificial intelligence model (232) and the second artificial intelligence model (234) according to one embodiment are implemented as a single artificial intelligence model, the first prompt and the second prompt may be transmitted to the single artificial intelligence model separately or integrated. According to one embodiment, the processor (220) may identify at least one keyword associated with conversation history information through a single artificial intelligence model and acquire at least one image generated based on at least one keyword and at least a portion of context information regarding an electronic device. According to one embodiment, the first artificial intelligence model (232) may mean a set of multiple first artificial intelligence models, and the second artificial intelligence model (234) may mean a set of multiple second artificial intelligence models.

[0084] According to one embodiment, the processor (220) may have a first artificial intelligence model and a second artificial intelligence model used when using a first user account (e.g., a designated user account, a user account associated with the manufacturer of an electronic device, a paid user account), and may have different first artificial intelligence models and a second artificial intelligence model used when using a second user account different from the first user account (e.g., a free user account). According to one embodiment, the processor (220) may acquire images generated differently when using the first user account and when using the second user account. According to one embodiment, the processor (220) may generate more images when using the first user account than when using the second user account and provide them for user selection. According to one embodiment, the processor (220) may acquire images faster when using the first user account than when using the second user account.

[0085] A processor (220) according to one embodiment may generate an image in response to the execution of the first message application when the specified location and / or specified time is reached, and display the generated image through the display (260), if there is a message that the user has repeatedly transmitted through the first message application at the specified location and / or specified time. A processor (220) according to one embodiment may generate an image using characters or images included in the repeatedly transmitted message if a conversation through the first message application is in progress, and display the generated image through the display (260), if there is a message that has been repeatedly transmitted through the first message application at the specified location and / or specified time. A processor (220) according to one embodiment may transmit the selected image to the conversation partner when the user selects the generated image.

[0086] A memory (230) according to one embodiment (e.g., memory (130) of FIG. 1) may store various data used by at least one component of an electronic device (201) (e.g., processor (220), and / or display (260)). The data may include, for example, software (e.g., software module or program (140)) and input data or output data for commands related thereto. A memory (230) according to one embodiment may store a first artificial intelligence model (232) and a second artificial intelligence model (234), and may store various data generated during program execution, including a program (e.g., software or program (140) of FIG. 1) for performing an image generation operation (or method or process) using conversation history information using the first artificial intelligence model (232) and the second artificial intelligence model (234). A memory (230) according to one embodiment may store instructions (or instructions) that enable a processor (220) to perform an operation (or method or process) for performing an image generation operation (or method or process) using the conversation history information of the present disclosure.

[0087] A display (260) according to one embodiment (e.g., the display (160) of FIG. 1) can display various information based on the control of a processor (220). A display (260) according to one embodiment can display a screen (e.g., a message application screen) associated with performing an image generation operation (or method) using conversation history information. According to one embodiment, the display (260) can be implemented in the form of a touch screen. When the display (260) is implemented in the form of a touch screen together with an input module, it can display various information generated according to the user's touch operation.

[0088] A communication circuit (290) according to one embodiment (e.g., communication module (190) of FIG. 1) may include a wireless communication module (e.g., cellular module, Wi-Fi (wireless-fidelity) module, Bluetooth module, or NFC (near field communication) module). A communication module (290) according to one embodiment may perform communication for sending and receiving messages while a message application is running. A communication module (290) according to one embodiment may communicate with an external server (e.g., server (108) of FIG. 1) including a cloud artificial intelligence model when the electronic device (201) uses an external first artificial intelligence model and / or a second artificial intelligence model. A communication circuit (290) according to one embodiment may receive biometric information sensed from an external electronic device (e.g., electronic device (102) of FIG. 1) based on the control of a processor (220).

[0089] According to one embodiment, the electronic device (201) is not limited to the configuration shown in FIG. 2 and may be configured to include various additional components. According to one embodiment, the electronic device (201) may further include an input module (not shown) (e.g., the input module (150) of FIG. 1) and may receive various inputs associated with performing an image generation operation (or method) using conversation history information through the input module.

[0090] In one embodiment, the main components of the electronic device were described through the electronic device (201) of FIG. 2. However, in various embodiments, not all components illustrated in FIG. 2 are essential components, and the connection relationships of the main components of the electronic device (201) described above through FIG. 2 may be changed according to various embodiments.

[0091] An electronic device according to one embodiment of the present disclosure (e.g., the electronic device (101) of FIG. 1 or the electronic device (201) of FIG. 2) may include a communication circuit (e.g., the communication module (190) of FIG. 1 or the communication circuit (290) of FIG. 2), a display (e.g., the display (160) of FIG. 1 or the display (260) of FIG. 2), a memory for storing commands (e.g., the memory (130) of FIG. 1 or the memory (230) of FIG. 2), and at least one processor (e.g., the processor (130) of FIG. 1 or the processor (230) of FIG. 2). According to one embodiment, the commands, when executed individually or collectively by the at least one processor, may cause the electronic device to obtain conversation history information including a received message received from a designated user and / or a transmitted message sent to the designated user using at least one message application. The commands, when executed individually or collectively by the at least one processor, may cause the electronic device to [receive] a first message application Through this, an event for transmitting a message to the designated user can be identified. For example, the first message application may refer to a message application currently running among at least one message application, in which an input window for a user to compose a message is active. When the commands are executed individually or collectively by the at least one processor, the electronic device may use a first artificial intelligence model to identify a keyword (e.g., at least one keyword) associated with the conversation history information. When the commands are executed individually or collectively by the at least one processor, the electronic device may use a second artificial intelligence model to acquire an image based on the keyword and at least a portion of the context information regarding the electronic device.When the above commands are executed individually or collectively by the at least one processor, the electronic device may display the image through the display as at least part of the message.

[0092] According to one embodiment, the at least one message application may include the first message application and the second message application. The received message may be received using the first message application, and the transmitted message may be transmitted using the second message application. According to one embodiment, the received message may be received through a message application other than the first message application. According to one embodiment, the collection of conversation history (e.g., received messages and / or transmitted messages) may be collected from each of one or a plurality of message applications, and received messages may be collected, transmitted messages may be collected, or transmitted and received messages may be collected from each of one or a plurality of message applications.

[0093] According to one embodiment, the commands, when executed individually or collectively by the at least one processor, may cause the electronic device to generate the image based at least partially on the keyword and the context information regarding the electronic device using the second artificial intelligence model when the event is identified through the first message application. The commands, when executed individually or collectively by the at least one processor, may cause the electronic device to generate an image different from the image based at least partially on the context information regarding the electronic device using the second artificial intelligence model when the event is identified through the second message application.

[0094] When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may be configured to generate a first prompt including conversation history information in response to the event identification. When the commands are executed individually or collectively by the at least one processor, the electronic device may be configured to input the first prompt into the first artificial intelligence model trained to generate text information, thereby enabling the first artificial intelligence model to identify the keyword selected from a plurality of keywords based on the conversation history information.

[0095] When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may be made to generate a second prompt including the keyword and the situation information regarding the electronic device. When the commands are executed individually or collectively by the at least one processor, the electronic device may be made to obtain the image generated using the keyword and the situation information through the second artificial intelligence model by inputting the second prompt to the second artificial intelligence model trained to generate image information.

[0096] The situation information for the electronic device according to one embodiment may include the location of the electronic device or the time at which the event was identified in the electronic device. The image may include a first graphic object representing at least one of the location or the time.

[0097] When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may display a user interface including at least a portion of the conversation history information through the display. When the commands are executed individually or collectively by the at least one processor, the electronic device may identify the event based on the keyboard function being invoked through the user interface. When the commands are executed individually or collectively by the at least one processor, the electronic device may input the conversation history information and the identified text into the first artificial intelligence model when text entered by a user through the keyboard function or designated by the electronic device is identified, thereby identifying the keyword associated with the identified text and the conversation history information through the first artificial intelligence model.

[0098] According to one embodiment, the image may be one of a plurality of images generated using the second artificial intelligence model. When the commands are executed individually or collectively by the at least one processor, the electronic device may be configured to display at least some of the plurality of images through the display in an area associated with the keyboard function of the user interface.

[0099] When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may be configured to store metadata including the image and the keyword corresponding to the image together in the memory when the image is selected from at least some of the plurality of images.

[0100] According to one embodiment, the received message may include an image captured through a camera. The image may include a second graphic object representing at least a part of a subject or text symbol included in the captured image.

[0101] When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may receive biometric information of the electronic device user from a wearable electronic device communicating with the electronic device through the communication circuit. When the commands are executed individually or collectively by the at least one processor, the electronic device may obtain the biometric information of the electronic device user as part of the situational information regarding the electronic device.

[0102] An electronic device (101, 201) according to one embodiment of the present disclosure may include a communication circuit (190, 290), a display (160, 260), a memory (130, 230) for storing commands, and at least one processor (120, 220). When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may be able to verify text to be transmitted to a designated user through a message application. For example, when the commands are executed individually or collectively by the at least one processor, the electronic device may be able to verify text to be transmitted to a designated user when a character to be transmitted is entered by a user through the message input area of ​​the message application or when a recommended character is displayed. When the commands are executed individually or collectively by the at least one processor, the electronic device may be able to obtain conversation history information including a received message received from the designated user and / or a transmitted message transmitted to the designated user. When the above commands are executed individually or collectively by the at least one processor, the electronic device may be configured to generate a plurality of images, including a first image object corresponding to the text and a second image object corresponding to the conversation history information, using at least one artificial intelligence model. For example, the first image object may include an object representing text corresponding to a message entered or recommended by a user (e.g., characters entered by the user of the electronic device to send to another party). For example, the second image object may include an object corresponding to a keyword identified using the conversation history information (e.g., a keyword identified in a previously exchanged history).For example, the object may include graphic elements within the image representing a person, animal, object, building, place, facial expression, mood, or time. When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may cause a plurality of images to be displayed differently according to priority (e.g., layout, emphasis). When the commands according to one embodiment are executed individually or collectively by the at least one processor, the electronic device may cause at least one image selected by a user among the plurality of images to be transmitted through a communication circuit (190, 290). When the commands are executed individually or collectively by the at least one processor, the electronic device may cause the plurality of images to be displayed on the user interface of the message application through the display. When the commands are executed individually or collectively by the at least one processor, the electronic device may cause the selected image among the plurality of images to be transmitted to the designated user through a communication circuit (190, 290). When the above commands are executed individually or collectively by the at least one processor, the electronic device may transmit the selected image among the plurality of images together with text corresponding to a message entered or recommended by the user (e.g., characters entered by the user of the electronic device to send to the other party). When the above commands are executed individually or collectively by the at least one processor, the electronic device may transmit the selected image among the plurality of images instead of the text corresponding to a message entered or recommended by the user (e.g., characters entered by the user of the electronic device to send to the other party).

[0103] An electronic device according to one embodiment (e.g., the electronic device (101) of FIG. 1 or the electronic device (201) of FIG. 2) may include a communication circuit (e.g., the communication module (190) of FIG. 1 or the communication circuit (290) of FIG. 2), a display (e.g., the display (160) of FIG. 1 or the display (260) of FIG. 2), a memory for storing commands (e.g., the memory (130) of FIG. 1 or the memory (230) of FIG. 2), and at least one processor (e.g., the processor (130) of FIG. 1 or the processor (230) of FIG. 2). The commands according to one embodiment, when executed individually or collectively by the at least one processor, may cause the electronic device to identify an event for transmitting a message to a specific counterparty. The commands, when executed individually or collectively by the at least one processor, may cause the electronic device to use at least one message application to communicate with the specific counterparty, including at least one of a received message received from the specific counterparty or a transmitted message transmitted to the specific counterparty. The history can be acquired. When executed individually or collectively by the at least one processor, the above commands may cause the electronic device to identify a plurality of keywords associated with the conversation history. When executed individually or collectively by the at least one processor, the above commands may cause the electronic device to generate a plurality of images corresponding to each of the plurality of keywords associated with the conversation history. When executed individually or collectively by the at least one processor, the above commands may cause the electronic device to display the plurality of images through the display in or adjacent to the keyboard interface.When the above commands are executed individually or collectively by the at least one processor, the electronic device may transmit a selected image among the plurality of images to the specific counterpart as at least part of the message.

[0104] FIG. 3 is a flowchart illustrating the operation of generating and transmitting an image using conversation history information according to one embodiment.

[0105] Referring to FIG. 3, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device according to one embodiment (e.g., electronic device (101) of FIG. 1 or electronic device (201) of FIG. 2) can perform at least one of 310 to 350 operations.

[0106] In operation 310, a processor (220) according to one embodiment may acquire (and / or store) conversation history information (or conversation history) including received messages received from a designated user and / or transmitted messages sent to a designated user during a designated period through at least one application using at least one message application. The conversation history information according to one embodiment may include messages exchanged between a user of the electronic device (201) and a designated user through one message application or through multiple message applications during a designated period. The conversation history information according to one embodiment may include messages of a designated data size among messages exchanged between a user of the electronic device (201) and a designated user through one or multiple message applications. For example, the processor (220) may select messages (e.g., recent messages) of a data capacity (or size) that can be processed at once by the electronic device (201) (or the first artificial intelligence model (232) and / or the second artificial intelligence model (234) of the electronic device (201)) among messages exchanged between the user of the electronic device (201) and a designated user through one or more message applications. For example, if the data capacity that can be processed at once by the electronic device (201) (or the first artificial intelligence model (232) and / or the second artificial intelligence model (234) of the electronic device (201)) is 100 characters of text, the processor (220) may select recent exchanged messages of 100 characters of text as conversation history information.

[0107] According to one embodiment, conversation history information may include at least one message included in a message application screen displayed through a display (260). According to one embodiment, the transmitted message and / or received message may include text (e.g., characters), images (e.g., photos, videos, emoticons, and / or AI images), and / or audio (e.g., music or voice).

[0108] In operation 320, a processor (220) according to one embodiment can identify an event for sending a message while displaying a message application screen through a display (260). When user input (e.g., touch input) is received for an input area of ​​the message application screen, the processor (220) according to one embodiment can call a keyboard function and further display a keyboard (or keyboard area) on the message application screen through the display (260). Based on the call of the keyboard function, the processor (220) according to one embodiment can identify an event for sending a message to a designated user corresponding to the conversation partner. When conversing with multiple users, the processor (220) according to one embodiment can infer (or predict) the designated user to whom the user of the electronic device (201) wishes to send a message in a predetermined manner (e.g., the most recently conversed user) based on conversation history information, and identify an event for sending a message to the designated user. When conversing with multiple users, the processor (220) according to one embodiment can perform an image generation process for each of the multiple users and allow the user to select from the generated images.

[0109] In operation 330, a processor (220) according to one embodiment may identify at least one keyword associated with conversation history information with a designated user by using a first artificial intelligence model (232) based on event identification for sending a message to a designated user. A processor (220) according to one embodiment may generate a prompt (e.g., a first prompt) requesting at least one keyword associated with conversation history information with a designated user and input it into the first artificial intelligence model (232), and may identify (or obtain) at least one keyword associated with conversation history information with a designated user by using the first artificial intelligence model (232). A processor (220) according to one embodiment may identify at least one keyword associated with conversation history information with a designated user and a message input by the user through a keyboard function by using the first artificial intelligence model (232). A processor (220) according to one embodiment can use a first artificial intelligence model (232) to identify at least one keyword associated with conversation history information with a designated user and a message recommended by the electronic device (201). A processor (220) according to one embodiment can use a first artificial intelligence model (232) to identify at least one keyword associated with conversation history information with a designated user and information (e.g., biometric information (e.g., exercise status, emotion, heart rate information, and / or blood sugar information) received from an external electronic device (e.g., external electronic device (102) of FIG. 1) connected to the electronic device (201) via communication (e.g., short-range wireless communication) (e.g., wearable electronic device, IoT device, in-vehicle electronic device, and / or other electronic device). A processor (220) according to one embodiment can use a first artificial intelligence model (232) to identify at least one keyword associated with conversation history information with a designated user and a plurality of keywords obtained based on conversation history information with a designated user.A processor (220) according to one embodiment may display at least one identified (or acquired) keyword through a display (260). A processor (220) according to one embodiment may edit and use at least one keyword displayed through the display (260) based on user input.

[0110] In operation 340, a processor (220) according to one embodiment may display an image generated based on at least one keyword (or at least one keyword edited based on user input) and / or at least part of context information about the electronic device (201) on a message application screen via a display (260) using a second artificial intelligence model (234). A processor (220) according to one embodiment may obtain context information about the electronic device (201) based on event identification for sending a message to a designated user. Context information about the electronic device (201) according to one embodiment may include the location (or place) of the electronic device (201) (or user of the electronic device (201)) or the time at which an event for sending a message from the electronic device (201) was identified. A processor (220) according to one embodiment may input (or transmit) to a second artificial intelligence model (234) a prompt (e.g., a second prompt) requesting image generation using at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201). A processor (220) according to one embodiment may input (or transmit) to a second artificial intelligence model (234) a second prompt requesting image generation using at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201), in addition to a specified (or selected) image (e.g., an image selected from images given or received included in conversation history information or an image selected by the user from an album) (or an image style).A processor (220) according to one embodiment may input (or transmit) a second prompt requesting image generation to a second artificial intelligence model (234) by further using a pre-specified (or pre-defined) image style in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201). A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing information (e.g., biometric information (e.g., exercise status, emotion, heart rate information, and / or blood glucose information) received from an external electronic device (e.g., external electronic device (102) of FIG. 1) connected to the electronic device (201) via communication (e.g., short-range wireless communication) in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201). A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing information on the user's emotional state in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201). According to one embodiment The processor (220) may input a second prompt requesting image generation into the second artificial intelligence model (234) by further utilizing a photo and / or image associated with a specified user's account in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201).A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing personal information about a designated user (or personal information learned about a designated user) (e.g., the designated user's nationality, language, favorite food, and / or other designated user information) in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201). A processor (220) according to one embodiment may input a second prompt requesting image generation into a second artificial intelligence model (234) by further utilizing a meme retrieved based on conversation history information in addition to at least one keyword (or at least one keyword edited based on user input) and / or context information about the electronic device (201). A processor (220) according to one embodiment may specify the priority of the information used to request image generation. For example, the processor (220) may include information in the second prompt that, if at least one keyword (e.g., “I am going to Gangnam Station”) and context information (e.g., “Current location information (Paris)”) are conflicting, the context information is given higher priority and is given priority in generating the image.

[0111] A processor (220) according to one embodiment may acquire at least one image (one or multiple images) generated through the second artificial intelligence model (234) based on the second prompt being input (or transmitted) to the second artificial intelligence model (234). A processor (220) according to one embodiment may display at least one image (one or multiple images) generated through the second artificial intelligence model (234) on a message application screen via a display (260). A processor (220) according to one embodiment may display at least one image generated through the second artificial intelligence model (234) on an area related to the keyboard function of the message application screen via the display (260) (e.g., around the keyboard area or an area adjacent to the keyboard area). If multiple images are generated through the second artificial intelligence model (234), a processor (220) according to one embodiment may display the multiple images arranged according to priority (e.g., listed up). For example, the processor (220) may identify an image containing characters among multiple images with a relatively higher priority than other images and display the image containing characters at a designated location (e.g., top or left) in an area related to keyboard functions. For example, the processor (220) may identify an image containing a designated user's face image among multiple images with a relatively higher priority than other images and display the image containing the designated user's face image at the top or left of an area related to keyboard functions. For example, the processor (220) may identify an image similar to an image included in conversation history information among multiple images with a relatively higher priority than other images and display the image similar to an image included in conversation history information at the top or left of an area related to keyboard functions.

[0112] In operation 350, a processor (220) according to one embodiment may transmit an image as at least part of a message to a designated user through a communication circuit (290). A processor (220) according to one embodiment may select an image to be transmitted as part of a message from among at least one image displayed around a keyboard area via user input. When an image to be transmitted as part of a message is selected from among at least one image, the processor (220) according to one embodiment may delete other images other than the selected image from the electronic device (201). A processor (220) according to one embodiment may transmit the image selected to be transmitted as part of a message to a designated user based on user input. A processor (220) according to one embodiment may store metadata in memory (230) together (or associated with each other) that includes at least a portion of the transmitted image and the information used to generate the transmitted image (e.g., conversation history information, at least one keyword, context information, specified user information, application information, number of uses, characters used, text messages transmitted together with (or associated with) the image, a first prompt, and / or a second prompt).

[0113] A method for generating an image using conversation history in an electronic device (101, 201) according to one embodiment of the present disclosure may include an operation of obtaining conversation history information including a received message received from a designated user and / or a transmitted message transmitted to the designated user using at least one message application. The method may include an operation of identifying an event for transmitting a message to the designated user through a first message application. For example, the first message application may refer to a message application among at least one message application that is currently running and has an input window for the user to compose a message activated. For example, the first message application may be a message application other than at least one message application. The method may include an operation of identifying a keyword (e.g., at least one keyword) associated with the conversation history information using a first artificial intelligence model. The method may include an operation of generating an image based on the keyword and at least a portion of context information regarding the electronic device using a second artificial intelligence model. The method may include an operation of displaying the image through the display as at least a portion of the message. According to one embodiment, the received message may be received through a message application other than the first message application. According to one embodiment, the collection of conversation history (e.g., received messages and / or sent messages) may be collected from each of one or more message applications, and received messages may be collected, sent messages may be collected, or sent and received messages may be collected from each of one or more message applications.

[0114] The method according to one embodiment may include an operation of generating the image based at least partially on the keyword and the context information regarding the electronic device using the second artificial intelligence model when the event is identified through the first message application. The method may include an operation of generating an image different from the image based at least partially on the keyword and the context information regarding the electronic device using the second artificial intelligence model when the event is identified through the second message application.

[0115] The method according to one embodiment may include an operation of generating a first prompt including conversation history information in response to the event identification. The method may include an operation of identifying a keyword selected from a plurality of keywords based on the conversation history information through the first artificial intelligence model by inputting the first prompt into the first artificial intelligence model trained to generate text information.

[0116] The method according to one embodiment may include an operation of generating a second prompt including the keyword and the situation information regarding the electronic device. The method may include an operation of obtaining the image generated using the keyword and the situation information through the second artificial intelligence model by inputting the second prompt to the second artificial intelligence model trained to generate image information.

[0117] In the method according to one embodiment, the situation information regarding the electronic device may include the location of the electronic device or the time at which the event was identified in the electronic device. The image may include a first graphic object representing at least one of the location or the time.

[0118] The method according to one embodiment may include an operation of displaying a user interface containing at least a portion of the conversation history information through a display of the electronic device. The method may include an operation of identifying the event based on the invocation of a keyboard function through the user interface. The method may include an operation of inputting the conversation history information and the identified text into the first artificial intelligence model when text entered by a user through the keyboard function or designated by the electronic device is identified, and identifying the keyword associated with the identified text and the conversation history information through the first artificial intelligence model.

[0119] In the method according to one embodiment, the image may be one of a plurality of images generated using the second artificial intelligence model. The method may include an operation of displaying at least some of the plurality of images through the display in an area related to the keyboard function of the user interface. When the image is selected from at least some of the plurality of images, the method may include an operation of storing metadata including the image and the keyword corresponding to the image together in the memory.

[0120] The method according to one embodiment may include the operation of receiving biometric information of the electronic device user from a wearable electronic device that communicates with the electronic device through the communication circuit. The method may include the operation of obtaining the biometric information of the electronic device user as part of the situational information regarding the electronic device.

[0121] FIG. 4 is a diagram showing examples of a first prompt and a second prompt when generating an image using a first artificial intelligence model and a second artificial intelligence model in an electronic device according to one embodiment.

[0122] Referring to FIG. 4, a processor (220) according to one embodiment can identify an event for sending a message to a conversation partner (e.g., a designated user) when a keyboard function is called upon receiving user input (e.g., touch input) for an input area of ​​a message application screen. Based on the identification of the event for sending a message to the designated user, the processor (220) according to one embodiment can (generate) and transmit a first prompt to a first artificial intelligence model (232).

[0123] A processor (220) according to one embodiment may transmit a first prompt to a first artificial intelligence model (232) requesting at least one keyword associated with conversation history information with a designated user. A processor (220) according to one embodiment may transmit a first prompt to a first artificial intelligence model (232) requesting at least one keyword associated with conversation history information with a designated user and a message entered by the user through a keyboard function. A processor (220) according to one embodiment may transmit a first prompt to a first artificial intelligence model (232) requesting at least one keyword associated with conversation history information with a designated user and a message recommended for transmission by an electronic device (201). A processor (220) according to one embodiment may transmit a first prompt to a first artificial intelligence model (232) requesting at least one keyword associated with information (e.g., biometric information (e.g., exercise status, emotion, heart rate information, and / or blood sugar information) received from an external electronic device (e.g., external electronic device (102) of FIG. 1) connected via communication (e.g., short-range wireless communication) with the electronic device (201) and conversation history information with a designated user. A processor (220) according to one embodiment may transmit a first prompt to a first artificial intelligence model (232) requesting at least one keyword associated with a plurality of keywords obtained based on conversation history information with a designated user and conversation history information with a designated user. The information included in the first prompt to request at least one keyword according to one embodiment may not be limited to the examples described above, and a combination of at least some or all of the information mentioned above may be possible.

[0124] A processor (220) according to one embodiment may identify (or obtain) at least one keyword generated in response to a first prompt through a first artificial intelligence model (232). A processor (220) according to one embodiment may identify at least one keyword using a conversation history through the first artificial intelligence model (232), and the at least one keyword may include text included in the conversation history or other text associated with text included in the conversation history. A keyword according to one embodiment may include a word, phrase, and / or sentence expressing the topic of the conversation history (or content). A keyword according to one embodiment may include the name of a person, animal, object, and / or place, and may include text representing an event (incident), to-do, and / or schedule related to the conversation history (or content). For example, keywords may include text representing events such as travel, meetings, birthdays and / or graduations, or tasks such as booking a train ticket to Busan on January 1st and / or sightseeing in downtown Paris in the evening, or schedules related to a specific time (e.g., tomorrow morning).

[0125] A processor (220) according to one embodiment may transmit a second prompt requesting image generation to a second artificial intelligence model based on at least a portion of context information regarding at least one keyword and / or electronic device (201). A processor (220) according to one embodiment may transmit a second prompt requesting image generation to a second artificial intelligence model (234) based on context information regarding at least one keyword and / or electronic device (201) and a designated (or selected) image (e.g., an image selected from among images given or received included in conversation history information). A processor (220) according to one embodiment may transmit a second prompt requesting image generation to a second artificial intelligence model (234) using context information regarding at least one keyword and / or electronic device (201) and a pre-designated (or pre-defined) image style. A processor (220) according to one embodiment may transmit a second prompt requesting image generation to a second artificial intelligence model (234) using information (e.g., biometric information (e.g., exercise status, emotion, heart rate information, and / or blood glucose information) received from an external electronic device (e.g., external electronic device (102) of FIG. 1) connected to the electronic device (201) via communication (e.g., short-range wireless communication) in addition to context information regarding at least one keyword and / or electronic device (201). A processor (220) according to one embodiment may transmit a second prompt requesting image generation to a second artificial intelligence model (234) using context information regarding at least one keyword and / or electronic device (201) and information on the user's emotional state.A processor (220) according to one embodiment may transmit a second prompt to a second artificial intelligence model (234) requesting image generation using context information about at least one keyword and / or electronic device (201) and a photo and / or image associated with a designated user's account. A processor (220) according to one embodiment may transmit a second prompt to a second artificial intelligence model (234) requesting image generation using context information about at least one keyword and / or electronic device (201) and personal information about a designated user (or personal information learned about a designated user) (e.g., the designated user's nationality, language, favorite food, and / or other designated user information). A processor (220) according to one embodiment may transmit a second prompt to a second artificial intelligence model (234) requesting image generation using context information about at least one keyword and / or electronic device (201) and a meme retrieved based on conversation history information. A processor (220) according to one embodiment may specify the priority of information used to request image generation and include priority information in a second prompt to be considered first when generating an image. The information included in the second prompt to request image generation according to one embodiment may not be limited to the examples described above, and a combination of at least some or all of the information mentioned above may be possible.

[0126] A processor (220) according to one embodiment may acquire at least one image (one or multiple images) generated through the second artificial intelligence model (234) based on the second prompt being input (or transmitted) to the second artificial intelligence model (234). According to one embodiment, the at least one image (one or multiple images) generated through the second artificial intelligence model (234) may include an object (e.g., an object image) that represents or symbolizes at least one keyword obtained based on conversation history (or content). For example, if at least one keyword includes a trip to Paris, the at least one image (one or multiple images) generated through the second artificial intelligence model (234) may include an Eiffel Tower object (Eiffel Tower image) that represents or symbolizes a trip to Paris. A processor (220) according to one embodiment may display the at least one image (one or multiple images) generated through the second artificial intelligence model (234) on a message application screen via a display (260). A processor (220) according to one embodiment may display at least one image generated through a second artificial intelligence model (234) on a display (260) in an area related to the keyboard function of a message application screen (e.g., around the keyboard area or an area adjacent to the keyboard area). At least one image generated through the second artificial intelligence model (234) according to one embodiment may include a still image or a video. A processor (220) according to one embodiment may automatically save keywords to a clipboard. When at least one image displayed through the display (260) is selected and a transmission request is made, the processor (220) according to one embodiment may transmit keywords stored in association with at least one image together with at least one image.

[0127] According to one embodiment, at least some or all of the first artificial intelligence model (232) and the second artificial intelligence model (234) may be included in an external device (e.g., a server (108)). According to one embodiment, the processor (220) may use at least some or all of the first artificial intelligence model (232) and the second artificial intelligence model (234) included in the external device through communication via a communication circuit (290) when at least some or all of the first artificial intelligence model (232) and the second artificial intelligence model (234) are included in the external device. According to one embodiment, the first artificial intelligence model (232) and the second artificial intelligence model (234) may correspond to functional elements included in a single artificial intelligence model. According to one embodiment, when the first artificial intelligence model (232) and the second artificial intelligence model (234) correspond to functional elements included in a single artificial intelligence model, the first prompt and the second prompt may be transmitted to the single artificial intelligence model separately or integrated. A processor (220) according to one embodiment can identify at least one keyword associated with conversation history information through one artificial intelligence model and acquire at least one image generated based on at least one keyword and at least a portion of context information about an electronic device.

[0128] FIG. 5 is a diagram illustrating an example of generating an image based on at least one keyword based on conversation history information according to one embodiment and situation information of an electronic device.

[0129] Referring to FIG. 5, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device according to one embodiment (e.g., electronic device of FIG. 1 or electronic device (201) of FIG. 2) may display a message application screen (510) based on the execution of a message application. For example, the message application may be a chatting application, an instant message application, an SMS (short message service) message application, a SNS (social network service) application, an email application, a content sharing service application (e.g., a comment window of a content sharing service application), or any other application that can exchange messages in a manner that converses with another party.

[0130] A message application screen (510) according to one embodiment may include a conversation screen for exchanging messages with a counterparty (e.g., a designated user). A message application screen (510) according to one embodiment may include information (512) (e.g., user name, user ID, phone number, or user account) (e.g., Kim Samsung) of a counterparty (e.g., a designated user) with whom a user of the electronic device (201) exchanges conversation messages (e.g., Kim Samsung), a message display area (514), and a message input area (516). A processor (220) according to one embodiment may display a received message received from a designated user through the message application screen (510) and a transmitted message entered by a user of the electronic device (201) through the message input area (516) in the message display area (514). The received message and the transmitted message displayed in the message display area (514) may be included in conversation history information. A processor (220) according to one embodiment may call a keyboard function and display a keyboard area (518) on a message application screen (510) when user input (e.g., touch input) is received for a message input area (516). The keyboard area (518) may include a keyboard and a message recommendation area (519). A processor (220) according to one embodiment may display a message recommended by an electronic device (201) in the message recommendation area (519).

[0131] A processor (220) according to one embodiment may identify an event for displaying a keyboard area (518) and sending a message to a designated user based on the keyboard function being called. Based on the identification of the event for sending a message to a designated user, the processor (220) according to one embodiment may generate (or acquire or identify) a first prompt (52) requesting at least one keyword associated with conversation history information with the designated user and input it into a first artificial intelligence model (232). For example, the first prompt (52) may include input information such as, “The following is the content of a conversation exchanged with a friend. Extract conversation topics, emotions, and situational information that can be identified from the conversation in word form, and tell me at least one keyword (for image generation) using the extracted words.” The input information input into the first prompt (52) according to one embodiment may include other phrases if it is a phrase requesting at least one keyword for image generation from conversation history information.

[0132] A processor (220) according to one embodiment can identify (or obtain) at least one keyword (54) associated with conversation history information with a designated user through the first artificial intelligence model (232) based on the input of a first prompt (52) to the first artificial intelligence model (232). For example, the processor (220) can obtain output information such as “an evening trip paris” as at least one keyword (54) associated with conversation history information with a designated user through the first artificial intelligence model (232). The output information according to one embodiment may include different phrases depending on the learning content, input information, input time, and / or performance of the first artificial intelligence model (232).

[0133] A processor (220) according to one embodiment can obtain situational information such as location information: Paris, time information: night, and weather information: rain if the user is traveling in the Paris region, it is currently night, and it is raining. A processor (220) according to one embodiment may also obtain additional situational information by analyzing the calendar schedule or social network service activities of the electronic device (201). A processor (220) according to one embodiment can obtain keywords such as “an evening trip paris” by transmitting a first prompt containing location information: Paris, time information: night, weather information: rain, and situational information obtained by analyzing the calendar schedule or social network service activities to a first artificial intelligence model (232).

[0134] A processor (220) according to one embodiment may generate (or acquire or identify) a second prompt (56) requesting the creation of an image using context information for at least one keyword and / or electronic device (201). For example, the second prompt (56) may include input information such as “Please draw an image that expresses your feelings in a “an evening trip in Paris” situation” according to the style below. The styles are cute icon color line art, white background.” The input information entered into the second prompt (56) according to one embodiment may include other phrases if it is a phrase requesting the creation of an image using context information for at least one keyword and / or electronic device (201).

[0135] A processor (220) according to one embodiment may obtain at least one image (multiple images are described as examples in FIG. 5) (58) generated through the second artificial intelligence model (234) based on the second prompt (56) being input (or transmitted) to the second artificial intelligence model (234). For example, the second artificial intelligence model (234) may generate an image containing a graphic object representing the scenery of the Eiffel Tower at night in Paris in response to a situation where the user is traveling in the Paris region and it is currently night. For another example, the second artificial intelligence model (234) may generate an image containing a graphic object representing the scenery of the Eiffel Tower during a rainy day in Paris in response to a situation where the user is traveling in the Paris region and it is currently day and it is raining. In the second artificial intelligence model (234), different images may be generated even if the same prompt is input, depending on the learning content, input information, input timing, and / or performance of the second artificial intelligence model (234).

[0136] A processor (220) according to one embodiment can display a plurality of images (58) generated through a second artificial intelligence model (234) in an area (517) adjacent to or around the keyboard area (518) of a message application screen (510).

[0137] A processor (220) according to one embodiment can transmit an image (e.g., 517-1) selected to be transmitted as part of a message to a designated user based on user input.

[0138] FIG. 6 is a diagram illustrating an example of generating an image based on at least one keyword and situation information of an electronic device based on conversation history information and a user input message according to one embodiment.

[0139] Referring to FIG. 6, when an event for sending a message to a designated user is identified as the keyboard area (518) is displayed, the processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device according to one embodiment (e.g., electronic device of FIG. 1 or electronic device (201) of FIG. 2) may generate (or acquire or identify) a first prompt (62) requesting conversation history information with the designated user and at least one keyword associated with a message (e.g., tired) entered by the user in the input area (516) via the keyboard, and input it into a first artificial intelligence model (232). For example, the first prompt (62) may include input information such as, “The following is the content of a conversation exchanged with a friend. Extract conversation topics, emotions, and situational information that can be identified from the conversation in word form, and tell me at least one keyword for image generation using the extracted words and the text entered via the keyboard.” The input information entered into the first prompt (62) according to one embodiment is conversation history information and via the keyboard If the phrase requests at least one keyword for image generation using a message entered by the user in the input area (516), other phrases may be included.

[0140] A processor (220) according to one embodiment can identify (or obtain) at least one keyword (64) associated with a message entered by a user in an input area (516) via a keyboard and conversation history information with a designated user through the first artificial intelligence model (232) based on the input of a first prompt (62) to the first artificial intelligence model (232). For example, the processor (220) can obtain output information such as “a tired trip” as at least one keyword (64) associated with a message entered by a user in an input area (516) via a keyboard and conversation history information with a designated user through the first artificial intelligence model (232). The output information according to one embodiment may include different phrases depending on the learning content, input information, input time, and / or performance of the first artificial intelligence model (232).

[0141] A processor (220) according to one embodiment may obtain situational information including user location information, time information, weather information and / or calendar schedule or social network service activity information of an electronic device (201).

[0142] A processor (220) according to one embodiment may generate (or acquire or identify) a second prompt (66) requesting the creation of an image using context information regarding at least one keyword and / or an electronic device (201). For example, the second prompt (66) may include input information such as “Please draw an image that expresses your feelings in a “a tired trip” situation” according to the style below. The styles are cute icon color line art, white background.” The input information entered into the second prompt (66) according to one embodiment may include other phrases if they are phrases requesting the creation of an image using context information regarding at least one keyword and / or an electronic device (201).

[0143] A processor (220) according to one embodiment may obtain at least one image (multiple images are described as examples in FIG. 6) (68) generated through the second artificial intelligence model (234) based on the second prompt (66) being input (or transmitted) to the second artificial intelligence model (234). For example, the second artificial intelligence model (234) may generate an image containing a graphic object representing a tired traveler or a person character who is tired while traveling, in response to a situation where the user is traveling and tired. In the second artificial intelligence model (234), different images may be generated even if the same prompt is input, depending on the learning content, input information, input timing, and / or performance of the second artificial intelligence model (234).

[0144] A processor (220) according to one embodiment may display at least one image (e.g., a plurality of images) (68) generated through a second artificial intelligence model (234) in an area (617) adjacent to or around the keyboard area (518) of a message application screen (510).

[0145] A processor (220) according to one embodiment can transmit an image (617-1) selected to be transmitted as part of a message to a designated user based on user input.

[0146] FIG. 7 is a diagram illustrating an example of generating an image based on conversation history information according to one embodiment, at least one keyword based on a message recommended by an electronic device, and context information of an electronic device.

[0147] Referring to FIG. 7, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device according to one embodiment (e.g., electronic device of FIG. 1 or electronic device (201) of FIG. 2) may generate (or acquire or identify) a first prompt (72) requesting at least one keyword associated with a message (e.g., "I'm tired," "I'm okay") recommended by the electronic device (201) in the conversation history information with the designated user and message recommendation area (519) when an event for sending a message to a designated user is identified as the keyboard area (518) is displayed, and input it into a first artificial intelligence model (232). For example, the first prompt (72) may include input information such as, "The following is the content of a conversation exchanged with a friend. Extract conversation topics, emotions, and situational information that can be identified from the conversation in word form. Check what content should be included in the answer sentence and generate an answer sentence based on the conversation content. Tell me at least one keyword for image generation using the extracted words and the answer sentence." One embodiment The input information entered into the first prompt (72) according to the example may include other phrases if it is a phrase requesting at least one keyword for image generation using conversation history information and a message recommended by the electronic device (201).

[0148] A processor (220) according to one embodiment can identify (or obtain) at least one keyword (74) associated with conversation history information with a designated user and a message recommended by the electronic device (201) through the first artificial intelligence model (232) based on the input of a first prompt (72) to the first artificial intelligence model (232). For example, the processor (220) can obtain output information such as “a tired trip” as at least one keyword (74) associated with conversation history information with a designated user and a message recommended by the electronic device (201) through the first artificial intelligence model (232). The output information according to one embodiment may include different phrases depending on the learning content, input information, input timing, and / or performance of the first artificial intelligence model (232).

[0149] A processor (220) according to one embodiment may obtain situational information including user location information, time information, weather information and / or calendar schedule or social network service activity information of an electronic device (201).

[0150] A processor (220) according to one embodiment may generate (or acquire or identify) a second prompt (76) requesting the creation of an image using context information for at least one keyword and / or electronic device (201). For example, the second prompt (76) may include input information such as “Please draw an image that expresses your feelings in a “a tired trip” situation” according to the style below. The styles are cute icon color line art, white background.” The input information entered into the second prompt (76) according to one embodiment may include other phrases if it is a phrase requesting the creation of an image using context information for at least one keyword and / or electronic device (201).

[0151] A processor (220) according to one embodiment may obtain at least one image (multiple images are described as examples in FIG. 7) (78) generated through the second artificial intelligence model (234) based on the second prompt (76) being input (or transmitted) to the second artificial intelligence model (234). For example, the second artificial intelligence model (234) may generate an image containing a graphic object representing a tired traveler or a person character who is tired while traveling, in response to a situation where the user is traveling and tired. In the second artificial intelligence model (234), different images may be generated even if the same prompt is input, depending on the learning content, input information, input timing, and / or performance of the second artificial intelligence model (234).

[0152] A processor (220) according to one embodiment may display at least one image (e.g., a plurality of images) (78) generated through a second artificial intelligence model (234) in an area (717) adjacent to or around the keyboard area (518) of a message application screen (510).

[0153] A processor (220) according to one embodiment can transmit an image (717-1) selected to be transmitted as part of a message to a designated user based on user input.

[0154] FIG. 8 is a diagram illustrating an example of generating an image based on at least one keyword based on conversation history information and a user input message according to one embodiment, situation information of an electronic device, and a selected image.

[0155] Referring to FIG. 8, when an event for sending a message to a designated user is identified as the keyboard area (518) is displayed, the processor (e.g., the processor (120) of FIG. 1 or the processor (220) of FIG. 2) of an electronic device according to one embodiment (e.g., the electronic device of FIG. 1 or the electronic device (201) of FIG. 2) may generate (or acquire or identify) a first prompt (82) that requests conversation history information with the designated user and at least one keyword associated with a message (e.g., OK) entered by the user in the input area (516) via the keyboard, and input it into the first artificial intelligence model (232). For example, the first prompt (82) may include input information such as, “The following is the content of a conversation exchanged with a friend. Extract conversation topics, emotions, and situational information that can be identified from the conversation in word form, and tell me at least one keyword for image generation using the extracted words and the text entered via the keyboard.” The input information entered into the first prompt (82) according to one embodiment may include other phrases if it is a phrase requesting at least one keyword for image generation using conversation history information and a message entered by the user into the input area (516) via the keyboard.

[0156] A processor (220) according to one embodiment can identify (or obtain) at least one keyword (84) associated with a message entered by a user in an input area (516) via a keyboard and conversation history information with a designated user through the first artificial intelligence model (232) based on the input of a first prompt (82) to the first artificial intelligence model (232). For example, the processor (220) can obtain output information such as “OK” as at least one keyword (84) associated with a message entered by a user in an input area (516) via a keyboard and conversation history information with a designated user through the first artificial intelligence model (232). The output information according to one embodiment may include different phrases depending on the learning content, input information, input timing, and / or performance of the first artificial intelligence model (232).

[0157] A processor (220) according to one embodiment can obtain situational information including user location information, time information, weather information and / or calendar schedule or social network service activity information of an electronic device (201).

[0158] A processor (220) according to one embodiment may generate (or acquire or identify) a second prompt (86) requesting the creation of an image using context information for at least one keyword and / or electronic device (201) and a specified (or selected) image (e.g., an image selected from among images given or received included in conversation history information or an image selected by the user from an album) (or image style). For example, the second prompt (86) may include input information such as, “You are a competent sticker creator. When an image is given, identify the image style in detail and create a sticker similar to the given image based on the given word. Create a sticker expressing ‘OK’ based on the attached image.” The input information entered into the second prompt (86) according to one embodiment may include other phrases if they are phrases requesting the creation of an image using context information for at least one keyword and / or electronic device (201).

[0159] A processor (220) according to one embodiment may obtain at least one image (multiple images are described as examples in FIG. 8) (88) generated through the second artificial intelligence model (234) based on the second prompt (86) being input (or transmitted) to the second artificial intelligence model (234). For example, the second artificial intelligence model (234) may generate an image containing a graphic object that reflects the meaning of OK, an image selected from among the images given or received included in the conversation history information, or an image selected from an album by the user. In the second artificial intelligence model (234), different images may be generated even if the same prompt is input, depending on the learning content, input information, input timing, and / or performance of the second artificial intelligence model (234).

[0160] A processor (220) according to one embodiment can display a plurality of images (88) generated through a second artificial intelligence model (234) in an area (817) adjacent to or around the keyboard area (518) of a message application screen (510).

[0161] A processor (220) according to one embodiment can transmit an image (817-1) selected to be transmitted as part of a message to a designated user based on user input.

[0162] FIG. 9 is a diagram showing an example of displaying a recommended image based on conversation history information according to one embodiment.

[0163] Referring to FIG. 9, when an event for sending a message to a designated user is identified as the keyboard area (518) is displayed, the processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device according to one embodiment (e.g., electronic device of FIG. 1 or electronic device (201)) identifies (or selects or determines) at least one image corresponding to a category (e.g., topic, emotion, situation) obtained using conversation history information with the designated user among the images stored in the electronic device (201), and displays at least one image in the image recommendation area (920) as at least one recommended image (e.g., sticker image) (921, 922).

[0164] A processor (220) according to one embodiment may further utilize information of recommended images (e.g., 921, 922) in addition to context information regarding at least one keyword and / or electronic device (201) obtained through a first artificial intelligence model (232) when generating a second prompt requesting image generation. The information of recommended images according to one embodiment may include meta information of recommended images, tag information of recommended images, and / or description information of recommended images. A processor (220) according to one embodiment may obtain description information of recommended images through a separate artificial intelligence model (e.g., a multimodal artificial intelligence model). Description information of recommended images may include keywords related to the description of recommended images. A processor (220) according to one embodiment may obtain a second prompt including context information regarding at least one keyword and / or electronic device (201) obtained through the first artificial intelligence model (232), meta information of recommended images, tag information of recommended images, and / or description information of recommended images. A processor (220) according to one embodiment may acquire at least one image generated through the second artificial intelligence model (234) based on the second prompt being input (or transmitted) to the second artificial intelligence model (234). If the second prompt includes meta information of the recommended image, tag information of the recommended image, and / or description information of the recommended image, the image generated (or output) from the second artificial intelligence model (234) may be an image reflecting the meta information, tag information, and / or description information of the recommended image.

[0165] According to various embodiments of the present disclosure, when sending and receiving conversation messages with a counterparty through a message application, it may be convenient to use at least one artificial intelligence model to acquire and recommend an image (e.g., an image that may be included as part of a transmitted message or a sticker image) that reflects the context, topic, or tone of the previous conversation content with the counterparty and various environmental variables.

[0166] According to various embodiments of the present disclosure, at least one image that may be included in a reply message can be configured to reflect the user's conversation history and situation. For example, if a user enters a word such as "happiness" in a reply message, the electronic device may recommend a character image with a happy expression or an image representing a happy situation as an image that may be included in the reply message. For example, if a user converses about a sad story and enters a word such as "happiness" in a sad situation, the electronic device may recommend an image that represents a comforting feeling of wishing for happiness despite sadness, in accordance with the user's conversation history and situation, as an image that may be included in the reply message.

[0167] The electronic device according to the various embodiments disclosed in this document may be a device of various forms. The electronic device may include, for example, a portable communication device (e.g., a smartphone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a consumer electronics device. The electronic device according to the embodiments of this document is not limited to the devices described above. For example, the wearable device may include an XR (extended reality) device (e.g., an AR (augmented reality) device, a VR (virtual reality) device, a MR (mixed reality) device, or AR glasses).

[0168] An electronic device (201) according to one embodiment may use at least one image captured through at least one camera to generate a second prompt (86) requesting image generation. An electronic device (201) according to one embodiment may generate and provide a 3D image if it provides a 3D display function (e.g., an XR device). The various embodiments of this document and the terms used herein are not intended to limit the technical features described herein to specific embodiments and should be understood to include various modifications, equivalents, or substitutions of said embodiments. In relation to the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of said items unless the relevant context clearly indicates otherwise. In this document, each of the phrases such as “A or B,” “at least one of A and B,” “at least one of A or B,” “A, B or C,” “at least one of A, B and C,” and “at least one of A, B, or C” may include any one of the items listed together in the corresponding phrase, or all possible combinations thereof. Terms such as “first,” “second,” or “first” or “second” may be used simply to distinguish a component from another component and do not limit the components in any other aspect (e.g., importance or order). Where any (e.g., first) component is referred to as “coupled” or “connected” to another (e.g., second) component, with or without the terms “functionally” or “communicationly,” it means that said component may be connected to said other component directly (e.g., wired), wirelessly, or through a third component.

[0169] The term “module” as used in the various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. A module may be a component formed integrally, or a minimum unit of said component or a part thereof that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).

[0170] Various embodiments of the present document may be implemented as software (e.g., program (140)) comprising one or more instructions stored in a storage medium (e.g., internal memory (136) or external memory (138)) readable by a machine (e.g., electronic device (101)). For example, a processor (e.g., processor (120)) of the machine (e.g., electronic device (101)) may call at least one of the one or more instructions stored in the storage medium and execute it. This enables the machine to be operated to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code that can be executed by an interpreter. The storage medium readable by the machine may be provided in the form of a non-transitory storage medium. Here, 'non-temporary' simply means that the storage medium is a tangible device and does not contain a signal (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily.

[0171] In a non-transient storage medium storing commands according to one embodiment, the commands are configured to cause the electronic device (101, 201) to perform at least one operation when executed by the electronic device, wherein the at least one operation may include an operation of obtaining conversation history information including a received message received from a designated user and / or a transmitted message transmitted to the designated user using at least one message application. The at least one operation may include an operation of identifying an event for transmitting a message to the designated user through a first message application. The at least one operation may include an operation of identifying a keyword associated with the conversation history information using a first artificial intelligence model. The at least one operation may include an operation of generating an image based on the keyword and at least a portion of context information regarding the electronic device using a second artificial intelligence model. The at least one operation may include an operation of displaying the image as at least a portion of the message through the display.

[0172] According to one embodiment, the method according to the various embodiments disclosed herein may be provided by being included in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or distributed online (e.g., download or upload) through an application store (e.g., Play Store™) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily created on a device-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.

[0173] According to various embodiments, each component (e.g., module or program) of the components described above may include a singular or multiple entities, and some of the multiple entities may be separated and placed in other components. According to various embodiments, one or more of the components or operations among the aforementioned components may be omitted, or one or more other components or operations may be added. Generally or additionally, multiple components (e.g., module or program) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the multiple components in the same or similar manner as those performed by the corresponding component among the multiple components prior to integration. According to various embodiments, operations performed by the module, program, or other components may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

Claims

1. In an electronic device (101, 201), Communication circuit (190, 290); Display (160, 260); Memory for storing instructions (130, 230); and It includes at least one processor (120, 220), When the above commands are executed individually or collectively by the at least one processor, the electronic device, Acquiring conversation history information including received messages received from a designated user and / or transmitted messages transmitted to said designated user using at least one message application, and Identifying an event for sending a message to the designated user through the first message application, and Using a first artificial intelligence model, keywords associated with the conversation history information are identified, and Using a second artificial intelligence model, an image is acquired based on at least a portion of the context information regarding the keyword and the electronic device, and An electronic device that displays the above image through the above display as at least part of the above message.

2. In Paragraph 1, The above at least one message application includes the first message application and the second message application, and An electronic device in which the received message is received using the first message application and the transmitted message is transmitted using the second message application.

3. In Paragraph 1 or 2, When the above commands are executed individually or collectively by the at least one processor, the electronic device, When the event is identified through the first message application, the second artificial intelligence model is used to generate the image based at least partially on the keyword and the situation information regarding the electronic device, and An electronic device that, when the event is identified through the second message application, uses the second artificial intelligence model to generate an image different from the image based at least partially on the keyword and the situation information regarding the electronic device.

4. In any one of paragraphs 1 through 3, When the above commands are executed individually or collectively by the at least one processor, the electronic device, In response to the above event identification, a first prompt including the above conversation history information is generated, and An electronic device that identifies a keyword selected from a plurality of keywords based on conversation history information through a first artificial intelligence model by inputting a first prompt into a first artificial intelligence model trained to generate text information.

5. In any one of paragraphs 1 through 4, When the above commands are executed individually or collectively by the at least one processor, the electronic device, Generates a second prompt including the above keyword and the above situation information regarding the electronic device, and An electronic device that acquires the image generated using the keyword and the situation information through the second artificial intelligence model by inputting the second prompt into the second artificial intelligence model trained to generate image information.

6. In any one of paragraphs 1 through 5, The above situation information regarding the above electronic device includes the location of the above electronic device or the time at which the event was identified in the above electronic device, and The above image is an electronic device comprising a first graphic object representing at least one of the above location or the above time.

7. In any one of paragraphs 1 through 6, When the above commands are executed individually or collectively by the at least one processor, the electronic device, A user interface including at least a portion of the conversation history information is displayed through the above display, and Identifying the event based on the keyboard function being called through the above user interface, and An electronic device that, when text entered by a user through the keyboard function or designated by the electronic device is identified, inputs the conversation history information and the identified text into the first artificial intelligence model, thereby identifying the keyword associated with the identified text and the conversation history information through the first artificial intelligence model.

8. In any one of paragraphs 1 through 7, The above image is one of a plurality of images generated using the second artificial intelligence model, and When the above commands are executed individually or collectively by the at least one processor, the electronic device, An electronic device that displays at least some of the above plurality of images through the display in an area related to the keyboard function of the user interface.

9. In any one of paragraphs 1 through 8, When the above commands are executed individually or collectively by the at least one processor, the electronic device, An electronic device that stores metadata including the image and the keyword corresponding to the image together in the memory when the image is selected from at least some of the plurality of images.

10. In any one of paragraphs 1 through 9, The above received message includes an image captured through a camera, and The above image is an electronic device comprising a second graphic object representing at least a part of a subject or text symbol included in the above captured image.

11. In any one of paragraphs 1 through 10, When the above commands are executed individually or collectively by the at least one processor, the electronic device, Receiving biometric information of the electronic device user from a wearable electronic device that communicates with the electronic device through the communication circuit, and An electronic device that identifies the biometric information of the user of the electronic device as part of the situational information for the electronic device.

12. A method for generating an image using conversation history in an electronic device (101, 201), The operation of obtaining conversation history information including received messages received from a designated user and / or transmitted messages sent to said designated user using at least one message application; An operation to identify an event for sending a message to the designated user through the first message application; An operation to identify keywords associated with the conversation history information using a first artificial intelligence model; An operation of acquiring an image based on at least a portion of context information regarding the keyword and the electronic device using a second artificial intelligence model; and A method comprising the operation of displaying the above image through the above display as at least part of the above message.

13. In Paragraph 12, When the event is identified through the first message application, the operation of generating the image using the second artificial intelligence model based at least partially on the keyword and the situation information regarding the electronic device; and A method comprising, when the event is identified through the second message application, generating an image different from the image based at least partially on the keyword and the context information regarding the electronic device using the second artificial intelligence model.

14. In Paragraph 12 or 13, An operation to generate a first prompt including the conversation history information in response to the above event identification; An operation of identifying the keyword selected among a plurality of keywords based on the conversation history information through the first artificial intelligence model by inputting the first prompt into the first artificial intelligence model trained to generate text information; The operation of generating a second prompt including the above keyword and the above situation information regarding the electronic device; and The method includes the operation of obtaining the image generated using the keyword and the situation information through the second artificial intelligence model by inputting the second prompt to the second artificial intelligence model trained to generate image information, and The above situation information regarding the above electronic device includes the location of the above electronic device or the time at which the event was identified in the above electronic device, and The above image includes a first graphic object representing at least one of the above location or the above time.

15. In the electronic device (101, 201), Communication circuit (190, 290); Display (160, 260); Memory for storing instructions (130, 230); and It includes at least one processor (120, 220), When the above commands are executed individually or collectively by the at least one processor, the electronic device, Check the text to be sent to a designated user through a messaging application, and Acquire conversation history information including received messages received from the aforementioned designated user and / or transmitted messages transmitted to the aforementioned designated user, and Using at least one artificial intelligence model, a plurality of images are generated, each including a first image object corresponding to the text and a second image object corresponding to the conversation history information. Displaying the above plurality of images on the user interface of the message application through the display, and An electronic device that transmits a selected image among the plurality of images above to the designated user through a communication circuit (190, 290).