WO2023219298A1 - 전자 장치 및 이의 제어 방법 - Google Patents

전자 장치 및 이의 제어 방법 Download PDF

Info

Publication number
WO2023219298A1
WO2023219298A1 PCT/KR2023/005365 KR2023005365W WO2023219298A1 WO 2023219298 A1 WO2023219298 A1 WO 2023219298A1 KR 2023005365 W KR2023005365 W KR 2023005365W WO 2023219298 A1 WO2023219298 A1 WO 2023219298A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
conversation
text
vector value
vector
Prior art date
Application number
PCT/KR2023/005365
Other languages
English (en)
French (fr)
Inventor
최형탁
라부루로힛
고현목
양해훈
이승철
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020220110769A external-priority patent/KR20230157219A/ko
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to US18/330,766 priority Critical patent/US20230360651A1/en
Publication of WO2023219298A1 publication Critical patent/WO2023219298A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/04Segmentation; Word boundary detection
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/16Speech classification or search using artificial neural networks
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/18Speech classification or search using natural language modelling
    • G10L15/183Speech classification or search using natural language modelling using context dependencies, e.g. language models
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • G10L25/63Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for estimating an emotional state

Definitions

  • This disclosure relates to an electronic device and a control method thereof, and more specifically, to an electronic device that vectorizes and stores user conversation history and uses it, and a control method thereof.
  • the purpose of the present disclosure is to provide an electronic device that can vectorize and store a user's conversation history and a method of controlling the same.
  • An electronic device is a communication device.
  • a memory that stores at least one instruction and stores one or more vector values corresponding to conversation history information, and extracts text from conversation content by executing the at least one instruction, and encodes the extracted text using a preset encoding algorithm. It includes a processor that calculates a vector value using and generates response information using the calculated vector value and the one or more stored vector values.
  • a control method in an electronic device includes the steps of storing one or more vector values corresponding to conversation history information, receiving conversation content, and generating response information corresponding to the conversation content. and transmitting the response information, wherein the generating the response information includes extracting text from the conversation content and calculating a vector value using the extracted text using a preset encoding algorithm. and generating response information using the calculated vector value and the one or more stored vector values.
  • the control method stores one or more vector values corresponding to conversation history information. Receiving a vector value corresponding to text included in conversation content, generating response information corresponding to the conversation content, and transmitting the response information, generating the response information Selects a vector value having a preset similarity to the received vector value among the stored vector values, converts each of the selected vector value and the received vector value into text using a preset decoding algorithm, and receives the received vector value. Response information is generated using the user's request and slot information confirmed using the text corresponding to the vector value, and the slot information confirmed using the vector value with the preset similarity.
  • FIG. 1 is a diagram showing a conversation system according to an embodiment of the present disclosure
  • FIG. 2 is a sequence diagram showing the operation of a conversation system according to an embodiment of the present disclosure
  • FIG. 3 is a diagram for explaining an operation example of a TOD (task_oriented dialogue) system according to an embodiment of the present disclosure.
  • FIG. 4 is a block diagram showing the configuration of an electronic device according to an embodiment of the present disclosure.
  • FIG. 5 is a block diagram showing another configuration of an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 is a diagram for explaining a conversation service model according to an embodiment of the present disclosure.
  • Figure 7 is a diagram for explaining the configuration of the vector DB of Figure 6;
  • Figure 8 is a block diagram for explaining the operation of the encoder of Figure 6;
  • FIG. 9 is a flowchart illustrating a control method of an electronic device according to an embodiment of the present disclosure.
  • FIG. 10 is a flowchart illustrating a conversation method in an electronic device according to an embodiment of the present disclosure
  • FIG. 11 is a flowchart illustrating a trigger method for a conversation system according to an embodiment of the present disclosure.
  • Figure 12 is a sequence diagram showing the operation of a conversation system according to an embodiment of the present disclosure.
  • expressions such as “A or B,” “at least one of A or/and B,” or “one or more of A or/and B” may include all possible combinations of the items listed together.
  • “A or B,” “at least one of A and B,” or “at least one of A or B” includes (1) at least one A, (2) at least one B, or (3) it may refer to all cases including both at least one A and at least one B.
  • a component e.g., a first component is “(operatively or communicatively) coupled with/to” another component (e.g., a second component).
  • another component e.g., a second component.
  • any component may be directly connected to the other component or may be connected through another component (e.g., a third component).
  • a component e.g., a first component
  • another component e.g., a second component
  • no other component e.g., a third component
  • the expression “configured to” depends on the situation, for example, “suitable for,” “having the capacity to.” ,” can be used interchangeably with “designed to,” “adapted to,” “made to,” or “capable of.”
  • the term “configured (or set to)” may not necessarily mean “specifically designed to” in hardware.
  • the expression “a device configured to” may mean that the device is “capable of” working with other devices or components.
  • the phrase “coprocessor configured (or set) to perform A, B, and C” refers to a processor dedicated to performing those operations (e.g., an embedded processor), or executing one or more software programs stored on a memory device. By doing so, it may mean a general-purpose processor (eg, CPU or application processor) capable of performing the corresponding operations.
  • value is defined as a concept that includes not only scalar values but also vectors.
  • expressions such as 'calculate' and 'calculate' may be replaced with expressions that generate the result of the corresponding calculation or calculation.
  • the conversation history information of the present disclosure refers to text information composed of responses from the user and the electronic device within the conversation window.
  • the user request and the response of the electronic device may be at least one of the contents displayed in the chat window or may be audio contents output from the electronic device.
  • Such history information may be a conversation history between one user and one response bot, or it may be a conversation history between a plurality of users and one response bot.
  • a response bot is an automated machine program that provides a specific service according to the user's request.
  • this conversation history information may include not only text information directly input from the user, but also text, video, emoticons, etc. that are voice signals or the result of voice recognition for voice signals.
  • text information is information having at least one user request and/or slot information corresponding to the user request.
  • This text information may be referred to as sentence information, command information, request information, query, etc.
  • text information may be composed of one sentence or may be composed of multiple sentences.
  • the user request is a command requesting performance of a specific service
  • the slot information may be an object or additional explanation information for specifying the request.
  • “turn-on” may be a user request
  • TV may be slot information.
  • This division is an example and can be implemented in various ways depending on the system implementation method. That is, when user requests are classified in more detail, the above-described “TV turn-on” may be one user request.
  • the service in this disclosure includes not only functions that can be performed by running an application installed on the device, but also functions that can be performed by using or controlling another device, and functions that can be performed by using or controlling a plurality of devices. It may include etc.
  • character data refers to data excluding numeric data such as real numbers and imaginary numbers, and not only data consisting of text, but also all types of data that can convert specific information into numerical values (e.g., images data, voice data).
  • FIG. 1 is a diagram illustrating a conversation system according to an embodiment of the present disclosure.
  • the conversation system 1000 may include a terminal device 100 and a server 200.
  • the terminal device 100 may receive conversation information from the user and transmit the input conversation information to the server 200.
  • the conversation information may be text directly input by the user, or may be a voice recognition result obtained by converting the user's spoken voice into text through voice recognition.
  • conversation content may include text (specifically, a phrase), voice, video, emoticons, etc.
  • text-based information will be referred to as conversation information
  • conversation content information consisting of content other than text
  • conversation content information consisting of content other than text
  • the server 200 may receive conversation information from the terminal device 100, generate response information corresponding to the received conversation information, and transmit it to the terminal device 100.
  • the server 200 generates response information using only the current conversation information, generates response information using only the text included in the current user's conversation history information, or responds to conversation history information of other users as well as the current user.
  • Response information can be generated using the vector value.
  • the server 200 confirms that the user’s request (intent) is a music playback command and “Music A” (slot). , Response information that A music playback is necessary can be generated through the music playback application.
  • the specific service when performing a service corresponding to a user's request, if it is difficult to proceed with a specific service using only the above-mentioned conversation information, or if there are several ways to perform the request, the specific service may be performed only with the currently entered conversation information. There are times when it is difficult to provide service.
  • the received conversation information includes the text “Play TV,” is it a request to control a separate electronic device called a TV, or is it a request to execute a specific application included in the terminal device 100? In some cases, it is difficult to tell whether something is being requested or not.
  • the server 200 uses the user's existing conversation history to determine that, if the user has previously requested control of a separate TV device, control of the TV device is requested among the two options, and Response information for controlling the TV device can be generated.
  • the server 200 can utilize the information to generate response information using more accurate response information. do.
  • the server 200 recognizes the TV object as a television, but if the user refers to the TV by a name such as TV or TV, the server 200 may not recognize the user's request.
  • the server 200 may respond to the other user's specification without re-confirming the utterance intention of the current user. It is possible to generate response information by referring to the history as described above.
  • the server 200 uses not only the current user's conversation history but also other users' conversation history to generate response information, which is advantageous for improving service performance.
  • the user's conversation history is not stored as is, but the conversation history corresponding to the conversation history is encoded with a preset natural language processing model and stored.
  • the process of converting to a preset natural language processing model is referred to as encoding processing, but it may also be referred to as encrypting and storing the user's conversation history.
  • the conversation system 1000 not only includes the user's conversation history information, but also the encoded conversation history of another user (or the encoded conversation of another user). It is possible to generate more accurate response information by using history). Additionally, since the conversation history is encoded (or encrypted) and stored, it is also possible to prevent leakage of personal information.
  • FIG. 2 is a sequence diagram showing the operation of a conversation system according to an embodiment of the present disclosure. Specifically, FIG. 2 is a diagram illustrating an example of a conversation system based on user utterances.
  • the terminal device 100 when the terminal device 100 receives a user utterance from a user (201), it can recognize the received utterance by voice and generate conversation information (i.e., text) corresponding to the user utterance (203). .
  • conversation information i.e., text
  • the terminal device 100 may generate conversation content including the corresponding text and a response from the previous server 200. Meanwhile, such conversation content may be generated on the server 200 side rather than on the terminal device 100 side.
  • the terminal device 100 can transmit the conversation content to the server 200 (205).
  • the server 200 When the server 200 receives the corresponding conversation content, it generates response content corresponding to the corresponding content (207). Specifically, the server 200 may apply the corresponding conversation content to a natural language understanding algorithm to confirm the user's intention and slot, and generate response content corresponding to the confirmed intention and slot.
  • Such response content can be transmitted to the terminal device 100 (209).
  • Such response content may consist of only text, or may include text or content information corresponding to the user's request.
  • the terminal device 100 that has received the response content can perform the corresponding response content.
  • the terminal device 100 may generate text corresponding to the input utterance and transmit the text to the server 200.
  • the server 200 may generate response content requesting playback of “A” music content in the music application of the terminal device 100 and provide the response content to the terminal device 100 .
  • the terminal device 100 that has received such response content can run the music application and play music A using the music application.
  • the user may use a similar term, rather than the same term, such as "A'", for the title "A music”.
  • a similar term such as "A'”
  • voice recognition may result in the recognition of "A'” similar to "A” rather than "A”.
  • the existing conversation system will use the music requested by the user.
  • a response may be made to ask again what the content is, or music content that is different from the user's request with a similar pronunciation of Dongdungga may be played.
  • conversation history information of other users is used, and the server 200 uses a preset encoding algorithm to calculate a vector value corresponding to “dungdung music playback” and the calculated vector value among the pre-stored vector values.
  • the server 200 uses a preset encoding algorithm to calculate a vector value corresponding to “dungdung music playback” and the calculated vector value among the pre-stored vector values.
  • the present disclosure can also be applied to a conversation system based on a conversation window (or chat window).
  • the terminal device 100 and the server 200 are shown and described as operating in cooperation to perform a conversation service, but the above-described functions are performed in one device. It may also be carried out.
  • FIG. 2 shows that the server 200 receives the corresponding conversation content and the server 200 calculates the vector value
  • the above-described encoding operation may also be performed on the terminal device 100 side. Such an implementation example will be described later in FIG. 12.
  • FIG. 3 is a diagram for explaining an operation example of a TOD (task_oriented dialogue) system according to an embodiment of the present disclosure.
  • Figure 3 is an example of the large-scale multi-domain Wizard-of-Oz (MutliWOZ) dataset where users book hotels and taxis.
  • the dialogue state is expressed as a ⁇ slot-value> pair for a specific domain.
  • One turn represents a single user's utterance 211 captured in the terminal device 100 and the response 213 of the system (i.e., server 200) thereto.
  • the conversation state can be updated based on the previous conversation state, current user utterance, and previous one-turn context.
  • TOD Trask-oriented Dialogue
  • conversation systems are generally capable of operating in a modular manner, such as understanding the user's intent, executing a request, and responding as a result to the request.
  • Dialogue State Tracking is a key operation that tracks the dialogue state, which is essential information for understanding the user's goal or intention.
  • Conversation state tracking requires analyzing the user's conversation and expressions in previous turn states, extracting the user's purpose or intention, and expressing the conversation state with well-defined slots and values. If a user's conversation spans many domains, it becomes a very difficult task to accurately determine the state of the conversation.
  • domain refers to an area related to a specific service.
  • hotel reservations, taxi reservations, and train reservations can each be domains, and these domains can be configured in various ways depending on how the system is configured. And, this domain may also be referred to as the user's request (intent).
  • Figure 3 shows an example of a data set where a user starts a conversation with a hotel reservation, then requests a taxi reservation, and finally changes the hotel reservation.
  • the conversation state is defined as a list of ⁇ slot-value> pairs for each domain. For example, ([hotel] people 2 stay 5 days) , ([taxi] arrived Hotel Santa)).
  • conversation states can be considered a representation of the entire conversation, and can be used in modules such as actions and responses in the system. Therefore, errors in the conversation state can be propagated not only to the above-described modules, but also to the conversation state of the next turn.
  • ground thuth means using actual conversation information rather than the conversation state created in the previous conversation turn.
  • Table 1 below shows error analysis values when actual conversation information is used instead of using state information of the previous conversation.
  • the present disclosure reinforces the conversation state by using similar conversation context in a pre-calculated index.
  • the present disclosure uses large-scale pre-trained modules. These pre-trained large-scale modules are highly efficient compared to search-based approaches compared to sparse representations and enable better response generation when answering open-ended questions, resulting in high response accuracy for search-based results.
  • This algorithm may be referred to as the NRA-DST framework, and the specific operation and configuration of the framework will be described in detail in FIGS. 7 and 8.
  • Figure 4 is a block diagram showing the configuration of an electronic device according to an embodiment of the present disclosure.
  • a device that directly generates response information such as a server
  • a device that collects conversation messages or voices and generates the necessary conversation information such as a terminal device
  • the electronic device in FIG. 4 can operate as the terminal device 100 in FIG. 1 or the server 200 in FIG. 1 .
  • the electronic device 300 of FIG. 4 may be various devices such as a personal computer (PC), laptop, smartphone, tablet, or server. Referring to FIG. 4 , the electronic device 300 may include a communication device 310, a memory 320, and a processor 330.
  • PC personal computer
  • the electronic device 300 may include a communication device 310, a memory 320, and a processor 330.
  • the communication device 310 is formed to connect the electronic device 300 with an external device (not shown), and is connected to an external device through a local area network (LAN) and the Internet, as well as a USB ( It is also possible to connect through a Universal Serial Bus) port or a wireless communication (e.g., cellular communication, WiFi 802.11a/b/g/n, NFC, Bluetooth) port.
  • This communication device 310 may also be referred to as a transceiver.
  • the communication device 310 may receive conversation content (or conversation information) from another device or transmit conversation content to another device.
  • the conversation content may include one user message or messages entered through multiple turns.
  • the user message may be text typed and input by the user, a message converted from the user's spoken voice into text through voice recognition, or voice data corresponding to the user's spoken voice.
  • the communication device 310 may transmit response content corresponding to the conversation content to another device that transmitted the conversation content, or may receive response content corresponding to the conversation content.
  • This response content may be information containing command information for executing a specific service, content corresponding to information requested by the user, or guidance information regarding the execution results of the service requested by the user.
  • response content containing command information for executing the specific application may be received.
  • the conversation content includes a message for ordering/reserving a specific service such as a hotel reservation, taxi reservation, or ordering a specific product
  • information about the order or reservation result requested by the user may be received as response content.
  • response content is not just one example, and various user requests that may occur in a conversation system and various responses may be made accordingly.
  • the memory 320 is a component for storing O/S, various software, and data for driving the electronic device 300.
  • the memory 320 may be implemented in various forms such as RAM, ROM, flash memory, HDD, external memory, memory card, etc., and is not limited to any one.
  • Memory 320 stores at least one instruction.
  • This at least one instruction may include applications required to perform the above-described conversation system, applications for voice recognition, and various applications for executing services corresponding to response information.
  • the memory 320 stores one or more vector values corresponding to conversation history information.
  • the conversation history information may include not only the current user's conversation history but also the conversation history of other users.
  • other users' conversation history may cause problems with personal information protection, so in the present disclosure, other users' conversation history is converted into vector values and stored.
  • vector values may be generated using a preset encoding algorithm, such as the BERT (Bidirectional Encoder Representations from Transformers) natural language processing model, RoBERTa (Robustly Optimized BERT Pretraining Approach) natural language processing model, and T5 natural language processing model.
  • BERT Bidirectional Encoder Representations from Transformers
  • RoBERTa Robustly Optimized BERT Pretraining Approach
  • T5 natural language processing model
  • the processor 330 controls each component within the electronic device 300.
  • the processor 330 may be composed of a single device such as a central processing unit (CPU) or an application-specific integrated circuit (ASIC), or may be composed of multiple devices such as a CPU or a graphics processing unit (GPU).
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • GPU graphics processing unit
  • the processor 330 can control the communication device 310 to receive text input from a user or a user's spoken voice, generate conversation content using the input text, and transmit the generated conversation content to an external device. there is.
  • the processor 330 encodes the conversation information (e.g., text) included in the generated conversation content into a vector value using a preset algorithm, and transmits the vector value resulting from the encoding to an external device (communication device) 310) can also be controlled.
  • the conversation information e.g., text
  • an external device communication device
  • the processor 330 may identify the user's request (intent) and/or slot information, etc. using the received conversation content. For example, the processor 330 may identify the user's request and/or slot information by analyzing text included in conversation content using a natural language recognition algorithm.
  • additional information may be time information, conversation frequency, and user emotion information.
  • time information may be the time information of the conversation content
  • the conversation frequency may be the number of conversation turns to respond to the user's request
  • the user emotion information may be an emoticon included in the conversation content, the tone of the user's voice, or the conversation content.
  • information that can be inferred from various information such as the relationship with the target (boss, married couple) included in.
  • the above-described information is referred to as additional information, but this additional information may also be used as the above-described slot information.
  • the processor 330 may determine a weight for each identified slot information. Specifically, the processor 330 may determine a weight for each slot information based on the correlation between the identified slot information and the user's request. Such weights may be determined using a preset lookup table or may be determined through the frequency of corresponding slot information in conversation content.
  • the processor 330 can identify whether response information is generated using only the identified user request or slot information. Specifically, the processor 330 may determine whether it is possible to generate response information corresponding to an identified user request using only the identified slot information.
  • the processor 330 may control the communication device 310 to generate response information and transmit the generated response information.
  • response information can be generated by additionally using vector values stored in the memory 320.
  • the processor 330 may convert text included in conversation content into a vector value using a preset algorithm. For example, the processor 330 may generate text data included in conversation content as one sentence and calculate a vector value corresponding to the generated sentence using a preset encoding algorithm. Alternatively, the processor 330 may divide the text included in the conversation content into each turn unit (or sentence unit) and calculate a vector value for each text for each turn unit (or sentence unit) using a preset encoding algorithm. .
  • the processor 330 performs processing to remove unnecessary symbols (e.g., symbols, special characters), etc. from sentences included in the conversation content, or identifies words corresponding to slot information that must be included, Vector values can also be calculated using sentences according to the above-described processing results.
  • the processor 330 also corresponds to various information such as content (e.g., emoticons), conversation time, conversation frequency, and relationship with the person included in the conversation content (boss, couple). Words can also be added to the above sentences.
  • the processor 330 may obtain a vector value that has a certain degree of similarity to the converted vector value among pre-stored vector values. At this time, the processor 330 may identify (or search for) a plurality of vector values among pre-stored vector values as candidate vector values. For example, the processor 330 may obtain a vector value of a certain rank (eg, up to the 2nd or 3rd rank) among vector values with high similarity. At this time, the processor 330 may obtain a vector value similar to the converted vector value among vector values with a similarity level greater than or equal to a preset value at the time of selection.
  • a certain rank eg, up to the 2nd or 3rd rank
  • the processor 330 can use the previously confirmed weight for each slot to obtain slot information with a high weight and a vector value with a high similarity. For example, when reserving a train ticket, if slot information such as “family,” “4 tickets,” and “hometown” is identified, and a high weight is applied to the slot information called “family,” the processor 330 determines the train ticket in the stored DB. Within the reservation domain, you can identify vector values with a preset similarity by searching the index in the order of family -> 4 tickets -> hometown. Alternatively, various methods can be used, such as searching for vector values corresponding to each confirmed slot and calculating similarity by reflecting the above-described weight for each searched vector value.
  • the processor 330 converts the searched vector value into text using a decoding method opposite to the above-described encoding method, extracts slot information from the text, and uses it together with the slot information included in the conversation content to provide response information. You can also create . Specifically, response information can be generated using the user's request confirmed through conversation content and/or slot information confirmed through text corresponding to a vector value having a certain degree of similarity to the slot information.
  • the slot information of the previously stored vector value is used when generating response information.
  • the vector value corresponding to the user's intention is identified, so only slot information corresponding to the pre-stored vector is used when generating response information. It was explained as follows. However, if the user's intention is unclear through the text included in the conversation content, on the contrary, a vector value with a preset similarity to the slot information included in the conversation content is identified among the pre-stored vector values, and the identified vector value is identified. You can also use the corresponding user intent.
  • the text included in the conversation content includes only "Area A”
  • a vector value with similarity to area A among pre-stored vector values can be identified, and the user intention extracted from the stored vector value can be used.
  • the processor 330 calculates a plurality of candidate vector values having similarity to area A, confirms the user intention of each of the plurality of candidate vector values, and confirms the user intention with the highest frequency of the confirmed user intention.
  • the user intention of the most recent candidate vector value among a plurality of candidate vector values may be used.
  • the processor 330 calculates a weight value for each word corresponding to the slot or user intention included in the sentence, and analyzes the similarity with the previously stored vector value for the above-mentioned words. By considering the weight, a vector value with a preset similarity may be identified.
  • the electronic device 300 receives conversation information (or conversation content), calculates the text in the received conversation information as a vector value, and determines the similarity with the previously stored vector value.
  • conversation information or conversation content
  • the electronic device 300 receives the vector value and generate response information using the received vector value and/or the previously stored vector value.
  • the processor 330 may update the conversation history information based on the above-described conversation content and the response information and store it in the memory 320. For example, one sentence is generated based on the character data included in the conversation content and the above-mentioned response information, one vector value is calculated using the generated sentence using a preset encoding algorithm, and the calculated vector value is It can be stored in memory 320.
  • the terminal device 100 uses not only the user's conversation history but also vector values corresponding to other users' conversation history in the process of generating response information, making it possible to generate response information with higher accuracy.
  • other users' conversation history is not stored as is, but is encoded and stored using a preset algorithm, thereby preventing leakage of personal information.
  • the accuracy of response information is higher when using actual conversation information rather than generating response information using only specific keywords (state information), and in the present disclosure, keywords (intent, It is possible to have high response accuracy in that the text corresponding to the actual conversation information is vectorized and stored rather than only the slot information).
  • the terminal device 100 (or electronic device) is shown as including only basic components (i.e., communication device, memory, processor), but the terminal device 100 further includes various components in addition to the above-described configurations. You may. These examples will be described below with reference to FIG. 5 .
  • Figure 5 is a block diagram showing another configuration of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 300' may further include a communication device 310, a memory 320, a processor 330, a display 340, an input interface 350, and a speaker 360. .
  • the communication device 310 and the memory 320 have been described in FIG. 4, so redundant description will be omitted.
  • the display 340 displays a user interface window for selecting a function supported by the electronic device 300.
  • the display 340 may display a user interface window for selecting various functions provided by the electronic device 400.
  • This display 430 may be a monitor such as a liquid crystal display (LCD), an organic light emitting diode (OLED), etc., and may also be implemented as a touch screen that can simultaneously perform some functions of the input interface 350, which will be described later. .
  • LCD liquid crystal display
  • OLED organic light emitting diode
  • the display 340 may display content corresponding to response information or display current conversation history information.
  • the input interface 350 may select a function of the electronic device 300 and receive a control command for the function from the user.
  • This input interface 350 may be a keyboard, mouse, touch pad, etc., and may also include a microphone for receiving the user's voice.
  • the speaker 360 outputs sound. This speaker 360 can output response information corresponding to the received response message as sound.
  • the processor 330 may convert the user's voice input through the microphone into text and transmit the converted text to the external server 200. And, when response information is received from the external server 200, text corresponding to the received response information can be output through the speaker 360 using the TTS function.
  • the electronic device 300 continuously monitors whether the voice of a preset trigger command is input, and if it is determined that the input user utterance voice includes the preset trigger command, the processor 330 performs the conversation as described above.
  • the service can be run.
  • the electronic device 300 receives a similar trigger name similar to the currently set trigger command from an external device, and uses not only the trigger name set by the user but also the similar trigger name when determining whether or not to include the above-described trigger command to conduct a conversation. You can also determine whether to start a service.
  • the current command that notifies the start (or wake-up) of the conversation system of the electronic device 300 is “Hi Bixby,” which is frequently used by other users as “Hi Bixby” and “Hi Bixby.”
  • the server 200 may provide information about the similar name to the terminal device 100 so that the conversation service can be triggered even by user utterances corresponding to “Hi Big ⁇ ” and “Hi Bigs.” You can.
  • the electronic device 300 that has received this pseudo-trigger information stores the pseudo-trigger information in the memory 320 and uses not only the trigger command set by the user but also the pseudo-trigger command when determining whether to start the speech service. You can.
  • FIG. 5 further illustrates components different from those of FIG. 4 (e.g., display, speaker, user input device), it is not necessary to include all of the above-described components when implemented, and only some of the above-described components are further included. It can also be implemented in a form. For example, if the electronic device 300 is configured with an AI speaker, only a microphone and speaker may be added.
  • Figure 6 is a diagram for explaining a conversation service model according to an embodiment of the present disclosure.
  • the processor 600 may include an NLU module 610, a conversation manager module 620, a query encoder 630, a vector DB 640, and a response module 650.
  • the NLU module 610 can extract text included in conversation content and extract the user's request (or purpose), slot, etc. from the extracted text.
  • the NLU model 610 uses not only text information but also various information included in the conversation content (for example, emoticons that can predict the user's mood, conversation time, conversation frequency, etc.) to determine the user's request and/or You can extract slot information.
  • the conversation manager module 620 may determine the domain to use based on the extracted user's purpose and slot, and transmit the corresponding information to the DB and/or response model corresponding to the determined domain.
  • the conversation manager module 620 can calculate the weight for the extracted slot.
  • text included in conversation content may include various slot information, and some of the included slot information may be closely related to the user's request (or purpose), while others may have a low correlation.
  • the conversation manager module 620 can calculate weight information for each extracted slot.
  • slot information For example, if the user's text is "I'm traveling with friends and family, please reserve 4 train tickets to Busan at 7 o'clock this Friday", the user's purpose is to reserve train tickets, "This Friday at 7 o'clock”, “ “4 train tickets”, “friends and family”, etc. can be used as slot information.
  • time and number of reservations are major keywords, so slot information regarding time information and number of reservations may be given a high weight, while travel purpose, target audience, etc. may be given relatively low weight.
  • time information and travel target are the main keywords, so contrary to the previous example, a high weight may be given to travel target. In other words, the weight is not fixedly applied to each keyword, but depends on its relevance to the user's purpose described above.
  • the weight of slot information can be changed.
  • the query encoder 630 may calculate vector values corresponding to the extracted user's purpose and slot. For example, a sentence can be constructed using the extracted user's purpose and slot, and a vector value can be calculated from the constructed sentence using a preset algorithm. In implementation, it is possible to calculate the vector value by processing the user's input sentence as is with a preset algorithm, rather than reconstructing the sentence through the extracted purpose and slot. In addition, as described above, the query encoder 630 uses the weight information about the slot to reconstruct the sentence using the slot information and the user request greater than the preset weight, and applies the preset algorithm using the reconstructed sentence to vector The value can be calculated.
  • the vector DB 640 may compare the similarity between the input vector value and previously stored vector values and search for a candidate vector among the previously stored vector values.
  • the number of searched candidate vectors may vary depending on the design method, and at least 2 to 3 candidate vectors may be searched, or candidate vectors may be searched among vectors with a certain similarity value.
  • the vector DB 640 can receive weight information for each slot, and can search for a candidate vector by considering the weight of the slot described above in the similarity comparison process. The specific configuration and operation of the vector DB 640 will be described later with reference to FIG. 7.
  • the response module 650 may generate response content using conversation history, etc.
  • the response module 650 may include a conversation state tracking module 651, a conversation state tracking updater 653, a conversation state encoder 655, and a conversation state decoder 657.
  • the conversation state tracking module 651 may receive conversation history from the conversation manager module 620 and preferentially determine whether response information can be generated through the received conversation history. If response information can be generated through the received conversation history, the conversation state tracking module 651 can generate response information only with information included in the corresponding conversation content. In other words, a response can be performed without using the vector DB.
  • the conversation state tracking module 651 controls the decoder 657 to convert the candidate vector value provided from the vector DB 640 into text, and combines the decoded information with Response information can be generated using information included in conversation content.
  • the conversation state tracking module 651 combines the two text information by performing text embedding, since both the information received from the conversation manager module 620 and the information received through the decoder 657 are text information, and the combined information is You can use it to generate response information.
  • the dialogue state tracking module 651 can combine the two text information by applying a dialogue information gating mechanism that determines whether to apply the dialogue information depending on the context information of the dialogue information. By using the gating mechanism, it is possible to prevent issues of overuse or underuse of functions as the transmitted information is balanced.
  • the conversation state tracking module 651 controls the conversation state updater 653 to update the conversation state based on the response information generated through the response, decoded information, and information included in the conversation content.
  • the encoder 655 can be controlled so that a vector value corresponding to the updated conversation state is generated and stored in the DB.
  • the vector value is converted on the processor 600 side based on the received conversation information, but when implemented, the encoding operation of converting the vector value into a vector value is performed on the terminal device side. , It can also be implemented in the form of performing the above-described operation using a vector value transmitted from the terminal device.
  • FIG. 7 is a diagram for explaining the configuration of the vector DB of FIG. 6.
  • the vector DB stores vector values corresponding to conversation history information.
  • vector values are structured and indexed. We will first explain how to create such a DB.
  • the DB generator may include a query encoder 710 and a slot encoder 720.
  • the query encoder 710 is a module that identifies the user's request or intention from text corresponding to conversation content.
  • the query encoder 710 can calculate a vector value corresponding to the user request or intent.
  • the query encoder 710 may use not only text but also various additional information (eg, conversation time, conversation frequency, information on subjects other than the user, etc.) that can be confirmed through conversation content.
  • the slot encoder 720 is a module that detects detailed items corresponding to the above-described request. Specifically, the slot encoder 720 may receive text included in conversation content and calculate a vector value corresponding to the slot information using the received text. At this time, the slot encoder 720 can generate a positive context (c i +) and a negative context (c i -). The slot encoder 720 can also calculate a vector value using not only text but also various additional information that can be confirmed through conversation content.
  • c i, c i sms is the text entered by the user
  • E q is the query encoder
  • E k is the slot encoder
  • sim is the dot procut operator.
  • the input text received in the future is encoded to calculate a vector value (730), and the calculated vector value is compared with the previously generated index value to determine the preset similarity among the plurality of previously stored vector values (740). You can search for vector values with
  • the DB stores vector values related to hotel reservation, parking lot, Wi-Fi, etc. You can search.
  • Figure 8 is a diagram for explaining another form of a response module according to an embodiment of the present disclosure.
  • the response module includes a vector value reception module 830, an encoder 840, and a decoder 850.
  • the method of FIG. 8 differs in that it uses a different encoding method. Specifically, in Figure 7, an encoding method was used in the process of calculating vector values from input conversation content or converting candidate vector values into text.
  • FIG. 9 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present disclosure.
  • the vector value corresponding to the conversation history information is stored.
  • vector values corresponding to conversation history information of each different user can be stored.
  • the vector value is calculated using a preset encoding algorithm, and the preset encoding algorithm is BERT (Bidirectional Encoder Representations from Transformers) natural language processing model, RoBERTa (Robustly Optimized BERT Pretraining Approach) natural language processing model, T5 natural language processing model, etc. You can.
  • BERT Bidirectional Encoder Representations from Transformers
  • RoBERTa Robottly Optimized BERT Pretraining Approach
  • conversation content is received (910).
  • Such conversation content may include only one sentence or may include multiple sentences.
  • the content may be text or voice data corresponding to the user's voice, and may include not only text but also additional information such as content and time information of the conversation.
  • response content corresponding to the conversation content is generated. Specifically, text is extracted from conversation content.
  • the user's request for the conversation content can be confirmed using the last sentence of the conversation content, and slot information included in the conversation content can be used to determine whether response information corresponding to the user's request can be obtained. If additional information is not needed, response information can be generated using only the extracted text information.
  • a vector value with a preset similarity can be obtained using the calculated vector value among the stored vector values, and response information can be obtained using the obtained vector value and the calculated vector value.
  • a vector value can be calculated from the extracted text using a preset encoding algorithm.
  • text-type data included in conversation content can be generated as a single sentence, and a vector can be calculated for the generated single sentence using a preset encoding algorithm.
  • the character data included in the conversation content may be divided into sentence units, and vectors may be calculated for each text by sentence unit using a preset encoding algorithm.
  • response information can be obtained using the calculated vector value and the stored vector value. For example, a candidate vector value with a preset similarity is decoded into text, slot information in the decoded text is extracted, and response information is provided using the user's request, slot information included in the conversation content, and the extracted slot information. can be created. At this time, there may be a plurality of candidate vector values described above, and each of the plurality of candidate vector values may be converted into text, and response information may be generated based on the converted text and the extracted text.
  • one text sentence is generated based on the converted text and the extracted text, and the generated text sentence is converted into one using a preset encoding algorithm. You can calculate the vector of and save the calculated vector.
  • response content can be transmitted or an event corresponding to the response content can be performed.
  • control method of an electronic device uses not only the user's conversation history but also vector values corresponding to other users' conversation history in the process of generating response content, making it possible to generate response information with higher accuracy.
  • other users' conversation history is not stored as is, but is encoded and stored using a preset algorithm, thereby preventing leakage of personal information.
  • FIG. 10 is a flowchart illustrating a conversation method in an electronic device according to an embodiment of the present disclosure.
  • text information corresponding to the user's utterance can be input.
  • only text information corresponding to the current utterance can be input, and if several utterances and response processes are currently in progress, conversation content including previous conversation history can be input.
  • the conversation content may include additional information in addition to text, such as the time of the current conversation and user emotion information that can be confirmed through a separate algorithm.
  • the user's intention and slot information can be extracted from the user's utterance.
  • the user's intended request and detailed information (or slot information) corresponding to the request can be extracted from the user text using the NLU model described above.
  • additional information eg, time, conversation frequency, emotional information, etc. may be used.
  • response information can be generated with only the extracted information and the response information can be provided to the terminal device corresponding to the user, or a service corresponding to the response information can be performed directly. .
  • the texts included in the user's speech information are calculated as vector values using a preset encoding algorithm.
  • the vector value may reflect not only the text included in the conversation content, but also various additional information included in the conversation content.
  • a candidate vector value having a preset similarity to the calculated vector value is searched among pre-stored vector values.
  • the searched candidate vector value can be decoded into text, and slot information included in the decoded text can be additionally used to generate response information.
  • FIG. 11 is a flowchart illustrating a trigger method for a conversation system according to an embodiment of the present disclosure.
  • voice recognition or conversation service
  • the trigger can be vectorized together with the voice data (S1140) and it can be checked whether a vector value similar to the trigger exists (S1150). Such judgments and operations may be performed through collaboration with other devices (e.g., transmitting information about the current trigger command to a server and receiving similar trigger commands thereto).
  • the trigger information of the terminal device can be updated using the candidate trigger information.
  • the trigger method according to the present disclosure registers not only the trigger set by the user but also similar triggers, making it possible to respond to the user's conversation service request with greater flexibility.
  • FIG. 12 is a sequence diagram showing the operation of a conversation system according to an embodiment of the present disclosure. Specifically, FIG. 12 is a diagram illustrating an example of encoding conversation information in the terminal device 100.
  • the terminal device 100 when the terminal device 100 receives a user utterance from a user (S1201), it can recognize the received utterance by voice and generate conversation information (i.e., text) corresponding to the user utterance (S1203). .
  • conversation information i.e., text
  • the terminal device 100 may store conversation content including the corresponding text and a response from the previous server 200.
  • the terminal device 100 may generate a vector value using text included in the above-described conversation content and a preset encoding algorithm. At this time, the terminal device 100 calculates a vector value using only the conversation text of the last turn included in the above-described conversation content, or recognizes user intention and slot information using all conversation texts included in the above-described conversation content. , one sentence can be generated using the recognized user intention and slot information, and the generated sentence can be generated as one vector using a preset encoding algorithm.
  • the terminal device 100 may check the user intention and slot of the conversation text included in the conversation content using a natural language understanding algorithm, and generate one sentence using the confirmed user intention and slot information.
  • the terminal device (!00) may be implemented by calculating a vector value for each conversation text included in the conversation content on a turn-by-turn (or character-by-character) basis and transmitting a plurality of calculated vector values to the server 200. there is.
  • the terminal device 100 may calculate a vector value by reflecting not only the conversation text but also additional information such as the current conversation time, conversation frequency, and predicted user emotion.
  • the server 200 may receive the vector value and generate response information based on the received vector value (S1207). Specifically, the server 200 selects a vector value that has a preset similarity to the received vector value among the stored vector values, and converts each of the selected and received vector values into text using a preset decoding algorithm, Response content (or response information) can be generated using the slot information confirmed using the user's request and slot information confirmed using the text corresponding to the received vector value and the vector value having a preset similarity.
  • the server 200 may transmit the generated response content to the terminal device 100). And the terminal device 100 that has received the response content can perform the corresponding response content (S1209).
  • the user conversation information is not directly provided to the server 200, but is vectorized and provided to the server 200, thereby minimizing exposure of the user's personal information.
  • unit or “module” used in the present disclosure includes a unit comprised of hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. You can.
  • a “part” or “module” may be an integrated part, a minimum unit that performs one or more functions, or a part thereof.
  • a module may be comprised of an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • Various embodiments of the present disclosure may be implemented as software including instructions stored in a machine-readable storage media that can be read by a machine (e.g., a computer).
  • the device may read instructions stored from the storage medium.
  • a device capable of calling and operating according to the called instruction may include an electronic device (e.g., electronic device 300) according to the disclosed embodiments.
  • the processor Functions corresponding to the above-mentioned instructions can be performed directly or using other components under the control of the processor. Instructions may include code generated or executed by a compiler or interpreter.
  • Machine-readable storage The medium may be provided in the form of a non-transitory storage medium.
  • 'non-transitory' only means that the storage medium does not contain signals and is tangible, and data is stored there. There is no distinction between semi-permanent or temporary storage in the medium.
  • Computer program products are commodities and can be traded between sellers and buyers.
  • the computer program product may be distributed on a machine-readable storage medium (e.g. compact disc read only memory (CD-ROM)) or online through an application store (e.g. Play StoreTM).
  • a machine-readable storage medium e.g. compact disc read only memory (CD-ROM)
  • an application store e.g. Play StoreTM
  • at least a portion of the computer program product may be at least temporarily stored or created temporarily in a storage medium such as the memory of a manufacturer's server, an application store's server, or a relay server.
  • Each component may be composed of a single or multiple entities, and some of the above-described sub-components may be omitted or other sub-components may be used. It may be further included in various embodiments. Alternatively or additionally, some components (e.g., modules or programs) may be integrated into a single entity and perform the same or similar functions performed by each corresponding component prior to integration. According to various embodiments, operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or at least some operations may be executed in a different order, omitted, or other operations may be added. It can be.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Signal Processing (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Child & Adolescent Psychology (AREA)
  • General Health & Medical Sciences (AREA)
  • Hospice & Palliative Care (AREA)
  • Psychiatry (AREA)
  • Machine Translation (AREA)

Abstract

전자 장치가 개시된다. 본 전자 장치는 통신 장치, 적어도 하나의 인스트럭션을 저장하고, 대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 메모리, 및 적어도 하나의 인스트럭션을 실행함으로써, 대화 컨텐츠로부터 텍스트를 추출하고, 추출된 텍스트를 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출하고, 산출된 벡터 값 및 저장된 하나 이상의 벡터 값을 이용하여 응답 정보를 생성하는 프로세서를 포함한다.

Description

전자 장치 및 이의 제어 방법
본 개시는 전자 장치 및 이의 제어 방법에 관한 것으로, 더욱 상세하게는 사용자 대화 이력을 벡터화하여 저장하여 이용하는 전자 장치 및 이의 제어 방법에 관한 것이다.
최근에는 메시지 어플리케이션(혹은, 메신저 어플리케이션, 채팅 어플리케이션) 또는 음성 인식 어플리케이션을 통해 입력된 음성 또는 텍스트로부터 사용자 요청(또는 명령)을 확인하고, 확인된 사용자 요청에 대응되는 서비스(예를 들어, 스케줄 관리 서비스, 예약 서비스, 쇼핑 서비스 등)를 제공하고 있다.
사용자가 요청한 서비스에 대한 정확한 응답을 위해서는, 사용자가 입력한 텍스트 또는 음성으로부터 사용자의 의도 및 명령을 정확하게 파악하는 것이 요구되었다.
상기 정보는 본 개시의 이해를 돕기 위한 정보로만 제공된다. 상술한 내용 중 어느 것이 본 개시와 관련하여 선행 기술로 적용될 수 있는지에 대해서 어떠한 결정도 없으며, 어떠한 주장도 이루어지지 않았다.
본 개시의 예는 적어도 상술한 문제점 및/또는 단점을 해결하기 위한 것이고, 후술하는 이점을 제공하는 것이다. 따라서, 본 개시의 목적은 사용자의 대화 이력을 벡터화하여 저장할 수 있는 전자 장치 및 그 제어 방법을 제공하는 데 있다.
추가적으로 예에 대해서는 다음의 설명에 후술할 것이고, 본 개시의 예들로부터 명백해지거나 학습될 수도 있다.
본 개시의 일 실시 예에 따른 전자 장치는 통신 장치. 적어도 하나의 인스트럭션을 저장하고, 대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 메모리, 및 상기 적어도 하나의 인스트럭션을 실행함으로써, 대화 컨텐츠로부터 텍스트를 추출하고, 상기 추출된 텍스트를 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출하고, 상기 산출된 벡터 값 및 상기 저장된 하나 이상의 벡터 값을 이용하여 응답 정보를 생성하는 프로세서를 포함한다.
한편, 본 개시의 일 실시 예에 따른 전자 장치에서의 제어 방법은 대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 단계, 대화 컨텐츠를 수신하는 단계, 상기 대화 컨텐츠에 대응되는 응답 정보를 생성하는 단계, 및 상기 응답 정보를 전송하는 단계를 포함하고, 상기 응답 정보를 생성하는 단계는, 상기 대화 컨텐츠로부터 텍스트를 추출하는 단계, 상기 추출된 텍스트를 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출하는 단계, 및 상기 산출된 벡터 값 및 상기 저장된 하나 이상의 벡터 값을 이용하여 응답 정보를 생성하는 단계를 포함한다.
한편, 본 개시의 일 실시 예에 따른 전자 장치에서의 제어 방법을 실행하기 위한 프로그램을 포함하는 컴퓨터 판독가능 기록 매체에 있어서, 상기 제어 방법은, 대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 단계, 대화 컨텐츠에 포함된 텍스트에 대응되는 벡터 값을 수신하는 단계, 상기 대화 컨텐츠에 대응되는 응답 정보를 생성하는 단계, 및 상기 응답 정보를 전송하는 단계를 포함하고, 상기 응답 정보를 생성하는 단계는, 상기 저장된 벡터 값 중 상기 수신된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 선택하고, 상기 선택된 벡터 값 및 상기 수신된 벡터 값 각각을 기설정된 디코딩 알고리즘을 이용하여 텍스트로 변환하고, 상기 수신된 벡터 값에 대응되는 텍스트를 이용하여 확인된 사용자의 요청 및 슬롯 정보와 상기 기설정된 유사도를 갖는 벡터 값을 이용하여 확인된 슬롯 정보를 이용하여 응답 정보를 생성한다.
본 개시의 실시예들의 상술하거나 다른 측면, 특징, 이익들은 첨부도면을 참조한 아래의 설명으로부터 더욱 명백해질 것이다. 첨부도면에서:
도 1은 본 개시의 일 실시 예에 따른 대화 시스템을 나타내는 도면,
도 2는 본 개시의 일 실시 예에 따른 대화 시스템의 동작을 나타내는 시퀀스도,
도 3은 본 개시의 일 실시 예에 따른 TOD(task_oriented Dialogue) 시스템의 동작 예를 설명하기 위한 도면이다.
도 4는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 도시한 블럭도,
도 5는 본 개시의 일 실시 예에 따른 전자 장치의 다른 구성을 도시한 블록도,
도 6은 본 개시의 일 실시 예에 따른 대화 서비스 모델을 설명하기 위한 도면,
도 7은 도 6의 벡터 DB의 구성을 설명하기 위한 도면,
도 8은 도 6의 인코더의 동작을 설명하기 위한 블럭도,
도 9는 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도,
도 10은 본 개시의 일 실시 예에 따른 전자 장치에서의 대화 방법을 설명하기 위한 흐름도,
도 11은 본 개시의 일 실시 예에 따른 대화 시스템에 대한 트리거 방법을 설명하기 위한 흐름도, 그리고,
도 12는 본 개시의 일 실시 예에 따른 대화 시스템의 동작을 나타내는 시퀀스도이다.
도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다.
-
이하에서는 본원의 청구항 및 그의 등가물(equivalent)의 포괄적인 이해를 돕기 위하여, 본 발명의 다양한 실시 예가 기재된다. 그러나 이는 본 문서에 기재된 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 문서의 실시 예의 다양한 변경(modifications), 균등물(equivalents), 및/또는 대체물(alternatives)을 포함하는 것으로 이해되어야 한다.
이하의 설명 및 청구항에 사용된 용어 및 단어는 서지적 의미로 제한되지 않으며, 발명자가 개시 내용을 명화하고 일관되게 설명하기 위하여 사용된 것이다. 따라서, 본 발명의 다양한 실시예에 대한 다음의 설명은 청구항 및 그 등가물에 의해 정의된 바와 같이 본 발명을 제한할 목적이 아니라, 예시 목적으로 사용되었다.
그리고 단수 형태(예를 들어, "a", "an", "the")는 문맥상 명백하게 달리 지시하지 않는 한 복수 지시 대상을 포함하는 것으로 이해되어야 한다. 예를 들어, "부품 표면"과 같은 표현은 하나 이상의 표면을 의미할 수 있다.
본 문서에서, "가진다," "가질 수 있다," "포함한다," 또는 "포함할 수 있다." 등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다.
본 문서에서, "A 또는 B," "A 또는/및 B 중 적어도 하나," 또는 "A 또는/및 B 중 하나 또는 그 이상 "등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. 예를 들면, "A 또는 B," "A 및 B 중 적어도 하나," 또는 "A 또는 B 중 적어도 하나"는, (1) 적어도 하나의 A를 포함, (2) 적어도 하나의 B를 포함, 또는 (3) 적어도 하나의 A 및 적어도 하나의 B 모두를 포함하는 경우를 모두 지칭할 수 있다.
본 문서에서 사용된 "제1," "제2," "첫째," 또는 "둘째, "등의 표현들은 다양한 구성요소들을, 순서 및/또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다.
어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "(기능적으로 또는 통신적으로) 연결되어((operatively or communicatively) coupled with/to)" 있다거나 "접속되어(connected to)" 있다고 언급된 때에는, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제3 구성요소)를 통하여 연결될 수 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 상기 어떤 구성요소와 상기 다른 구성요소 사이에 다른 구성요소(예: 제3 구성요소)가 존재하지 않은 것으로 이해될 수 있다.
본 문서에서 사용된 표현 "~하도록 구성된(또는 설정된)(configured to)"은 상황에 따라, 예를 들면, "~에 적합한(suitable for)," "~하는 능력을 가지는(having the capacity to)," "~하도록 설계된(designed to)," "~하도록 변경된(adapted to)," "~하도록 만들어진(made to)," 또는 "~를 할 수 있는(capable of)"과 바꾸어 사용될 수 있다. 용어 "~하도록 구성된(또는 설정된)"은 하드웨어적으로 "특별히 설계된(specifically designed to)" 것만을 반드시 의미하지 않을 수 있다. 대신, 어떤 상황에서는, "~하도록 구성된 장치"라는 표현은, 그 장치가 다른 장치 또는 부품들과 함께 "~할 수 있는" 것을 의미할 수 있다. 예를 들면, 문구 "A, B, 및 C를 수행하도록 구성된(또는 설정된) 부프로세서"는 해당 동작을 수행하기 위한 전용 프로세서(예: 임베디드 프로세서), 또는 메모리 장치에 저장된 하나 이상의 소프트웨어 프로그램들을 실행함으로써, 해당 동작들을 수행할 수 있는 범용 프로세서(generic-purpose processor)(예: CPU 또는 application processor)를 의미할 수 있다.
그리고 본 개시에서 "값"이라 함은 스칼라값뿐만 아니라 벡터도 포함하는 개념으로 정의된다. 그리고 본 개시에서 '산출한다', '계산한다' 등의 표현은 해당 산출 또는 계산의 결과물을 생성한다는 표현으로 대체될 수 있다.
한편, 본 개시의 대화 이력 정보는 대화창 내의 사용자와 전자 장치의 응답으로 구성된 텍스트 정보를 의미한다. 사용자 요청 및 전자 장치의 응답은 대화창 내의 표시된 내용 중 적어도 하나이거나, 전자 장치의 출력하는 음성 내용일 수도 있다. 이와 같은 이력 정보는 하나의 사용자와 하나의 응답 봇 간의 대화 이력일 수 있으며, 복수의 사용자와 하나의 응답 봇 간의 대화 이력일 수 있다. 여기서 응답 봇은 사용자의 요청에 따라 특정의 서비스를 제공하는 자동화된 기계 프로그램이다. 그리고 이러한 대화 이력 정보는 사용자로부터 직접 입력받은 텍스트 정보뿐만 아니라, 음성 신호 또는 음성 신호에 대한 음성 인식 결과인 텍스트, 동영상, 이모티콘 등을 포함할 수 있다.
그리고 본 개시에서 텍스트 정보는 적어도 하나의 사용자 요청 및/또는 사용자 요청에 대응되는 슬롯 정보를 갖는 정보이다. 이러한 텍스트 정보는 문장 정보, 명령 정보, 요청 정보, 쿼리 등으로 지칭될 수 있다. 그리고 텍스트 정보는 하나의 문장으로 구성될 수 있고, 복수의 문장으로 구성될 수도 있다.
그리고 사용자 요청은 특정 서비스의 수행을 요청하는 명령이고, 슬롯 정보는 해당 요청을 특정하기 위한 목적물 또는 부가 설명 정보일 수 있다. 예를 들어, "TV Turn-on"이란 문장에서 "turn-on"은 사용자 요청이고, TV가 슬롯 정보일 수 있다. 이와 같은 구분은 일 예이며, 시스템 구현 방식에 따라 다양하게 구현될 수 있다. 즉, 사용자 요청을 보다 상세하게 구분하는 경우에는 상술한 "TV turn-on"이 하나의 사용자 요청일 수 있다.
그리고 본 개시에서의 서비스는 해당 장치에 설치된 어플리케이션의 구동을 통하여 수행할 수 있는 기능뿐만 아니라, 다른 장치를 이용 또는 제어하여 수행할 수 있는 기능, 복수의 장치를 이용 또는 제어하여 수행할 수 있는 기능 등을 포함할 수 있다.
그리고 본 개시에서 문자형 데이터는 실수, 허수 등과 같은 수치형 데이터를 제외한 데이터를 의미하며, 텍스트로 구성되는 데이터뿐만 아니라, 특정 정보를 수치 값으로 변환할 수 있는 모든 형태의 데이터(예를 들어, 이미지 데이터, 음성 데이터)를 포함한다.
후술하는 본 개시의 각 단계의 수학적 연산 및 산출은 해당 연산 또는 산출을 하기 위해 공지되어 있는 코딩 방법 및/또는 본 개시에 적합하게 고안된 코딩에 의해서 컴퓨터 연산으로 구현될 수 있다.
이하에서는 도면을 참조하여 본 발명에 대해 상세히 설명하기로 한다.
도 1은 본 개시의 일 실시 예에 따른 대화 시스템을 나타내는 도면이다.
도 1을 참조하면, 대화 시스템(1000)은 단말장치(100) 및 서버(200)를 포함할 수 있다.
단말장치(100)는 사용자로부터 대화 정보를 입력받고, 입력받은 대화 정보를 서버(200)에 전송할 수 있다. 여기서 대화 정보는 사용자가 직접 입력한 텍스트이거나, 사용자의 발화 음성을 음성 인식을 통하여 텍스트로 변환한 음성 인식 결과일 수 있다.
이러한 대화 정보는 대화 컨텐츠로 지칭될 수 있다. 예를 들어, 대화 컨텐츠에는 텍스트(구체적으로, 문장(phrase)), 음성, 동영상, 이모티콘 등을 포함할 수 있다. 이하에서는 설명을 용이하게 하기 위하여, 텍스트 기반의 정보를 대화 정보라고 지칭하고, 텍스트 이외에 컨텐츠로 구성되는 정보를 대화 컨텐츠라고 지칭한다.
서버(200)는 단말장치(100)로부터 대화 정보를 수신하고, 수신된 대화 정보에 대응되는 응답 정보를 생성하여 단말장치(100)에 전송할 수 있다.
이때, 서버(200)는 현재 대화 정보만을 이용하여 응답 정보를 생성하거나, 현재 사용자의 대화 이력 정보에 포함된 텍스트만을 이용하여 응답 정보를 생성하거나, 현재 사용자뿐만 아니라 다른 사용자들의 대화 이력 정보에 대응되는 벡터 값을 이용하여 응답 정보를 생성할 수 있다.
예를 들어, 수신된 대화 정보에 "A 음악 틀어줘"라는 텍스트가 포함되어 있는 경우, 서버(200)는 사용자의 요청(intent)이 음악 재생명령이고, "A음악"(슬롯)것을 확인하여, 음악재생 애플리케이션을 통하여 A 음악 재생이 필요하다는 응답 정보를 생성할 수 있다.
한편, 사용자의 요청에 대응되는 서비스를 진행함에 있어서, 상술한 대화 정보만으로 특정의 서비스를 진행하기 어려운 경우나, 해당 요청을 수행하는 방법의 가짓수가 여러 가지인 경우, 현재 입력된 대화 정보만으로 특정 서비스를 진행하기 어려운 경우가 있다.
예를 들어, 수신된 대화 정보에 "TV 틀어줘"라는 텍스트가 포함되어 있는 경우, TV라는 별도의 전자 기기의 제어를 요청하는 것인지, 아니면, 단말장치(100) 내에 포함된 특정 어플리케이션의 실행을 요청하는 것인지를 구분하기 어려운 경우가 있다.
즉, 단말장치(100)에 별도의 TV 장치를 제어하기 위한 제1 어플리케이션 및 직접 TV 컨텐츠를 제어하기 위한 제2 어플리케이션이 설치되어 있는 경우에, 사용자의 "TV 틀어줘"라는 요청은 해당 대화 정보만으로 사용자의 요청을 정확하게 파악하기 어렵다.
이 경우, 서버(200)는 사용자의 기존의 대화 이력을 이용하여, 기존에 사용자가 별도의 TV 장치의 제어를 요청한 이력이 있다면, 두 가지 선택지 중 TV 장치의 제어를 요청한 것으로 파악하고, 별도의 TV 장치의 제어를 수행하기 위한 응답 정보를 생성할 수 있다.
이와 같이 사용자의 대화 이력에 사용자의 요청을 특정하기 위한 정보(즉, 슬롯 정보)가 포함되어 있으면, 서버(200)는 해당 정보를 활용하여 더욱 정확한 응답 정보를 활용하여 응답 정보를 생성하는 것이 가능하다.
또한, 사용자의 발화가 정확하게 인식되지 못한 경우에도 서버(200)는 정확한 응답 정보를 생성하기 어렵다. 예를 들어, 사용자가 표준어가 아닌 비표준어를 사용하여 발화한 경우, 또는 사용자의 연령이 낮아 사용자의 발화 의도 또는 슬롯의 내용을 정확하게 인식하지 못하는 경우가 있다. 예를 들어, TV에 대한 객체를 서버(200)는 텔레비전으로 인식하고 있는데, 사용자가 TV를 테레비, 티비 등의 명칭으로 지칭하는 경우, 서버(200)는 사용자의 요청을 인식하지 못할 수 있다.
만약, 다른 사용자의 "테레비 켜줘"라는 요청에 대응하여 외부 TV를 턴-온하는 응답한 이력이 있었던 경우, 서버(200)는 현재 사용자에게 발화 의도 등을 재차 확인하는 과정 없이, 다른 사용자의 상술한 바와 같은 이력을 참고하여 응답 정보를 생성하는 것이 가능하다.
이와 같이 서버(200)는 사용자의 대화 정보에 대한 응답 정보를 생성하는 과정에서, 현재 사용자의 대화 이력뿐만 아니라, 다른 사용자의 대화 이력도 활용하여 응답 정보를 생성하는 것이 서비스 성능 향상에 유리하다.
그러나 다른 사용자의 대화 이력을 활용하기 위하여, 다른 사용자의 대화 이력을 그대로 저장하는 경우, 개인 정보 노출 등이 문제될 수 있다.
따라서, 본 개시에서는 사용자의 대화 이력을 그대로 저장하지 않고, 대화 이력에 대응되는 대화 이력을 기설정된 자연어 처리 모델로 인코딩하여 저장하여 이용한다. 이하에서는 기설정된 자연어 처리 모델로 변환하는 과정을 인코딩 처리라 지칭하지만, 사용자의 대화 이력을 암호화하여 저장한다고 지칭될 수도 있다.
이와 같은 서버(200)에서의 구체적인 동작에 대해서는 도 4 내지 도 8을 참조하여 후술한다.
이상과 같이 본 개시에 따른 대화 시스템(1000)은 사용자의 대화 컨텐츠에 대한 응답 메시지를 생성하는 과정에서, 사용자의 대화 이력 정보뿐만 아니라, 인코딩된 다른 사용자의 대화 이력(또는 암호화된 다른 사용자의 대화 이력)을 이용함으로써 더욱 정확한 응답 정보를 생성하는 것이 가능하다. 또한, 대화 이력을 인코딩(또는 암호화)하여 저장하는바, 개인 정보의 유출을 방지하는 것도 가능하다.
도 2는 본 개시의 일 실시 예에 따른 대화 시스템의 동작을 나타내는 시퀀스도이다. 구체적으로, 도 2는 사용자의 발화에 기초한 대화 시스템의 예를 도시한 도면이다.
도 2를 참조하면, 단말장치(100)는 사용자로부터 사용자 발화를 수신하면(201), 수신된 발화를 음성 인식하여 사용자 발화에 대응되는 대화 정보(즉, 텍스트)를 생성할 수 있다(203).
만약, 해당 서비스에 대한 발화가 연속적으로 진행중이었으면 단말장치(100)는 해당 텍스트 및 이전 서버(200)에서의 응답을 포함하는 대화 컨텐츠를 생성할 수도 있다. 한편, 이와 같은 대화 컨텐츠는 단말장치(100) 측이 아닌 서버(200) 측에서 생성할 수도 있다.
텍스트를 생성하면, 단말장치(100)는 서버(200)에 대화 컨텐츠를 전송할 수 있다(205).
서버(200)는 해당 대화 컨텐츠를 수신하면, 해당 컨텐츠에 대응하는 응답 컨텐츠를 생성한다(207). 구체적으로, 서버(200)는 해당 대화 컨텐츠를 자연어 이해 알고리즘에 적용하여 사용자의 의도 및 슬롯을 확인하고, 확인된 의도 및 슬롯에 대응되는 응답 컨텐츠를 생성할 수 있다.
그리고 생성된 응답 컨텐츠를 단말장치(100)에 전송할 수 있다(209). 이와 같은 응답 컨텐츠는 텍스트만으로 구성되거나, 텍스트 또는 사용자의 요청에 대응되는 컨텐츠 정보를 포함할 수도 있다.
그리고 응답 컨텐츠를 수신한 단말장치(100)는 해당 응답 컨텐츠를 수행할 수 있다.
예를 들어, 사용자가 "A 음악 틀어줘!"라는 발화를 하였으면, 단말장치(100)는 입력된 발화에 대응되는 텍스트를 생성하고, 해당 텍스트를 서버(200)에 전송할 수 있다. 이에 대응하여, 서버(200)는 단말장치(100)의 음악 어플리케이션에서 "A" 음악 컨텐츠 재생을 수행하라는 응답 컨텐츠를 생성하여, 단말장치(100)에 제공할 수 있다.
이러한 응답 컨텐츠를 제공받은 단말장치(100)는 음악 어플리케이션을 구동시키고, 해당 음악 어플리케이션을 이용하여 A 음악을 재생할 수 있다.
한편, 상술한 과정에서, 사용자가 "A 음악"이라는 제목을 "A'"과 같은 동일한 용어가 아닌 유사한 용어를 이용할 수 있다. 또는 사용자는 정확한 발화를 하였음에도 음성 전달 과정 또는 음성 인식의 오류에 의하여 "A"가 아닌 "A"와 유사한 "A'"가 인식 될 수도 있다. 예를 들어, 'dun dun"이라는 제목에 대해서, 발화자가 "둥둥 음악 틀어줘!"라고 발화하고, 음악 DB에 "둥둥"이라는 음악 컨텐츠가 존재하지 않은 경우, 기존의 대화 시스템에서는 사용자가 요청한 음악 컨텐츠가 무엇인지를 재차 물어보는 응답을 진행하거나, 둥둥가 발음이 유사한 사용자의 요청과 다른 음악 컨텐츠가 재생될 수 있다.
그러나 본 개시에서는 다른 사용자의 대화 이력 정보를 이용하는바, 서버(200)는 기설정된 인코딩 알고리즘을 이용하여 "둥둥 음악 재생"에 대응되는 벡터 값을 산출하고, 기저장된 벡터 값 중 산출된 벡터 값과 유사한 후보 벡터 값을 선별하고, 해당 선별된 벡터 값을 디코딩하여 사용자의 발화 의도가 "던던 음악 틀어줘~"라는 것을 식별할 수 있다. 이상에서는 간단한 예를 이용하여 다른 사용자의 대화 이력을 사용하는 경우의 이점에 대해서 설명하였으나, 이와 같은 동작은 하나의 예시이며, 다양한 형태로 구현될 수 있다. 벡터 값을 이용하는 보다 구체적인 내용에 대해서는 도 3을 참조하여 이하에서 설명한다.
한편, 도 2에서는 음성 기반의 대화 시스템의 동작 예를 도시하고 설명하였지만, 구현시에는 사용자로부터 직접 텍스트를 입력받는 경우에도 동일하게 동작 가능하다. 즉, 대화창(또는 채팅 창) 기반의 대화 시스템에도 본 개시는 적용될 수 있다.
한편, 도 1 및 도 2를 도시하고 설명함에 있어서, 대화 서비스를 수행하기 위하여, 단말장치(100)와 서버(200)가 협동하여 동작하는 것으로 도시하고 설명하였지만, 상술한 기능은 하나의 장치에서 수행될 수도 있다.
또한, 도 2에서는 서버(200)에서 해당 대화 컨텐츠를 수신하고, 서버(200)가 벡터 값을 산출하는 것으로 도시하였지만, 상술한 인코딩 동작은 단말장치(100) 측에서 수행될 수도 있다. 이와 같은 구현 예에 대해서는 도 12에서 후술한다.
도 3은 본 개시의 일 실시 예에 따른 TOD(task_oriented Dialogue) 시스템의 동작 예를 설명하기 위한 도면이다. 구체적으로, 도 3은 사용자가 호텔과 택시를 예약하는 대규모 다중 도메인 Wizard-of-Oz(MutliWOZ) 데이터 세트의 예이다.
여기서, 대화 상태(Dialogue State)는 특정 도메인에 대한 <슬롯-값>의 쌍으로 표시된다. 1 턴은 단말장치(100)에서 캡처된 단일 사용자의 발화(211)와 그에 대한 시스템(즉, 서버(200))의 응답(213)을 나타낸다. 그리고 대화 상태는 이전 대화 상태, 현재 사용자 발화 및 이전 1 턴 컨텍스트를 기반으로 업데이트될 수 있다.
TOD(Task-oriented Dialogue) 시스템은 음성 대화를 통해 사용자와 컴퓨터 시스템 간의 상호 작용을 향상시키고 사용자가 호텔 예약 또는 택시 예약과 같은 사용자 서비스를 지원하는 시스템이다.
이러한 대화 시스템은 일반적으로 사용자의 의도를 이해, 요청의 실행, 해당 요청에 대한 결과 응답과 같은 모듈식으로 동작이 가능하다.
이 중 사용자의 의도를 이용하는 것이 해당 서비스를 수행함에 있어서 가장 주요한 동작인데, 이를 위하여 대화 상태의 추적이 필요하다.
대화 상태 추적(DST, Dialogue State Tracking)은 사용자의 목표 또는 의도를 파악하는데 필수적인 정보 정보인 대화 상태(Dialogue state)를 추적하는 주요한 동작이다.
대화 상태 추적은 사용자의 대화 및 이전 턴 상태에서의 표현을 분석하여, 사용자의 목적 또는 의도를 추출하고, 잘 정의된 슬롯 및 값으로 대화 상태를 표현하는 것이 필요하다. 만약, 사용자의 대화가 많은 도메인에 걸쳐 있는 경우, 대화 상태를 정확하게 파악하는 것은 매우 어려운 작업이 된다.
여러 도메인에서 동작하는 대규모의 멀티 도메인 데이터 세트(MultiWOZ)는 대화 시스템의 발전에 많은 영향을 주었다. 여기서 도메인은 특정 서비스와 관련된 영역을 의미한다. 예를 들어, 호텔 예약, 택시 예약, 기차 예약 각각이 도메인이 될 수 있으며, 이러한 도메인은 시스템을 구성하는 방식에 따라 다양하게 구성될 수 있다. 그리고, 이러한 도메인은 사용자의 요청(intent)으로 지칭될 수도 있다.
도 3은 사용자가 호텔 예약으로 대화를 시작한 다음 택시 예약을 요청하고, 마지막으로 호텔 예약을 변경하는 데이터 세트의 예를 도시한다.
여기서 대화 상태는 각 도메인에 대한 <슬롯-값>의 쌍의 목록으로 정의된다. 예를 들어, ([hotel] people 2 stay 5 days) , ([taxi] arrival Hotel Santa)).
이러한 대화 상태는 전체 대화의 표현으로 간주될 수 있으며, 시스템의 작업 및 응답과 같은 모듈에서 사용될 수 있다. 따라서, 대화 상태에서의 오류는 상술한 모듈뿐만 아니라, 다음 턴의 대화 상태에도 전파 될 수 있다.
이러한 문제를 해결하기 위하여 본 개시에서는 이전 대화 상태를 MinTL 모델에서의 ground truth로 대체하였다. 여기서 ground thuth는 이전 대화 턴에서 생성한 대화 상태가 아닌 실제 대화 정보를 이용하는 경우를 의미한다.
아래의 표 1은 이전 대화의 상태 정보의 이용 대신에 실제 대화 정보를 이용하는 경우의 에러 분석 값이다.
Predicted Dialogue State Ground Truth Dialogue State
MinTl(T5-small) 51.0 78.0
MinTl(T5-base) 51.4 78.3
표 1을 참조하면, 이전 대화 턴에서 사용한 대화 상태 정보를 이용하는 대신에, 이전 대화를 이용하는 경우, 에러 전파율이 27% 차이가 발생함을 확인할 수 있다.
따라서, 성능 격차 및 오류 전파를 줄이기 위하여, 본 개시에서는 사전 계산된 인덱스에서 유사한 대화 컨텍스트를 이용하여 대화 상태를 보강하였다. 이를 위하여, 본 개시에서는 사전 훈련된 대규모 모듈을 이용한다. 이러한 사전 훈련된 대규모 모듈은 희소 표현과 비교하여 검색 기반 접근 방식에 비하여 매우 효율적이며, 개방형 질문에 대한 응답 시에 더 나은 응답 생성이 가능하여, 검색 기반 결과에 대한 높은 응답 정확도를 갖게 된다.
한편, 이와 같은 동작은 일반적인 질문이나 구절과 같은 자연 텍스트를 이용하여야 한다. 그러나 앞서 설명한 바와 같이 다른 사용자의 텍스트 및 구절을 그대로 저장하여 이용하는 경우, 개인 정보 보호라는 문제가 발생할 수 있다는 점에서, 본 개시에서는 상술한 텍스트(또는 구절) 등을 벡터화하여 저장하고, 해당 벡터화된 값들을 구조화하여 색인한 DB를 만들어 이용한다.
이를 통하여 벡터화된 데이터를 이용하여서도 현재 사용자의 대화와 유사한 텍스트를 갖는 다른 사용자의 대화를 효율적으로 검색할 수 있으며, 검색된 다른 사용자의 대화에 대응되는 벡터 값을 활용하여 높은 정밀도의 응답 처리가 가능하다.
이와 같은 알고리즘은 NRA-DST 프레임워크라 지칭될 수 있으며, 해당 프레임 워크의 구체적인 동작 및 구성에 대해서는 도 7 및 도 8에서 자세히 설명한다.
도 4는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 도시한 블럭도이다.
구체적으로, 도 1의 시스템에서 서버 등과 같이 직접적으로 응답 정보를 생성하는 장치 및 단말장치와 같이 대화 메시지 또는 음성을 수집하고, 그에 필요한 대화 정보를 생성하는 장치 등을 전자 장치라고 지칭할 수 있다. 즉, 도 4의 전자 장치는 도 1의 단말장치(100) 또는 도 1의 서버(200)로서 동작하는 것이 가능하다. 또한, 도 1의 단말장치 및 서버의 기능을 하나의 장치에서 수행하는 것도 가능하다.
도 4의 전자 장치(300)는 PC(Personal computer), 노트북, 스마트폰, 태블릿, 서버 등 다양한 장치일 수 있다. 도 4를 참조하면, 전자 장치(300)는 통신 장치(310), 메모리(320), 프로세서(330)를 포함할 수 있다.
통신 장치(310)는 전자 장치(300)를 외부 장치(미도시)와 연결하기 위해 형성되고, 근거리 통신망(LAN: Local Area Network) 및 인터넷망을 통해 외부 장치에 접속되는 형태뿐만 아니라, USB(Universal Serial Bus) 포트 또는 무선 통신(예를 들어, cellular communication, WiFi 802.11a/b/g/n, NFC, Bluetooth) 포트를 통하여 접속되는 형태도 가능하다. 이러한 통신 장치(310)는 송수신부(transceiver)로 지칭될 수도 있다.
통신 장치(310)는 다른 장치로부터 대화 컨텐츠(또는 대화 정보)를 수신하거나, 다른 장치에 대화 컨텐츠를 전송할 수 있다. 여기서 대화 컨텐츠는 하나의 사용자 메시지를 포함하거나, 여러 턴을 통하여 입력한 메시지를 포함할 수 있다. 여기서 사용자 메시지는 사용자가 직접 타이핑하여 입력한 텍스트일 수 있으며, 사용자의 발화 음성을 음성 인식을 통하여 텍스트로 변환한 메시지이거나, 사용자의 발화 음성에 대응되는 음성 데이터일 수도 있다.
통신 장치(310)는 대화 컨텐츠를 송신한 다른 장치에 해당 대화 컨텐츠에 대응되는 응답 컨텐츠를 전송하거나, 대화 컨텐츠에 대응되는 응답 컨텐츠를 수신할 수 있다. 이러한 응답 컨텐츠는 특정 서비스를 실행하기 위한 명령 정보가 포함된 정보이거나, 사용자가 요청한 정보에 대응되는 컨텐츠이거나, 사용자가 요청한 서비스에 대한 실행 결과에 대한 안내 정보 등일 수 있다.
예를 들어, 대화 컨텐츠에 사용자가 특정 어플리케이션의 실행을 요청하는 메시지가 포함되어 있는 경우, 특정 어플리케이션 실행을 위한 명령 정보가 포함된 응답 컨텐츠를 수신할 수 있다. 또는 대화 컨텐츠에 호텔 예약, 택시 예약, 특정 물품의 주문 등의 특정 서비스의 주문/예약 등의 메시지가 포함되어 있는 경우, 사용자가 요청한 주문 또는 예약 결과에 대한 정보를 응답 컨텐츠로 수신할 수 있다. 상술한 응답 컨텐츠의 예는 하나의 예시에 불가하며, 대화 시스템에서 발생할 수 있는 다양한 사용자 요청 및 그에 따른 다양한 응답이 이루어질 수 있다.
메모리(320)는 전자 장치(300)를 구동하기 위한 O/S나 각종 소프트웨어, 데이터 등을 저장하기 위한 구성요소이다. 메모리(320)는 RAM이나 ROM, 플래시 메모리, HDD, 외장 메모리, 메모리 카드 등과 같은 다양한 형태로 구현될 수 있으며, 어느 하나로 한정되는 것은 아니다.
메모리(320)는 적어도 하나의 인스트럭션을 저장한다. 이러한 적어도 하나의 인스트럭션은 상술한 대화 시스템의 수행에 필요한 어플리케이션, 음성 인식을 위한 어플리케이션, 응답 정보에 대응되는 서비스를 실행하기 위한 각 종 어플리케이션을 수행하기 위한 것들을 포함할 수 있다.
메모리(320)은 대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장한다. 여기서 대화 이력 정보는 현재 사용자의 대화 이력 뿐만 아니라 다른 사용자의 대화 이력도 포함할 수 있다. 앞서 설명한 바와 같이 다른 사용자의 대화 이력은 개인 정보 보호에 문제가 발생할수 있는바, 본 개시에서는 다른 사용자의 대화 이력을 벡터 값으로 변환하여 저장한다.
이러한 벡터 값은 BERT(Bidirectional Encoder Representations from Transformers) 자연어 처리 모델, RoBERTa(Robustly Optimized BERT Pretraining Approach) 자연어 처리 모델, T5 자연어 처리 모델 등과 같은 기설정된 인코딩 알고리즘을 이용하여 생성한 것일 수 있다. 한편, 구현시에는 자연어 처리를 위하여 텍스트를 벡터 값으로 변환할 수 있는 알고리즘이라면, 상술한 예시 이외에에 다른 알고리즘을 이용할 수도 있다.
프로세서(330)는 전자 장치(300) 내의 각 구성을 제어한다. 이러한 프로세서(330)는 CPU(central processing unit), ASIC(application-specific integrated circuit)과 같은 단일 장치로 구성될 수 있으며, CPU, GPU(Graphics Processing Unit) 등의 복수의 장치로 구성될 수도 있다.
프로세서(330)는 사용자로부터 텍스트를 입력받거나, 사용자 발화 음성을 입력받으면, 입력된 텍스트를 이용하여 대화 컨텐츠를 생성하고, 생성한 대화 컨텐츠를 외부 장치에 전송하도록 통신 장치(310)를 제어할 수 있다.
이때 프로세서(330)는 생성한 대화 컨텐츠에 포함된 대화 정보((예를 들어, 텍스트)를 기설정된 알고리즘을 이용하여 벡터 값으로 인코딩하고, 인코딩 결과인 벡터 값을 외부 장치에 전송하도록 통신 장치(310)를 제어할 수도 있다.
프로세서(330)는 대화 컨텐츠가 수신되면 수신된 대화 컨텐츠를 이용하여 사용자의 요청(intent) 및/또는 슬롯(slot) 정보 등을 식별할 수 있다. 예를 들어, 프로세서(330)는 자연어 인식 알고리즘을 이용하여 대화 컨텐츠에 포함된 텍스트 등을 분석하여 사용자의 요청 및/또는 슬롯 정보 등을 식별할 수 있다.
이때, 프로세서(330)는 수신한 대화 컨텐츠로부터 부가 정보를 식별할 수 있다. 예를 들어, 부가 정보는 시간 정보, 대화 빈도, 사용자 감정 정보일 수 있다. 그리고, 시간 정보는 대화 컨텐츠의 시간 정보일 수 있으며, 대화 빈도는 사용자 요청에 따른 응답을 진행하기 위한 대화 턴수 등일 수 있으며, 사용자 감정 정보는 대화 컨텐츠에 포함된 이모티콘 또는 사용자의 목소리 톤, 대화 컨텐츠에 포함된 대상자와의 관계(상사, 부부) 등의 다양한 정보로 통해 유추되는 정보있다. 이상에서는 상술한 정보 들을 부가 정보라고 지칭하였지만, 이러한 부가 정보는 상술한 슬롯 정보로서 이용될 수도 있다.
그리고 프로세서(330)는 식별된 슬롯 정보 각각에 대한 가중치를 결정할 수 있다. 구체적으로, 프로세서(330)는 식별된 슬롯 정보와 사용자의 요청과의 연관성에 기초하여 각각의 슬롯 정보에 대한 가중치를 결정할 수 있다. 이와 같은 가중치에 대해서는 미리 설정된 룩업 테이블에 의하여 결정되거나, 대화 컨텐츠에서의 해당 슬롯 정보의 빈도수 등을 통하여 결정될 수도 있다.
그리고, 프로세서(330)는 식별된 사용자 요청 또는 슬롯 정보만으로 응답 정보를 생성하는 것인지를 식별할 수 있다. 구체적으로, 프로세서(330)는 식별된 사용자 요청에 대응되는 응답 정보의 생성이 식별된 슬롯 정보만을 이용하여 생성하는 것이 가능한지를 판단할 수 있다.
만약, 대화 컨텐츠에 있는 텍스트만으로 응답 정보를 생성하는 것이 가능한 경우, 프로세서(330)는 응답 정보를 생성하고, 생성한 응답 정보가 전송되도록 통신 장치(310)를 제어할 수 있다.
만약, 대화 컨텐츠에 있는 텍스트만으로 응답 정보를 생성하는 것이 어렵다고 판단되면, 메모리(320)에 저장된 벡터 값을 추가적으로 이용하여 응답 정보를 생성할 수 있다.
구체적으로, 프로세서(330)는 대화 컨텐츠에 포함된 텍스트를 기설정된 알고리즘을 이용하여 벡터 값으로 변환할 수 있다. 예를 들어, 프로세서(330)는 대화 컨텐츠에 포함된 문자형 데이터를 하나의 문장으로 생성하고, 기설정된 인코딩 알고리즘을 이용하여 상기 생성된 문장에 대응되는 벡터 값을 산출할 수 있다. 또는 프로세서(330)는 대화 컨텐츠에 포함된 텍스트를 각 턴 단위(또는 문장 단위)로 구분하고, 턴 단위(또는 문장 단위)별 텍스트 각각을 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출할 수도 있다.
이때, 프로세서(330)는 대화 컨텐츠에 포함된 문장 중에서 불필요한 기호(예를 들어, 부호, 특수문자) 등을 제거하는 처리를 수행하거나, 반드시 포함되어야 하는 슬롯 정보에 대응되는 단어 등을 식별하고, 상술한 처리 결과에 따른 문장을 이용하여 벡터 값을 산출할 수도 있다. 또한, 프로세서(330)는 대화 컨텐츠에 포함된 텍스트 이외에 컨텐츠(예를 들어, 이모티콘) 또는 대화 시간, 대화 빈도, 대화 컨텐츠에 포함된 대상자와의 관계(상사, 부부) 등 다양한 정보에 대해서도 대응되는 단어를 상술한 문장에 추가할 수도 있다.
그리고, 프로세서(330)는 기저장된 벡터 값 중 변환된 벡터 값과 일정 유사도를 갖는 벡터 값을 획득할 수 있다. 이때 프로세서(330)는 기저장된 벡터 값 중에 복수개의 벡터 값을 후보 벡터 값으로 식별(또는 검색)할 수 있다. 예를 들어, 프로세서(330)는 유사도가 높은 벡터 값 중 일정 순위(예를 들어, 2순위까지 또는 3순위 까지)의 벡터 값을 획득할 수 있다. 이때, 프로세서(330)는 해당 선별시에 기설정된 유사도 이상인 벡터 값 들 중에서 변환된 벡터 값과 유사한 벡터 값을 획득할 수도 있다.
이때, 프로세서(330)는 기설정된 유사도 이상인지를 확인할때, 앞서 확인된 슬롯 별 가중치를 이용하여, 가중치가 높은 슬롯 정보와 유사도가 높은 벡터 값을 획득할 수 있다. 예를 들어, 기차표 예매 시에 "가족", "4매", "고향" 등의 슬롯 정보가 식별되었고, "가족"이라는 슬롯 정보에 높은 가중치가 적용된 경우, 프로세서(330)는 저장된 DB의 기차표 예매 도메인 내에서 가족 -> 4매 -> 고향의 순서로 인덱스를 검색하여 기설정된 유사도를 갖는 벡터 값을 식별할 수 있다. 또는 확인된 슬롯 각각에 대응되는 벡터 값을 검색하고, 검색된 벡터 값 각각에 대해서 상술한 가중치를 반영하여 유사도를 산출하는 등의 다양한 방식이 이용될 수 있다.
그리고, 프로세서(330)는 상술한 인코딩 방식에 반대되는 디코딩 방식을 이용하여 검색된 벡터 값으로 텍스트로 변환하고, 해당 텍스트에서 슬롯 정보를 추출하고, 대화 컨텐츠에 포함된 슬롯 정보와 함께 이용하여 응답 정보를 생성할 수도 있다. 구체적으로 대화 컨텐츠를 통하여 확인된 사용자의 요청 및/또는 슬롯 정보와 일정 유사도를 갖는 벡터 값에 대응되는 텍스트를 통하여 확인된 슬롯 정보를 이용하여 응답 정보를 생성할 수 있다.
한편, 이상에서는 기저장된 벡터 값의 슬롯 정보만을 응답 정보의 생성시에 이용하는 것으로 설명하였다. 구체적으로, 기저장된 벡터 값 중 기설정된 유사도를 갖는 벡터 값을 식별하는 과정에서, 사용자의 의도에 대응되는 벡터 값을 식별하기 때문에, 응답 정보의 생성시에는 기저장된 벡터에 대응되는 슬롯 정보만을 이용하는 것으로 설명하였다. 그러나, 대화 컨텐츠에 포함된 텍스트를 통하여 사용자의 의도가 불분명한 경우에는 반대로, 기저장된 벡터 값 중 대화 컨텐츠에 포함된 슬롯 정보와 기설정된 유사도를 갖는 벡터 값을 식별하고, 해당 식별된 벡터 값에 대응되는 사용자 의도를 이용할 수도 있다.
예를 들어, 대화 컨텐츠에 포함된 텍스트가 "A 지역"만으로 포함하는 경우, 사용자의 의도가 A 지역의 정보를 알려달라는 요청인지, 아니면 A 지역으로 안내하는 네이게이션 어플리케이션의 구동을 요청하는 것인지 불분명할 수 있다. 이와 같은 경우에는 기저장된 벡터 값 중 A 지역과 유사도가 있는 벡터 값을 식별하고, 식벼된 벡터 값에서 추출된 사용자 의도를 이용할 수 있다.
이때, 프로세서(330)는 A 지역과 유사도가 있는 복수의 후보 벡터 값을 산출하고, 복수의 후보 벡터 값들 각각의 사용자 의도를 확인하고, 확인된 사용자 의도의 빈도수가 가장 높은 것을 사용자 의도로 확인하거나, 복수의 후보벡터 값 중 가장 최근의 후보 벡터 값의 사용자 의도를 이용할 수도 있다.
또한, 프로세서(330)는 상술한 벡터화 과정에서, 문장에 포함되는 슬롯 또는 사용자 의도에 대응되는 단어 각각에 대한 가중치 값을 산출하고, 기저장된 벡터 값과의 유사도의 분석시에 상술한 단어에 대한 가중치를 고려하여, 기설정된 유사도를 갖는 벡터 값을 식별할 수도 있다.
또한, 이상에서는 전자 장치(300)가 대화 정보(또는 대화 컨텐츠)를 수신하고, 수신된 대화 정보 내의 텍스트를 벡터 값으로 산출하여 기저장된 벡터 값과의유사도를 판단하는 것으로 설명하였지만, 구현시에 벡터화 동작을 다른 장치에서 수행하고, 전자 장치(300)는 벡터 값을 수신하고, 수신된 벡터 값 및/또는 기저장된 벡터 값을 이용하여 응답 정보를 생성하는 것도 가능하다.
그리고, 프로세서(330)는 상술한 응답 메시지의 응답 이후에, 상술한 대화 컨텐츠 및 상기 응답 정보에 기초하여 대화 이력 정보를 업데이트하여 메모리(320)에 저장할 수 있다. 예를 들어, 대화 컨텐츠에 포함된 문자형 데이터와 상술한 응답 정보에 기초하여 하나의 문장을 생성하고, 생성된 문장을 기설정된 인코딩 알고리즘을 이용하여 하나의 벡터 값을 산출하고, 산출한 벡터 값을 메모리(320)에 저장할 수 있다.
이상과 같이 본 개시에 따른 단말 장치(100)는 응답 정보의 생성 과정에서 사용자의 대화 이력 뿐만 아니라 다른 사용자의 대화 이력에 대응되는 벡터 값도 이용하는바 보다 높은 정확도로 응답 정보를 생성하는 것이 가능하다. 또한, 다른 사용자의 대화 이력을 그대로 저장하지 않고, 기설정된 알고리즘을 이용하여 인코딩하여 저장하는바, 개인 정보의 누출되는 것을 방지할 수 있다.
또한, 앞서 도 3에서 설명한 바와 같이 특정 키워드(상태 정보)만 이용하여 응답 정보를 생성하는 것보다, 실제 대화 정보를 이용하는 것이 응답 정보의 정확도가 높으며, 본 개시에서는 대화 이력 정보로써 키워드(의도, 슬롯 정보)만을 저장하는 것이 아니라, 실제 대화 정보에 대응되는 텍스트를 벡터화하여 저장한다는 점에서, 높은 응답 정확도를 가질 수 잇다.
한편, 도 4에서는 단말장치(100)(또는 전자 장치)가 기본적인 구성(즉, 통신장치, 메모리, 프로세서)만을 포함하는 것으로 도시하였지만, 단말장치(100)는 상술한 구성 이외에 다양한 구성을 더 포함할 수도 있다. 이러한 예시에 대해서는 도 5를 참조하여 이하에서 설명한다.
도 5는 본 개시의 일 실시 예에 따른 전자 장치의 다른 구성을 도시한 블록도이다.
도 5를 참조하면, 전자 장치(300')는 통신 장치(310), 메모리(320), 프로세서(330), 디스플레이(340), 입력 인터페이스(350), 스피커(360)를 더 포함할 수 있다.
통신 장치(310) 및 메모리(320)에 대해서는 도 4에서 설명하였는바 중복 설명은 생략한다.
디스플레이(340)는 전자 장치(300)가 지원하는 기능을 선택받기 위한 사용자 인터페이스 창을 표시한다. 구체적으로, 디스플레이(340)는 전자 장치(400)가 제공하는 각종 기능을 선택받기 위한 사용자 인터페이스 창을 표시할 수 있다. 이러한 디스플레이(430)는 LCD(liquid crystal display), OLED(Organic Light Emitting Diodes) 등과 같은 모니터일 수 있으며, 후술할 입력 인터페이스(350)의 일부 기능을 동시에 수행할 수 있는 터치 스크린으로 구현될 수도 있다.
디스플레이(340)는 응답 정보에 대응되는 컨텐츠를 표시하거나, 현재 대화 이력 정보를 표시할 수 있다.
입력 인터페이스(350)는 사용자로부터 전자 장치(300)의 기능 선택 및 해당 기능에 대한 제어 명령을 입력받을 수 있다. 이러한 입력 인터페이스(350)는 키보드, 마우스, 터치 패드 등일 수 있으며, 사용자의 음성을 입력받기 위한 마이크를 포함할 수도 있다.
스피커(360)는 소리를 출력한다. 이러한 스피커(360)는 수신한 응답 메시지에 대응되는 응답 정보를 소리로 출력할 수 있다.
예를 들어, 전자 장치(300)가 AI 스피커로 구현되는 경우, 프로세서(330)는 마이크를 통하여 입력된 사용자 발화 음성을 텍스트로 변환하고, 변환된 텍스트를 외부 서버(200)에 전송할 수 있다. 그리고, 외부 서버(200)로부터 응답 정보를 수신하면, 수신된 응답 정보에 대응되는 텍스트를 TTS 기능을 이용하여 스피커(360)를 통해 출력할 수 있다.
또한, 전자 장치(300)는 기설정된 트리거 명령의 음성이 입력되었는지를 지속적으로 감시하고, 입력된 사용자 발화 음성에 기설정된 트리거 명령이 포함되어 있다고 판단되면, 프로세서(330)는 앞서 설명한 바와 같은 대화 서비스를 실행할 수 있다.
그리고 전자 장치(300)는 외부 장치로부터 현재 설정된 트리거 명령과 유사한 유사 트리거 명칭을 수신하고, 상술한 트리거 명령의 포함 여부의 판단시에 사용자가 설정한 트리거 명칭뿐만 아니라 유사 트리거 명칭을 함께 이용하여 대화 서비스의 시작 여부를 판단할 수도 있다.
예를 들어, 현재 전자 장치(300)의 대화 시스템의 개시(또는 웨이크 업)를 알리는 명령어가 "하이 빅스비"인데, 다른 사용자가 "하이 빅~", "하이 빅스~"로 이용하는 빈도가 높은 경우, 서버(200)는 특정 단말장치(100)에서도 "하이 빅~", "하이 빅스"에 대응한 사용자 발화에도 대화 서비스가 트리거 될 수 있도록, 해당 유사 명칭에 대한 정보를 단말장치에 제공할 수 있다.
이러한 유사 트리거 정보를 입력받은 전자 장치(300)는 유사 트리거 정보를 메모리(320)에 저장하고, 발화 서비스의 시작 여부를 판단할 때, 사용자가 설정한 트기거 명령뿐만 아니라, 유사 트리거 명령도 이용할 수 있다.
도 5에서는 도 4와 다른 구성들(예를 들어, 디스플레이, 스피커, 사용자 입력 장치) 등을 더 도시하였지만, 구현시에 상술한 구성들이 다 포함될 필요는 없고, 상술한 구성 중 일부만이 더 포함되는 형태로 구현될 수도 있다. 예를 들어, 전자 장치(300)가 AI 스피커로 구성되는 경우, 마이크와 스피커만 추가될 수도 있다.
도 6은 본 개시의 일 실시 예에 따른 대화 서비스 모델을 설명하기 위한 도면이다.
도 6을 참조하면, 프로세서(600)는 NLU 모듈(610), 대화 매니저 모듈(620), 쿼리 인코더(630), 벡터 DB(640), 응답 모듈(650)을 포함할 수 있다.
NLU 모듈(610)은 대화 컨텐츠에 포함된 텍스트를 추출하고, 추출된 텍스트 내에서 사용자의 요청(또는 목적), 슬롯 등을 추출할 수 있다. 이때, NLU 모델(610)은 텍스트 정보뿐만 아니라, 대화 컨텐츠에 포함된 다양한 정보(예를 들어, 사용자의 기분을 예측할 수 있는 이모티콘, 또는 대화 시간, 대화 빈도 등)을 이용하여 사용자의 요청 및/똔느 슬롯 정보를 추출할 수 있다.
대화 매니저 모듈(620)은 추출된 사용자의 목적, 슬롯에 기초하여 이용할 도메인을 결정하고, 결정된 도메인에 대응되는 DB 및/또는 응답 모델에 해당 정보를 전송할 수 있다.
이때 대화 매니저 모듈(620)은 추출된 슬롯에 대한 가중치를 산출할 수 있다. 구체적으로, 대화 컨텐츠에 포함된 텍스트에는 다양한 슬롯 정보가 포함될 수 있으며, 포함된 슬롯 정보는 사용자의 요청(또는 목적)과 깊은 연관이 있는 것도 있을 수 있으며, 연관성이 낮은 것도 있을 수 있다. 사용자 요청에 정확한 응답을 위해서는 사용자의 요청과 깊은 연관성이 높은 슬롯 정보를 이용하는 것이 유리하다는 점에서, 대화 매니저 모듈(620)은 추출된 슬롯 각각에 대한 가중치 정보를 산출할 수 있다.
예를 들어, 사용자의 텍스트가 "친구 가족과 같이 여행하는데, 이번 주 금요일 7시에 부산가는 기차표 4장 예약해줘"인 경우, 사용자의 목적은 기차표 예약이고, "이번 주 금요일 7시", "기차표 4장", "친구 가족" 등이 슬롯 정보로 이용될 수 있다. 해당 서비스 실행을 위해서는 시간 및 예약 매수 등이 주요한 키워드인바, 시간 정보 및 예약 매수에 대한 슬롯 정보는 높은 가중치를 부여하고, 여행 목적, 대상자 등은 상대적으로 낮은 가중치를 부여할 수 있다.
반대로, 사용자의 텍스트가 "친구 가족과 이번 주 금요일에 여행 가는데 어디가 좋을까"인 경우, 사용자 목적은 여행지 추천이고, "친구 가족", 이번 주 금요일"이 슬롯 정보로 이용될 수 있다. 해당 서비스 실행을 위해서는 시간 정보 및 여행 대상자가 주요한 키워드인바, 앞선 예시와 반대로 여행 대상자에 대해서는 높은 가중치를 부여할 수도 있다. 즉, 각 키워드에 가중치는 고정적으로 적용되지 않고, 상술한 사용자 목적과의 관련성에 따라 슬롯 정보의 가중치는 변경될 수 있다.
쿼리 인코더(630)는 추출된 사용자의 목적 및 슬롯에 대응되는 벡터 값을 산출할 수 있다. 예를 들어, 추출된 사용자의 목적 및 슬롯을 이용하여 문장을 구성하고, 구성된 문장을 기설정된 알고리즘을 이용하여 벡터 값을 산출할 수 있다. 구현시에는 추출된 목적 및 슬롯을 통하여 문장을 재구성하지 않고, 사용자의 입력 문장 그대로를 기설정된 알고리즘으로 처리하여 벡터 값을 산출하는 것도 가능하다. 또한, 쿼리 인코더(630)는 상술한 바와 같이 슬롯에 대한 가중치 정보를 활용하여 기설정된 가중치 이상의 슬롯 정보와 사용자 요청을 이용하여 문장을 재구성하고, 재구성된 문장을 이용하여 기설정된 알고리즘에 적용하여 벡터 값을 산출할 수 잇다.
벡터 DB(640)는 입력된 벡터 값과 기저장된 벡터 값들 간의 유사도를 비교하고, 기저장된 벡터 값들 중 후보 벡터를 검색할 수 있다. 이때, 검색된 후보 벡터의 개수는 설계 방식에 따라 다양하게 구성될 수 있으며, 최소 2~3개의 후보 벡터가 검색되도록 한다거나, 일정 유사도 값을 갖는 벡터들 중에서 후보 벡터를 검색할 수도 있다. 이때, 벡터 DB(640)는 슬롯 각각에 대한 가중치 정보를 입력받을 수 있으며, 상술한 유사도 비교 과정에서 상술한 슬롯의 가중치를 고려하여 후보 벡터를 검색할 수 있다. 벡터 DB(640)의 구체적인 구성 및 동작에 대해서는 도 7을 참조하여 후술한다.
응답 모듈(650)은 대화 이력 등을 이용하여 응답 컨텐츠를 생성할 수 있다. 구체적으로, 응답 모듈(650)은 대화 상태 추적 모듈(651), 대화 상태 추적 업데이터(653), 대화 상태 인코더(655), 대화 상태 디코더(657)를 포함할 수 있다.
대화 상태 추적 모듈(651)은 대화 매니저 모듈(620)로부터 대화 이력을 수신하고, 수신된 대화 이력을 통하여 응답 정보를 생성할 수 있는지를 우선적으로 판단할 수 있다. 수신된 대화 이력을 통하여 응답 정보를 생성할 수 있다면, 대화 상태 추적 모듈(651)은 해당 대화 컨텐츠에 포함된 정보만으로 응답 정보를 생성할 수 있다. 즉, 벡터 DB를 이용하지 않고, 응답을 수행할 수도 있다.
만약, 대화 이력만으로 응답 정보를 생성하는 것이 어렵다고 판단되면, 대화 상태 추적 모듈(651)은 벡터 DB(640)로부터 제공된 후보 벡터 값이 텍스트로 변환되도록 디코더(657)를 제어하고, 디코딩된 정보와 대화 컨텐츠에 포함된 정보를 이용하여 응답 정보를 생성할 수 있다.
구체적으로, 대화 상태 추적 모듈(651)은 대화 매니저 모듈(620)로부터 수신된 정보와 디코더(657)를 통하여 수신된 정보 모두 텍스트 정보인바, 텍스트 임베딩을 수행하여 두 텍스트 정보를 합치고, 합쳐진 정보를 이용하여 응답 정보를 생성할 수 있다. 이때, 대화 상태 추적 모듈(651)은 대화 정보의 문맥 정보에 따라 적용 여부를 결정하는 Dialogue information Gating 매커니즘을 적용하여 두 텍스트 정보를 합칠 수 있다. Gating 매커니즘을 이용함에 따라 전달된 정보들의 균형이 맞춰짐에 따라 기능 과다 사용 또는 기능 부족 사용 문제를 방지하는 것이 가능하다.
그리고, 대화 상태 추적 모듈(651)은 응답이 완료되면, 해당 응답을 통하여 생성된 응답 정보, 디코딩된 정보, 대화 컨텐츠에 포함된 정보에 기초하여 대화 상태가 업데이트하도록 대화 상태 업데이터(653)를 제어하고, 업데이트된 대화 상태에 대응되는 벡터 값이 생성되어 DB에 저장되도록 인코더(655)를 제어할 수 있다.
한편, 도 6을 도시하고 설명함에 있어서, 수신한 대화 정보에 기초하여 벡터 값을 프로세서(600) 측에서 변환하는 것으로 설명하였지만, 구현시에 벡터 값으로 변환하는 인코딩 동작은 단말장치 측에서 수행하고, 단말장치에서 전달된 벡터 값을 이용하여 상술한 동작을 수행하는 형태로도 구현될 수 있다.
도 7은 도 6의 벡터 DB의 구성을 설명하기 위한 도면이다.
구체적으로, 벡터 DB는 대화 이력 정보에 대응되는 벡터 값을 저장한다. 벡터 값을 손쉽게 검색 이용하기 위하여, 본 개시에서는 벡터 값들을 구조화하여 색인화한다. 이와 같은 DB를 만드는 방법에 대해서 먼저 설명한다.
먼저, DB 생성기는 쿼리 인코더(710) 및 슬롯 인코더(720)를 포함할 수 있다.
쿼리 인코더(710)는 대화 컨텐츠에 대응되는 텍스트에서, 사용자의 요청 또는 의도를 파악하는 모듈이다. 쿼리 인코더(710)는 통하여 사용자 요청 또는 의도에 대응되는 벡터 값을 산출할 수 있다. 이때, 쿼리 인코더(710)는 텍스트뿐만 아니라, 대화 컨텐츠를 통하여 확인할 수 있는 다양한 부가 정보(예를 들어, 대화 시간, 대화 빈도, 사용자 이외에 대상자 정보 등)을 이용할 수도 있다.
슬롯 인코더(720)는 상술한 요청에 대응되는 세부 항목들을 검출하는 모듈이다. 구체적으로, 슬롯 인코드(720)는 대화 컨텐츠에 포함된 텍스트를 수신하고, 수신된 텍스트를 이용하여 슬롯 정보에 대응되는 벡터 값을 산출할 수 있다. 이때, 슬롯 인코더(720)는 postive context(ci+)와 negative context(ci-)를 생성할 수 있다. 슬롯 인코더(720)도, 텍스트뿐만 아니라, 대화 컨텐츠를 통하여 확인할 수 있는 다양한 부가 정보를 이용하여 벡터 값을 산출할 수도 있다.
이와 같이 쿼리 인코더(710) 및 슬롯 인코더(720)에서 생성된 벡터 값을 이용하여 유사도를 산출할 수 있다.
[수학식 1]
sim(ci, cj) = Eq(ci)TEk(cj)
여기서 는 ci, ci sms 는 사용자가 입력한 텍스트, Eq는 쿼리 인코더, Ek는 슬롯 인코더, sim는 dot procut 연산자이다.
이와 같이 유사도 값이 산출되면, 해당 산출된 유사도 값을 색인 값으로 활용하여 복수의 벡터 값을 구조화할 수 있다.
이와 같이 구조화된 경우, 향후에 수신된 입력 텍스트를 인코딩하여 벡터 값을 산출하고(730), 산출된 벡터 값와 앞서 생성한 색인 값을 비교하여 기저장된 복수의 벡터 값(740) 중 기설정된 유사도를 갖는 벡터 값을 검색할 수 있다.
예를 들어, 도시된 바와 같이 사용자의 요청이 특정 호텔의 예약이고, 그에 대응되는 벨류(슬롯으로, 와이파이, 주차장 등)이 포함되어 있는 경우, DB는 호텔 예약, 주차장, 와이파이 등과 관련된 벡터 값을 검색할 수 있다.
도 8은 본 개시의 일 실시 예에 따른 응답 모듈의 다른 형태를 설명하기 위한 도면이다.
도 8을 참조하면, 응답 모듈은 벡터값 수신 모듈(830), 인코더(840), 디코더(850)를 포함한다.
앞서 도 7과 비교하였을 때 도 8의 방식은 서로 다른 인코딩 방식을 이용한다는 점이 차이가 있다. 구체적으로, 도 7에서는 입력된 대화 컨텐츠에서 벡터 값을 산출하거나, 후보 벡터 값을 텍스트로 변환하는 과정에서 하나의 인코딩 방식을 이용하였다.
그러나, 도 8에서는 DB 검색을 위한 인코딩 방식과 후보 벡터를 활용하는 과정에서의 인코딩 방식을 서로 다른 알고리즘을 이용할 수 있다.
예를 들어, 뉴럴 인덱스(820)를 이용하여 대화 컨텐츠에서 벡터 값을 산출하는 과정(810)에서는 SOTA pre-trained DNN 모델인 RoBERTa를 이용하고, 응답 모듈(840, 850)에서는 SOTA DNN Generation 모델인 T5를 이용할 수 있다. 이와 같이 구현시에는 특정 과정에서 보다 높은 성능을 갖는 인코딩 및 디코딩 방식을 이용할 수도 있다.
도 9는 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.
먼저, 대화 이력 정보에 대응되는 벡터 값을 저장한다. 구체적으로, 서로 다른 사용자 각각의 대화 이력 정보에 대응되는 벡터 값을 저장할 수 있다. 여기서, 벡터 값은 기설정된 인코딩 알고리즘을 이용하여 산출된 것으로, 기설정된 인코딩 알고리즘은 BERT(Bidirectional Encoder Representations from Transformers) 자연어 처리 모델, RoBERTa(Robustly Optimized BERT Pretraining Approach) 자연어 처리 모델, T5 자연어 처리 모델 등일 수 있다.
그리고, 대화 컨텐츠를 수신한다(910). 이러한 대화 컨텐츠는 하나의 문장만을 포함할 수 있으며, 복수의 문장을 포함할 수도 있다. 또한 해당 컨텐츠는 텍스트일 수 있으며, 사용자 발화 음성에 대응되는 음성 데이터일 수도 있으며, 텍스트뿐만 아니라, 컨텐츠, 해당 대화의 시간 정보 등의 부가 정보도 포함할 수 있다.
그리고, 대화 컨텐츠에 대응되는 응답 컨텐츠를 생성한다. 구체적으로, 대화 컨텐츠로부터 텍스트를 추출한다.
예를 들어, 추출된 텍스트를 이용하여 응답 정보를 획득하기 위한 추가 정보가 필요한지 여부를 선행적으로 식별할 수 있다. 예시로, 대화 컨텐츠의 마지막 문장을 이용하여 대화 컨텐츠의 사용자의 요청을 확인하고, 대화 컨텐츠 내의 포함된 슬롯 정보들을 이용하여 사용자의 요청에 대응되는 응답 정보를 획득 가능한지를 판단할 수 있다. 만약, 추가 정보가 필요하지 않다면, 추출된 텍스트 정보만을 이용하여 응답 정보를 생성할 수 있다.
반대로, 추가 정보가 필요한 것으로 식별되면 저장된 벡터 값 중 산출된 벡터 값을 이용하여 기설정된 유사도를 갖는 벡터 값을 획득하고, 획득된 벡터 값과 산출된 벡터 값을 이용하여 응답 정보를 획득할 수 있다.
그리고, 추출된 텍스트를 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출할 수 있다. 예를 들어, 대화 컨텐츠에 포함된 문자형 데이터를 하나의 문장으로 생성하고, 생성된 하나의 문장에 대해서 기설정된 인코딩 알고리즘을 이용하여 벡터를 산출할 수 있다. 또는 대화 컨텐츠에 포함된 문자형 데이터를 문장 단위로 구분하고, 문장 단위별 텍스트 각각을 기설정된 인코딩 알고리즘을 이용하여 벡터를 산출할 수도 있다.
그리고 산출된 벡터 값 및 저장된 벡터 값을 이용하여 응답 정보를 획득할 수 있다. 예를 들어, 기설정된 유사도를 갖는 후보 벡터 값을 텍스트로 디코딩하고, 디코딩된 텍스트 내의 슬롯 정보를 추출하고, 사용자의 요청, 대화 컨텐츠 내의 포함된 슬롯 정보 및 추출된 슬롯 정보를 이용하여 응답 정보를 생성할 수 있다. 이때, 사술한 후보 벡터 값은 복수 개 일 수 있으며, 복수개의 후보 벡터 값 각각을 텍스트로 변환하고, 변환된 텍스트와 추출된 텍스트에 기초하여 응답 정보를 생성할 수도 있다.
그리고, 상술한 대화 이력을 다른 사용자 또는 이후의 대화 과정에서 이용하기 위하여, 변환된 텍스트와 추출된 텍스트에 기초하여 하나의 텍스트 문장을 생성하고, 생성된 텍스트 문장을 기설정된 인코딩 알고리즘을 이용하여 하나의 벡터를 산출하고, 산출된 벡터를 저장할 수 있다.
그리고 응답 컨텐츠를 전송하거나, 해당 응답 컨텐츠에 대응되는 이벤트를 수행할 수 있다.
이상과 같이 본 개시에 따른 전자 장치의 제어 방법은 응답 컨텐츠의 생성 과정에서 사용자의 대화 이력 뿐만 아니라 다른 사용자의 대화 이력에 대응되는 벡터 값도 이용하는바 보다 높은 정확도로 응답 정보를 생성하는 것이 가능하다. 또한, 다른 사용자의 대화 이력을 그대로 저장하지 않고, 기설정된 알고리즘을 이용하여 인코딩하여 저장하는바, 개인 정보의 누출되는 것을 방지할 수 있다.
도 10은 본 개시의 일 실시 예에 따른 전자 장치에서의 대화 방법을 설명하기 위한 흐름도이다.
도 10을 참조하면, 사용자 발화에 대응되는 텍스트 정보를 입력받을 수 있다. 이때, 현재 발화에 대응되는 텍스트 정보만을 입력받을 수 있으며, 현재 여러 발화 및 응답 과정이 진행 중인 경우라면, 이전 대화 이력을 포함하는 대화 컨텐츠를 입력받을 수 있다. 이때, 대화 컨텐츠는 현재 대화의 시간, 별도의 알고리즘을 통하여 확인할 수 있는 사용자 감정 정보 등 텍스트 이외에 정보를 더 포함할 수도 있다.
그리고, 사용자 발화로부터 사용자의 의도 및 슬롯 정보를 추출할 수 있다. 구체적으로, 앞서 설명한 바와 같은 NLU 모델을 이용하여 사용자 텍스트로부터 사용자가 의도하는 요청 및 해당 요청에 대응되는 상세 정보(또는 슬롯 정보)를 추출할 수 있다. 이때, 텍스트 정보뿐만 아니라, 부가 정보(예를 들어, 시간, 대화 빈도, 감정 정보)등을 이용할 수도 있다.
그리고, 추출된 정보만으로 응답 정보를 생성하는 것이 가능한지를 판단한다(S1020).
만약, 추출된 정보만으로 응답 정보를 생성하는 것이 충분하면, 추출된 정보만으로 응답 정보를 생성하여 해당 사용자에 대응되는 단말장치에 응답 정보를 제공하거나, 직접 응답 정보에 대응되는 서비스를 수행할 수 있다.
만약, 추출된 정보만으로 응답 정보를 생성하는 것이 어려운 경우, 사용자의 발화 정보에 포함된 텍스트들을 기설정된 인코딩 알고리즘을 이용하여 벡터 값으로 산출한다. 이때, 벡터 값은 대화 컨텐츠에 포함된 텍스트뿐만 아니라, 대화 컨텐츠에 포함된 다양한 부가 정보가 반영될 수도 있다.
그리고, 기저장된 벡터 값 중 산출된 벡터 값과 기설정된 유사도를 갖는 후보 벡터 값을 검색한다.
그리고, 검색된 후보 벡터 값을 텍스트로 디코딩하고, 디코딩된 텍스트에 포함된 슬롯 정보등을 추가로 활용하여 응답 정보를 생성할 수 있다.
도 11은 본 개시의 일 실시 예에 따른 대화 시스템에 대한 트리거 방법을 설명하기 위한 흐름도이다.
도 11을 참조하면, 실시간으로 응성 정보를 수신하면(S1110), 수신된 음성 데이터와 기저장된 트리거 명령을 비교하여, 웨이커 업이 필요한지를 판단할 수 잇다(S1120).
만약, 해당 사용자 발화가 트리거 명령으로 인식되면(S1130), 음성 인식(또는 대화 서비스)를 실행할 수 있다(S1160).
만약, 정확한 트리거로 인식되지 않으면, 해당 트리거를 음성 데이터와 함께 벡터화하고(S1140), 해당 트리거와 유사한 벡터 값이 존재하는지를 확인할 수 있다(S1150). 이와 같은 판단 및 동작은 다른 장치(예를 들어, 서버에 현재 트리거 명령에 대한 정보를 전송하고, 그에 대한 유사 트리거 명령의 수신)과의 협업을 통하여 수행될 수 있다.
만약, 유사한 벡터 값이 존재하면, 후보 트리거 정보를 이용하여 단말장치의 트리거 정보를 업데이트할 수 있다.
이상과 같이 본 개시에 따른 트리거 방법은 사용자가 설정한 트리거 뿐만 아니라, 유사 트리거도 등록하는바, 보다 높은 유연하게 사용자의 대화 서비스 요청에 대응하는 것이 가능하다.
도 12는 본 개시의 일 실시 예에 따른 대화 시스템의 동작을 나타내는 시퀀스도이다. 구체적으로, 도 12는 대화 정보에 대한 인코딩을 단말장치(100)에서 수행하는 경우의 예를 도시한 도면이다.
도 12를 참조하면, 단말장치(100)는 사용자로부터 사용자 발화를 수신하면(S1201), 수신된 발화를 음성 인식하여 사용자 발화에 대응되는 대화 정보(즉, 텍스트)를 생성할 수 있다(S1203).
*만약, 해당 서비스에 대한 발화가 연속적으로 진행중이었으면 단말장치(100)는 해당 텍스트 및 이전 서버(200)에서의 응답을 포함하는 대화 컨텐츠를 단말장치(100)는 저장하고 있을 수 있다.
그리고, 단말장치(100)는 상술한 대화 컨텐츠에 포함된 텍스트 및 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 생성할 수 있다. 이때, 단말장치(100)는 상술한 대화 컨텐츠에 포함된 마지막 턴의 대화 텍스트만을 이용하여 벡터 값을 산출하거나, 상술한 대화 컨텐츠에 포함된 모든 대화 텍스트를 이용하여 사용자 의도 및 슬롯 정보를 인식하고, 인식된 사용자 의도 및 슬롯 정보를 이용하여 하나의 문장을 생성하고, 생성된 문장을 기설정된 인코딩 알고리즘을 이용하여 하나의 벡터로 생성할 수 있다.
이때, 단말장치(100)는 대화 컨텐츠에 포함된 대화 텍스트를 자연어 이해 알고리즘을 이용하여 사용자 의도 및 슬롯을 확인하고, 확인된 사용자 의도 및 슬롯 정보를 이용하여 하나의 문장을 생성할 수 있다. 또는 단말장치(!00)는 대화 컨텐츠에 포함된 대화 텍스트 각각을 턴 단위(또는 문자 단위)로 벡터 값을 산출하고, 산출된 복수의 벡터 값을 서버(200)에 전송하는 형태로 구현될 수도 있다.
또한, 단말장치(100)는 대화 텍스트뿐만 아니라, 현재 대화 시간, 대화 빈도, 예측된 사용자 감정 등의 부가 정보를 반영하여 벡터 값을 산출할 수도 있다.
서버(200)는 벡터 값을 수신하고, 수신된 벡터 값을 기초로 응답 정보를 생성할 수 있다(S1207). 구체적으로, 서버(200)는 저장된 벡터 값 중 수신된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 선택하고, 선택된 벡터 값 및 수신된 벡터 값 각각을 기설정된 디코딩 알고리즘을 이용하여 텍스트로 변환하고, 수신된 벡터 값에 대응되는 텍스트를 이용하여 확인된 사용자의 요청 및 슬롯 정보와 기설정된 유사도를 갖는 벡터 값를 이용하여 확인된 슬롯 정보를 이용하여 응답 컨텐츠(또는 응답 정보)를 생성할 수 있다.
응답 컨텐츠를 생성하면, 서버(200)는 생성된 응답 컨텐츠를 단말장치(100)에 전송할 수 있다). 그리고 응답 컨텐츠를 수신한 단말장치(100)는 해당 응답 컨텐츠를 수행할 수 있다(S1209).
이와 같이 본 실시 예에서는 사용자 대화 정보를 직접적으로 서버(200)에 제공하지 않고, 벡터화 하여 서버(200)에 제공하는바, 사용자 개인 정보의 노출을 최소화할 수 있다.
한편, 본 개시에서 사용된 용어 "부" 또는 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구성된 유닛을 포함하며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로 등의 용어와 상호 호환적으로 사용될 수 있다. "부" 또는 "모듈"은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 모듈은 ASIC(application-specific integrated circuit)으로 구성될 수 있다.
본 개시의 다양한 실시예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작할 수 있는 장치로서, 개시된 실시예들에 따른 전자 장치(예: 전자 장치(300))를 포함할 수 있다. 상술한 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접, 또는 프로세서의 제어 하에 다른 구성요소들을 이용하여 상술한 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장매체가 신호(signal)를 포함하지 않으며 실재(tangible)한다는 것을 의미할 뿐 데이터가 저장매체에 반영구적 또는 임시적으로 저장됨을 구분하지 않는다.
일시 예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 온라인으로 배포될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시예들에 따른 구성 요소(예: 모듈 또는 프로그램) 각각은 단수 또는 복수의 개체로 구성될 수 있으며, 전술한 해당 서브 구성 요소들 중 일부 서브 구성 요소가 생략되거나, 또는 다른 서브 구성 요소가 다양한 실시예에 더 포함될 수 있다. 대체적으로 또는 추가적으로, 일부 구성 요소들(예: 모듈 또는 프로그램)은 하나의 개체로 통합되어, 통합되기 이전의 각각의 해당 구성 요소에 의해 수행되는 기능을 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.
본 개시의 내용은 다양한 실시예를 참조하여 도시하고 설명하였지만, 본 개시의 사상 및 범위를 벗어나지 않는 범위 내에서 다양한 변경이 이루어 질 수 있다.

Claims (15)

  1. 전자 장치에 있어서,
    통신 장치;
    적어도 하나의 인스트럭션을 저장하고, 대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 메모리; 및
    상기 적어도 하나의 인스트럭션을 실행함으로써, 대화 컨텐츠로부터 텍스트를 추출하고, 상기 추출된 텍스트를 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출하고, 상기 산출된 벡터 값 및 상기 저장된 하나 이상의 벡터 값을 이용하여 응답 정보를 생성하는 프로세서;를 포함하는 전자 장치.
  2. 제1항에 있어서,
    상기 프로세서는,
    상기 수신한 대화 컨텐츠로부터 부가 정보를 추출하고,
    상기 벡터 값은 상기 추출된 부가 정보를 추가적으로 이용하여 산출되고,
    상기 부가 정보는,
    상기 대화 컨텐츠의 시간 정보, 대화 빈도, 사용자 감정 정보 중 적어도 하나를 포함하는 전자 장치.
  3. 제1항에 있어서,
    상기 프로세서는,
    상기 응답 정보를 획득하기 위한 추가 정보가 필요한지 여부를 식별하고, 추가 정보가 필요한 것으로 식별되면 상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값와 기설정된 유사도를 갖는 벡터 값을 획득하고,
    상기 응답 정보는,
    상기 획득된 벡터 값을 추가적으로 이용하여 생성되는 전자 장치.
  4. 제3항에 있어서,
    상기 프로세서는,
    상기 추출된 텍스트를 이용하여 사용자의 요청 및 슬롯 정보를 확인하고, 상기 확인된 슬롯 정보를 이용하여 상기 사용자의 요청에 대응되는 응답 정보를 획득 가능한지를 판단하는 전자 장치.
  5. 제1항에 있어서,
    상기 프로세서는,
    상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 디코딩하여 텍스트를 확인하고, 상기 확인된 텍스트 내의 슬롯 정보를 확인하고,
    상기 응답 정보는,
    상기 대화 컨텐츠를 이용하여 확인된 사용자 요청 및 슬롯 정보와 상기 기설정된 유사도를 갖는 벡터 값을 이용하여 확인된 슬롯 정보를 이용하여 생성되는 전자 장치.
  6. 제5항에 있어서,
    상기 프로세서는,
    상기 대화 컨텐츠를 이용하여 확인된 슬롯 정보 각각에 대한 가중치를 결정하고, 상기 결정된 가중치를 이용하여 상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 획득하는 전자 장치.
  7. 제5항에 있어서,
    상기 프로세서는,
    상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값과 기설정된 유사도를 갖는 복수개의 후보 벡터 값을 획득하고, 상기 획득된 복수개의 후보 벡터 값 각각을 텍스트로 디코딩하는 전자 장치.
  8. 제5항에 있어서,
    상기 프로세서는,
    상기 기설정된 유사도를 갖는 벡터값에 대응되는 텍스트와 상기 대화 컨텐츠에서 추출된 텍스트를 이용하여 하나의 텍스트 문장을 생성하고, 상기 생성된 텍스트 문장을 기설정된 인코딩 알고리즘을 이용하여 하나의 벡터를 산출하고, 상기 산출된 벡터를 상기 메모리에 저장하는 전자 장치.
  9. 전자 장치에서의 제어 방법에 있어서,
    대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 단계;
    대화 컨텐츠를 수신하는 단계;
    상기 대화 컨텐츠에 대응되는 응답 정보를 생성하는 단계; 및
    상기 응답 정보를 전송하는 단계;를 포함하고,
    상기 응답 정보를 생성하는 단계는,
    상기 대화 컨텐츠로부터 텍스트를 추출하는 단계;
    상기 추출된 텍스트를 기설정된 인코딩 알고리즘을 이용하여 벡터 값을 산출하는 단계; 및
    상기 산출된 벡터 값 및 상기 저장된 하나 이상의 벡터 값을 이용하여 응답 정보를 생성하는 단계;를 포함하는 제어 방법.
  10. 제9항에 있어서,
    상기 벡터 값을 산출하는 단계는,
    상기 수신한 대화 컨텐츠로부터 부가 정보를 추출하고,
    상기 벡터 값은 상기 추출된 부가 정보를 추가적으로 이용하여 산출되고,
    상기 부가 정보는,
    상기 대화 컨텐츠의 시간 정보, 대화 빈도, 사용자 감정 정보 중 적어도 하나를 포함하는 제어 방법.
  11. 제9항에 있어서,
    상기 응답 정보를 생성하는 단계는,
    상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 텍스트로 변환하기 위한 디코딩 단계;
    상기 텍스트 내의 슬롯 정보를 확인하는 단계;를 포함하고,
    상기 응답 정보는,
    상기 대화 컨텐츠를 이용하여 확인된 사용자 요청 및 슬롯 정보와 상기 기설정된 유사도를 갖는 벡터 값을 이용하여 확인된 슬롯 정보를 이용하여 생성되는 제어 방법.
  12. 제11항에 있어서,
    상기 응답 정보를 생성하는 단계는,
    상기 대화 컨텐츠를 이용하여 확인된 슬롯 정보 각각에 대한 가중치를 결정하고, 상기 결정된 가중치를 이용하여 상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 획득하는 단계;를 더 포함하는 제어 방법.
  13. 제11항에 있어서,
    상기 디코딩하는 단계는,
    상기 저장된 하나 이상의 벡터 값 중 상기 산출된 벡터 값과 기설정된 유사도를 갖는 복수개의 후보 벡터 값을 획득하고, 상기 획득된 복수개의 후보 벡터 값 각각을 텍스트로 디코당하는 제어 방법.
  14. 제11항에 있어서,
    상기 기설정된 유사도를 갖는 벡터값에 대응되는 텍스트와 상기 대화 컨텐츠에서 추출된 텍스트를 이용하여 하나의 텍스트 문장을 생성하고, 상기 생성된 텍스트 문장을 기설정된 인코딩 알고리즘을 이용하여 하나의 벡터를 산출하고, 상기 산출된 벡터를 저장하는 단계;를 더 포함하는 제어 방법.
  15. 전자 장치에서의 제어 방법을 실행하기 위한 프로그램을 포함하는 컴퓨터 판독가능 기록 매체에 있어서,
    상기 제어 방법은,
    대화 이력 정보에 대응되는 하나 이상의 벡터 값을 저장하는 단계;
    대화 컨텐츠에 포함된 텍스트에 대응되는 벡터 값을 수신하는 단계;
    상기 대화 컨텐츠에 대응되는 응답 정보를 생성하는 단계; 및
    상기 응답 정보를 전송하는 단계;를 포함하고,
    상기 응답 정보를 생성하는 단계는,
    상기 저장된 벡터 값 중 상기 수신된 벡터 값과 기설정된 유사도를 갖는 벡터 값을 선택하고, 상기 선택된 벡터 값 및 상기 수신된 벡터 값 각각을 기설정된 디코딩 알고리즘을 이용하여 텍스트로 변환하고, 상기 수신된 벡터 값에 대응되는 텍스트를 이용하여 확인된 사용자의 요청 및 슬롯 정보와 상기 기설정된 유사도를 갖는 벡터 값을 이용하여 확인된 슬롯 정보를 이용하여 응답 정보를 생성하는 컴퓨터 판독 가능 기록 매체.
PCT/KR2023/005365 2022-05-09 2023-04-20 전자 장치 및 이의 제어 방법 WO2023219298A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/330,766 US20230360651A1 (en) 2022-05-09 2023-06-07 Electronic apparatus and method for controlling thereof

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20220056868 2022-05-09
KR10-2022-0056868 2022-05-09
KR1020220110769A KR20230157219A (ko) 2022-05-09 2022-09-01 전자 장치 및 이의 제어 방법
KR10-2022-0110769 2022-09-01

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/330,766 Continuation US20230360651A1 (en) 2022-05-09 2023-06-07 Electronic apparatus and method for controlling thereof

Publications (1)

Publication Number Publication Date
WO2023219298A1 true WO2023219298A1 (ko) 2023-11-16

Family

ID=88730593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/005365 WO2023219298A1 (ko) 2022-05-09 2023-04-20 전자 장치 및 이의 제어 방법

Country Status (1)

Country Link
WO (1) WO2023219298A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190133931A (ko) * 2018-05-24 2019-12-04 한국과학기술원 문장 패러프레이즈 인식 기반 대화 시스템 답변 방법
KR102098003B1 (ko) * 2018-10-11 2020-04-07 삼성생명보험주식회사 챗봇 구동 방법, 장치 및 컴퓨터 판독가능 매체
KR20200105057A (ko) * 2019-02-28 2020-09-07 한국전력공사 질의 문장 분석을 위한 질의 자질 추출 장치 및 방법
KR20200143991A (ko) * 2019-06-17 2020-12-28 주식회사 오니온파이브 텍스트의 내용 및 감정 분석에 기반한 답변 추천 시스템 및 방법
KR102297849B1 (ko) * 2018-11-28 2021-09-03 한국과학기술원 정답을 찾는 질의 응답 시스템 및 그의 훈련 방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190133931A (ko) * 2018-05-24 2019-12-04 한국과학기술원 문장 패러프레이즈 인식 기반 대화 시스템 답변 방법
KR102098003B1 (ko) * 2018-10-11 2020-04-07 삼성생명보험주식회사 챗봇 구동 방법, 장치 및 컴퓨터 판독가능 매체
KR102297849B1 (ko) * 2018-11-28 2021-09-03 한국과학기술원 정답을 찾는 질의 응답 시스템 및 그의 훈련 방법
KR20200105057A (ko) * 2019-02-28 2020-09-07 한국전력공사 질의 문장 분석을 위한 질의 자질 추출 장치 및 방법
KR20200143991A (ko) * 2019-06-17 2020-12-28 주식회사 오니온파이브 텍스트의 내용 및 감정 분석에 기반한 답변 추천 시스템 및 방법

Similar Documents

Publication Publication Date Title
WO2020213996A1 (en) Method and apparatus for interrupt detection
WO2020263034A1 (en) Device for recognizing speech input from user and operating method thereof
WO2019117466A1 (ko) 발화의 의미를 분석하기 위한 전자 장치 및 그의 동작 방법
WO2020231181A1 (en) Method and device for providing voice recognition service
WO2020145439A1 (ko) 감정 정보 기반의 음성 합성 방법 및 장치
WO2020101263A1 (en) Electronic apparatus and method for controlling thereof
EP3908961A1 (en) Electronic device and method for controlling the electronic device thereof
WO2020105856A1 (en) Electronic apparatus for processing user utterance and controlling method thereof
WO2020091350A1 (en) Electronic device and control method thereof
WO2022035183A1 (ko) 사용자의 음성 입력을 인식하는 디바이스 및 그 동작 방법
WO2020130447A1 (ko) 페르소나에 기반하여 문장을 제공하는 방법 및 이를 지원하는 전자 장치
WO2021002584A1 (ko) 음성을 통한 전자문서 제공 방법, 음성을 통한 전자문서 작성 방법 및 장치
WO2021029642A1 (en) System and method for recognizing user&#39;s speech
WO2021029643A1 (en) System and method for modifying speech recognition result
WO2020116818A1 (en) Electronic device and method of controlling thereof
WO2018056779A1 (en) Method of translating speech signal and electronic device employing the same
EP3818518A1 (en) Electronic apparatus and method for controlling thereof
WO2021246812A1 (ko) 딥러닝 nlp 모델을 활용한 뉴스 긍정도 분석 솔루션 및 장치
WO2021107390A1 (en) Electronic device and method for controlling the electronic device
WO2023219298A1 (ko) 전자 장치 및 이의 제어 방법
WO2022177224A1 (ko) 전자 장치 및 전자 장치의 동작 방법
WO2022139122A1 (ko) 전자 장치 및 이의 제어 방법
WO2019135599A1 (ko) 음성 명령을 처리하기 위한 전자 문서 표시 방법 및 그 전자 장치
WO2022169172A1 (ko) 사용자의 질의를 처리하는 디바이스 및 그 동작 방법
WO2022131566A1 (ko) 전자 장치 및 전자 장치의 동작 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23803721

Country of ref document: EP

Kind code of ref document: A1