Electronic device and conversation message recommendation method using artificial intelligence model in electronic device
The electronic device uses AI to analyze previous messages and environmental factors to generate contextually relevant responses, addressing the limitations of simple suggested replies and enhancing conversational interactions.
Patent Information
- Application Number
- PCT/KR2025/000190
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-21
- Filing Date
- 2025-01-06
- Publication Date
- 2025-08-07
AI Technical Summary
Existing messaging applications on electronic devices often provide simple, context-insensitive suggested replies that do not account for the conversation's context, tone, or environmental variables, limiting their effectiveness in conversational interactions.
An electronic device employs an artificial intelligence model to analyze previous conversation messages and environmental variables to generate contextually relevant and tone-matching response or greeting suggestions, using either an on-device or cloud-based AI model, with filters to ensure appropriateness and accuracy.
Enhances conversational interactions by providing contextually accurate and appropriate response or greeting suggestions, improving user engagement and maintaining a coherent dialogue flow.
Smart Images

Figure KR2025000190_07082025_PF_FP_ABST
Abstract
Description
Methods for Recommending Conversational Messages Using Artificial Intelligence Models in Electronic Devices and Electronic Devices
[0001] Various embodiments of the present invention relate to an electronic device and a method for recommending a conversation message using an artificial intelligence model in the electronic device.
[0002] Thanks to remarkable advancements in information and communication technology and semiconductor technology, the proliferation and use of various electronic devices is rapidly increasing. Electronic devices are being developed to enable users to carry and communicate with one another. An electronic device can refer to any device that performs a specific function based on its embedded software, such as a mobile communication terminal, tablet PC, smartphone, wearable electronic device, audio / video device, desktop / laptop computer, or in-vehicle navigation system.
[0003] Electronic devices can provide interactive messaging services (or applications) that allow users to exchange messages with others. Through the messaging application, the electronic device can allow users to select a contact with whom they wish to communicate and exchange messages with that contact. For example, the electronic device can display messages received from the contact on a chat screen using the messaging application and transmit a user-entered message to the contact.
[0004] Electronic devices can recommend a designated reply phrase before a user types a reply message through a messaging application, or can recommend a reply phrase for a single received message, such as a "Smart Recommend." For example, when a message such as "Hello" is received through a messaging application, the electronic device can recommend a designated recommended reply phrase, such as "Hello" or "Yes, hello," in response to the message "Hello."
[0005] Suggested reply phrases provided through messaging applications on electronic devices may only provide simple sentences as suggested reply messages for a single received message, and may not provide sentences that reflect the context, topic, tone, or various environmental variables (e.g., time, date, or location) of the previous conversation, or emojis.
[0006] According to one embodiment of the present disclosure, when transmitting and receiving a conversation message with a counterpart through a message application, an electronic device can obtain and recommend a conversation message that reflects the context, topic, or tone of a previous conversation with the counterpart and various environmental variables by using an artificial intelligence (AI) model, and a method for recommending a conversation message using an AI model in the electronic device can be provided.
[0007] According to one embodiment of the present disclosure, an electronic device may include a communication circuit, a display, a memory storing instructions, and a processor operatively connected to the communication circuit, the display, and the memory. The instructions, when executed by the processor, may be configured to cause the electronic device to search for a previous conversation message with the other party while a message recommendation function is activated during a conversation screen with the other party displayed on the display. The instructions, when executed by the processor, may cause the electronic device to generate a response request prompt using at least one previous conversation message if there is at least one previous conversation message with the other party within a specified period of time and to transmit the response request prompt to an AI model. The instructions, when executed by the processor, may be configured to cause the electronic device to obtain response messages corresponding to the response request prompt through the AI model and to display the response messages on the conversation screen. The instructions, when executed by the processor, may cause the electronic device to generate a greeting request prompt and transmit the response prompt to an AI model if there is not at least one previous conversation message with the other party within the specified period of time. The above instructions, when executed by the processor, may be configured to cause the electronic device to obtain greeting messages corresponding to the greeting request prompt through the AI model and display the greeting messages on the conversation screen.
[0008] According to one embodiment of the present disclosure, a method for recommending conversation messages using an artificial intelligence model of an electronic device may include an operation of searching for previous conversation messages with a counterpart while a message recommendation function is activated during a conversation screen with the counterpart on a display of the electronic device. If at least one previous conversation message with the counterpart exists within a specified period, a response request prompt may be generated using the at least one previous conversation message and transmitted to an AI model. The method may include an operation of obtaining response messages corresponding to the response request prompt through the AI model and displaying the response messages on the conversation screen. If no previous conversation message with the counterpart exists within the specified period, a greeting request prompt may be generated and transmitted to the AI model. The method may include an operation of obtaining greeting messages corresponding to the greeting request prompt through the AI model and displaying the greeting messages on the conversation screen.
[0009] According to one embodiment of the present disclosure, in a non-transitory storage medium storing commands, the commands are set to cause the electronic device to perform at least one operation when executed by the electronic device, wherein the at least one operation may include: searching for a previous conversation message with the other party while a message recommendation function is activated during a conversation screen with the other party displayed on the display of the electronic device; generating a response request prompt using the at least one previous conversation message if there is at least one previous conversation message with the other party within a specified period and transmitting the response message to an AI model; obtaining response messages corresponding to the response request prompt through the AI model and displaying the response message on the conversation screen; generating a greeting request prompt if there is no previous conversation message with the other party within the specified period and transmitting the greeting request prompt to the AI model; and obtaining greeting messages corresponding to the greeting request prompt through the AI model and displaying the greeting message on the conversation screen.
[0010] FIG. 1 is a block diagram of an electronic device within a network environment according to one embodiment.
[0011] Figure 2 is a schematic block diagram of an electronic device according to one embodiment.
[0012] Figure 3 is an example of a screen for setting a conversation message recommendation function using an AI model according to one embodiment.
[0013] Figure 4 is a drawing showing a conversation screen with a counterpart according to one embodiment.
[0014] FIG. 5 is a flowchart illustrating a conversation message recommendation operation using an AI model in an electronic device according to one embodiment.
[0015] FIG. 6A is a flowchart illustrating a conversation message recommendation operation using a device-based AI model or a cloud-based AI model in an electronic device according to one embodiment.
[0016] Figure 6b is a flowchart continuing from Figure 6a.
[0017] FIG. 7 is a diagram illustrating an operation of generating a response message request prompt according to one embodiment.
[0018] FIG. 8 is a diagram illustrating an example of a dialogue message recommendation screen using an AI model according to one embodiment.
[0019] FIG. 9 is a diagram illustrating an example of a dialogue message recommendation screen using an AI model when a knowledge-based question is received according to one embodiment.
[0020] FIG. 10 is a diagram illustrating an example of a conversation message recommendation screen using an AI model when a reply request prompt that does not include the author of each of the previous conversation messages is used and when a reply request prompt that includes the author of each of the previous conversation messages is used, according to one embodiment.
[0021] FIG. 11 is a diagram illustrating an example of a conversation message recommendation screen when an input of a response request prompt includes a sentence containing an inappropriate expression according to one embodiment.
[0022] FIG. 12a is a drawing showing an example of a screen that displays a conversation message recommendation area instead of a keypad for entering a conversation message when a conversation message recommendation function using an AI model is activated during a conversation screen display according to one embodiment.
[0023] FIG. 12b is a drawing showing an example of a screen in which recommended reply messages are displayed in a reply message recommendation area and a selected reply message is transmitted to the other party when a reply message recommendation function using an AI model according to one embodiment is activated.
[0024] Figure 13 is a diagram illustrating a generative artificial intelligence system according to one embodiment.
[0025] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to an embodiment. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) and the server (108) via a second network (199) (e.g., a long-range wireless communication network). According to an embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0026] The processor (120) may 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, for example, software (e.g., a program (140)), and may perform various data processing or calculations. According to one embodiment, as at least a part of the data processing or calculation, the processor (120) may store a command or data received from another component (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the command or data stored in the volatile memory (132), and store the resulting data in a 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 a secondary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together therewith. For example, if the electronic device (101) includes a main processor (121) and a secondary processor (123), the secondary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a specified function. The secondary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0027] The auxiliary processor (123) may control at least a part of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, 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. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can 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 can include multiple artificial neural network layers.The artificial neural network may be one of 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, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0028] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0029] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0030] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0031] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. According to one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0032] The display module (160) can visually provide information to an external party (e.g., a 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 the 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 a force generated by the touch.
[0033] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0034] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0035] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In 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.
[0036] The connection terminal (178) may include a connector through which the electronic device (101) may 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).
[0037] A haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0038] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0039] 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 as, for example, at least a part of a power management integrated circuit (PMIC).
[0040] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0041] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the 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 operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that 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., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as 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 can 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 verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0042] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), 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), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) may support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0043] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). According to one embodiment, the antenna module (197) may include an antenna including a radiator formed 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 the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the selected at least one antenna. According to some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).
[0044] 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 a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.
[0045] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
[0046] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via 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 executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an 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 process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the 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.
[0047] In the detailed description below, reference numerals in the drawings may be used interchangeably or omitted for components that can be easily understood through the preceding embodiments, and their detailed descriptions may also be omitted. An electronic device according to an embodiment disclosed in this document may be implemented by selectively combining components of different embodiments, and components of one embodiment may be replaced by components of another embodiment. For example, it should be noted that the present invention is not limited to specific drawings or embodiments.
[0048] Figure 2 is a block diagram of an electronic device according to one embodiment.
[0049] Referring to FIG. 2, an electronic device (201) according to an embodiment (e.g., the electronic device (101) of FIG. 1) may include a processor (220), a memory (230), a display (260), and a communication circuit (290). The electronic device (201) according to an embodiment is not limited thereto and may further include various components or may be configured by excluding some of the components. The electronic device (201) according to an embodiment may further include all or part of the electronic device (101) illustrated in FIG. 1.
[0050] A processor (220) according to an 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 (e.g., AI chip) specialized for processing artificial intelligence (AI) models. The processor (220) according to an embodiment may perform overall control operations of the electronic device (201), and may perform a conversation message recommendation (or suggestion) operation using an AI model.
[0051] According to one embodiment, a processor (220) may display a conversation screen for exchanging conversation messages with a counterpart on a display (260) based on the execution of a message application (e.g., a conversational message application). For example, the message application may be a chatting application, an instant message application, an SMS (short message service) message application, or any other application that allows exchanging messages in a conversational manner with a counterpart.
[0052] According to an embodiment, the processor (220) may identify whether a conversation message recommendation function is activated while a conversation screen with a counterpart is displayed on the display (260). According to an embodiment, the counterpart may refer to another user who exchanges conversation messages with the user of the electronic device (201), and the user and the counterpart may each use a unique user ID, phone number, or user account. According to an embodiment, the conversation message recommendation function may be a message recommendation function using an AI model. According to an embodiment, if the conversation message recommendation function is not activated while a conversation screen with the counterpart is displayed, the processor (220) may not recommend conversation messages with the counterpart.
[0053] According to one embodiment, the processor (220) can check previous conversation messages with the other party when the conversation message recommendation function is activated while displaying a conversation screen with the other party.
[0054] According to one embodiment, the processor (220) can determine (or identify or confirm) whether a previous conversation message with the other party exists within a specified period based on the results of checking the previous conversation message with the other party. For example, the specified period may be 24 hours or several days, or may be specified as a shorter or longer period.
[0055] According to one embodiment, the processor (220) may generate a response request prompt using a previous conversation message with the other party if there is a previous conversation message with the other party within a specified period.
[0056] In one embodiment, a response request prompt may include natural language or a function (or command) to be input into an AI model to recommend a response message that reflects the context, topic, tone, and various variables (e.g., language, time, date, or location) of the content of a previous conversation message with the other party, or emojis.
[0057] For example, a response request prompt may be structured as shown in Table 1 below.
[0058] 답변 요청 프롬프트**Instruction:**The input text below is a group conversation in {source_language} between "Others" and the "User". Using the entire conversation as your context and paying special attention to the last messages, generate four meaningful replies that build on or continue the discussion from the "User" perspective. Please follow these considerations:- Consideration of Conversation Context, Tone, and Emotional State: Pay special attention to the overall context, tone, and emotional state of both the "User" and "Others" participants.- Factual Accuracy: Replies should be consistent with prior messages and should accurately reflect the facts presented in the conversation.- Addressing Unanswered Questions and Comments: Ensure that any questions or comments that "User" may have missed are addressed.- Promotion of Diversity: Generate replies that encompass diverse intents, contexts, or tones.Include one reply that addresses the most recent messages and another that focuses on unanswered questions or comments.- Emphasis on Accuracy: While analyzing the conversation, make a note of any facts and numbers mentioned in messages to enhance the accuracy of your replies.- Maintaining Tone, Intent, and Context: Uphold the tone, intent, and context of the original conversation.- Descriptive Replies: When necessary to address multiple unreplied or unanswered questions or comments, consider providing more detailed and comprehensive responses.- The output must be in {source_language}.- You must always include the appropriate emojis to each response message.- The response message must not exceed 160 characters, including spaces.**Response format:**{"response": ["User: Hello, there. ","User: Hay, How are you today? ,"User: Good morning. ","User: How are you doing? "]}input:"Others: Which season do you like the best among the four seasons?User: I like winter the best among the four seasons!Others: Isn't winter too cold?"output:
[0059] Referring to Table 1 above, a processor (220) according to one embodiment can generate a response request prompt that includes an instruction, a response format, and input. For example, the processor (220) may input the following command: [The input text below is a {source_language} group conversation between "others" and "users." Use the entire conversation as context, paying particular attention to the last message, to generate four meaningful responses that build on or continue the discussion from the "users" perspective. The following considerations should be observed:
[0060] - Consider the context, tone, and emotional state of the conversation: Pay special attention to the overall context, tone, and emotional state of the “user” and “other” participants.
[0061] - Factual Accuracy: Your response must be consistent with previous messages and accurately reflect the facts presented in the conversation.
[0062] - Address unanswered questions and comments: Ensure that any questions or comments that "users" may have missed are addressed.
[0063] - Promote diversity: Create responses that encompass a variety of intents, contexts, and tones. Include one response to the most recent message and one focused on unanswered questions or comments.
[0064] - Emphasize accuracy: While analyzing conversations, note the facts and figures mentioned in the messages to improve the accuracy of your responses.
[0065] - Maintain tone, intent, and context: Maintain the tone, intent, and context of the original conversation.
[0066] - Explanatory Response: If you have multiple unanswered or unanswered questions or comments, consider providing a more detailed and comprehensive response.
[0067] - Output must be in {source_language}.
[0068] - Each response message must always include an appropriate emoticon.
[0069] - The response message cannot exceed 160 characters including spaces.] can be included, and {source_language} can include the recognized language by recognizing the language of the content to be included in the input (or the language of previous conversation messages with the other party) using a language recognition model, or can include the language set in the electronic device (201).
[0070] For example, the processor (220) may send a response format of ["User: Hello, there. ", “User: Hay, How are you today? ", "User: Good morning. ", "User: How are you doing? "] may include content indicating the response format of the reply message.
[0071] For example, if the processor (220) includes as input the content of a previous conversation message with the other party [Which season do you like the best among the four seasons?, I like winter the best among the four seasons!, Isn't winter too cold?], the processor (220) may include information indicating the writer of each message (e.g., user or others) as a prefix of each message included in the content of the previous conversation message, such as “Others: Which season do you like the best among the four seasons? User: I like winter the best among the four seasons! Others: Isn't winter too cold?”
[0072] The response request prompt in Table 1 above is only an example, and the processor (220) may of course generate other response request prompts having different commands, different response formats, and / or different inputs than those in Table 1 above, depending on the content of the previous conversation message with the other party.
[0073] According to one embodiment, the processor (220) can transmit the generated response request prompt to the AI model.
[0074] According to an embodiment, the processor (220) may obtain a response message corresponding to the generated response request prompt through an AI model. According to an embodiment, the processor (220) may obtain a response message corresponding to the response request prompt through an on-device-based AI model (232) (hereinafter also referred to as an AI model (232)) within the electronic device (201) or a cloud-based AI model (not shown) (e.g., an AI model (not shown) included in a server (108)) (hereinafter also referred to as a cloud AI model).
[0075] In one embodiment, the processor (220) may determine (or identify or determine) whether to use the AI model (232) or the cloud AI model for the answer request prompt (and / or the greeting request prompt). In one embodiment, the processor (220) may determine (or identify or determine) whether to pass the answer request prompt (and / or the greeting request prompt) to the AI model (232) or the cloud AI model. In one embodiment, the processor (220) may determine whether to use (or pass) the answer request prompt (and / or the greeting request prompt) to the AI model (232) or the cloud AI model based on setting information, the type of the prompt, the size of the prompt, the communication status with the cloud server, and / or the load level of the electronic device (201).
[0076] According to one embodiment, the processor (220) may store configuration information on whether to use an AI model (232) or a cloud AI model, and if the configuration information indicates that the AI model (232) is to be used, the processor (220) may transmit a response request prompt to the AI model (232). According to one embodiment, if the configuration information indicates that the cloud AI model is to be used, the processor (220) may transmit a response request prompt to the cloud AI model.
[0077] In one embodiment, the processor (220) determines whether to use the AI model (232) or the cloud AI model based on the type of prompt, and transmits the response request prompt to the cloud AI model to improve prompt processing performance and transmits the greeting request prompt to the AI model (232) to reduce time consumed by communication.
[0078] In one embodiment, the processor (220) may determine whether to use the AI model (232) or the cloud AI model based on the size of the prompt (e.g., data size), if the size of the answer request prompt is greater than (or exceeds) a specified data size, the prompt may be passed to the cloud AI model, and if the size of the answer request prompt is less than (or below) the specified data size, the prompt may be passed to the AI model (232). For example, if the answer request prompt is in Korean and has 1,000 or more characters, the processor (220) may pass the answer request prompt to the cloud AI model, and if the answer request prompt is in Korean and has less than 1,000 characters, the processor may pass the answer request prompt to the AI model (232). For example, if the answer request prompt is in English and has 2,500 or more characters, the processor (220) may pass the answer request prompt to the cloud AI model, and if the answer request prompt is in English and has less than 2,500 characters, the processor may pass the answer request prompt to the AI model (232).
[0079] In one embodiment, the processor (220) determines whether to use the AI model (232) or the cloud AI model based on the communication status with the cloud server. If the communication status with the cloud server is normal, the processor may transmit a response request prompt to the cloud AI model, and if the communication status with the cloud server is not normal but bad, the processor may transmit a response request prompt to the AI model (232).
[0080] In one embodiment, the processor (220) may determine whether to use the AI model (232) or the cloud AI model based on the load level of the electronic device (201). If the load of the electronic device (201) (or the processor (220)) is equal to or greater than a specified load (e.g., data processing amount equal to or greater than a specified data processing amount), the processor may transmit an answer request prompt to the cloud AI model, and if the load of the electronic device (201) (or the processor (220)) is equal to or less than a specified load, the processor may transmit an answer DYCJD prompt to the AI model (232).
[0081] According to one embodiment, the processor (220) can obtain at least one response message corresponding to the response request prompt from the AI model (232) or the cloud AI model.
[0082] According to one embodiment, the AI model (232) and the cloud AI model may be used together to obtain at least one response message corresponding to the response request prompt.
[0083] For example, the processor (220) may transmit (or input) the response request prompt corresponding to Table 1 to the AI model (232) or the cloud AI model, and then obtain response messages as shown in Table 2 below from the AI model (232) or the cloud AI model.
[0084] response { 'response': [ "Still, winter is beautiful because it snows. ", "In winter, you can enjoy skiing or snowboarding. ", "Winter is also a good season to eat tangerines. ""Winter is cold, but I like being able to go sledding. " ]}
[0085] Referring to Table 2 above, the processor (220) according to one embodiment responds to the response request prompt corresponding to Table 1 above by saying ["Still, winter is pretty because it snows. ", "In winter, you can enjoy skiing or snowboarding. ", "Winter is also a good season to eat tangerines. ", "Winter is cold, but I like being able to go sledding. "] can be obtained. The response messages in Table 2 above are only examples, and the processor (220) can of course obtain at least one other response message according to another response request prompt. The processor (220) according to one embodiment can verify the input and response messages (e.g., identify inappropriate expressions) using the filter engine (234) (e.g., safety filter). The filter engine (234) according to one embodiment can include software (or a program) for performing an operation of identifying sentences (or texts) including inappropriate expressions (e.g., expressions of a designated expression category) in the input and response messages. For example, the designated expression categories can include categories related to sexual expressions (Sexual), derogatory expressions (Derogatory), bad-mannered expressions (Toxic), violent expressions (Violent), insulting expressions (Insult), profane expressions (Profanity), drug-related expressions (Drugs), and / or other expressions that may cause discomfort to the other party. There is. According to one embodiment, the processor (220) may display the response messages (as is) on the conversation screen if the input or response messages do not contain sentences that include expressions from categories related to sexual expression categories (Sexual), derogatory expression categories (Derogatory), non-manner expression categories (Toxic), violent expression categories (Violent), insulting expression categories (Insult), profane expression categories (Profanity), drug-related expression categories (Drugs), and / or other expressions that may cause discomfort to the other party.In one embodiment, the processor (220) may, when input or reply messages contain sentences that include expressions in the categories of sexual expression (Sexual), derogatory expression (Derogatory), non-mannerly expression (Toxic), violent expression (Violent), insulting expression (Insult), profane expression (Profanity), drug-related expression (Drugs), and / or other expressions that may cause discomfort to the other party, remove and display reply messages containing the sentences instead of displaying the reply messages as they are, or display a message indicating that the input or reply message contains inappropriate content and therefore cannot be recommended. In one embodiment, the processor (220) may, when acquiring reply messages from a cloud AI model of an external electronic device, acquire reply messages from which sentences containing expressions in the categories of sexual expression (Sexual), derogatory expression (Derogatory), non-mannerly expression (Toxic), and / or violent expression (Violent) are removed by the external electronic device, and filter the acquired reply messages. The engine (234) can secondarily remove sentences containing expressions from the Insult category, the Profanity category, and / or the Drugs category.
[0086] According to one embodiment, the processor (220) may obtain a score related to the sexual expression category (Sexual), the derogatory expression category (Derogatory), the unmannerly expression category (Toxic), and / or the violent expression category (Violent) for each of the response messages when obtaining response messages from the cloud AI model of the external electronic device. In one embodiment, the processor (220) may perform an operation of secondarily identifying sentences including expressions of the insulting expression category (Insult), the profanity expression category (Profanity), and / or the drug-related expression category (Drugs) from the response messages through a filter engine (234) when the scores related to the sexual expression category (Sexual), the derogatory expression category (Derogatory), the bad manners expression category (Toxic), and / or the violent expression category (Violent) of the response messages obtained from the cloud AI model of the external electronic device exceed a specified score, thereby calculating scores related to the insulting expression category (Insult), the profanity expression category (Profanity), and / or the drug-related expression category (Drugs) of the response messages. According to one embodiment, the processor (220) may not display the reply message if the scores related to the insulting expression category (Insult), the profane expression category (Profanity), and / or the drug-related expression category (Drugs) of the secondarily generated reply messages are equal to or greater than a specified score (e.g., 1.0), and may display a message indicating that the reply message contains inappropriate content and therefore cannot be recommended as a conversation message.
[0087] According to an embodiment, the processor (220) removes reply messages that include expressions in categories related to sexual expression categories (Sexual), derogatory expression categories (Derogatory), non-manner expression categories (Toxic), violent expression categories (Violent), insulting expression categories (Insult), profane expression categories (Profanity), drug-related expression categories (Drugs), and / or other expressions that may cause discomfort to the other party, and if there are any remaining reply messages, performs output format verification, output content usability verification, and / or output content validity verification on the remaining reply messages, and displays reply messages for which output format verification, output content usability verification, and / or output content validity verification have been completed on the conversation screen.
[0088] According to one embodiment, the processor (220) outputs the response messages in a format that is not a JSON format, such as “Yes, I ate well”, “It’s not yet time, what should I eat?”, “I ate”, “Do you want to eat together?”, if the response messages are in a format that is not a JSON format.
[0089] "User: Yes, it was delicious",
[0090] “User: Not yet, what should I eat?”,
[0091] You can perform output format validation by changing it to JSON format, such as "User: I ate. Would you like to eat together?"
[0092] According to one embodiment, the processor (220) may perform a usefulness verification of output contents by checking a similarity arrangement between response messages through a similarity verification engine and removing (or deleting) one of the two sentences if there are two sentences whose similarity is greater than a specified value (e.g., 0.7 to 0.8), since the usefulness of the response messages may be low when the response messages include multiple similar sentences.
[0093] According to one embodiment, the processor (220) may perform validation of output content to identify and remove sentences including a second language (e.g., Japanese) different from the first language when the input language is a first language (e.g., Korean) and the response messages include sentences including a second language different from the first language. For example, the processor (220) may perform validation of output content to identify sentences including a language different from the input language as invalid sentences by comparing the Unicode of the input language (e.g., Korean Unicode / u0370- / u10FF) with the Unicode of each sentence included in the response messages based on Unicode, and to identify sentences having different Unicodes (e.g., Japanese Unicode 3040 to 31FF), and to identify and remove sentences having different Unicodes from the input language Unicode.
[0094] According to one embodiment, the processor (220) may display sentences that do not include expressions of a specified expression category among the response messages and are not removed as a result of performing output format verification, output content usability verification, and / or output content validity verification, as response messages on the dialogue screen.
[0095] According to one embodiment, the processor (220) may generate a greeting request prompt and transmit it to the AI model (232) or the cloud AI model if there is no previous conversation message with the other party within a specified period, and may obtain a greeting corresponding to the greeting request prompt through the AI model (232) or the cloud AI model and display the greeting on the conversation screen.
[0096] A greeting request prompt according to one embodiment may include natural language or a function (or command) to be input into an AI model (232) or a cloud AI model to recommend a greeting message to be delivered to the other party if there is no previous conversation message with the other party within a specified period of time.
[0097] For example, a greeting request prompt may be structured as shown in Table 3 below.
[0098] Prompt to request a greeting**Instruction:**Recommend a simple greeting sentence for my friend. However, avoid creating informal sentences.- The output must be in {source_language}.- You must always include the appropriate emojis to each response message.**Response format:**["User: Hello. ","User: Hi there! ","User: Nice to meet you :) ","User: Hello, my friend "]input:output:
[0099] Referring to Table 3 above, a processor (220) according to one embodiment may generate a greeting request prompt that includes an instruction, a response format, and an input. For example, the processor (220) may include the following in the command section: [Recommend a simple greeting for my friend, but avoid using everyday sentences. - The output must be in {source_language}.
[0100] - Each response message must always include an appropriate emoticon.], and {source_language} can include the language set in the electronic device (201) using a language recognition model.
[0101] For example, the processor (220) may include ["User: Hello. ", "User: Hi there! ", "User: Nice to meet you :) ", "User: Hello, my friend "] may contain content indicating the response format of the greeting message.
[0102] For example, the processor (220) may not include content in the input section because there is no content of a previous conversation message with the other party.
[0103] The greeting request prompt in Table 3 above is only an example, and the processor (220) can of course generate a greeting request prompt.
[0104] According to one embodiment, the processor (220) may acquire greeting messages corresponding to a greeting request prompt through an AI model (232) or a cloud AI model and display the greeting messages on a conversation screen. According to one embodiment, the processor (220) may store setting information on whether to use the AI model (232) or the cloud AI model, and may acquire greeting messages corresponding to the greeting request prompt using either the AI model (232) or the cloud AI model based on the previously stored setting information.
[0105] For example, the processor (220) may transmit (or input) a greeting request prompt corresponding to Table 3 above to the AI model (232) or the cloud AI model, and then obtain greeting messages as shown in Table 4 below from the AI model (232) or the cloud AI model.
[0106] response { 'response': [ "Hello, it's been a while!!", "Good morning ~ Have a nice day.", "How about a cup of coffee in the morning?" ]}
[0107] Referring to Table 4 above, a processor (220) according to one embodiment can obtain greeting messages including contents such as ["Hello, it's been a while!!", "Good morning ~ have a nice day", "How about a cup of coffee in the morning?"] in response to a greeting request prompt corresponding to Table 3 above, and display the obtained greeting messages on a conversation screen. The greeting message in Table 4 above is only an example, and it will be apparent to those skilled in the art that the processor (220) can obtain other greeting messages according to other greeting request prompts. In one embodiment, when the number of greeting messages obtained from the AI model (232) or the cloud AI model (not shown) is less than a specified number (e.g., 4 or another specified number), the processor (220) may generate an additional greeting message using a greeting data set (e.g., a first greeting data set by time or date) stored in the memory (230) of the electronic device (201), and display the greeting message obtained from the AI model (232) or the cloud AI model (not shown) and the greeting message generated by the electronic device (201) itself on the conversation screen. For example, the processor (220) may generate a greeting message using multiple different greeting data sets according to a specific day (e.g., Chuseok, Lunar New Year), weekdays and weekends, or morning, lunch, and evening. Table 5 below may show examples of greeting data sets according to morning, lunch, and evening.
[0108] Morning (Korean / English)Lunch (Korean / English)Dinner (Korean / English)1. Good morning! 2. It's a refreshing morning. 3. How about a cup of coffee in the morning? 1. Good morning! 2.It's a refreshing. 3.morning How about a cup of coffee this morning? 1. Good afternoon. 2. Did you have a delicious lunch? 3. Are you having a relaxing afternoon? 1. Have a good afternoon! 2. Did you have a delicious lunch? 3. Are you having a relaxing afternoon? 1. Are you having a relaxing evening? 2. How about a cup of warm tea in the evening? 3. Are you resting well? 4. What did you eat for dinner tonight? 1. Are you having a relaxing evening? 2. How about a warm cup of tea in the evening? 3. Are you resting well? 4. What did you have for dinner tonight?
[0109] Referring to Table 5 above, the processor (220) according to one embodiment of the present invention generates “1. Good morning! ” when the number of greeting messages obtained from the AI model (232) or the cloud AI model (not shown) is less than a specified number (e.g., 3), the greeting request prompt generation time is in the morning, and the language of the electronic device (201) is Korean. , 2. It's a refreshing morning. , 3. How about a cup of coffee in the morning? ”The number of greetings (e.g., 1) to fill the specified number of greetings can be obtained, and three greeting messages obtained from the AI model (232) or the cloud AI model (not shown) and one greeting message generated in the electronic device (201) itself can be displayed on the conversation screen. The greeting data set in Table 5 is only an example, and the processor (220) can of course obtain greeting messages within the electronic device (201) using various other greeting data sets. The memory (230) according to one embodiment (e.g., the memory (130) of FIG. 1) can store various data used by at least one component (e.g., the processor (220) and / or the display (260)) of the electronic device (201). The data can include, for example, software (e.g., a software module or program (140)) and input data or output data for commands related thereto. The memory (230) according to one embodiment can store the AI model (232) and the filter. The engine (234) can be stored, and various data generated during program execution can be stored, including a program (e.g., software or the program (140) of FIG. 1) for recommending a conversation message using the AI model (232). According to one embodiment, the memory (230) can store commands (or instructions) that cause the processor (220) to perform a conversation message recommendation operation (or method) using the AI model of the present disclosure.
[0110] According to one embodiment, a display (260) (e.g., display (160) of FIG. 1) may display various types of information based on the control of the processor (220). According to one embodiment, the display (260) may display a screen (e.g., a conversation screen) related to performing a conversation message recommendation operation (or method) using an AI model. According to one embodiment, the display (260) may be implemented in the form of a touch screen. When the display (260) is implemented together with an input module in the form of a touch screen, it may display various types of information generated according to a user's touch operation.
[0111] A communication circuit (290) according to an embodiment (e.g., the communication module (190) of FIG. 1) may include a wireless communication module (e.g., a cellular module, a wireless-fidelity (Wi-Fi) module, a Bluetooth module, or a near field communication (NFC) module). The communication module (290) according to an embodiment may communicate with an external electronic device (not shown) including a cloud AI model (e.g., the server (108) of FIG. 1). The communication circuit (290) according to an embodiment may transmit a response request prompt or a greeting request prompt to the external electronic device based on the control of the processor (220). The communication circuit (290) according to an embodiment may receive a response message or a greeting message corresponding to the response request prompt or the greeting request prompt from the external electronic device based on the control of the processor (220).
[0112] According to one embodiment, the electronic device (201) is not limited to the configuration illustrated in FIG. 2 and may further include various components. According to one embodiment, the electronic device (201) may further include an input module (not illustrated) (e.g., the input module (150) of FIG. 1) and receive various inputs related to performing a conversation message recommendation operation (or method) using an AI model through the input module.
[0113] In one embodiment, the main components of the electronic device have been described through the electronic device (201) of FIG. 2. However, in various embodiments, not all of the components illustrated through FIG. 2 are essential components, and the connection relationship of the main components of the electronic device (201) described above through FIG. 2 may be changed according to various embodiments.
[0114] An electronic device (e.g., an electronic device (101) of FIG. 1 or an electronic device (201) of FIG. 2) according to an embodiment may include a communication circuit (e.g., a communication module (190) of FIG. 1 or a communication circuit (290) of FIG. 2), a display (e.g., a display (160) of FIG. 1 or a display (260) of FIG. 2), a memory (e.g., a memory (130) of FIG. 1 or a memory (230) of FIG. 2)) for storing instructions, and a processor (e.g., a processor (130) of FIG. 1 or a processor (230) of FIG. 2) operatively connected to the communication circuit, the display, and the memory. According to an embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to search for a previous conversation message with the other party while a message recommendation function is activated during a conversation screen with the other party displayed on the display. The instructions, when executed by the processor, may cause the electronic device to generate a response request prompt using at least one previous conversation message if there is at least one previous conversation message with the other party within a specified period of time and transmit the response request prompt to an AI model. The instructions, when executed by the processor, may be configured to cause the electronic device to obtain response messages corresponding to the response request prompt through the AI model and display the response messages on the conversation screen. The instructions, when executed by the processor, may cause the electronic device to generate a greeting request prompt and transmit the greeting request prompt to an AI model if there is not at least one previous conversation message with the other party within the specified period of time. The instructions, when executed by the processor, may be configured to cause the electronic device to obtain greeting messages corresponding to the greeting request prompt through the AI model and display the greeting messages on the conversation screen.
[0115] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to transmit a reply message selected by a user input from among the reply messages to the counterpart through the communication circuit, or to transmit a greeting message selected by the user from among the greeting messages to the counterpart through the communication circuit.
[0116] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to identify whether to use the AI model of the electronic device or the cloud AI model of an external electronic device, and, if the AI model of the electronic device is used, to obtain the response messages corresponding to the response request prompt through the AI model of the electronic device, and, if the cloud AI model is used, to transmit the response request prompt to the external electronic device through the communication circuit and receive the response messages obtained using the cloud AI model from the external electronic device.
[0117] The response request prompt according to one embodiment may include a command, a response format, and an input to be input to the AI model. According to one embodiment, the input may include at least one previous conversation message and information about the author of each of the at least one previous conversation message.
[0118] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to block display of the at least one previous conversation message and / or the reply messages if the at least one previous conversation message and / or the reply messages contain a specified inappropriate expression.
[0119] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to check the format of each of the response messages, and if the format of each of the response messages is not a designated format, change the format of each of the response messages to the designated format.
[0120] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to identify whether there is a reply message in a first language different from the second language of the at least one previous conversation message among the reply messages, and to display the remaining reply messages in the second language excluding the reply message in the identified first language among the reply messages.
[0121] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to identify a similarity between the response messages, identify one of the plurality of similar response messages if there are multiple similar response messages among the response messages based on the similarity, and remove similar messages other than the one of the plurality of similar response messages.
[0122] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to obtain at least one additional greeting message using greeting data sets previously stored in the memory when the number of the greeting messages is less than a specified number, and to display the greeting messages and the at least one additional greeting message on the conversation screen.
[0123] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to select a greeting data set according to time, date and / or language among the greeting data sets and obtain at least one additional greeting message using the selected greeting data set.
[0124] Figure 3 is an example of a screen for setting a conversation message recommendation function using an AI model according to one embodiment.
[0125] Referring to FIG. 3, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device (e.g., electronic device of FIG. 1 or electronic device (201) of FIG. 2) according to one embodiment may display a screen (362) for setting a conversation message recommendation function using an AI model on a display (260).
[0126] According to one embodiment, a processor (220) may display a Message suggestions icon (315) for setting whether to activate a conversation message recommendation function using an AI model and an On-device mode icon (317) for setting whether to use an on-device AI model on a conversation message recommendation function setting screen (362) using an AI model.
[0127] According to one embodiment, the processor (220) can activate a conversation message recommendation function using an AI model based on whether the Message suggestions icon (315) is selected in an on state, and can deactivate a conversation message recommendation function using an AI model based on whether the Message suggestions icon (315) is selected in an off state.
[0128] According to one embodiment, the processor (220) <301> Based on the On-device mode icon (317) being selected as Off while the Message suggestions icon (315) is set to On, the cloud AI model rather than the AI model (232) of the electronic device (201) can be set to be used for conversation message recommendation (in the cloud-based AI model use mode).
[0129] According to one embodiment, the processor (220) <302> Based on the On-device mode icon (317) being selected to be on while the Message suggestions icon (315) is set to be on, the AI model (232) of the electronic device (201) rather than the cloud AI model can be set to be used for conversation message recommendation (on-device based AI model use mode).
[0130] Figure 4 is a drawing showing a conversation screen with a counterpart according to one embodiment.
[0131] Referring to FIG. 4, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device (e.g., electronic device of FIG. 1 or electronic device (201) of FIG. 2) according to an embodiment may display a conversation screen (462) for exchanging conversation messages with a counterpart on a display (260) based on execution of a message application (e.g., conversational message application). For example, the message application may be a chatting application, an instant message application, an SMS (short message service) message application, or another application that allows exchanging messages in a conversational manner with a counterpart. A conversation screen (462) according to one embodiment may include information (412) of another user who exchanges conversation messages with the user of the electronic device (201) (e.g., user ID, phone number, or user account) (xxx-xxxx-xxxx), a conversation message display area (420), an input message display area (430), and a conversation message recommendation area (440).
[0132] According to one embodiment, a processor (220) may display a visual object (432) related to a message recommendation function while displaying a conversation screen (462) with the other party. According to one embodiment, the processor (220) may activate the message recommendation function when receiving an input for selecting a visual object (432) related to the message recommendation function.
[0133] In one embodiment, the processor (220) displays a conversation screen (462) with the other party, and if the message recommendation function is activated, if there is a previous conversation message with the other party within a specified period of time, <401> The response messages obtained by providing an AI model (e.g., AI model (232) or cloud AI model) with a response request prompt using previous conversation messages with the other party (e.g., “Yes, hello”, “Have you eaten?”) are (e.g., “Yes, I ate well.”). ", “It’s not yet time, what should I eat? ", "I ate. Do you want to eat together? ”) can be displayed in the conversation message recommendation area (440).
[0134] In one embodiment, the processor (220) provides a greeting request prompt to an AI model (e.g., AI model (232) or cloud AI model) when there is no previous conversation message with the other party within a specified period while the message recommendation function is activated during the display of the conversation screen (462) with the other party, and obtains greeting messages (e.g., “Hello”). ", “How is your family? ", "hello ", "how are you doing? ")second <402> It can be displayed in the conversation message recommendation area (440) as shown below.
[0135] FIG. 5 is a flowchart illustrating a conversation message recommendation operation using an AI model in an electronic device according to one embodiment.
[0136] Referring to FIG. 5, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device (e.g., electronic device (101) of FIG. 1 or electronic device (201) of FIG. 2) according to one embodiment may perform at least one operation from operations 510 to 540.
[0137] In operation 510, the processor (220) according to an embodiment may search for (or confirm) a previous conversation message with the other party based on the activation of a conversation message recommendation function while a conversation screen with the other party is displayed on the display (260). The processor (220) according to an embodiment may display a conversation screen for exchanging conversation messages with the other party on the display (260) based on the execution of a message application (e.g., a conversational message application). For example, the message application may be a chatting application, an instant message application, an SMS (short message service) message application, or any other application that allows exchanging messages in a conversational manner with the other party. The processor (220) according to an embodiment may identify whether the conversation message recommendation function is activated while a conversation screen with the other party is displayed on the display (260). The other party according to an embodiment may refer to another user who exchanges conversation messages with the user of the electronic device (201), and the user and the other party may each use a unique user ID, phone number, or user account. The conversation message recommendation function according to one embodiment may be a conversation message recommendation function using an AI model.
[0138] In operation 520, the processor (220) according to one embodiment may determine (or identify or confirm) whether a previous conversation message with the other party exists within a specified period based on the results of checking the previous conversation message with the other party. For example, the specified period may be 24 hours or several days, or may be specified as a shorter or longer period.
[0139] In operation 530, the processor (220) according to an embodiment may generate a response request prompt using a previous conversation message with the other party if there is a previous conversation message with the other party within a specified period, obtain response messages corresponding to the response request prompt through an AI model, and display the response messages on a conversation screen. The response request prompt according to an embodiment may include natural language or a function (or command) to be input into the AI model to recommend response messages that reflect the context, topic, tone, and various variables (e.g., language, time, date, or location) or emoji of the content of the previous conversation message with the other party. The processor (220) according to an embodiment may obtain response messages corresponding to the response request prompt through the AI model. According to an embodiment, a processor (220) may obtain response messages corresponding to a response request prompt through an on-device-based AI model (232) (hereinafter also referred to as an AI model (232)) inside an electronic device (201) or a cloud-based AI model (not shown) (e.g., an AI model (not shown) included in a server (108)) (hereinafter also referred to as a cloud AI model) outside the electronic device (201). According to an embodiment, the processor (220) may determine whether to use (or transmit) the response request prompt through the AI model (232) or the cloud AI model based on setting information, the type of the prompt, the size of the prompt, the communication status with the cloud server, and / or the load level of the electronic device (201).
[0140] According to one embodiment, a processor (220) may transmit a response request prompt to an AI model (232) or a cloud AI model, and obtain response messages corresponding to the response request prompt from the AI model (232) or the cloud AI model. According to one embodiment, the processor (220) may display the response messages on a conversation screen (e.g., a conversation message recommendation area (440) of the conversation screen). In one embodiment, the processor (220) may obtain reply messages that do not include expressions in categories related to sexual expression categories (Sexual), derogatory expression categories (Derogatory), ill-mannered expression categories (Toxic), violent expression categories (Violent), insulting expression categories (Insult), profanity, drug-related expression categories (Drugs), and / or other expressions that may cause discomfort to the other party, and may perform output format verification, usability verification, and / or validity verification of the output contents of the reply messages, and may display reply messages for which output format verification, usability verification, and / or validity verification of the output contents have been completed on the conversation screen. In one embodiment, the processor (220) may transmit a reply message selected by the user from among the reply messages displayed on the conversation screen to the other party through the communication circuit (290).
[0141] In operation 540, the processor (220) according to an embodiment may generate a greeting request prompt if there is no previous conversation message with the other party within a specified period, obtain greeting messages corresponding to the greeting request prompt through an AI model (e.g., AI model (232) or a cloud AI model), and display the greeting messages on a conversation screen. The greeting request prompt according to an embodiment may include natural language or a function (or command) to be input into the AI model (232) or the cloud AI model to recommend a greeting message to be delivered to the other party if there is no previous conversation message with the other party within a specified period. The processor (220) according to an embodiment may transmit the greeting messages corresponding to the greeting request prompt to the AI model (232) or the cloud AI model, and display the greeting messages obtained from the AI model (232) or the cloud AI model on the conversation screen. According to an embodiment, the processor (220) may determine whether to use (or transmit) the response request prompt to the AI model (232) or to use (or transmit) the cloud AI model based on setting information, the type of prompt, the size of the prompt, the communication status with the cloud server, and / or the load level of the electronic device (201). According to an embodiment, the processor (220) may transmit the greeting request prompt to the AI model (232) or the cloud AI model, and may obtain greeting messages corresponding to the greeting request prompt from the AI model (232) or the cloud AI model.In an embodiment, when the number of greeting messages obtained from the AI model (232) or the cloud AI model (not shown) is less than 4 (or a specified number), the processor (220) may generate at least one additional greeting message using a greeting data set (e.g., a first greeting data set by time or date) stored in the memory (230) of the electronic device (201) and display the greeting messages obtained from the AI model (232) or the cloud AI model (not shown) and at least one greeting message generated by the electronic device (201) itself on the conversation screen. For example, the processor (220) may generate at least one greeting message using multiple different greeting data sets depending on a specific day (e.g., Chuseok, Lunar New Year), weekdays and weekends, or morning, lunch, and evening. The processor (220) in an embodiment may transmit a greeting message selected by the user from among the greeting messages displayed on the conversation screen to the other party through the communication circuit (290).
[0142] According to an embodiment of the present disclosure, a method for recommending a conversation message using an AI model in an electronic device (e.g., the electronic device 101 of FIG. 1 or the electronic device 201 of FIG. 2) may include an operation of searching for a previous conversation message with a counterpart while a message recommendation function is activated during a conversation screen with the counterpart on a display of the electronic device (e.g., the display module 160 of FIG. 1 or the display 260 of FIG. 2). According to an embodiment, the method may generate a response request prompt using the at least one previous conversation message and transmit it to the AI model if there is at least one previous conversation message with the counterpart within a specified period. According to an embodiment, the method may include an operation of obtaining response messages corresponding to the response request prompt through the AI model and displaying them on the conversation screen. According to an embodiment, the method may generate a greeting request prompt and transmit it to the AI model if there is no previous conversation message with the counterpart within the specified period. The method may include an operation of obtaining greeting messages corresponding to the greeting request prompt through the AI model and displaying them on the conversation screen.
[0143] According to one embodiment, the method may further include an operation of transmitting a reply message selected by a user input from among the reply messages to the counterpart through the communication circuit, or an operation of transmitting a greeting message selected by the user from among the greeting messages to the counterpart through the communication circuit.
[0144] According to one embodiment, the method may further include an operation of identifying whether to use the AI model of the electronic device or the cloud AI model of an external electronic device, an operation of obtaining the response messages corresponding to the response request prompt through the AI model of the electronic device when the AI model of the electronic device is used, and an operation of transmitting the response request prompt to the external electronic device through the communication circuit and receiving the response messages obtained using the cloud AI model from the external electronic device when the cloud AI model is used.
[0145] In the method according to one embodiment, the response request prompt may include a command, a response format, and an input to be input to the AI model, wherein the input may include at least one previous conversation message and information about the author of each of the at least one previous conversation message.
[0146] The method according to one embodiment may further include an action of not displaying the reply messages if the at least one previous conversation message and / or the reply messages contain the specified inappropriate expression.
[0147] The method according to one embodiment may further include an operation of checking the format of each of the response messages, and if the format of each of the response messages is not a specified format, changing the format of each of the response messages to the specified format.
[0148] According to one embodiment, the method may further include an operation of identifying whether there is a reply message in a first language different from the second language of the at least one previous conversation message among the reply messages, and displaying the remaining reply messages in the second language, excluding the reply message in the identified first language, among the reply messages.
[0149] According to one embodiment, the method may further include an operation of identifying a similarity between the reply messages, and, if there are multiple similar reply messages among the reply messages based on the similarity, identifying one of the multiple similar reply messages, and removing the remaining similar messages excluding the one of the multiple similar reply messages.
[0150] According to one embodiment, the method may further include selecting a greeting data set based on time, date, and / or language from among greeting data sets previously stored in the memory when the number of the greeting messages is less than a specified number, obtaining at least one additional greeting message using the selected greeting data set, and displaying the greeting messages and the at least one additional greeting message on the conversation screen.
[0151] FIG. 6a is a flowchart illustrating a conversation message recommendation operation using a device-based AI model or a cloud-based AI model in an electronic device according to one embodiment, and FIG. 6b is a flowchart continuing from FIG. 6a.
[0152] Referring to FIGS. 6A and 6B, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device (e.g., electronic device (101) of FIG. 1 or electronic device (201) of FIG. 2) according to one embodiment may perform at least one of operations 610 to 648.
[0153] In operation 610, the processor (220) according to an embodiment may search for (or confirm) a previous conversation message with the other party based on the activation of a conversation message recommendation function while displaying a conversation screen with the other party on the display (260). The processor (220) according to an embodiment may display a conversation screen for exchanging conversation messages with the other party on the display (260) based on the execution of a message application (e.g., a conversational message application). For example, the message application may be a chatting application, an instant message application, an SMS (short message service) message application, or any other application that allows exchanging messages in a conversational manner with the other party. The processor (220) according to an embodiment may identify whether the conversation message recommendation function is activated while displaying a conversation screen with the other party on the display (260). The other party according to an embodiment may refer to another user who exchanges conversation messages with the user of the electronic device (201), and the user and the other party may each use a unique user ID, phone number, or user account. A message recommendation function according to one embodiment may be a conversation message recommendation function using an AI model.
[0154] In operation 620, the processor (220) according to one embodiment may determine (or identify or confirm) whether a previous conversation message with the other party exists within a specified period based on the results of checking the previous conversation message with the other party. For example, the specified period may be 24 hours or several days, or may be specified as a shorter or longer period.
[0155] In operation 632, the processor (220) according to one embodiment may generate a response request prompt using a previous conversation message with the other party if there is a previous conversation message with the other party within a specified period. The response request prompt according to one embodiment may include natural language or a function (or command) to be input into the AI model to recommend a response message that reflects the context, topic, tone, and various variables (e.g., language, time, date, or location) of the content of the previous conversation message with the other party, or emoji.
[0156] In operation 634, the processor (220) according to one embodiment may determine (or identify or confirm) whether the on-device-based AI model (232) is set to be used for recommending conversation messages. The processor (220) according to one embodiment may store setting information on whether to use the on-device-based AI model (232) or the cloud AI model, and may determine whether the on-device-based AI model (232) is set to be used based on the stored setting information.
[0157] In operation 636, the processor (220) according to an embodiment, if set to use the on-device based AI model (232), may obtain response messages corresponding to the response request prompt through the AI model (232) in the electronic device (201) and display the response messages on the conversation screen. The processor (220) according to an embodiment may obtain response messages that do not include expressions in the categories related to sexual expression categories (Sexual), derogatory expression categories (Derogatory), ill-mannered expression categories (Toxic), violent expression categories (Violent), insulting expression categories (Insult), profane expression categories (Profanity), drug-related expression categories (Drugs), and / or other expressions that may cause discomfort to the other party, and may perform output format verification, usability verification, and / or validity verification of the output contents of the response messages, and display response messages for which the output format verification, usability verification, and / or validity verification of the output contents are successful (or completed) on the conversation screen.
[0158] In operation 638, the processor (220) according to one embodiment, if not set to use the on-device based AI model (232), may transmit a response request prompt to the cloud-based AI model of the external electronic device through the communication circuit (290), receive response messages corresponding to the response request prompt from the external electronic device, and display the response messages on the conversation screen. According to an embodiment, the processor (220) may receive reply messages that do not include expressions in categories related to sexual expression categories (Sexual), derogatory expression categories (Derogatory), ill-mannered expression categories (Toxic), violent expression categories (Violent), insulting expression categories (Insult), profane expression categories (Profanity), drug-related expression categories (Drugs), and / or other expressions that may cause discomfort to the other party, and may perform output format verification, usability verification, and / or validity verification of the output contents of the reply messages, and may display reply messages that have successfully (or completed) output format verification, output content usability verification, and / or output content validity verification among the reply messages on the conversation screen.
[0159] In operation 642, the processor (220) according to one embodiment may generate a greeting request prompt if there is no previous conversation message with the other party within a specified period. The greeting request prompt according to one embodiment may include natural language or a function (or command) to be input into the AI model (232) or the cloud AI model to recommend a greeting message to be delivered to the other party if there is no previous conversation message with the other party within the specified period.
[0160] In operation 644, the processor (220) according to one embodiment may determine (or identify or confirm) whether the on-device-based AI model (232) is set to be used for recommending conversation messages. The processor (220) according to one embodiment may store setting information on whether to use the on-device-based AI model (232) or the cloud AI model, and may determine whether the on-device-based AI model (232) is set to be used based on the stored setting information.
[0161] In operation 646, the processor (220) according to an embodiment may, if set to use the on-device based AI model (232), obtain greeting messages corresponding to the greeting request prompt through the AI model (232) in the electronic device (201) and display the greeting messages on the conversation screen. If the number of greeting messages obtained from the AI model (232) is less than a specified number (e.g., 4), the processor (220) according to an embodiment may generate an additional greeting message using a greeting data set (e.g., a first greeting data set by time or date) stored in the memory (230) of the electronic device (201) and display the greeting message generated using the greeting messages obtained from the AI model (232) and the greeting data set of the electronic device (201) on the conversation screen. For example, the processor (220) may generate a greeting message using multiple different greeting data sets depending on a specific day (e.g., Chuseok, Lunar New Year), weekdays and weekends, or morning, lunch, and evening.
[0162] In operation 648, the processor (220) according to an embodiment may transmit a greeting request prompt to a cloud-based AI model of an external electronic device through a communication circuit (290) if the processor is not set to use an on-device-based AI model (232), receive greeting messages corresponding to the greeting request prompt from the external electronic device, and display the greeting messages on a conversation screen. If the number of greeting messages received from the external electronic device is less than a specified number (e.g., 4), the processor (220) according to an embodiment may generate an additional greeting message using a greeting data set (e.g., a first greeting data set by time or date) stored in a memory (230) of the electronic device (201), and display the greeting message generated using the greeting message received from the external electronic device and the greeting data set of the electronic device (201) on the conversation screen.
[0163] FIG. 7 is a diagram illustrating an operation of generating a response message request prompt according to one embodiment.
[0164] Referring to FIG. 7, a processor (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) of an electronic device (e.g., electronic device (101) of FIG. 1 or electronic device (201) of FIG. 2) according to one embodiment may perform at least one operation from operations 710 to 760.
[0165] In operation 710, the processor (220) according to one embodiment may determine (or identify or confirm) whether the number of previous conversation messages with the other party within a specified period exceeds a specified number. According to one embodiment, the specified number may be 20, but other numbers may also be possible. The processor (220) according to one embodiment may determine (or identify or confirm) whether the number of previous conversation messages with the other party within a specified period exceeds a specified number (e.g., 20) based on the activation of a conversation message recommendation function while displaying a conversation screen with the other party on the display (260).
[0166] In operation 720, the processor (220) according to one embodiment can obtain (as is) the previous conversation messages with the other party within the specified period if the number of previous conversation messages with the other party within the specified period does not exceed the specified number.
[0167] In operation 730, the processor (220) according to one embodiment may obtain a specified number of previous conversation messages among the previous conversation messages with the other party within a specified period if the number of previous conversation messages with the other party within a specified period exceeds a specified number. The processor (220) according to one embodiment may obtain a specified number of previous conversation messages by excluding previous conversation messages in order of oldest. For example, the time criterion for determining whether previous conversation messages are old may use an updated time criterion. The updated time may refer to the time at which the message was updated, such as “read” or “delivered.”
[0168] In operation 740, the processor (220) according to one embodiment may determine (or identify or confirm) whether the number of characters in the acquired previous conversation messages exceeds a specified number of characters. According to one embodiment, the specified number of characters may be differently specified depending on the processing capability or language of the AI model. According to one embodiment, the specified number of characters when the previous conversation messages are input to the on-device-based AI model (232) may be smaller than the specified number of characters when the previous conversation messages are input to the cloud-based AI model. For example, when the previous conversation messages are in Korean, the number of characters in the previous conversation messages input to the on-device-based AI model (232) may be limited to 1000 characters, and the number of characters in the previous conversation messages input to the cloud-based AI model may be limited to 10000 characters. For example, if the previous conversation messages are in English, the number of characters in the previous conversation messages input to the on-device-based AI model (232) may be limited to 2500 characters, and the number of characters in the previous conversation messages input to the cloud-based AI model may be limited to 25000 characters. The limited number of characters according to an embodiment may not be limited to a specific number, and may be adjusted to another limited number of characters by a developer or operator. The processor (220) according to an embodiment may perform operation 750 if the number of characters in the acquired previous conversation messages exceeds a specified number of characters, and may perform operation 760 if the number of characters in the acquired previous conversation messages does not exceed a specified number of characters.
[0169] In operation 750, the processor (220) according to one embodiment may obtain previous conversation messages whose character count does not exceed a specified number of characters by excluding some of the previous conversation messages in order of age. For example, the time criterion for determining whether previous conversation messages are old may be based on an updated time criterion. The updated time may refer to the time at which the message was updated, such as "read" or "delivered."
[0170] In operation 760, the processor (220) according to an embodiment may generate a response request prompt including information (prefix) indicating previous conversation messages and the authors of each of the previous conversation messages. The processor (220) according to an embodiment may select the information (prefix) indicating the previous conversation messages and the authors of each of the previous conversation messages as inputs of the response request prompt and generate a response request prompt including the inputs. For example, the processor (220) may add a prefix such as “user” to the front of a conversation message written by a user of the electronic device (201) among previous conversation messages, add a prefix such as “others” to the front of a conversation message written by a counterpart, and add the previous conversation messages with the prefixes added as inputs of the response request prompt to generate the response request prompt. In one embodiment, a prefix may help an AI model (e.g., an AI model (232) or a cloud-based AI model) identify the user and the other party as the author of a previously written conversation message and generate a response tailored to the user and the other party.
[0171] FIG. 8 is a diagram illustrating an example of a dialogue message recommendation screen using an AI model according to one embodiment.
[0172] Referring to FIG. 8, a processor (e.g., the processor 120 of FIG. 1 or the processor 220 of FIG. 2) of an electronic device (e.g., the electronic device of FIG. 1 or the electronic device (201) of FIG. 2) according to an embodiment may display a conversation screen (862) for exchanging conversation messages with a counterpart on a display (260) based on execution of a message application (e.g., an interactive message application). The conversation screen (862) according to an embodiment may include information (812) (e.g., user ID, phone number, or user account) (xxx-xxxx-xxxx) of the counterpart, who is another user exchanging conversation messages with the user of the electronic device (201), a conversation message display area (820), an input message display area (830), and a conversation message recommendation area (840). According to one embodiment, the processor (220) may display an icon (832) that can select and indicate activation (or deactivation) of a conversation message recommendation function using an AI model in an input message display area (830).
[0173] In one embodiment, the processor (220) provides an AI model (e.g., AI model (232) or cloud AI model) with a prompt requesting a response using a previous conversation message with the other party when a conversation message recommendation function (832) is activated while displaying a conversation screen (862) with the other party and receiving a message from the other party, such as “Yeah, hi hi, I’m going to play soccer now, haha”, to generate response messages (e.g., “Be careful on the way to play soccer!”). ", “I heard you’re good at soccer! Fighting! ”, “When is the soccer game? Can I go with you? ", "It would be cool to see you playing soccer haha") can be displayed in the conversation message recommendation area (840).
[0174] FIG. 9 is a diagram illustrating an example of a dialogue message recommendation screen using an AI model when a knowledge-based question is received according to one embodiment.
[0175] Referring to FIG. 9, a processor (e.g., the processor 120 of FIG. 1 or the processor 220 of FIG. 2) of an electronic device (e.g., the electronic device of FIG. 1 or the electronic device (201) of FIG. 2) according to an embodiment may display a conversation screen (962) for exchanging conversation messages with a counterpart on a display (260) based on execution of a message application (e.g., an interactive message application). The conversation screen (962) according to an embodiment may include information (912) (e.g., user ID, phone number, or user account) (xxx-xxxx-xxxx) of a counterpart who is another user exchanging conversation messages with a user of the electronic device (201), a conversation message display area (920), an input message display area (930), and a conversation message recommendation area (940). According to one embodiment, the processor (220) may display an icon (932) that can select and indicate activation (or deactivation) of a conversation message recommendation function using an AI model in an input message display area (930).
[0176] According to one embodiment, the processor (220) <901> When a conversation message recommendation function (932) is activated while displaying a conversation screen (962) with the other party, such as “Cheolsu,” “I had a math test today,” “What was the formula for the root?”, and “Can you tell me the formula for the root?”, when receiving messages including knowledge-based questions from the other party, a prompt requesting an answer using a previous conversation message with the other party is provided to an AI model (e.g., AI model (232) or cloud AI model), and response messages including search results for answers to the questions are provided (e.g., “The formula for the root is the formula for finding the solution to x when ax^2 + bx + c = 0.”). ", "The root formula is a formula used to solve quadratic equations. , "The root formula is an important formula in mathematics. ") can be displayed in the conversation message recommendation area (940).
[0177] According to one embodiment, the processor (220) <902> When a message including a knowledge-based question from the other party, such as “How many legs do octopuses and squids have?” is received while the conversation message recommendation function (932) is activated during the conversation screen (962) with the other party, a prompt requesting an answer using a previous conversation message with the other party is provided to an AI model (e.g., AI model (232) or cloud AI model) so as to provide answer messages including search results for answers to the question (e.g., “Octopuses have 8 legs and squids have 10 legs!”). ", "Did you know how many legs an octopus and squid have? I just found out today ", "I didn't know there was a difference in the number of legs between octopus and squid! That's a fun fact! ") can be displayed in the conversation message recommendation area (940).
[0178] FIG. 10 is a diagram illustrating an example of a conversation message recommendation screen using an AI model when a reply request prompt that does not include the author of each of the previous conversation messages is used and when a reply request prompt that includes the author of each of the previous conversation messages is used, according to one embodiment.
[0179] Referring to FIG. 10, a processor (e.g., the processor (120) of FIG. 1 or the processor (220) of FIG. 2) of an electronic device (e.g., the electronic device of FIG. 1 or the electronic device (201) of FIG. 2) according to an embodiment may display a conversation screen (1062) for exchanging conversation messages with a counterpart on a display (260) based on execution of a message application (e.g., an interactive message application). The conversation screen (1062) according to an embodiment may include information (1012) of a counterpart who is another user exchanging conversation messages with a user (e.g., a father) of the electronic device (201) (e.g., a pretty daughter), a conversation message display area (1020), an input message display area (1030), and a conversation message recommendation area (1040). According to one embodiment, the processor (220) may display an icon (1032) that can select and indicate activation (or deactivation) of a conversation message recommendation function using an AI model in an input message display area (1030).
[0180] According to one embodiment, the processor (220) <1001> If an AI model (e.g., AI model (232) or cloud AI model) is provided with a response request prompt that does not include the author (e.g., prefix) of each of the previous conversation messages, such as “Okay? I’ll go haha”, “Should I just bring an umbrella?”, “How long will it rain?”, “Dad, do you want to see me get rained on?”, response messages that do not reflect the relationship or speech style between the user (dad) and the other party (pretty daughter) can be received and displayed in the conversation message recommendation area (1040).
[0181] According to one embodiment, the processor (220) <1002> By providing an AI model (e.g., AI model (232) or cloud AI model) with a response request prompt that includes the author of each of the previous conversation messages, such as “Okay, my daughter~ Got it! Dad will be there!”, “Don’t worry, my daughter, Dad will be there”, “What time does Dad have to be there by?”, “Dad, I’ll bring an umbrella, where should we go?”, response messages that reflect the relationship or speech pattern between the user (dad) and the other party (pretty daughter) can be received and displayed in the conversation message recommendation area (1040).
[0182] FIG. 11 is a diagram illustrating an example of a conversation message recommendation screen when an input of a response request prompt includes a sentence containing an inappropriate expression according to one embodiment.
[0183] Referring to FIG. 11, a processor (e.g., the processor 120 of FIG. 1 or the processor 220 of FIG. 2) of an electronic device (e.g., the electronic device of FIG. 1 or the electronic device (201) of FIG. 2) according to an embodiment may display a conversation screen (1162) for exchanging conversation messages with a counterpart on a display (260) based on execution of a message application (e.g., a conversational message application). The conversation screen (1162) according to an embodiment may include information (1112) of a counterpart who is another user exchanging conversation messages with the user of the electronic device (201) (e.g., xxx-xxxx-xxxx), a conversation message display area (1120), an input message display area (1130), and a conversation message recommendation area (1140). An icon (1132) indicating activation (or deactivation) of a conversation message recommendation function using an AI model may be displayed in the input message display area (1130).
[0184] In one embodiment, the processor (220) may determine (or verify) whether sentences (or texts) of inappropriate expressions (e.g., sexual expression category, derogatory expression category, toxic expression category, violent expression category, insulting expression category, profanity expression category, drug-related expression category, and / or other expressions related to categories that may cause discomfort to the other party) are included in previous conversation messages that may be input to a response request prompt when a conversation message recommendation function using an AI model is activated. In one embodiment, the processor (220) may display a message in the conversation message recommendation area (1140) indicating that the input contains inappropriate content and therefore cannot be recommended (e.g., “Can't provide suggestions for this message because it might contain inappropriate content. Try again with different text.”) when previous conversation messages that can be inputs for the response request prompt include expressions in the sexual expression category (Sexual), such as “How do you understand transgender?”
[0185] FIG. 12a is a drawing showing an example of a screen that displays a conversation message recommendation area instead of a keypad for entering a conversation message when a conversation message recommendation function using an AI model is activated during a conversation screen display according to one embodiment.
[0186] Referring to FIG. 12A, a processor (e.g., the processor 120 of FIG. 1 or the processor 220 of FIG. 2) of an electronic device (e.g., the electronic device of FIG. 1 or the electronic device (201) of FIG. 2) according to an embodiment may display a conversation screen (1262) for exchanging conversation messages with a counterpart on the display (260) based on execution of a message application (e.g., an interactive message application). The conversation screen (1262) according to an embodiment may include information (1212) (e.g., user ID, phone number, or user account) (xxx-xxxx-xxxx) of a counterpart who is another user exchanging conversation messages with the user of the electronic device (201), a conversation message display area (1220), an input message display area (1230), and a conversation message recommendation area (1240) or a keypad (1250) for inputting a conversation message. An icon (1232) indicating activation (or deactivation) of a conversation message recommendation function using an AI model may be displayed in the input message display area (1230).
[0187] According to one embodiment, the processor (220) <1201> When the message recommendation function (1232) is disabled while displaying the conversation screen (1262) with the other party, a keypad (1250) for entering a conversation message can be displayed. According to an embodiment, the processor (220) can display a conversation message recommendation area (1240) instead of the keypad (1250) when the conversation message recommendation function is activated based on an input (e.g., touch input) to the icon (1232). According to an embodiment, the icon (1232) can be displayed with different visual effects when the conversation message recommendation function is activated and deactivated.
[0188] According to one embodiment, the processor (220) <1202> A message such as “creating messages” can be displayed in the conversation message recommendation area (1240) and a prompt for requesting a response using a previous conversation message with the other party can be generated and provided to an AI model (e.g., AI model (232) or cloud AI model).
[0189] FIG. 12b is a drawing showing an example of a screen in which recommended reply messages are displayed in a reply message recommendation area and a selected reply message is transmitted to the other party when a reply message recommendation function using an AI model according to one embodiment is activated.
[0190] Referring to FIG. 12b, a processor (220) according to one embodiment <1203> By providing an AI model (e.g., AI model (232) or cloud AI model) with a prompt requesting a response using a previous conversation message with the other party, such as “Yes, hello”, “Have you eaten?”, it can generate response messages (e.g., “Yes, I had a good meal.”). ", "It's not yet time, what should I eat? ", "I ate. Do you want to eat together? ") can be displayed in the conversation message recommendation area (1240).
[0191] In one embodiment, the processor (220) selects a message selected by the user from among the response messages displayed in the dialogue message recommendation area (1240), for example, “Yes, it was delicious.” ") and send it to the other party, <1204> Messages sent to the other party in the conversation message display area (1220) such as “Yes, it was delicious. ") can be displayed.
[0192] FIG. 13 is a diagram for explaining a generative artificial intelligence system according to one embodiment.
[0193] In a generative artificial intelligence system (1300) according to one embodiment, a user query / response interface (1310) (e.g., the input module or display module (160) of FIG. 1 or the display (260) of FIG. 2) can receive user input. The user input may be in the form of natural language, images, and / or videos, but is not limited thereto. In addition, context information may also be transmitted when the user input is transmitted. The context information may include various additional information at the time of the user input. For example, the additional information may include information about the application currently being used by the user or information about the user's location. In addition, the user input may also be in a form that mixes the natural language, images, sounds, and context information described above. In addition, the user input may also be in a non-natural language form, such as selecting a menu. The user query / response interface (1310) can output the results of the generative artificial intelligence system to the user. The output can be in natural language or in a specific content format, and can also be provided in the form of actions requested by the user. The user query / response interface (1310) can display the results of the generative artificial intelligence system to the user. The output can be in natural language or in a specific content format, and can also be provided in the form of actions requested by the user.
[0194] An AI framework (1340) (e.g., processor (120) of FIG. 1 or processor (220) of FIG. 2) can receive user input and coordinate and control each component necessary to perform the user's intention based on the user's query.
[0195] User input received from the user query / response interface (1310) may be transmitted to a prompt design component (1341) (e.g., the processor (120) of FIG. 1 or the processor (220) of FIG. 2). The prompt design component (1341) may be used to generate prompts suitable for inputting user input into a large language model (LLM) or a large multimodal model (LMM). The prompt design component (1341) may be an AI component that uses a machine learning algorithm or a neural network to develop better prompts over time. The prompt design component (1341) may access a knowledge component including user preference data, a prompt library, and prompt examples based on the user input to generate prompts, and may transmit the generated prompts to the LLM or LMM.
[0196] The API / Plug-in management component (1342) (e.g., the processor (120) of FIG. 1 or the processor (220) of FIG. 2) may communicate with external information when a request for additional information is made when a user input is passed as input to a generative model (e.g., the AI model (232) of FIG. 2 or the cloud AI model). The API / Plug-in management component (1342) may establish a channel for communicating with the outside of the AI Interface through an API, and may enable access to various data sources (e.g., the knowledge repository (1320)) (e.g., the memory (130) of FIG. 1 or the memory (230) of FIG. 2) through the established channel. Additionally, the API / plug-in management component (1342) may request an application / service component (1330) (e.g., the processor (120) of FIG. 1 or the processor (220) of FIG. 2) to perform an action that ultimately performs user input, rather than an intermediate result, through the API, if the action needs to be performed by the application or service. Information obtained from an external source may be used to generate a prompt in the prompt design component (1341) together with user input, or may be passed as input to a generative model (e.g., the AI model (232) of FIG. 2 or a cloud AI model).
[0197] An output modification component (also called a refiner component) (1343) (e.g., a processor (120) of FIG. 1 or a processor (220) of FIG. 2) can fine-tune the output from a generative model (e.g., an AI model (232) of FIG. 2 or a cloud AI model). For example, the output modification component (1343) can verify whether the content generated through the LLM and / or LMM is irrelevant, biased, or harmful. In addition, the output modification component (1343) can determine to what extent it matches the result desired by the user and, if necessary, perform additional processing. The output modification component (1343) can additionally configure and provide the user with hints to avoid unwanted output.
[0198] A generative AI model (1360) (e.g., AI model (232) of FIG. 2 or a cloud AI model) may generally refer to an artificial intelligence neural network that creates new types of data based on user input information. The generative AI model (1360) may include an image-generating model and / or a language-generating model. Representative models for generating images include a generative adversarial network (GAN) and a variational auto encoder (VAE), and examples include a Diffusion-based generative model that uses a VAE and a Transformer structure. A language-generating model is a model trained to statistically output the most appropriate output based on input values, and representative examples include models such as CHAT-GPT 3 and CHAT-GPT 4. In addition, there are also LMMs (large multimodal models) that can recognize various types of data input, such as text, images, and voice, and generate new data corresponding to them.
[0199] According to various embodiments of the present disclosure, when sending and receiving a conversation message with a counterpart through a messaging application, an artificial intelligence (AI) model can be used to obtain and recommend a conversation message that reflects the context, topic, or tone of the previous conversation with the counterpart and various environmental variables, which can be convenient.
[0200] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments disclosed in this document are not limited to the aforementioned devices.
[0201] The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with 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 the items, unless the context clearly indicates otherwise. In this document, each of the phrases "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" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0202] The term "module" used in 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. A module may be an integral component, or a minimum unit or part of such a component 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).
[0203] Various embodiments of the present document may be implemented as software (e.g., a program (140)) including one or more commands stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101)). For example, a processor (e.g., a processor (120)) of the machine (e.g., an electronic device (101)) may call at least one command among the one or more commands stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one command called. The one or more commands may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0204] In a non-transitory storage medium storing commands according to one embodiment, the commands are set to cause the electronic device to perform at least one operation when executed by the electronic device, wherein the at least one operation may include: searching for a previous conversation message with the other party while a message recommendation function is activated during a conversation screen with the other party displayed on the display of the electronic device; generating a response request prompt using the at least one previous conversation message if there is at least one previous conversation message with the other party within a specified period and transmitting the response message to an AI model; obtaining response messages corresponding to the response request prompt through the AI model and displaying the response message on the conversation screen; generating a greeting request prompt and transmitting the greeting request prompt to the AI model if there is no previous conversation message with the other party within the specified period; and obtaining greeting messages corresponding to the greeting request prompt through the AI model and displaying the greeting message on the conversation screen.
[0205] According to one embodiment, the method according to the various embodiments disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0206] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component 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 the electronic device (101, 201), Communication circuit (190, 290); display(160, 260); Memory (130, 230) for storing instructions; and At least one processor (120, 220) operatively connected to the communication circuit, the display and the memory, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: When the message recommendation function is activated while displaying the conversation screen with the other party on the above display, search for previous conversation messages with the other party, If there is at least one previous conversation message with the other party within a specified period, a response request prompt is generated using the at least one previous conversation message and passed to the AI model, Obtaining response messages corresponding to the response request prompt through the AI model, and displaying the response messages on the conversation screen, If there is no at least one previous conversation message with the other party within the specified period, a greeting request prompt is generated and passed to the AI model, Obtain greeting messages corresponding to the greeting request prompt through the above AI model, and An electronic device that displays the above greeting messages on the above conversation screen.
2. In paragraph 1, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: Transmitting a response message selected by user input from among the above response messages to the other party through the communication circuit, or An electronic device that transmits a greeting message selected by a user from among the above greeting messages to the other party through the communication circuit.
3. In paragraph 1 or 2, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: Identify whether to use the AI model of the electronic device or the cloud AI model of an external electronic device, When using the AI model of the electronic device, the response messages corresponding to the response request prompt are obtained through the AI model of the electronic device, and An electronic device that transmits the response request prompt to the external electronic device through the communication circuit when using the cloud AI model and receives response messages obtained using the cloud AI model from the external electronic device.
4. In paragraphs 1 to 3, The above response request prompt includes the command, response format, and input to be input to the AI model, and An electronic device wherein the input includes at least one previous conversation message and information about the author of each of the at least one previous conversation message.
5. In paragraphs 1 to 4, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: An electronic device that blocks the display of reply messages if at least one of the previous conversation messages and / or the reply messages contains a specified inappropriate expression.
6. In paragraphs 1 to 5, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: An electronic device that checks the format of each of the above response messages and, if the format of each of the above response messages is not a specified format, changes the format of each of the above response messages to the specified format.
7. In paragraphs 1 to 6, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: Identifying whether there is a reply message in a first language different from the second language of at least one previous conversation message among the reply messages, and An electronic device that displays the remaining response messages in the second language, excluding the response message in the first language identified among the above response messages.
8. In paragraphs 1 to 7, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: Identify the similarity between the above response messages, Based on the above similarity, if there are multiple similar reply messages among the above reply messages, identify one of the multiple similar reply messages, and An electronic device for removing all similar messages except one of the plurality of similar reply messages.
9. In paragraphs 1 to 8, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: If the number of the above greeting messages is less than the specified number, at least one additional greeting message is obtained using the greeting data sets previously stored in the memory, and An electronic device that displays the above greeting messages and at least one additional greeting message on the conversation screen.
10. In paragraphs 1 to 9, The above instructions, when individually or collectively executed by the at least one processor, cause the electronic device to: An electronic device that selects a greeting data set based on time, date and / or language from among the above greeting data sets and obtains at least one additional greeting message using the selected greeting data set.
11. In a method for recommending a conversation message using an AI model in an electronic device (101, 201), An operation of searching for a previous conversation message with the other party while the message recommendation function is activated during a conversation screen display with the other party on the display (160, 260) of the electronic device; and An action of generating a response request prompt using the at least one previous conversation message with the other party within a specified period of time and transmitting the response request prompt to the AI model, and obtaining response messages corresponding to the response request prompt through the AI model and displaying the response messages on the conversation screen; or A method comprising: generating a greeting request prompt and transmitting it to the AI model if there is no previous conversation message with the other party within the specified period; and obtaining greeting messages corresponding to the greeting request prompt through the AI model and displaying them on the conversation screen.
12. In paragraph 11, An action of transmitting a response message selected by user input from among the above response messages to the other party through the communication circuit; or A method further comprising an action of transmitting a greeting message selected by the user from among the above greeting messages to the other party through the communication circuit.
13. In paragraph 11 or 12, An action of identifying whether to use the AI model of the electronic device or the cloud AI model of an external electronic device; An operation of obtaining the response messages corresponding to the response request prompt through the AI model of the electronic device when using the AI model of the electronic device; or A method further comprising an action of transmitting the response request prompt to the external electronic device through the communication circuit when using the cloud AI model and receiving response messages obtained using the cloud AI model from the external electronic device.
14. In clauses 11 to 13, The above response request prompt includes the command, response format, and input to be input to the AI model, and A method wherein the input comprises at least one previous conversation message and author information of each of the at least one previous conversation message.
15. In a non-transitory storage medium storing commands, the commands are set 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 is: An action of searching for a previous conversation message with the other party while the message recommendation function is activated during a conversation screen display with the other party on the display (160, 260) of the electronic device; An action of generating a response request prompt using at least one previous conversation message with the other party within a specified period of time and transmitting the same to the AI model; An action of obtaining response messages corresponding to the response request prompt through the AI model and displaying them on the conversation screen; An action of generating a greeting request prompt and transmitting it to the AI model if there is no previous conversation message with the other party within the specified period; and A storage medium including an action of obtaining greeting messages corresponding to the greeting request prompt through the AI model and displaying them on the conversation screen.
Citation Information
Patent Citations
Method for operating of integrated message application and electronic device supporting the same
KR1020160094032A
Method and computer system of analyzing communication situation based on dialogue act information
KR1020170061647A
An apparatus, method and system for drone filming service
KR1020210122723A
Computer program for classifying lines from piping & instrument diagram
KR1020250065123A
Artificial intelligence communication assistance
US20230325590A1