WO2019216551A1 - 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법 - Google Patents

대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법 Download PDF

Info

Publication number
WO2019216551A1
WO2019216551A1 PCT/KR2019/003759 KR2019003759W WO2019216551A1 WO 2019216551 A1 WO2019216551 A1 WO 2019216551A1 KR 2019003759 W KR2019003759 W KR 2019003759W WO 2019216551 A1 WO2019216551 A1 WO 2019216551A1
Authority
WO
WIPO (PCT)
Prior art keywords
sentence
dialogue
output
generating
external memory
Prior art date
Application number
PCT/KR2019/003759
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
Application filed by 경북대학교 산학협력단 filed Critical 경북대학교 산학협력단
Publication of WO2019216551A1 publication Critical patent/WO2019216551A1/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
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • 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
    • 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/3331Query processing
    • G06F16/334Query execution
    • G06F16/3347Query execution using vector based model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present invention relates to a dialogue sentence generating device, a dialogue robot including the same, and a dialogue sentence generating method, and more particularly, to a dialogue sentence generating device generating a sentence in response to a sentence received from a user, a dialogue robot and the same including the same. It relates to a sentence generation method.
  • intelligent robots will be widely used in homes and offices in the near future.
  • intelligent robots include housekeeping robots, assistant robots, and entertainment robots that replace or assist humans, and are called conversation robots in that they have a function to communicate with humans.
  • the implementation method of such a conversation robot mainly consists of outputting a one-to-one mapped action with a specific input signal when a predefined input signal enters the robot.
  • Conversation robot technology seeks interaction between the user and the robot. However, in reality, since the output of the robot is predefined in the user's specific input, it is merely a simple task, not a conversation with the user.
  • An aspect of the present invention provides a dialog sentence generating device for generating a dialogue sentence by generating a specific vector from an external memory and setting it as an initial state of the decoder, and a dialogue robot and a dialogue sentence generating method including the same.
  • An apparatus for generating a dialogue sentence according to an aspect of the present invention for solving the above problems is to generate an input vector by inputting a first dialogue sentence from a user, encoding the first dialogue sentence, and generating a DNC (Differentiable Neural Computer). Write or delete the input vector to an external memory according to a write or delete algorithm, and perform a read operation on the external memory according to a read algorithm of a DNC to generate an output vector and the LSTM (the output vector). And a output unit for outputting a second dialog sentence by setting as an input parameter of Long Short Term Memory).
  • DNC Differentiable Neural Computer
  • the sentence processor may be provided in plural to generate a plurality of output vectors, and the output unit may generate a plurality of second dialogue sentences by setting the plurality of output vectors as input parameters of the LSTM, respectively.
  • the apparatus may further include a controller configured to select any one of the plurality of second conversation sentences according to a preset criteria for each time zone, and to control the output unit to output the selected dialogue sentences.
  • the controller may measure the usage time of the user and change a criterion for selecting any one of the plurality of second dialogue sentences when the usage time of the user exceeds a preset time.
  • the apparatus may further include a controller configured to predict the age of the user by analyzing the first dialogue sentence.
  • the control unit may control the output unit to output the second dialogue sentence, which is made up of short words according to the predicted age of the user, to be corrected and outputted in lower words.
  • the sentence processing unit may be set to be random at first, and set a position to perform a read operation in the external memory of the NxW matrix according to a read weight updated by applying a backpropagation algorithm using the second dialogue sentence. It may include an external memory control module for reading the information from the corresponding position of the external memory to generate the output vector.
  • the sentence processing unit may include an encoder for dividing the first dialogue sentence into word units and encoding the first dialogue sentence through an LSTM to generate the input vector.
  • it may be a chat robot including a chat sentence generating device.
  • the method of generating a dialogue sentence includes receiving a first dialogue sentence from a user, generating an input vector by encoding the first dialogue sentence, and writing or deleting a differential neural computer (DNC). Performing an operation of writing or deleting the input vector to an external memory according to an algorithm, and performing an operation of reading from the external memory according to a read algorithm of a DNC to generate an output vector, and converting the output vector into an LSTM (Long Short Term Memory).
  • LSTM Long Short Term Memory
  • the generating of the output vector may include generating or outputting a plurality of output vectors by performing a write or delete operation and a read operation of the input vector to a plurality of external memories, or writing or writing the input vectors to a single external memory.
  • the method may include generating a plurality of output vectors by repeatedly performing an erase operation and a read operation.
  • the outputting of the second dialogue sentence may include generating a plurality of second dialogue sentences by setting the plurality of output vectors as input parameters of an LSTM, respectively.
  • the outputting of the second dialogue sentence may include selecting one of the second dialogue sentences among the plurality of second dialogue sentences and outputting the selected second dialogue sentence according to a criterion set in advance for each time zone. It may include.
  • the selecting of any one of the plurality of second conversation sentences according to a criterion preset for each time zone may include measuring a usage time of the user and setting a time for which the usage time of the user is preset. If exceeded, the method may include changing a criterion for selecting any one of the plurality of second conversation sentences.
  • the method may further include predicting an age of the user by analyzing the first dialogue sentence.
  • the outputting of the second dialogue sentence may include modifying the second dialogue sentence with a lower term according to a predicted age of the user.
  • the generating of the input vector by encoding the first dialogue sentence may include generating the input vector by dividing the first dialogue sentence into word units and encoding the first dialogue sentence through a LSTM.
  • the generating of the output vector may include: setting a position at which to perform a read operation in the external memory of an NxW matrix according to a read weight that is initially set to random, and reading information at a corresponding position of the external memory. Generating a vector.
  • the setting of the position at which the read operation is performed in the external memory of the NxW matrix according to the read weight set to be randomly performed comprises: updating the read weight by applying a backpropagation algorithm using the second dialogue sentence. It may include.
  • the present invention has a wider storage capacity than the conventional method of generating and learning a conversation sentence using only the information inside the decoder, so that the context can be understood, and a longer sentence can be learned, thereby providing a natural dialogue sentence. Can be generated.
  • FIG. 1 is a diagram illustrating an example of a dialog robot to which a dialog sentence generating device according to an exemplary embodiment of the present invention is applied.
  • FIG. 2 is a diagram illustrating a data flow in an apparatus for generating a dialogue sentence according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of an apparatus for generating a dialogue sentence according to an embodiment of the present invention.
  • FIG. 4 is a conceptual view illustrating output of a dialogue sentence in the output unit illustrated in FIG. 3.
  • FIG. 5 is a flowchart illustrating a dialog sentence generating method according to an embodiment of the present invention.
  • FIG. 6 is a flowchart illustrating a dialog sentence generating method according to another exemplary embodiment of the present invention.
  • FIG. 7 is a flowchart illustrating a dialog sentence generating method according to another exemplary embodiment of the present invention.
  • FIG. 1 is a diagram illustrating an example of a dialog robot to which a dialog sentence generating device according to an exemplary embodiment of the present invention is applied.
  • the dialogue sentence generating apparatus 100 may be installed at one side of the dialogue robot 1.
  • the conversation sentence generating apparatus 100 may generate a second dialogue sentence in response to the first dialogue sentence input from the user.
  • the dialogue robot 1 may include a dialogue sentence generating apparatus 100 to implement a communication function with a user, and may provide various services such as entertainment, education, and guidance from the dialogue robot.
  • the dialogue sentence generating apparatus 100 may configure some modules of the dialogue robot 1 as shown in FIG. 1, or may constitute a separate apparatus.
  • the dialogue sentence generating apparatus 100 may be in the form of a computer, a server, or an engine, and may include a device, an apparatus, a terminal, a user equipment, and an MS (mobile station, mobile terminal (MT), user terminal (UT), subscriber station (SS), wireless device (wireless device), personal digital assistant (PDA), wireless modem, handheld device, etc. It may be called in other terms.
  • FIG. 2 is a diagram illustrating a data flow in an apparatus for generating a dialogue sentence according to an embodiment of the present invention.
  • the apparatus 100 for generating a dialogue sentence may be a sentence generation apparatus based on a deep learning technology, and may output a second dialogue sentence 18 in response to the first dialogue sentence 13 of the user.
  • the dialogue sentence generating apparatus 100 may include an encoder and a decoder configured of an artificial neural network.
  • the encoder may generate the feature vector by encoding the first dialogue sentence 13
  • the decoder may generate the second dialogue sentence 18 by decoding the feature vector.
  • the dialog sentence generating apparatus 100 may update the feature vector input to the decoder through the external memory 10. That is, the dialogue sentence generating apparatus 100 may encode the first dialogue sentence 13 and store it in the external memory 10. The apparatus 100 for generating a dialogue sentence may read a value from a specific position of the external memory 10 and set it as the initial state 15 of the decoder.
  • the external memory 10 is connected to the input terminal of the decoder, and the input value of the decoder can be updated through the external memory 10, and the decoder From the external memory 10 to the input of the first dialogue sentence 13, the reverse propagation can be learned. Therefore, the conversation sentence generating apparatus 100 has a wider storage capacity than the conventional method of generating and learning the dialogue sentence using only the information inside the decoder, so that the context can be understood and the longer sentence can be learned. To create a natural dialogue.
  • FIG. 3 is a block diagram of an apparatus for generating a dialogue sentence according to an embodiment of the present invention.
  • the apparatus for generating a dialogue sentence 100 may include an input unit 110, a sentence processing unit 130, and an output unit 150.
  • the input unit 110 may receive a first dialogue sentence from a user.
  • the input unit 110 may include a microphone for acquiring a voice signal.
  • the input unit 110 may read the first conversation sentence in the form of a text in the form of text by using a known voice characterization technique and transmit the read-out text to the sentence processing unit 130 to be described later.
  • the sentence processor 130 may generate a feature vector from the first dialog sentence and perform a write, delete, or read operation in the external memory 10 according to a write, delete, and read algorithm of a differential neural computer (DNC).
  • the sentence processor 130 may include an encoder 131 and an external memory control module 133.
  • the encoder 131 may be configured as a neural network.
  • the encoder 131 may be implemented with a long short term memory (LSTM) model.
  • the LSTM model is a deep learning model that processes data continuously in time by reflecting a signal of a previous frame into a current frame.
  • the encoder 131 may generate a feature vector corresponding to the first dialogue sentence by encoding the first dialogue sentence through the LSTM.
  • the feature vector may be referred to as abstracted information representing the first dialog sentence.
  • the feature vector generated by the encoder 131 is defined as an input vector.
  • the encoder 131 divides the first dialog sentence into word units and sequentially inputs each frame of the LSTM. When the input of the first dialogue sentence is completed, the encoder 131 may perform encoding to generate an input vector.
  • the external memory control module 133 may generate an output vector that is an initial value for generating a second dialog sentence after performing a write or delete operation using an input vector in the external memory 10.
  • the external memory control module 133 may perform a write, delete, or read operation in the external memory 10 according to a write, delete, and read algorithm of the DNC, which is an AI learning model distributed by Google.
  • a write, delete, and read algorithm of the DNC which is an AI learning model distributed by Google.
  • the external memory 10 may store information in each column in a matrix of size NxW.
  • the external memory control module 133 may include a write module for writing or deleting information in the external memory 10 and a reading module for reading information stored in the external memory 10.
  • the write module may designate a position to perform a write or delete operation in the external memory 10 using the write weight w w and the write key.
  • the write weight w w is initially set to random, and may be updated by applying a backpropagation algorithm using a second dialogue sentence, which is output data of the output unit 150, which will be described later.
  • the write key may be used to find a previously modified location in the external memory 10.
  • the read module may designate a position to perform a read operation in the external memory 10 using the read weight w r .
  • the read weight w r is initially set to random, and may be updated by applying a backpropagation algorithm using a second dialog sentence, which is output data of the output unit 150 to be described later.
  • the read module may set a position to perform a write operation in the external memory 10 according to Equation 1 below, and read an output vector by performing a read operation at the corresponding position.
  • the external memory control module 133 may generate an output vector which is an initial value for generating the second dialog sentence in the external memory 10.
  • the external memory control module 133 finds the low level output stage before taking the softmax in the external memory 10 and connects it with the output unit 150, thereby using the external memory 10 from the output unit 150 and the first.
  • the dialogue sentence 13 enables the learning based on the back propagation method up to the input stage.
  • the output unit 150 may convert the output vector into a natural language. That is, the output unit 150 may decode the output vector to generate a second dialogue sentence that is a response to the first dialogue sentence.
  • the output unit 150 may be implemented to include a decoder composed of an artificial neural network (Neural Network).
  • the output unit 150 may be implemented in a long short term memory (LSTM) model.
  • the LSTM model is a deep learning model that processes data continuously in time by reflecting a signal of a previous frame into a current frame.
  • the output unit 150 may generate the second dialog sentence by setting the output vector as an input parameter of the LSTM. This will be described with reference to FIG. 4.
  • FIG. 4 is a conceptual view illustrating output of a dialogue sentence in the output unit illustrated in FIG. 3.
  • the output unit 150 may input an output vector y T , which is information read from the external memory 10, to the initial state of the LSTM.
  • the external memory control module 133 may find an output terminal of a low level before taking softmax in the external memory 10 and generate an output vector that matches the input dimension of the LSTM.
  • the output unit 150 may set the output vector as the initial state of the LSTM, perform decoding to generate a word for each frame of the LSTM, and generate a second dialog sentence from the words generated in each frame of the LSTM. have.
  • the output unit 150 may output the second dialog sentence to the outside.
  • the output unit 150 may be implemented including a speaker for outputting a voice signal.
  • the dialogue sentence generating apparatus 100 may further include a controller in the configuration shown in FIG. 3.
  • the output unit 150 may be implemented to generate a plurality of second dialog sentences.
  • the controller may select one of the plurality of second conversation sentences and control the output unit 150 to output the selected second conversation sentence.
  • the sentence processor 130 may be provided in plural and may be implemented to generate a plurality of output vectors from the plurality of external memories 10. Alternatively, the sentence processor 130 may be implemented to generate a plurality of output vectors by repeatedly generating an output vector from one external memory 10.
  • the output unit 150 may generate a plurality of second dialogue sentences by setting the plurality of output vectors as input parameters of the LSTM, respectively.
  • the controller may select any one of the plurality of second conversation sentences based on a preset criterion for each time zone. For example, in the early morning time (am1: 00 ⁇ am 6:00) it is preferable to refrain from using the chat sentence generating apparatus 100, the second chat sentence selection criteria may be set in order of short sentence length.
  • the controller may measure a user's use time and change the dialogue sentence selection criterion if the user's use time exceeds a preset time. For example, when the user's use time exceeds 30 minutes in the morning time (am1: 00 ⁇ am 6:00), the second dialog sentence selection criteria may be changed in order of the length of the sentence.
  • the controller selects any one of the plurality of second conversation sentences according to a criterion set in advance for each time zone, and may flexibly select the user's situation.
  • the controller may randomly select one second dialogue sentence at random when two or more second dialogue sentences are selected from among the plurality of second dialogue sentences according to a criterion set in advance for each time zone.
  • control unit analyzes the first dialog sentence to predict the age of the user, according to the predicted user's age the second dialog sentence is corrected and outputted so that the output unit 150 It can play a role of controlling.
  • the controller may receive the first dialog sentence in text form from the input unit 110.
  • the controller may divide the first dialog sentence in word units.
  • the controller may calculate the age for each word of the first dialogue sentence by comparing the words of the first dialogue sentence with word information for each age.
  • the controller may estimate the age calculated for each word constituting the first dialog sentence as an average of the user.
  • the controller may divide the user into an adult or a child according to the predicted age of the user.
  • the output unit 150 may be set to generate a second dialogue sentence consisting of words in initial design. Therefore, if the user is classified as an adult, the control unit may control the output unit 150 to output the second dialogue sentence composed of the high word as it is. If the user is classified as a child, the controller may control the second conversation sentence to be output as a lower word in the output unit 150. For example, the controller outputs a word corresponding to the ending of the words that are output from the LSTM of the output unit 150 to form the second dialogue sentence, and lowers the word corresponding to the ending according to pre-stored ending conversion information (eg, let's do). Can be modified.
  • pre-stored ending conversion information eg, let's do
  • the controller searches for and lowers a word that can be corrected as a lower word according to pre-stored elevation-lowering conversion information (for example, meal to rice) among the words outputted from the LSTM of the output unit 150 and constituting the second dialogue sentence. Can be corrected with words.
  • pre-stored elevation-lowering conversion information for example, meal to rice
  • the controller may control the second conversation sentence, which is a high or low word, to be output according to the age of the user.
  • the control unit may expect interaction with a real person by giving a friendly feeling to the child user.
  • the dialogue sentence generating method according to an embodiment of the present invention may be performed in substantially the same configuration as the dialogue sentence generating apparatus 100 shown in FIG. 3. Therefore, the same components as the dialog sentence generating apparatus 100 of FIG. 3 are given the same reference numerals, and repeated descriptions thereof will be omitted.
  • FIG. 5 is a flowchart illustrating a dialog sentence generating method according to an embodiment of the present invention.
  • the input unit 110 may receive a first dialogue sentence from a user (500).
  • the input unit 110 may read the first dialogue sentence in the form of a text in the form of text and transmit it to the sentence processing unit 130 to be described later.
  • the encoder 131 may generate an input vector from the first dialog sentence (510).
  • the encoder 131 may be implemented as an LSTM model, and may divide the first dialog sentence into word units, sequentially input the frames in the LSTM, and encode the first dialogue sentence to generate an input vector.
  • the external memory control module 133 may generate an output vector by performing an input vector write or delete operation on the external memory 10 and a read operation on the external memory 10 (520, 530).
  • the external memory control module 133 may perform a write, delete, or read operation in the external memory 10 according to a write, delete, and read algorithm of the DNC, which is an AI learning model distributed by Google.
  • the external memory control module 133 may designate a location to perform a write or delete operation in the external memory 10 using the write weight w w , and perform a write or delete operation at the location. have.
  • the external memory control module 133 may designate a position to perform a read operation in the external memory 10 using a read weight w r , and read an output vector by performing a read operation at the corresponding position.
  • the write weight w w or the read weight w r may be set to random at first, and may be updated by applying a backpropagation algorithm using a second dialogue sentence, which is output data of the output unit 150.
  • the output unit 150 may generate a second dialogue sentence from the output vector and output the second dialogue sentence (540, 550).
  • the output unit 150 may be implemented as an LSTM model, and may generate a word for each frame of the LSTM by setting the output vector as an initial state of the LSTM and performing decoding.
  • the output unit 150 may generate and output a second dialog sentence from words generated in each frame of the LSTM.
  • Figure 6 is a flow chart of a dialog sentence generation method according to another embodiment of the present invention.
  • the input unit 110 may receive a first dialog sentence from a user (600).
  • the encoder 131 may generate an input vector from the first dialogue sentence (610).
  • the external memory control module 133 may generate an output vector by performing an input vector write or delete operation in the external memory 10 and a read operation in the external memory 10 (620 and 630).
  • the external memory control module 133 may generate a plurality of output vectors by repeating the above steps with respect to one external memory 10 or a plurality of external memories 10 (640).
  • the output unit 150 may generate a plurality of second dialogue sentences from the plurality of output vectors (650).
  • the controller may set the second dialog sentence selection criteria according to the current time zone and the use time, and select one of the plurality of second dialogue sentences according to the second dialogue sentence selection criteria (660 and 670). .
  • the control unit selects any one of the plurality of second conversation sentences according to the preset criteria for each time zone, and measures the user's usage time, and if the user's usage time exceeds the preset time, the dialogue sentence By changing the selection criteria, one of the plurality of second conversation sentences may be selected.
  • the output unit 150 may output a second dialogue sentence selected by the controller (680).
  • FIG. 7 is a flowchart illustrating a dialog sentence generating method according to another exemplary embodiment of the present invention.
  • the input unit 110 may receive a first dialog sentence from a user (700).
  • the encoder 131 may generate an input vector from the first dialogue sentence (710).
  • the external memory control module 133 may generate an output vector by performing an input vector write or delete operation on the external memory 10 and a read operation on the external memory 10 (720 and 730).
  • the output unit 150 may generate a second dialogue sentence from the output vector (740).
  • the controller may determine whether the user is a child by predicting the user's age (750, 760).
  • the controller receives the first conversation sentence in text form from the input unit 110, and each word of the first conversation sentence and the pre-stored age. By comparing the star word information, it is possible to calculate the age for each word of the first dialogue sentence.
  • the controller may estimate the age calculated for each word constituting the first dialog sentence as an average of the user.
  • the controller may divide the user into an adult or a child according to the predicted age of the user.
  • the control unit may correct the second conversation sentence by lowering words (770).
  • the controller may modify the word corresponding to the ending of the words output from the LSTM of the output unit 150 to form a lower word according to pre-stored ending conversion information (eg, let's do).
  • the controller searches for and lowers a word that can be corrected as a lower word according to pre-stored elevation-lowering conversion information (for example, meal to rice) among the words outputted from the LSTM of the output unit 150 and constituting the second dialogue sentence. Can be corrected with words.
  • the output unit 150 may output a second dialogue sentence modified by the controller (780).
  • the output unit 150 may output a second dialogue sentence (790).
  • the method of generating a dialogue sentence may be implemented in the form of program instructions that may be implemented as an application or executed through various computer components, and may be recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the program instructions recorded on the computer-readable recording medium are those specially designed and configured for the present invention, and may be known and available to those skilled in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
  • the hardware device may be configured to operate as one or more software modules to perform the process according to the invention, and vice versa.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)

Abstract

대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법이 개시된다. 대화문장 생성 장치는 사용자로부터 제1 대화문장을 입력 받는 입력부, 상기 제1 대화문장을 인코딩하여 입력벡터를 생성하고, DNC(Differentiable Neural Computer)의 쓰기 또는 삭제 알고리즘에 따라 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작을 수행하며, DNC의 읽기 알고리즘에 따라 상기 외부 메모리에서 읽기 동작을 수행하여 출력벡터를 생성하는 문장 처리부 및 상기 출력벡터를 LSTM(Long Short Term Memory)의 입력 파라미터로 설정하여 제2 대화문장을 출력하는 출력부를 포함한다.

Description

대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법
본 발명은 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법에 관한 것으로, 보다 상세하게는 사용자로부터 입력 받는 문장에 응답하여 문장을 생성하는 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법에 관한 것이다.
멀지 않은 장래에 가정이나 사무실 마다 지능형 로봇이 보편적으로 보급될 것으로 기대된다. 이러한 지능형 로봇의 예로서 인간을 대신하거나 보조하는 가사 로봇, 비서 로봇, 엔터테인먼트 로봇 등이 있으며, 인간과 대화할 수 있는 기능을 갖추고 있는 점에서 대화로봇이라 한다. 이러한 대화로봇의 구현 방법은 사전에 정의된 특정한 입력신호가 로봇으로 들어오면 입력신호와 일 대 일로 매핑된 행동을 출력하는 방법이 주를 이룬다.
대화로봇 기술은 사용자와 로봇 간의 상호작용을 추구한다. 그러나, 실상은 사용자의 특정 입력에 로봇의 출력을 사전에 정의하기 때문에, 사용자와 대화하는 것이 아니라 단순 작업이 이루어지는 것에 불과하다.
최근에는 특정한 입력신호에 따라 정해진 출력만을 단순히 표현하는 것이 아닌, 특정 입력에 대해서 여러 개의 유사 출력을 발생시키기 위해 랜덤방식을 활용한 출력 방법이나, 확률을 이용한 출력방법 또한 제안된바 있다. 그러나 여전히 사용자와 대화하는 것이 아니라 단순 매핑 작업이 이루어지는 것에 불과하며 문맥에 따른 유연한 대화는 불가능한 실정이다.
본 발명의 일측면은 외부 메모리로부터 특정 벡터를 생성하고, 이를 디코더의 초기 스테이트로 설정 하여 대화문장을 생성하는 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법을 제공한다.
상기 과제를 해결하기 위한 본 발명의 일측면에 따른 대화문장 생성 장치는 사용자로부터 제1 대화문장을 입력 받는 입력부, 상기 제1 대화문장을 인코딩하여 입력벡터를 생성하고, DNC(Differentiable Neural Computer)의 쓰기 또는 삭제 알고리즘에 따라 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작을 수행하며, DNC의 읽기 알고리즘에 따라 상기 외부 메모리에서 읽기 동작을 수행하여 출력벡터를 생성하는 문장 처리부 및 상기 출력벡터를 LSTM(Long Short Term Memory)의 입력 파라미터로 설정하여 제2 대화문장을 출력하는 출력부를 포함한다.
한편, 상기 문장 처리부는, 복수 개 마련되어 복수의 출력벡터를 생성하고, 상기 출력부는, 복수의 출력벡터를 각각 LSTM의 입력 파라미터로 설정하여 복수의 제2 대화문장을 생성할 수 있다.
또한, 시간대 별로 미리 설정되는 기준에 따라 상기 복수의 제2 대화문장 중 어느 하나의 대화문장을 선택하고, 선택한 대화문장이 출력되도록 상기 출력부를 제어하는 제어부를 더 포함할 수 있다.
또한, 상기 제어부는, 상기 사용자의 이용 시간을 측정하고, 상기 사용자의 이용 시간이 미리 설정된 시간을 초과하면 상기 복수의 제2 대화문장 중 어느 하나의 대화문장을 선택하는 기준을 변경할 수 있다.
또한, 상기 제1 대화문장을 분석하여 상기 사용자의 연령을 예측하는 제어부를 더 포함할 수 있다.
또한, 상기 제어부는, 예측한 상기 사용자의 연령에 따라 높임말로 이루어지는 상기 제2 대화문장이 낮춤말로 수정되어 출력되도록 상기 출력부를 제어할 수 있다.
또한, 상기 문장 처리부는, 최초 랜덤으로 설정되며, 상기 제2 대화문장을 이용한 역전파 알고리즘이 적용되어 업데이트되는 읽기 가중치에 따라 NxW 행렬의 상기 외부 메모리에서 읽기 동작을 수행할 위치를 설정하고, 상기 외부 메모리의 해당 위치에서 정보를 읽어 상기 출력벡터를 생성하는 외부 메모리 제어 모듈을 포함할 수 있다.
또한, 상기 문장 처리부는, 상기 제1 대화문장을 단어 단위로 구분하고, LSTM을 통해 인코딩하여 상기 입력벡터를 생성하는 인코더를 포함할 수 있다.
또한, 대화문장 생성 장치를 포함하는 대화로봇일 수 있다.
한편, 본 발명의 일 측면에 따른 대화문장 생성 방법은 사용자로부터 제1 대화문장을 입력 받는 단계, 상기 제1 대화문장을 인코딩하여 입력벡터를 생성하는 단계, DNC(Differentiable Neural Computer)의 쓰기 또는 삭제 알고리즘에 따라 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작을 수행하고, DNC의 읽기 알고리즘에 따라 상기 외부 메모리에서 읽기 동작을 수행하여 출력벡터를 생성하는 단계 및 상기 출력벡터를 LSTM(Long Short Term Memory)의 입력 파라미터로 설정하여 제2 대화문장을 출력하는 단계를 포함한다.
또한, 상기 출력벡터를 생성하는 단계는, 복수의 외부 메모리에 각각 상기 입력벡터의 쓰기 또는 삭제 동작과 읽기 동작을 수행하여 복수의 출력벡터를 생성하거나, 하나의 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작과 읽기 동작을 반복 수행하여 복수의 출력벡터를 생성하는 단계를 포함할 수 있다.
또한, 상기 제2 대화문장을 출력하는 단계는, 상기 복수의 출력벡터를 각각 LSTM의 입력 파라미터로 설정하여 복수의 제2 대화문장을 생성하는 단계를 포함할 수 있다.
또한, 상기 제2 대화문장을 출력하는 단계는, 시간대 별로 미리 설정되는 기준에 따라 상기 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하는 단계 및 선택한 제2 대화문장을 출력하는 단계를 포함할 수 있다.
또한, 시간대 별로 미리 설정되는 기준에 따라 상기 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하는 단계는, 상기 사용자의 이용 시간을 측정하고, 상기 사용자의 이용 시간이 미리 설정된 시간을 초과하면 상기 복수의 제2 대화문장 중 어느 하나의 대화문장을 선택하는 기준을 변경하는 단계를 포함할 수 있다.
또한, 상기 제1 대화문장을 분석하여 상기 사용자의 연령을 예측하는 단계를 더 포함할 수 있다.
또한, 상기 제2 대화문장을 출력하는 단계는, 예측한 상기 사용자의 연령에 따라 높임말로 이루어지는 상기 제2 대화문장을 낮춤말로 수정하는 단계를 포함할 수 있다.
또한, 상기 제1 대화문장을 인코딩하여 입력벡터를 생성하는 단계는, 상기 제1 대화문장을 단어 단위로 구분하고, LSTM을 통해 인코딩하여 상기 입력벡터를 생성하는 단계일 수 있다.
또한, 상기 출력벡터를 생성하는 단계는, 최초 랜덤으로 설정되는 읽기 가중치에 따라 NxW 행렬의 상기 외부 메모리에서 읽기 동작을 수행할 위치를 설정하는 단계 및 상기 외부 메모리의 해당 위치에서 정보를 읽어 상기 출력벡터를 생성하는 단계를 포함할 수 있다.
또한, 최초 랜덤으로 설정되는 읽기 가중치에 따라 NxW 행렬의 상기 외부 메모리에서 읽기 동작을 수행할 위치를 설정하는 단계는, 상기 제2 대화문장을 이용한 역전파 알고리즘을 적용하여 상기 읽기 가중치를 업데이트하는 단계를 포함할 수 있다.
본 발명에 따르면, 디코더 내부의 정보만을 이용하여 대화문장을 생성 및 학습하는 종래의 방식에 비해 넓은 저장용량을 가짐으로써 문맥의 이해가 가능하고, 보다 긴 문장에 대한 학습이 가능하여 자연스러운 대화문장을 생성할 수 있다.
도 1은 본 발명의 일 실시예에 따른 대화문장 생성 장치가 적용된 대화로봇의 일 예를 도시한 도면이다.
도 2는 본 발명의 일 실시예에 따른 대화문장 생성 장치에서의 데이터 흐름을 나타낸 도면이다.
도 3은 본 발명의 일 실시예에 따른 대화문장 생성 장치의 블록도이다.
도 4는 도 3에 도시된 출력부에서의 대화문장 출력을 설명하기 위한 개념도이다.
도 5는 본 발명의 일 실시예에 따른 대화문장 생성 방법의 순서도이다.
도 6은 본 발명의 다른 실시예에 따른 대화문장 생성 방법의 순서도이다.
도 7은 본 발명의 또 다른 실시예에 따른 대화문장 생성 방법의 순서도이다.
후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예와 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.
이하, 도면들을 참조하여 본 발명의 바람직한 실시예들을 보다 상세하게 설명하기로 한다.
도 1은 본 발명의 일 실시예에 따른 대화문장 생성 장치가 적용된 대화로봇의 일 예를 도시한 도면이다.
도 1을 참조하면, 대화문장 생성 장치(100)는 대화로봇(1)의 일측에 설치될 수 있다. 대화문장 생성 장치(100)는 사용자로부터 입력되는 제1 대화문장에 대한 응답으로 제2 대화문장을 생성할 수 있다. 대화로봇(1)은 이러한 대화문장 생성 장치(100)를 포함하여, 사용자와의 커뮤니케이션 기능을 구현할 수 있으며, 이로부터 오락, 교육, 안내 등의 다양한 서비스를 제공할 수 있다.
대화문장 생성 장치(100)는 도 1에 도시된 바와 같이 대화로봇(1)의 일부 모듈을 구성하거나, 또는, 별도의 장치를 구성할 수 있다. 대화문장 생성 장치(100)는 컴퓨터(computer), 서버(server) 또는 엔진(engine) 형태일 수 있으며, 디바이스(device), 기구(apparatus), 단말(terminal), UE(user equipment), MS(mobile station), MT(mobile terminal), UT(user terminal), SS(subscriber station), 무선기기(wireless device), PDA(personal digital assistant), 무선 모뎀(wireless modem), 휴대기기(handheld device) 등 다른 용어로 불릴 수 있다.
도 2는 본 발명의 일 실시예에 따른 대화문장 생성 장치에서의 데이터 흐름을 나타낸 도면이다.
도 2를 참조하면, 대화문장 생성 장치(100)는 딥러닝 기술 기반의 문장 생성 장치로, 사용자의 제1 대화문장(13)에 응답하여 제2 대화문장(18)을 출력할 수 있다.
대화문장 생성 장치(100)는 인공 신경망(Neural Network)으로 구성되는 인코더(encoder) 및 디코더(decoder)를 포함할 수 있다. 인코더는 제1 대화문장(13)을 인코딩하여 특징벡터를 생성하고, 디코더는 특징벡터를 디코딩하여 제2 대화문장(18)을 생성할 수 있다.
대화문장 생성 장치(100)는 디코더로 입력되는 특징벡터를 외부 메모리(10)를 통해 업데이트할 수 있다. 즉, 대화문장 생성 장치(100)는 제1 대화문장(13)을 인코딩하여 외부 메모리(10)에 저장할 수 있다. 그리고, 대화문장 생성 장치(100)는 외부 메모리(10)의 특정 위치에서 값을 읽어들여 디코더의 초기 스테이트(15)로 설정할 수 있다.
이와 같이, 본 발명의 일 실시예에 따른 대화문장 생성 장치(100)는 디코더의 입력단에 외부 메모리(10)가 연결되어, 외부 메모리(10)를 통해 디코더의 입력 값을 업데이트할 수 있으며, 디코더로부터 외부 메모리(10) 사용 및 제1 대화문장(13) 입력단 까지 역전파 방식에 따른 학습이 가능하다. 따라서, 대화문장 생성 장치(100)는 디코더 내부의 정보만을 이용하여 대화문장을 생성 및 학습하는 종래의 방식에 비해 넓은 저장용량을 가짐으로써 문맥의 이해가 가능하고, 보다 긴 문장에 대한 학습이 가능하여 자연스러운 대화문장을 생성할 수 있다.
이하, 도 3을 참조하여 본 발명의 일 실시예에 따른 대화문장 생성 장치(100)의 각 구성에 대하여 구체적으로 설명한다.
도 3은 본 발명의 일 실시예에 따른 대화문장 생성 장치의 블록도이다.
도 3을 참조하면, 본 발명의 일 실시예에 따른 대화문장 생성 장치(100)는 입력부(110), 문장 처리부(130) 및 출력부(150)를 포함할 수 있다.
입력부(110)는 사용자로부터 제1 대화문장을 입력 받을 수 있다. 이를 위해, 입력부(110)는 음성 신호 획득을 위한 마이크로폰 등을 포함하여 구현될 수 있다. 입력부(110)는 공지된 음성 문자화 기술을 적용하여 음성 신호 형태의 제1 대화문장을 텍스트의 형태로 읽어 후술하는 문장 처리부(130)로 전달할 수 있다.
문장 처리부(130)는 제1 대화문장으로부터 특징벡터를 생성하고, DNC(Differentiable Neural Computer)의 쓰기, 삭제 및 읽기 알고리즘에 따라 외부 메모리(10)에서의 쓰기, 삭제 또는 읽기 동작을 수행할 수 있다. 이를 위해, 문장 처리부(130)는 인코더(131) 및 외부 메모리 제어 모듈(133)을 포함할 수 있다.
인코더(131)는 인공 신경망(Neural Network)으로 구성될 수 있다. 예를 들어, 인코더(131)는 LSTM(Long Short Term Memory) 모델로 구현될 수 있다. LSTM 모델은 이전 프레임의 신호를 현재 프레임에 반영하여 시간적으로 연속하는 데이터를 처리하는 딥러닝 모델이다.
인코더(131)는 제1 대화문장을 LSTM을 통해 인코딩하여 제1 대화문장에 대응하는 특징벡터를 생성할 수 있다. 특징벡터는 제1 대화문장을 나타내는 추상화된 정보라 할 수 있으며, 이하의 설명에서 인코더(131)에서 생성하는 특징벡터를 입력벡터로 정의한다. 인코더(131)는 제1 대화문장을 단어 단위로 구분하고, 순차적으로 LSTM의 각 프레임에 입력할 수 있다. 인코더(131)는 제1 대화문장의 입력이 완료되면, 인코딩을 실행하여 입력벡터를 생성할 수 있다.
외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 입력벡터를 이용한 쓰기 또는 삭제 동작을 수행한 뒤, 읽기 동작을 수행하여 제2 대화문장 생성을 위한 초기 값인 출력벡터를 생성할 수 있다.
외부 메모리 제어 모듈(133)은 구글 사에서 배포한 인공지능 학습 모델인 DNC의 쓰기, 삭제 및 읽기 알고리즘에 따라 외부 메모리(10)에서의 쓰기, 삭제 또는 읽기 동작을 수행할 수 있다. DNC의 쓰기, 삭제 및 읽기 알고리즘에 대해 간략히 설명하면 다음과 같다.
먼저, 외부 메모리(10)는 NxW 크기의 행렬로 각 열에 정보를 저장할 수 있다. 외부 메모리 제어 모듈(133)은 외부 메모리(10)에 정보를 쓰거나 삭제하는 쓰기 모듈 및 외부 메모리(10)에 저장된 정보를 읽는 읽기 모듈을 포함할 수 있다.
쓰기 모듈은 쓰기 가중치(ww) 및 쓰기 키(write key)를 이용하여 외부 메모리(10)에서 쓰기 또는 삭제 동작을 수행할 위치를 지정할 수 있다. 쓰기 가중치(ww)는 최초 랜덤으로 설정되며, 후술하는 출력부(150)의 출력 데이터인 제2 대화문장을 이용한 역전파 알고리즘이 적용되어 업데이트될 수 있다. 쓰기 키(write key)는 외부 메모리(10)에서 이전에 수정된 위치를 찾는 데 사용될 수 있다.
읽기 모듈은 읽기 가중치(wr)를 이용하여 외부 메모리(10)에서 읽기 동작을 수행할 위치를 지정할 수 있다. 읽기 가중치(wr)는 최초 랜덤으로 설정되며, 후술하는 출력부(150)의 출력 데이터인 제2 대화문장을 이용한 역전파 알고리즘이 적용되어 업데이트될 수 있다. 읽기 모듈은 아래 수학식 1에 따라 외부 메모리(10)에서 쓰기 동작을 수행할 위치를 설정하고, 해당 위치에서 읽기 동작을 수행하여 출력벡터를 읽어 올 수 있다.
Figure PCTKR2019003759-appb-M000001
이처럼, 외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 제2 대화문장 생성을 위한 초기 값인 출력벡터를 생성할 수 있다. 외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 softmax를 취하기 이전의 낮은 레벨의 출력 단을 찾아 출력부(150)와 연결시킴으로써, 출력부(150)로부터 외부 메모리(10) 사용 및 제1 대화문장(13) 입력단 까지 역전파 방식에 따른 학습을 가능하게 한다.
출력부(150)는 출력벡터를 자연어로 변환할 수 있다. 즉, 출력부(150)는 출력벡터를 디코딩하여 제1 대화문장에 대한 응답인 제2 대화문장을 생성할 수 있다. 이를 위해, 출력부(150)는 인공 신경망(Neural Network)으로 구성되는 디코더를 포함하여 구현될 수 있다. 예를 들어, 출력부(150)는 LSTM(Long Short Term Memory) 모델로 구현될 수 있다. LSTM 모델은 이전 프레임의 신호를 현재 프레임에 반영하여 시간적으로 연속하는 데이터를 처리하는 딥러닝 모델이다. 출력부(150)는 출력벡터를 LSTM의 입력 파라미터로 설정하여 제2 대화문장을 생성할 수 있다. 이와 관련하여 도 4를 참조하여 설명한다.
도 4는 도 3에 도시된 출력부에서의 대화문장 출력을 설명하기 위한 개념도이다.
도 4를 참조하면, 출력부(150)는 외부 메모리(10)로부터 읽어 온 정보인 출력벡터(yT)를 LSTM의 초기 스테이트로 입력할 수 있다. 이를 위해, 외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 softmax를 취하기 이전의 낮은 레벨의 출력 단을 찾아 LSTM의 입력 차원에 맞는 출력벡터를 생성할 수 있다. 출력부(150)는 출력벡터를 LSTM의 초기 스테이트로 하고, 디코딩을 실행하여 LSTM의 각 프레임별로 단어를 생성할 수 있으며, LSTM의 각 프레임에서 생성한 단어들로부터 제2 대화문장을 생성할 수 있다.
출력부(150)는 제2 대화문장을 외부로 출력할 수 있다. 이를 위해, 출력부(150)는 음성 신호 출력을 위한 스피커 등을 포함하여 구현될 수 있다.
한편, 본 발명의 다른 실시예에 따르면, 대화문장 생성 장치(100)는 도 3에 도시된 구성에 제어부를 더 포함할 수 있다. 본 발명의 다른 실시예에 따르면, 출력부(150)는 복수의 제2 대화문장을 생성하도록 구현될 수 있다. 이와 같은 경우, 제어부는 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하고, 선택한 제2 대화문장이 출력되도록 출력부(150)를 제어하는 역할을 수행할 수 있다.
구체적으로는, 문장 처리부(130)는 복수 개 마련되어 각각 복수의 외부 메모리(10)로부터 복수의 출력벡터를 생성하도록 구현될 수 있다. 또는, 문장 처리부(130)는 하나의 외부 메모리(10)로부터 출력벡터를 생성하는 단계를 반복 수행하여, 복수의 출력벡터를 생성하도록 구현될 수 있다. 출력부(150)는 복수의 출력벡터를 각각 LSTM의 입력 파라미터로 설정하여 복수의 제2 대화문장을 생성할 수 있다.
제어부는 시간대 별로 미리 설정되는 기준에 따라 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택할 수 있다. 예를 들어, 대화문장 생성 장치(100)의 사용을 자제하는 것이 바람직한 새벽 시간대(am1:00~am6:00)에는 제2 대화문장 선택 기준이 문장 길이가 짧은 순으로 설정될 수 있다.
또한, 제어부는 사용자의 이용 시간을 측정하고, 사용자의 이용 시간이 미리 설정된 시간을 초과하면, 대화문장 선택 기준을 변경할 수 있다. 예를 들어, 새벽 시간대(am1:00~am6:00)에 사용자의 이용 시간이 30분을 초과하면, 제2 대화문장 선택 기준이 문장 길이가 긴 순으로 변경될 수 있다.
이처럼, 제어부는 시간대 별로 미리 설정되는 기준에 따라 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하되, 사용자의 상황에 맞추어 유연한 선택을 도모할 수 있다.
제어부는 시간대 별로 미리 설정되는 기준에 따라 복수의 제2 대화문장 중 둘 이상의 제2 대화문장이 선택되면, 랜덤으로 어느 하나의 제2 대화문장을 최종 선택할 수 있다.
한편, 본 발명의 또 다른 실시예에 다르면, 제어부는 제1 대화문장을 분석하여 사용자의 연령을 예측하고, 예측한 사용자의 연령에 따라 제2 대화문장이 수정되어 출력되도록 출력부(150)를 제어하는 역할을 수행할 수 있다.
구체적으로는, 제어부는 입력부(110)로부터 텍스트 형태의 제1 대화문장을 전달 받을 수 있다. 제어부는 제1 대화문장을 단어 단위로 구분할 수 있다. 제어부는 제1 대화문장의 각 단어와 미리 저장된 연령 별 단어 정보를 비교하여, 제1 대화문장의 각 단어 별로 연령을 산정할 수 있다. 제어부는 제1 대화문장을 구성하는 각 단어 별로 산정된 연령을 평균 내어 사용자의 연령으로 예측할 수 있다.
제어부는 예측한 사용자의 연령에 따라 사용자를 어른 또는 어린이로 나눌 수 있다. 이때, 출력부(150)는 최초 설계 시 높임말로 이루어지는 제2 대화문장을 생성하도록 설정될 수 있다. 따라서, 제어부는 사용자가 어른으로 구분되면 출력부(150)에서 높임말로 이루어지는 제2 대화문장이 그대로 출력되도록 제어할 수 있다. 제어부는 사용자가 어린이로 구분되면 출력부(150)에서 제2 대화문장이 낮춤말로 수정되어 출력되도록 제어할 수 있다. 예를 들면, 제어부는 출력부(150)의 LSTM에서 출력되어 제2 대화문장을 구성하는 각 단어 중, 어미에 해당하는 단어를 미리 저장된 어미 변환 정보(예컨대, 합시다→하자)에 따라 낮춤 단어로 수정할 수 있다. 또는, 제어부는 출력부(150)의 LSTM에서 출력되어 제2 대화문장을 구성하는 각 단어 중 미리 저장된 높임-낮춤 변환 정보(예컨대, 식사→밥)에 따라 낮춤 단어로 수정 가능한 단어를 검색하여 낮춤 단어로 수정할 수 있다.
이처럼, 제어부는 사용자의 연령에 따라 높임말 또는 낮춤말로 이루어지는 제2 대화문장이 출력되도록 제어함으로써, 특히, 어린이 사용자에게 친근감을 주어 실제 사람과 대화하는 듯한 인터렉션을 기대할 수 있다.
이하에서는, 본 발명의 일 실시예에 따른 대화문장 생성 방법에 대하여 설명하기로 한다. 본 발명의 일 실시예에 따른 대화문장 생성 방법은 도 3에 도시된 대화문장 생성 장치(100)와 실질적으로 동일한 구성에서 진행될 수 있다. 따라서, 도 3의 대화문장 생성 장치(100)와 동일한 구성요소는 동일한 도면부호를 부여하고, 반복되는 설명은 생략하기로 한다.
도 5는 본 발명의 일 실시예에 따른 대화문장 생성 방법의 순서도이다.
도 5를 참조하면, 입력부(110)는 사용자로부터 제1 대화문장을 입력 받을 수 있다(500). 입력부(110)는 음성 신호 형태의 제1 대화문장을 텍스트의 형태로 읽어 후술하는 문장 처리부(130)로 전달할 수 있다.
인코더(131)는 제1 대화문장으로부터 입력벡터를 생성할 수 있다(510). 인코더(131)는 LSTM 모델로 구현되며, 제1 대화문장을 단어 단위로 구분하고, 순차적으로 LSTM의 각 프레임에 입력한 뒤, 인코딩을 실행하여 입력벡터를 생성할 수 있다.
외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 입력벡터 쓰기 또는 삭제 동작을 수행하고, 외부 메모리(10)에서 읽기 동작을 수행하여 출력벡터를 생성할 수 있다(520, 530). 외부 메모리 제어 모듈(133)은 구글 사에서 배포한 인공지능 학습 모델인 DNC의 쓰기, 삭제 및 읽기 알고리즘에 따라 외부 메모리(10)에서의 쓰기, 삭제 또는 읽기 동작을 수행할 수 있다. 예를 들어, 외부 메모리 제어 모듈(133)은 쓰기 가중치(ww)를 이용하여 외부 메모리(10)에서 쓰기 또는 삭제 동작을 수행할 위치를 지정하고, 해당 위치에서 쓰기 또는 삭제 동작을 수행할 수 있다. 또한, 외부 메모리 제어 모듈(133)은 읽기 가중치(wr)를 이용하여 외부 메모리(10)에서 읽기 동작을 수행할 위치를 지정하고, 해당 위치에서 읽기 동작을 수행하여 출력벡터를 읽어 올 수 있다. 쓰기 가중치(ww) 또는 읽기 가중치(wr)는 각각 최초 랜덤으로 설정되며, 출력부(150)의 출력 데이터인 제2 대화문장을 이용한 역전파 알고리즘이 적용되어 업데이트될 수 있다.
출력부(150)는 출력벡터로부터 제2 대화문장을 생성하고, 제2 대화문장을 출력할 수 있다(540, 550). 출력부(150)는 LSTM 모델로 구현되며, 출력벡터를 LSTM의 초기 스테이트로 하고, 디코딩을 실행하여 LSTM의 각 프레임별로 단어를 생성할 수 있다. 그리고, 출력부(150)는 LSTM의 각 프레임에서 생성한 단어들로부터 제2 대화문장을 생성하여 출력할 수 있다.
한편, 도 6은 본 발명의 다른 실시예에 따른 대화문장 생성 방법의 순서도이다.
도 6을 참조하면, 입력부(110)는 사용자로부터 제1 대화문장을 입력 받을 수 있다(600).
인코더(131)는 제1 대화문장으로부터 입력벡터를 생성할 수 있다(610).
외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 입력벡터 쓰기 또는 삭제 동작을 수행하고, 외부 메모리(10)에서 읽기 동작을 수행하여 출력벡터를 생성할 수 있다(620, 630).
외부 메모리 제어 모듈(133)은 하나의 외부 메모리(10) 또는 복수의 외부 메모리(10)에 대해 위와 같은 단계를 반복하여 복수의 출력벡터를 생성할 수 있다(640).
출력부(150)는 복수의 출력벡터로부터 복수의 제2 대화문장을 생성할 수 있다(650).
제어부는 현재 시간대 및 이용 시간에 따른 제2 대화문장 선택 기준을 설정하고, 제2 대화문장 선택 기준에 따라 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택할 수 있다(660, 670). 제어부는 시간대 별로 미리 설정되는 기준에 따라 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하되, 사용자의 이용 시간을 측정하고, 사용자의 이용 시간이 미리 설정된 시간을 초과하면, 대화문장 선택 기준을 변경하여 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택할 수 있다.
출력부(150)는 제어부에서 선택한 제2 대화문장을 출력할 수 있다(680).
도 7은 본 발명의 또 다른 실시예에 따른 대화문장 생성 방법의 순서도이다.
도 7을 참조하면, 입력부(110)는 사용자로부터 제1 대화문장을 입력 받을 수 있다(700).
인코더(131)는 제1 대화문장으로부터 입력벡터를 생성할 수 있다(710).
외부 메모리 제어 모듈(133)은 외부 메모리(10)에서 입력벡터 쓰기 또는 삭제 동작을 수행하고, 외부 메모리(10)에서 읽기 동작을 수행하여 출력벡터를 생성할 수 있다(720, 730).
출력부(150)는 출력벡터로부터 제2 대화문장을 생성할 수 있다(740).
제어부는 사용자 연령을 예측하여, 사용자가 어린이인지를 구분할 수 있다(750, 760) 제어부는 입력부(110)로부터 텍스트 형태의 제1 대화문장을 전달 받고, 제1 대화문장의 각 단어와 미리 저장된 연령 별 단어 정보를 비교하여, 제1 대화문장의 각 단어 별로 연령을 산정할 수 있다. 제어부는 제1 대화문장을 구성하는 각 단어 별로 산정된 연령을 평균 내어 사용자의 연령으로 예측할 수 있다. 제어부는 예측한 사용자의 연령에 따라 사용자를 어른 또는 어린이로 나눌 수 있다.
제어부는 사용자가 어린이로 구분되면, 제2 대화문장을 낮춤말로 수정할 수 있다(770). 제어부는 출력부(150)의 LSTM에서 출력되어 제2 대화문장을 구성하는 각 단어 중, 어미에 해당하는 단어를 미리 저장된 어미 변환 정보(예컨대, 합시다→하자)에 따라 낮춤 단어로 수정할 수 있다. 또는, 제어부는 출력부(150)의 LSTM에서 출력되어 제2 대화문장을 구성하는 각 단어 중 미리 저장된 높임-낮춤 변환 정보(예컨대, 식사→밥)에 따라 낮춤 단어로 수정 가능한 단어를 검색하여 낮춤 단어로 수정할 수 있다.
출력부(150)는 제어부에 의해 수정된 제2 대화문장을 출력할 수 있다(780).
제어부에 의해 사용자가 어른으로 구분되면, 출력부(150)는 제2 대화문장을 출력할 수 있다(790).
이와 같은, 본 발명의 실시예에 따른 대화문장 생성 방법은 애플리케이션으로 구현되거나 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다.
상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거니와 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다.
컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD 와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다.
프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
이상에서는 실시예들을 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.

Claims (19)

  1. 사용자로부터 제1 대화문장을 입력 받는 입력부;
    상기 제1 대화문장을 인코딩하여 입력벡터를 생성하고, DNC(Differentiable Neural Computer)의 쓰기 또는 삭제 알고리즘에 따라 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작을 수행하며, DNC의 읽기 알고리즘에 따라 상기 외부 메모리에서 읽기 동작을 수행하여 출력벡터를 생성하는 문장 처리부; 및
    상기 출력벡터를 LSTM(Long Short Term Memory)의 입력 파라미터로 설정하여 제2 대화문장을 출력하는 출력부를 포함하는 대화문장 생성 장치.
  2. 제1항에 있어서,
    상기 문장 처리부는,
    복수 개 마련되어 복수의 출력벡터를 생성하고,
    상기 출력부는,
    복수의 출력벡터를 각각 LSTM의 입력 파라미터로 설정하여 복수의 제2 대화문장을 생성하는 대화문장 생성 장치.
  3. 제2항에 있어서,
    시간대 별로 미리 설정되는 기준에 따라 상기 복수의 제2 대화문장 중 어느 하나의 대화문장을 선택하고, 선택한 대화문장이 출력되도록 상기 출력부를 제어하는 제어부를 더 포함하는 대화문장 생성 장치.
  4. 제3항에 있어서,
    상기 제어부는,
    상기 사용자의 이용 시간을 측정하고, 상기 사용자의 이용 시간이 미리 설정된 시간을 초과하면 상기 복수의 제2 대화문장 중 어느 하나의 대화문장을 선택하는 기준을 변경하는 대화문장 생성 장치.
  5. 제1항에 있어서,
    상기 제1 대화문장을 분석하여 상기 사용자의 연령을 예측하는 제어부를 더 포함하는 대화문장 생성 장치.
  6. 제5항에 있어서,
    상기 제어부는,
    예측한 상기 사용자의 연령에 따라 높임말로 이루어지는 상기 제2 대화문장이 낮춤말로 수정되어 출력되도록 상기 출력부를 제어하는 대화문장 생성 장치.
  7. 제1항에 있어서,
    상기 문장 처리부는,
    최초 랜덤으로 설정되며, 상기 제2 대화문장을 이용한 역전파 알고리즘이 적용되어 업데이트되는 읽기 가중치에 따라 NxW 행렬의 상기 외부 메모리에서 읽기 동작을 수행할 위치를 설정하고, 상기 외부 메모리의 해당 위치에서 정보를 읽어 상기 출력벡터를 생성하는 외부 메모리 제어 모듈을 포함하는 대화문장 생성 장치.
  8. 제1항에 있어서,
    상기 문장 처리부는,
    상기 제1 대화문장을 단어 단위로 구분하고, LSTM을 통해 인코딩하여 상기 입력벡터를 생성하는 인코더를 포함하는 대화문장 생성 장치.
  9. 제1항 내지 제8항 중 어느 하나의 항에 따른 대화문장 생성 장치를 포함하는 대화로봇.
  10. 사용자로부터 제1 대화문장을 입력 받는 단계;
    상기 제1 대화문장을 인코딩하여 입력벡터를 생성하는 단계;
    DNC(Differentiable Neural Computer)의 쓰기 또는 삭제 알고리즘에 따라 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작을 수행하고, DNC의 읽기 알고리즘에 따라 상기 외부 메모리에서 읽기 동작을 수행하여 출력벡터를 생성하는 단계; 및
    상기 출력벡터를 LSTM(Long Short Term Memory)의 입력 파라미터로 설정하여 제2 대화문장을 출력하는 단계를 포함하는 대화문장 생성 방법.
  11. 제10항에 있어서,
    상기 출력벡터를 생성하는 단계는,
    복수의 외부 메모리에 각각 상기 입력벡터의 쓰기 또는 삭제 동작과 읽기 동작을 수행하여 복수의 출력벡터를 생성하거나, 하나의 외부 메모리에 상기 입력벡터의 쓰기 또는 삭제 동작과 읽기 동작을 반복 수행하여 복수의 출력벡터를 생성하는 단계를 포함하는 대화문장 생성 방법.
  12. 제11항에 있어서,
    상기 제2 대화문장을 출력하는 단계는,
    상기 복수의 출력벡터를 각각 LSTM의 입력 파라미터로 설정하여 복수의 제2 대화문장을 생성하는 단계를 포함하는 대화문장 생성 방법.
  13. 제12항에 있어서,
    상기 제2 대화문장을 출력하는 단계는,
    시간대 별로 미리 설정되는 기준에 따라 상기 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하는 단계; 및
    선택한 제2 대화문장을 출력하는 단계를 포함하는 대화문장 생성 방법.
  14. 제13항에 있어서,
    시간대 별로 미리 설정되는 기준에 따라 상기 복수의 제2 대화문장 중 어느 하나의 제2 대화문장을 선택하는 단계는,
    상기 사용자의 이용 시간을 측정하고, 상기 사용자의 이용 시간이 미리 설정된 시간을 초과하면 상기 복수의 제2 대화문장 중 어느 하나의 대화문장을 선택하는 기준을 변경하는 단계를 포함하는 대화문장 생성 방법.
  15. 제10항에 있어서,
    상기 제1 대화문장을 분석하여 상기 사용자의 연령을 예측하는 단계를 더 포함하는 대화문장 생성 방법.
  16. 제15항에 있어서,
    상기 제2 대화문장을 출력하는 단계는,
    예측한 상기 사용자의 연령에 따라 높임말로 이루어지는 상기 제2 대화문장을 낮춤말로 수정하는 단계를 포함하는 대화문장 생성 방법.
  17. 제10항에 있어서,
    상기 제1 대화문장을 인코딩하여 입력벡터를 생성하는 단계는,
    상기 제1 대화문장을 단어 단위로 구분하고, LSTM을 통해 인코딩하여 상기 입력벡터를 생성하는 단계인 대화문장 생성 방법.
  18. 제10항에 있어서,
    상기 출력벡터를 생성하는 단계는,
    최초 랜덤으로 설정되는 읽기 가중치에 따라 NxW 행렬의 상기 외부 메모리에서 읽기 동작을 수행할 위치를 설정하는 단계; 및
    상기 외부 메모리의 해당 위치에서 정보를 읽어 상기 출력벡터를 생성하는 단계를 포함하는 대화문장 생성 방법.
  19. 제18항에 있어서,
    최초 랜덤으로 설정되는 읽기 가중치에 따라 NxW 행렬의 상기 외부 메모리에서 읽기 동작을 수행할 위치를 설정하는 단계는,
    상기 제2 대화문장을 이용한 역전파 알고리즘을 적용하여 상기 읽기 가중치를 업데이트하는 단계를 포함하는 대화문장 생성 방법.
PCT/KR2019/003759 2018-05-11 2019-04-01 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법 WO2019216551A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2018-0054222 2018-05-11
KR1020180054222A KR102069076B1 (ko) 2018-05-11 2018-05-11 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법

Publications (1)

Publication Number Publication Date
WO2019216551A1 true WO2019216551A1 (ko) 2019-11-14

Family

ID=68468211

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/003759 WO2019216551A1 (ko) 2018-05-11 2019-04-01 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법

Country Status (2)

Country Link
KR (1) KR102069076B1 (ko)
WO (1) WO2019216551A1 (ko)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060070605A (ko) * 2004-12-21 2006-06-26 한국전자통신연구원 영역별 언어모델과 대화모델을 이용한 지능형 로봇 음성인식 서비스 장치 및 방법
KR20120135449A (ko) * 2011-06-02 2012-12-14 포항공과대학교 산학협력단 웹을 이용한 정보 검색 방법 및 이를 사용하는 음성 대화 방법
KR20130123038A (ko) * 2012-05-02 2013-11-12 한국전자통신연구원 자동 번역을 위한 존대 표현 생성 장치 및 그 방법
JP6178936B1 (ja) * 2017-01-24 2017-08-09 株式会社Preferred Networks パケットスイッチ装置及びメッセージ交換システム
KR20180008247A (ko) * 2016-07-14 2018-01-24 김경호 딥러닝 인공신경망 기반의 타스크 제공 플랫폼
JP2018045594A (ja) * 2016-09-16 2018-03-22 トヨタ自動車株式会社 文章生成装置および文章生成方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060070605A (ko) * 2004-12-21 2006-06-26 한국전자통신연구원 영역별 언어모델과 대화모델을 이용한 지능형 로봇 음성인식 서비스 장치 및 방법
KR20120135449A (ko) * 2011-06-02 2012-12-14 포항공과대학교 산학협력단 웹을 이용한 정보 검색 방법 및 이를 사용하는 음성 대화 방법
KR20130123038A (ko) * 2012-05-02 2013-11-12 한국전자통신연구원 자동 번역을 위한 존대 표현 생성 장치 및 그 방법
KR20180008247A (ko) * 2016-07-14 2018-01-24 김경호 딥러닝 인공신경망 기반의 타스크 제공 플랫폼
JP2018045594A (ja) * 2016-09-16 2018-03-22 トヨタ自動車株式会社 文章生成装置および文章生成方法
JP6178936B1 (ja) * 2017-01-24 2017-08-09 株式会社Preferred Networks パケットスイッチ装置及びメッセージ交換システム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KANG, DONG HYEON ET AL.: "A seq-memoty-seq chatbot that considers context information using external memory. 2018 Brain and Artificial Intelligence Symposium", BRAIN ENGINEERING SOCIETY OF KOREA . POSTER SECTION 26, 30 January 2018 (2018-01-30) *

Also Published As

Publication number Publication date
KR102069076B1 (ko) 2020-01-22
KR20190129490A (ko) 2019-11-20

Similar Documents

Publication Publication Date Title
WO2019004582A1 (ko) 아식칩과 스마트폰을 구비하는 실시간 음성인식 장치
WO2020204364A2 (ko) 단어의 문맥 정보와 형태론적 정보를 고려한 단어 임베딩 방법 및 장치
WO2021033981A1 (ko) Dna 저장 장치의 연성 정보 기반 복호화 방법, 프로그램 및 장치
WO2021095987A1 (ko) 다중타입 엔티티에 기반한 지식 보완 방법 및 장치
WO2021071000A1 (ko) 신약 후보 물질 도출 방법 및 장치
WO2020054980A1 (ko) 음소기반 화자모델 적응 방법 및 장치
WO2023003262A1 (ko) 시험 점수를 예측하는 방법 및 장치
WO2018169276A1 (ko) 언어 정보를 처리하기 위한 방법 및 그 전자 장치
WO2014142422A1 (ko) 지시 표현 처리에 기반한 대화 처리 방법 및 장치
WO2022145611A1 (ko) 전자 장치 및 그 제어 방법
WO2019216551A1 (ko) 대화문장 생성 장치, 이를 포함하는 대화로봇 및 대화문장 생성 방법
WO2023167466A1 (ko) 음성 개인정보 보호 기술을 이용한 기계학습 데이터베이스 구축 시스템
WO2023136417A1 (ko) 비디오 스토리 질의 응답을 위한 트랜스포머 모델을 구축하는 장치 및 방법
WO2019198900A1 (en) Electronic apparatus and control method thereof
WO2016208817A1 (ko) 키 입력을 인터페이스하는 장치 및 방법
WO2021045434A1 (ko) 전자 장치 및 이의 제어 방법
WO2020256339A1 (ko) 전자 장치 및 이의 제어 방법
WO2022163996A1 (ko) 자기주의 기반 심층 신경망 모델을 이용한 약물-표적 상호작용 예측 장치 및 그 방법
WO2022177091A1 (ko) 전자 장치 및 이의 제어 방법
JP2020027168A (ja) 学習装置、学習方法、音声合成装置、音声合成方法及びプログラム
WO2021230470A1 (ko) 전자 장치 및 그 제어 방법
WO2021054613A1 (en) Electronic device and method for controlling the electronic device thereof
WO2021066266A1 (ko) 인공지능을 이용하여 소리를 생성하는 방법
WO2020149511A1 (ko) 전자 장치 및 이의 제어 방법
WO2022196955A1 (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: 19800296

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19800296

Country of ref document: EP

Kind code of ref document: A1