KR20220085221A - The method of managing chatbot conversation flow using script - Google Patents

The method of managing chatbot conversation flow using script Download PDF

Info

Publication number
KR20220085221A
KR20220085221A KR1020200175115A KR20200175115A KR20220085221A KR 20220085221 A KR20220085221 A KR 20220085221A KR 1020200175115 A KR1020200175115 A KR 1020200175115A KR 20200175115 A KR20200175115 A KR 20200175115A KR 20220085221 A KR20220085221 A KR 20220085221A
Authority
KR
South Korea
Prior art keywords
conversation
user
dialog
task
unit
Prior art date
Application number
KR1020200175115A
Other languages
Korean (ko)
Other versions
KR102472887B1 (en
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 주식회사 와이즈넛
Priority to KR1020200175115A priority Critical patent/KR102472887B1/en
Publication of KR20220085221A publication Critical patent/KR20220085221A/en
Application granted granted Critical
Publication of KR102472887B1 publication Critical patent/KR102472887B1/en

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
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/02User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages

Abstract

본 발명은 챗봇의 대화 흐름 관리 방법에 관합니다.
종래의 챗봇 기술이 사용자의 질문에 대해 답변을 제공하는 정해진 패턴의 상호작용을 다루는 데 초점을 맞추었다면, 본 발명에서는 설계자가 예상한 사용자와 챗봇 간의 다양한 방식의 상호작용을 챗봇의 대화처리 소프트웨어가 처리할 수 있도록 했습니다.
본 발명의 챗봇의 대화 처리 소프트웨어는 사용자 UI로부터 입력 받은 사용자의 질문사항을 메시지 처리기를 통해 사용자별로 구분하여 전달받은 후에 대화 작업 관리자를 통해 처리합니다. 대화 작업 관리자는 복잡한 대화 시나리오 전체를 컴포넌트 단위의 단위 대화 작업으로 나누어 실행하는 역할을 수행합니다. 최초의 사용자 질문은 뿌리 대화 작업에서 의도분류 과정을 거처 실행됩니다. 의도분류 결과에 맞는 각 대화 작업이 실행되며 각 단위 대화 작업은 본 발명에서 정의된 스크립트를 실행하는 방법에 의해 수행됩니다. 단위 대화 작업은 정해진 스크립트를 따라 사용자와 메시지를 주고받거나 자연어 처리, 논리연산, 분기 등을 수행하는 방법에 따라 사용자와의 상호작용을 수행하며, 대화 작업이 종료될 때 다른 대화 작업이 실행되도록 하여 대화 흐름이 계속 이어지도록 합니다.
The present invention relates to a chatbot conversation flow management method.
While the conventional chatbot technology focused on dealing with a fixed pattern of interaction that provides an answer to a user's question, in the present invention, the chatbot's dialog processing software provides various types of interaction between the user and the chatbot expected by the designer. made it possible to process it.
The chatbot's dialog processing software of the present invention processes the user's questions inputted from the user UI through the dialog task manager after classifying them for each user through the message handler. The dialog task manager plays the role of dividing and executing the entire complex dialog scenario into component-level unit dialog tasks. The first user question is executed through the intent classification process in the root dialogue task. Each dialogue task according to the intention classification result is executed, and each unit dialogue operation is performed by the method of executing the script defined in the present invention. The unit conversation task performs interaction with the user according to the method of exchanging messages with the user according to a set script or performing natural language processing, logical operation, branching, etc. Let the conversation flow continue.

Description

스크립트를 이용한 챗봇의 대화흐름 관리 방법{THE METHOD OF MANAGING CHATBOT CONVERSATION FLOW USING SCRIPT} How to manage chatbot conversation flow using script {THE METHOD OF MANAGING CHATBOT CONVERSATION FLOW USING SCRIPT}

본 발명은 챗봇을 이용하여 사람이 수행하던 작업 중 일부를 자동화하는 기술에 관한다.The present invention relates to a technology for automating some of the tasks performed by humans using a chatbot.

최근 챗봇을 통해 사람이 수행하던 복잡한 업무 일부를 자동화하는 시도가 활발히 진행되고 있다. 챗봇은 사용자가 별도의 특화된 프로그램을 설치하지 않고도 익숙한 대화형 인터페이스를 통해 사용자에게 필요한 정보를 제공하거나 서비스를 제공할 수 있는 기술이다. 이러한 챗봇은 단순 질의응답을 넘어 사람이 수행하던 비교적 단순하고 규칙적인 업무를 대신하기 시작했다. 사용자가 묻는 추상적인 질문이나 요청에 대해 챗봇은 반복적인 대화를 통해 사용자의 숨은 의도를 정확히 인지하고, 그 의도에 맞는 서비스를 제공할 수 있다. 더 나아가 사용자에게 제공한 서비스에 대한 반응을 보고 관련된 다른 서비스의 제공을 통해 사용자가 미처 의도하지 않았던 정보나 서비스를 제공할 수도 있다. Recently, attempts are being made to automate some of the complex tasks performed by humans through chatbots. A chatbot is a technology that allows users to provide necessary information or services through a familiar conversational interface without the user installing a separate specialized program. These chatbots have gone beyond simple question-and-answering and have begun to replace the relatively simple and regular tasks performed by humans. In response to an abstract question or request from the user, the chatbot can accurately recognize the user's hidden intention through repeated conversations and provide a service that meets the user's intention. Furthermore, it is possible to provide information or services that the user did not intend by looking at the response to the service provided to the user and providing other related services.

그러나 종래의 챗봇은 질문에 대한 답변을 제공하는 등의 고정된 방식의 상호작용만을 제공하는 데 그치고 있다. 이런 방식의 챗봇은 상담사들의 역할을 대체하는 자동 상담 분야에서는 효과적이었다. 그러나 사용자에게 먼저 말을 건다거나, 사용자의 돌발적인 반응에 대처하는 데에는 어려움을 겪고 있다. However, the conventional chatbot only provides a fixed method of interaction, such as providing an answer to a question. This type of chatbot has been effective in the field of automatic counseling that replaces the role of counselors. However, it is difficult to talk to the user first or to respond to the user's sudden reaction.

우리 발명자들은 사용자가 챗봇이 답변한 내용에 대해 문의를 한다거나, 다른 분야로 주제를 전환한다거나 또는 챗봇의 답변이 마음에 안 들었을 때 추가적인 설명을 요구한다거나 하는 다양한 대화 방식을 연구하고 있다. 이를 위해서는 챗봇의 대화 흐름 관리를 대화 주제나 사용자의 반응에 맞게 '적응적으로' 설계할 수 있는 방안이 필요하다. Our inventors are studying various conversational methods, such as when a user asks a question about the chatbot's response, shifts the topic to another field, or asks for additional explanation when the chatbot's answer is not satisfactory. To this end, it is necessary to design the chatbot's conversation flow management 'adaptively' according to the conversation topic or the user's reaction.

챗봇의 대화 흐름을 표현하기 위한 방식 중에 종래 AIML(Artificial Intelligence Markup Language )이나 Chat Script 등 스크립트 기반의 대화 흐름 표현 방법이 제안되었다. 사용자와의 대화 흐름을 기술하려는 노력이었다. 그러나 사용자의 반응에 따른 분기나 반복 등의 일반적인 프로그래밍 언어에서 가능한 제어 로직에 대한 지원에는 한계를 보였다. Among the methods for expressing the conversation flow of a chatbot, a script-based conversation flow expression method such as AIML (Artificial Intelligence Markup Language) or Chat Script has been proposed. It was an effort to describe the flow of conversations with users. However, support for control logic that is possible in general programming languages such as branching or repeating according to the user's reaction was limited.

선행기술문헌정보Prior art literature information

1. 대한민국 특허공보 제1840420호 공보1. Korean Patent Publication No. 1840420

2. 대한민국 특허공보 제1830857호 공보2. Korean Patent Publication No. 1830857

3. 대한민국 공개특허공보 제10- 2019-0066988호 공개공보3. Korean Patent Laid-Open Publication No. 10-2019-0066988

본 발명의 발명자들은 위와 같은 문제점을 해결하기 위하여 공동으로 연구하고 토론하면서 노력한 결과 본 발명을 완성하기에 이르렀다. The inventors of the present invention have completed the present invention as a result of joint research and discussion to solve the above problems.

본 발명의 목적은 챗봇과 사용자가 대화를 통해 상호작용하는 과정에서 예측 가능한 다수의 상황에 적응하여 대응할 수 있도록 하는 소프트웨어 시스템과 대화 흐름 처리 알고리즘을 제안하는 데 있다. An object of the present invention is to propose a software system and a conversation flow processing algorithm that enable a chatbot and a user to adapt and respond to a number of predictable situations in the process of interaction through dialogue.

본 발명의 대강은 이러하다. 복잡한 대화 시나리오는 보다 작은 세부 대화 작업으로 분할된다. 분할된 각 세부 대화 작업은 독립적인 스레드를 갖는 소프트웨어 컴포넌트에서 실행된다. 각 세부 대화 작업은 동작이 완료되면 다음에 실행될 세부 대화 작업을 지정할 수 있고, 각 세부 대화 작업 간의 동적인 연결에 의해 긴 흐름의 대화가 진행될 수 있다. The gist of the present invention is as follows. Complex dialogue scenarios are broken down into smaller, detailed dialogue tasks. Each subdivided conversation task is executed in a software component having an independent thread. Each detailed conversation task can specify the detailed dialog task to be executed next when the action is completed, and a long flow of conversation can proceed by dynamic connection between each detailed dialog task.

각각의 세부 대화 작업은 절차적 흐름, 분기, 반복 등의 일반적인 프로그래밍 언어에서 제공되는 기본 기능을 포함하는 스크립트 언어로 기술된다. 대화 흐름을 기술하는 스크립트를 해석하여 실행하는 구성을 통해서 챗봇은 다양한 상황에 사용자와의 대화를 진행할 수 있도록 설계된다. 챗봇 서비스의 설계자가 정의한 세부 대화 작업의 흐름과 각 세부 대화 작업을 기술하는 스크립트의 실행을 통해 챗봇은 사용자와의 대화에서 발생하는 다양한 상황에 능동적으로 대응할 수 있다Each detailed dialogue task is described in a script language that includes basic functions provided in general programming languages such as procedural flow, branching, and iteration. Through the configuration that interprets and executes the script that describes the conversation flow, the chatbot is designed to communicate with the user in various situations. Through the flow of detailed conversation tasks defined by the designer of the chatbot service and the execution of scripts that describe each detailed conversation task, the chatbot can actively respond to various situations that occur in conversations with users.

한편, 본 발명의 명시되지 않은 또 다른 목적들은 하기의 상세한 설명 및 그 효과로부터 용이하게 추론 할 수 있는 범위 내에서 추가적으로 고려될 것이다.On the other hand, other objects not specified in the present invention will be additionally considered within the range that can be easily inferred from the following detailed description and effects thereof.

위와 같은 과제를 달성하기 위하여 컴퓨터 장치는 대화를 처리하는 독립적인 스레드를 갖는 컴포넌트 단위로서 대화 스크립트로 미리 설계된 하나 이상의 단위 대화 작업을 포함하면서 이 단위 대화 작업을 서로 연결하여 대화를 처리하는 챗봇 대화처리 소프트웨어가 설치되어 있으며, 사용자 단말이 상기 컴퓨터 장치로 사용자 메시지를 입력함으로써 개시되는 챗봇의 대화 흐름 관리 방법으로서:In order to achieve the above task, the computer device is a component unit having an independent thread for processing a conversation, including one or more unit conversation tasks pre-designed as a dialog script, and chatbot conversation processing that processes the conversation by linking these unit conversation tasks with each other A method for managing a conversation flow of a chatbot having software installed and initiated by a user terminal inputting a user message to the computer device, the method comprising:

상기 사용자 단말이 사용자 인터페이스를 통해 상기 컴퓨터 장치로 사용자 메시지를 입력하고,The user terminal inputs a user message to the computer device through the user interface,

상기 컴퓨터 장치의 메시지 처리기가 상기 사용자 메시지를 사용자별로 구분하여 대화 작업 관리자에 전달하고,The message processor of the computer device divides the user message by user and transmits it to the conversation task manager,

상기 대화 작업 관리자가 복잡한 대화 시나리오 전체를 각각의 단위 대화 작업으로 분할하되, 사용자 메시지를 수신할 때 기 실행되는 단위 대화 작업이 존재한다면 사용자 메시지를 실행 중인 모든 단위 대화 작업에 전달하고, 사용자 메시지를 수신할 때 단위 대화 작업이 없다면 상기 사용자 메시지의 의도를 분류하여 어떤 단위 대화 작업에 해당하는지를 판단하고 해당 단위 대화 작업을 실행하며,The conversation task manager divides the entire complex conversation scenario into each unit conversation task, but if there is a unit conversation task that is already executed when receiving a user message, the user message is delivered to all the running unit conversation tasks, and the user message is transmitted. If there is no unit conversation operation when receiving, classify the intent of the user message to determine which unit conversation operation corresponds to, and execute the corresponding unit conversation operation;

각 단위 대화 작업별로 대화 스크립트 실행기가 미리 정의된 대화 스크립트를 명령어 단위로 순차적으로 실행하면서 후행하는 단위 대화 작업을 지정하는 단계를 포함하며, 각각의 단위 대화 작업을 동적으로 연결하는 것을 특징으로 한다.It is characterized in that the dialog script executor sequentially executes a predefined dialog script in units of commands for each unit dialog task, and designates a subsequent unit dialog task, and dynamically connects each unit dialog task.

본 발명의 바람직한 어느 실시예에 따른 챗봇의 대화 흐름 관리 방법에 있어서, 단위 대화 작업마다 각각 별개의 메시지 송수신 모듈 및 대화 흐름 제어모듈이 구성되어 있으며, 상기 메시지 송수신 모듈은 사용자 단말에 메시지를 송수신하는 통신 포트로 기능하며, 상기 대화 흐름 제어모듈은 후행하는 단위 대화 작업으로 대화 흐름을 전달하는 제어모듈 포트로 기능한다.In the chatbot conversation flow management method according to a preferred embodiment of the present invention, a separate message sending/receiving module and a conversation flow control module are configured for each unit conversation task, and the message sending/receiving module is configured to send and receive messages to and from a user terminal. It functions as a communication port, and the conversation flow control module functions as a control module port for transferring a conversation flow to a subsequent unit conversation task.

본 발명의 바람직한 어느 실시예에 따른 챗봇의 대화 흐름 관리 방법에 있어서, 상기 단위 대화 작업이 미리 정의된 명령어를 이용하여 의도 분류를 수행하는 단계를 더 포함할 수 있다.In the chatbot conversation flow management method according to a preferred embodiment of the present invention, the unit conversation task may further include performing intention classification using a predefined command.

또한, 본 발명의 바람직한 어느 실시예에 따른 챗봇의 대화 흐름 관리 방법에 있어서, 상기 대화 스크립트는 상기 단위 대화 작업마다 별개로 구성되는 대화스크립트저장소에서 읽어들이는 것이다.In addition, in the chatbot conversation flow management method according to a preferred embodiment of the present invention, the dialogue script is read from the dialogue script storage configured separately for each unit dialogue task.

또한, 상기 대화 스크립트는 Send, Receive, AskListen, Jump, Branch, Exit, Logic, GetEntity, GetIntent, Http 명령어를 포함하는 것이 좋다.In addition, it is preferable that the dialog script include Send, Receive, AskListen, Jump, Branch, Exit, Logic, GetEntity, GetIntent, and Http commands.

본 발명에 따르는 챗봇은 설계자가 예측 가능한 다양한 상황에 대해 적응적으로 반응할 수 있으며, 사용자는 챗봇을 사용하여 원하는 정보나 서비스를 더 정확하고 상세하게 제공 받을 수 있다. 단순한 1회성 질의응답이 아니라 반복적인 대화를 통해 사용자의 의도를 보다 명확하게 챗봇에게 전달하고 챗봇은 사용자가 원하는 정확한 서비스를 제공할 수 있다. The chatbot according to the present invention can adaptively respond to a variety of situations predictable by a designer, and a user can receive desired information or services more accurately and in detail by using the chatbot. Rather than a simple one-time Q&A, the user's intentions are more clearly communicated to the chatbot through repeated conversations, and the chatbot can provide the exact service that the user wants.

또한 본 발명의 챗봇은 사용자가 관심 있어 할 만한 판단되는 정보를 추가로 제공하는 방법에 의해 대화를 이어가거나, 이전 대화와 관련된 대화를 계속해서 이어갈 수 있다. 이를 통해 사용자는 챗봇을 통한 대화에서 만족도를 높일 수 있다.In addition, the chatbot of the present invention may continue a conversation by a method of additionally providing information determined to be of interest to the user, or may continue a conversation related to a previous conversation. Through this, users can increase their satisfaction in conversations through the chatbot.

한편, 여기에서 명시적으로 언급되지 않은 효과라 하더라도, 본 발명의 기술적 특징에 의해 기대되는 이하의 명세서에서 기재된 효과 및 그 잠정적인 효과는 본 발명의 명세서에 기재된 것과 같이 취급됨을 첨언한다.On the other hand, even if it is an effect not explicitly mentioned herein, it is added that the effects described in the following specification expected by the technical features of the present invention and their potential effects are treated as described in the specification of the present invention.

도 1은 본 발명의 어느 실시예에 따른 챗봇의 대화처리 구조를 나타내는 시스템 구성을 개략적으로 나타내고 있다.
도 2는 본 발명의 어느 실시예에 따른 단위 대화작업(150)의 기능 모듈 구조를 개략적으로 나타낸다.
도 3은 뿌리 대화 작업(150a)의 스크립트를 예시한다.
도 4는 본 발명의 방법을 적용한 어느 시나리오의 대화 작업 사이의 연계를 나타낸다.
도 5는 도 4의 시나리오에서 날씨답변 대화작업에 대한 스크립트를 예시한다.
도 6은 도 4 및 도 5의 대화작업을 이용한 사용자와 챗봇의 대화를 예시하는 도면이다.
※ 첨부된 도면은 본 발명의 기술사상에 대한 이해를 위하여 참조로서 예시된 것임을 밝히며, 그것에 의해 본 발명의 권리범위가 제한되지는 아니한다.
1 schematically shows a system configuration showing a chatbot conversation processing structure according to an embodiment of the present invention.
2 schematically shows a functional module structure of a unit conversational task 150 according to an embodiment of the present invention.
3 illustrates a script of the root conversation task 150a.
Fig. 4 shows the linkage between dialogue tasks in a scenario to which the method of the present invention is applied.
5 exemplifies a script for a weather response conversation task in the scenario of FIG. 4 .
6 is a diagram illustrating a conversation between a user and a chatbot using the conversation task of FIGS. 4 and 5 .
※ It is revealed that the accompanying drawings are exemplified as a reference for understanding the technical idea of the present invention, and the scope of the present invention is not limited thereby.

본 발명의 챗봇의 대화 처리 소프트웨어는 사용자 UI로부터 입력 받은 사용자의 질문사항을 메시지 처리기를 통해 사용자별로 구분하여 전달받은 후에 대화 작업 관리자를 통해 처리한다. 대화 작업 관리자는 복잡한 대화 시나리오 전체를 컴포넌트 단위의 단위 대화 작업으로 나누어 실행하는 역할을 수행한다. 최초의 사용자 질문은 뿌리 대화 작업에서 의도분류 과정을 거처 실행된다. 의도분류 결과에 맞는 각 대화 작업이 실행되며 각 단위 대화 작업은 본 발명에서 정의된 스크립트를 실행하는 방법에 의해 수행된다. 단위 대화 작업은 정해진 스크립트를 따라 사용자와 메시지를 주고받거나 자연어 처리, 논리연산, 분기 등을 수행하는 방법에 따라 사용자와의 상호작용을 수행하며, 대화 작업이 종료될 때 다른 대화 작업이 실행되도록 하여 대화 흐름이 계속 이어지도록 구조화되어 있다. The chatbot dialog processing software of the present invention processes the user's questions inputted from the user UI through the dialog task manager after being divided by user through a message processor and delivered. The dialog task manager plays the role of dividing and executing the entire complex dialog scenario into component-based unit dialog tasks. The first user question is executed through the intent classification process in the root dialogue task. Each dialogue task corresponding to the intention classification result is executed, and each unit dialogue operation is performed by the method of executing the script defined in the present invention. The unit conversation task performs interaction with the user according to the method of exchanging messages with the user according to a set script or performing natural language processing, logical operation, branching, etc. It is structured so that the flow of conversation continues.

이하, 도면을 참조하여 본 발명의 다양한 실시예가 안내하는 본 발명의 구성과 그 구성으로부터 비롯되는 효과에 대해 살펴본다. 본 발명을 설명함에 있어서 관련된 공지기능에 대하여 이 분야의 기술자에게 자명한 사항으로서 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. Hereinafter, the configuration of the present invention guided by various embodiments of the present invention and effects resulting from the configuration will be described with reference to the drawings. In the description of the present invention, if it is determined that related known functions are obvious to those skilled in the art and may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted.

도 1은 본 발명의 바람직한 어느 실시예에 따른 시스템 구성을 개략적으로 나타내었다.1 schematically shows a system configuration according to a preferred embodiment of the present invention.

사용자 단말(1)과 컴퓨터 장치(100) 사이에 대화가 이루어진다. 사용자 단말(1)은 음성으로 사용자 메시지를 전달하는 전화기일 수 있으며, 음성 또는 텍스트로 사용자 메시지를 전달하는 컴퓨터일 수도 있다. 본 발명의 컴퓨터 장치(100)는 하나 이상의 하드웨어 및 소프트웨어로 구성된 장치로서, 사용자 단말(1)이 전달하는 사용자 메시지를 수신하고 해석해서 사용자와 대화를 진행하는 챗봇 단말이며, 챗봇 대화처리 소프트웨어가 설치되어 있다. 본 발명의 방법은 이 챗봇 대화처리 소프트웨어에 의해 정해지는 알고리즘에 의해 실행된다.A conversation is made between the user terminal 1 and the computer device 100 . The user terminal 1 may be a phone that delivers a user message by voice, or a computer that delivers a user message by voice or text. The computer device 100 of the present invention is a device composed of one or more hardware and software, and is a chatbot terminal that receives and interprets a user message transmitted by the user terminal 1 to conduct a conversation with the user, and the chatbot conversation processing software is installed has been The method of the present invention is executed by an algorithm determined by this chatbot conversation processing software.

본 발명의 챗봇 대화처리 소프트웨어는 사용자 인터페이스(110), 메시지 처리기(120), 대화 작업 관리자(130) 및 대화 흐름기(15)를 포함한다. 대화 흐름기(15)는 하나 이상의 단위 대화 작업(150)들로 구성된다. 이 단위 대화 작업(150)은 대화를 처리하는 독립적인 스레드를 갖는 컴포넌트 단위로서 대화 스크립트가 미리 등록되어 있다. 그리고 본 발명의 챗봇 대화처리 소프트웨어는 각각의 단위 대화 작업(150)을 처리하며 이들 단위 대화 작업(150)을 서로 연결하면서 사용자와 챗본 사이의 긴 대화를 처리한다.The chatbot conversation processing software of the present invention includes a user interface 110 , a message handler 120 , a conversation task manager 130 , and a conversation flow flower 15 . The conversation flow 15 is composed of one or more unit conversation tasks 150 . In this unit dialog task 150, a dialog script is registered in advance as a component unit having an independent thread for processing a dialog. In addition, the chatbot conversation processing software of the present invention processes each unit conversation task 150 and processes a long conversation between the user and the chatbone while connecting these unit conversation tasks 150 to each other.

도 1에 도시된 것처럼, 사용자 단말(1)이 사용자 UI(110)를 통해 입력한 사용자 메시지는 메시지 처리기(120)로 전달된다. 메시지 처리기(120)는 여러 사용자의 메시지를 사용자별로 구분하여 단위 대화 작업(150)에 전달하는 역할을 한다. 메시지 처리기(120)는 사용자로부터 받은 사용자 메시지를 대화 작업 관리자(130)에 전달하고, 단위 대화 작업(150)에서 생성한 챗봇의 메시지를 사용자 단말(1)로 전달하는 역할을 한다. 대화 작업 관리자(130)는 소프트웨어 컴포넌트로 존재하는 여러 단위 대화 작업(150)의 실행 주기를 관리한다. 또한 대화 작업 관리자(130)는 대화 리퀘스트가 생기는 경우 요청받은 대화 작업을 실행하는 역할을 담당한다. As shown in FIG. 1 , a user message input by the user terminal 1 through the user UI 110 is transmitted to the message processor 120 . The message processor 120 serves to classify messages of several users for each user and deliver them to the unit conversation task 150 . The message processor 120 delivers the user message received from the user to the conversation task manager 130 , and serves to transfer the chatbot message generated in the unit conversation task 150 to the user terminal 1 . The dialog task manager 130 manages the execution cycle of several unit dialog tasks 150 existing as software components. In addition, the conversation task manager 130 is responsible for executing the requested conversation task when a conversation request occurs.

사용자로부터 메시지를 받았을 때 실행되는 단위 대화 작업이 없다면 뿌리(Root) 대화 작업(150a)을 실행하며, 기존에 실행되는 단위 대화 작업(150)이 있으면 사용자로부터 받은 메시지를 모두 실행 중인 딘위 대화 작업(150)에 전달한다. 뿌리 대화 작업(150)은 사용자로부터 메시지를 받았을 때 가장 처음 실행되는 대화 작업으로서 사용자로부터 받은 메시지의 의도를 분류하여 받은 메시지가 어떤 단위 대화 작업(150)에 해당하는지를 판단하고 해당 단위 대화 작업(150)을 실행하는 역할을 한다. If there is no unit conversation task to be executed when a message is received from the user, the root conversation task 150a is executed. 150). The root conversation task 150 is a dialog task that is first executed when a message is received from the user, and classifies the intent of the message received from the user to determine which unit dialog task 150 the received message corresponds to, and the corresponding unit dialog task 150 ) to execute.

각 단위 대화 작업(150)마다 각각 별개의 메시지 송수신 모듈(151) 및 대화 흐름 제어모듈(152)이 구성된다. 메시지 송수신 모듈(151)은 사용자 단말(1)로 메시지를 송수신하는 통신 포트로 기능하며, 상기 대화 흐름 제어모듈(152)은 각 대화 작업이 종료된 후에 이어서 실행될 후행 단위 대화 작업으로 대화 흐름을 전달하는 제어모듈 포트로 기능한다.A separate message transmission/reception module 151 and a conversation flow control module 152 are configured for each unit conversation task 150 . The message sending/receiving module 151 functions as a communication port for sending and receiving messages to and from the user terminal 1, and the conversation flow control module 152 transfers the conversation flow to a subsequent unit conversation task to be executed after each conversation task is finished. It functions as a control module port to

도 2는 본 발명의 어느 실시예에 따른 단위 대화 작업(150)의 내부 구조를 예시적으로 나타낸다.2 exemplarily shows the internal structure of a unit conversation operation 150 according to an embodiment of the present invention.

각 단위 대화 작업(150)별로 챗봇 설계자에 의해 미리 정의된 대화 스크립트를 대화스크립트저장소(159)에서 읽어서 대화 스크립트 실행기(153)에서 명령어 단위로 순차적으로 실행한다. A dialog script predefined by the chatbot designer for each unit dialog task 150 is read from the dialog script storage 159 and sequentially executed in the dialog script executor 153 in units of commands.

또한, 대화 작업을 실행하는 중에 의도 분류 및 엔티티 인식이 필요한 경우 각각 대화작업 컴포넌트에 정의된 명령어를 이용하여 의도 분류기(155) 및 엔티티 인식기(156)를 통해 얻는 의도분류 결과와 엔티티 인식결과를 대화에 활용한다. In addition, when intention classification and entity recognition are required while executing a conversational task, the intention classification result and entity recognition result obtained through the intention classifier 155 and the entity recognizer 156 are communicated using commands defined in the dialog task component, respectively. use it for

대화 스크립트는 메시지 송수신, 흐름제어, 자연어처리, API호출등을 위한 총 10개의 명령어로 구성되며, 명령어들을 조합하여 사용자와의 상호작용을 기술할 수 있다. 이들 명령어로는 Send, Receive, AskListen, Jump, Branch, Exit, Logic, GetEntity, GetIntent, Http가 있다.Conversation script consists of a total of 10 commands for message transmission/reception, flow control, natural language processing, API call, etc., and can describe interactions with users by combining commands. These commands include Send, Receive, AskListen, Jump, Branch, Exit, Logic, GetEntity, GetIntent, and Http.

명령어 Send는 사용자 단말로 메시지를 보내는 명령어이며, 그 인자로는 message(변수 내용 또는 보낼 메시지), choices(선택버튼에 보일 메시지), callbackMessages(선택 버튼을 눌렀을 때 챗봇에 전달될 메시지)가 포함된다.The command Send is a command that sends a message to the user terminal, and its arguments include message (variable contents or message to be sent), choices (message to be displayed on the selection button), and callbackMessages (message to be delivered to the chatbot when the selection button is pressed). .

명령어 Receive는 사용자 단말로부터 온 메시지를 받는 명령어이며, 그 인자로는 key(받은 메시지를 저장할 key), timeout(메시지 받을 때 까지 대기할 시간(초))가 포함된다.The command Receive is a command to receive a message from a user terminal, and its arguments include key (key to store the received message) and timeout (time to wait (seconds) until message is received).

명령어 AskListen는 사용자 단말에게 메시지를 보내고 사용자 응답을 기다렸다가 받는 명령어이며, 그 인자로는 key(받을 메시지를 저장할 변수명), message(보낼 메시지 (텍스트)), choice(선택버튼에 나올 메시지 - 세미콜론으로 구분됨), callbackMessages(선택 버튼을 눌렀을 때 챗봇에 전달될 메시지- 세미콜론으로 구분됨)가 포함된다.The command AskListen is a command that sends a message to the user terminal and waits for a user response, and its arguments include key (name of a variable to store the message to be received), message (message to be sent (text)), and choice (message to be displayed on the selection button - semicolon). separated), and callbackMessages (message to be sent to the chatbot when the select button is pressed - separated by semicolons).

명령어 Jump는 특정 레이블로 이동하도록 하는 명령어이며, 그 인자로는 label(이동할 명령문의 레이블), loopLimit(최대 반복 횟수)가 있다. Command Jump is a command to move to a specific label, and its arguments include label (label of the statement to be moved) and loopLimit (maximum number of repetitions).

명령어 Branch는 조건 변수가 비교 변수(reference)와 동일할 경우 특정 레이블로 분기하는 명령어이며, 그 인자로는 reference(조건계산 결과와 비교할 값의 변수명), then(reference와 조건 결과가 같을 경우 이동할 명령문의 레이블), else(reference와 조건 결과가 다를 경우 이동할 명령문의 레이블)가 있다.Command Branch is a command that branches to a specific label when the condition variable is the same as the comparison variable (reference), and its arguments are reference (name of the variable to be compared with the condition calculation result), then (referred to when the reference and condition result are the same) The label of the statement) and else (the label of the statement to be moved if the result of the condition is different from the reference).

명령어 Exit은 스크립트 수행 종료 후 다른 대화 작업을 실행하며 outputSentence의 문장을 다음 대화 작업의 입력문장으로 전달하는 명령어이며, 그 인자로는 nextTask(다음으로 실행할 대화 작업을 담은 변수명), outputSentence(다음 실행할 대화작업에 전달할 문장을 담은 변수명)을 포함한다.Command Exit is a command that executes another dialog task after script execution is finished and passes the outputSentence sentence to the input sentence of the next dialog task. variable name that contains the sentence to be passed to the dialog operation).

명령어 Logic은 논리연산식에 맞게 논리연산을 수행하고 그 결과를 key 변수에 저장하도록 하는 명령어이다. 그 결과는 true 또는 false이다. 명령어 Logic의 인자는 key(논리연산 결과를 저장할 변수명), expression(논리연산식)을 포함한다.Command Logic is a command that performs a logical operation according to the logical operation expression and stores the result in the key variable. The result is either true or false. The argument of command Logic includes key (name of variable to store the result of logical operation) and expression (logical expression).

명령어 GetEntity는 reference 문자열에서 엔티티를 추출하여 변수에 저장하는 명령어이며, 그 인자로는 key(엔티티 추출 결과를 저장할 변수명), reference(엔티티 추출을 할 문자열이 저장된 변수명), entityName(추출할 엔티티의 이름)이 있다.The command GetEntity is a command that extracts an entity from a reference string and stores it in a variable, and its arguments are key (name of the variable to save the entity extraction result), reference (name of the variable where the string to extract entity is stored), entityName (the entity to be extracted). name) is there.

명령어 GetIntent는 reference 문자열 문자열에서 의도분류를 수행해서 변수에 저장하도록 하는 명령어이며, 그 인자로는 key(의도분류 추출 결과를 저장할 변수명), reference(의도분류 추출을 할 문자열이 저장된 변수명)이 있다.The command GetIntent is a command that performs intent classification on a reference string string and stores it in a variable, and its arguments include key (name of the variable to store the result of intention classification extraction) and reference (name of the variable where the string to extract intention classification is stored in). have.

명령어 Http는 HTTP요청을 전달하고 결과를 변수에 저장하는 명령어이며, 그 인자로는 key(요청 결과를 저장할 변수명), URI(요청 주소), body(요청에 담길 body 문자열)를 포함한다.The command Http is a command that delivers an HTTP request and stores the result in a variable, and its arguments include key (name of a variable to store the request result), URI (request address), and body (body string to be included in the request).

사용자로부터 받은 메시지, 함수의 처리 결과 등은 단위 대화 작업(150) 내부에서 관리되는 변수에 저장되며, 함수의 인자에서 key 값은 변수에 값을 저장하는 용도로, reference 값은 저장된 변수의 값을 읽어오는 용도로 사용된다. The message received from the user, the processing result of the function, etc. are stored in a variable managed inside the unit conversation job 150, the key value in the function argument is for storing the value in the variable, and the reference value is the value of the stored variable. It is used for reading.

대화 작업이 실행되면 이전 대화 작업으로부터 전달받은 메시지를 "입력문장"이라는 reference 인자를 선언함으로써 획득할 수 있다. When the conversation task is executed, the message received from the previous conversation task can be obtained by declaring the reference argument of “input sentence”.

예를 들어, GetIntent(의도분류 결과, 입력문장)과 같은 명령어는 사용자로부터 받은 입력문장을 의도분류하여 그 결과를 "의도분류 결과"라는 변숫값에 저장한다. For example, a command such as GetIntent (intent classification result, input sentence) classifies the input sentence received from the user and stores the result in a variable value called "intention classification result".

대화 스크립트는 명령어 행들이 모인 문장으로 정의된다. 각 명령어 행은 레이블, 명령어, 인자들로 표현된다. A dialog script is defined as a set of command lines. Each command line is represented by a label, command, and argument.

예를 들어 뿌리 대화 작업(150a)은 최초 사용자를 맞이하고 사용자로부터 질문을 받은 후 그 입력문장에 대해 의도분류를 수행하고 다른 대화 작업을 실행하는 역할을 한다. 이 대화 작업에 대한 스크립트의 예시는 도 3과 같다. For example, the root dialog task 150a serves to greet the first user and receive a question from the user, then perform intention classification on the input sentence and execute another dialog task. An example of a script for this dialog operation is shown in FIG. 3 .

첫 번째 행은 명령어가 send이며 인자는 "안녕하세요 저는 OO 챗봇입니다."이다. 대화 작업이 실행되면 사용자에게 이 메시지를 출력한다. In the first line, the command is send and the argument is "Hello, I'm an OO chatbot." When a dialog operation is executed, this message is output to the user.

두 번째 행은 명령어가 AskListen이며 첫 번째 인자는 "질문내용", 두 번째 인자는 "궁금하신 게 있으면 물어봐 주세요" 이다. "궁금하신 게 있으면 물어봐 주세요"라는 문장을 사용자 UI 화면에 출력하고 사용자가 질문을 입력하면 "질문내용"이라는 변수에 그 문장을 저장한다. In the second line, the command is AskListen, the first argument is "question content", and the second argument is "If you have any questions, please ask". The sentence "Ask if you have any questions" is printed on the user UI screen, and when the user inputs a question, the sentence is stored in a variable called "Question content".

세 번째 행은 명령어가 GetIntent 이고 첫 번째 인자는 "의도분류 결과" 두 번째 인자는 "질문내용"이다. "질문내용" 변수에 있는 값을 읽어와서 의도분류를 수행한 후 그 결과를 "의도분류 결과"란 변수에 저장한다. In the third line, the command is GetIntent, the first argument is “intent classification result” and the second argument is “question content”. After reading the value in the "question content" variable and performing intention classification, the result is stored in the variable "intention classification result".

네 번째 행은 의도분류 결과의 값이 Null이 아닌지 여부를 판단하여 "논리 연산 결과"라는 변수에 저장하며 의도분류 결과가 null이 아니면 true를 null이면 false를 저장한다. The fourth row determines whether the value of the intention classification result is not null and stores it in a variable called "logical operation result", and stores true if the intention classification result is not null, and false if it is null.

다섯 번째 행은 명령어가 Branch, 첫 번째 인자는 "논리 연산 결과" 두 번째 인자는 "의도분류 성공", 세 번째 인자는 "의도분류 실패"이고 논리 연산 결과가 true인 경우에는 의도분류 성공이라는 레이블이 있는 행으로 이동하고 false인 경우는 의도분류실패라는 레이블이 있는 행으로 이동한다. In the fifth line, the command is Branch, the first argument is “logical operation result”, the second argument is “intent classification success”, the third argument is “intent classification failure”, and when the logical operation result is true, it is a label of intention classification success. Moves to the row with , and if false, moves to the row labeled 'Intent Classification Failed'.

여섯 번째 행은 명령어가 Exit이고 첫 번째 인자가 "의도분류 결과"이고 두 번째 인자가 질문내용이다. "의도분류 결과" 변수에 있는 내용에 해당하는 다음 대화 작업을 찾고 "질문내용" 변수의 값을 전달해서 다음 대화 작업을 실행한다. 현재 대화 작업은 종료된다. In the sixth line, the command is Exit, the first argument is "intention classification result", and the second argument is the question content. It finds the next dialog action that corresponds to the content in the "Intent classification result" variable, and executes the next dialog action by passing the value of the "Question content" variable. The current conversation task is ended.

일곱 번째 행은 다섯 번째 행의 분기에서 이어 실행된 행으로서 명령어는 Send이고 인자는 "질문을 이해하지 못했습니다"이다. "질문을 이해하지 못했습니다"라는 메시지를 사용자에게 보여준다.The seventh line is the line executed following the branch of the fifth line, where the command is Send and the argument is "do not understand the question". Show the user the message "I didn't understand the question".

여덟 번째 행은 명령어가 Jump, 첫 번째 인자가 "질문"이며, "질문"이라는 레이블을 갖는 행으로 이동한다. 즉, 다시 질문을 수행한다. The eighth line moves to the line labeled "question", where the command is Jump, the first argument is "question". That is, the question is asked again.

본 발명에서 전체 대화는 단위 대화 작업(150)들이 서로 연계되어 구성된다. 도 4는 날씨를 소개하는 챗봇 서비스 시나리오에 대한 예시를 나타낸다. In the present invention, the entire conversation is configured by connecting the unit conversation tasks 150 to each other. 4 shows an example of a chatbot service scenario introducing weather.

의도분류기는 질문내용에 따라서 날씨 답변, 자기소개, null 중 하나의 답변을 내놓도록 학습되었다고 가정한다. It is assumed that the intention classifier has been trained to give one of the following answers: weather answer, self-introduction, and null according to the content of the question.

처음으로 사용자가 질문하면 도 3의 과정처럼 뿌리 대화 작업(150a)에서 의도분류를 한 후 질문내용에 따라 날씨 답변 대화 작업(150b) 또는 자기소개 대화 작업(150f) 두 개의 대화 작업 중 하나가 실행된다. When a user asks a question for the first time, as in the process of FIG. 3 , after intention classification in the root dialog task 150a, one of two dialog tasks is executed according to the question content: a weather answer dialog task 150b or self-introduction dialog task 150f do.

도 5는 날씨 답변 대화 작업(150b)의 스크립트를 예시한다. 하나씩 살펴보자.5 illustrates the script of the weather answer dialog task 150b. Let's take a look one by one.

첫 번째 행은 명령어가 Send이며 인자는 "날씨에 대해 질문하셨네요. 잠시만 기다려주세요." 로서 대화 작업이 실행되면 사용자에게 이 메시지를 출력한다. In the first line, the command is Send and the argument is "You asked about the weather. Please wait." This message is output to the user when the dialog operation is executed as

두 번째 행은 명령어가 Http이며 첫번째 인자는 "날씨 결과", 두 번째 인자는 "http:// api.wisenut.co.kr/weather" 이다. Http 요정을 전달하고 결과를 "날씨 결과"이라는 변수에 저장한다. In the second line, the command is Http, the first argument is "weather result", and the second argument is "http://api.wisenut.co.kr/weather". Pass an Http fairy and store the result in a variable called "weather result".

세 번째 행은 명령어가 Send이며 인자는 "{{날씨 결과}}"이다. 이때 인자가 {{ }} 인 경우에는 변수에 저장된 내용을 출력한다. 따라서 '날씨 결과'에 저장된 변수 내용을 사용자에게 출력한다.In the third line, the command is Send and the argument is "{{weather result}}". In this case, if the argument is {{ }}, the contents stored in the variable are output. Therefore, the contents of the variables stored in the 'weather result' are output to the user.

네 번째 행은 명령어가 AskListen이며 첫 번째 인자는 "날씨 부가정보 추천 여부"로 받을 메시지를 저장할 변수명이다. 두 번째 인자는 "현재 날씨와 관련된 정보를 더 확인하시겠어요?"이며 사용자에게 보낼 메시지다. 세 번째 인자는 "날씨에 맞는 옷차림, 날씨에 맞는 음식, 식당추천, 아니요"로서 선택 버튼에 나올 메시지로 세미콜론으로 구분된다. 화면에 '날씨에 맞는 옷차림', '날씨에 맞는 음식', '식당추천', '아니오' 가 사용자가 선택할 수 있도록 보여준다. 네 번째 인자는 "날씨에 맞는 옷차림,날씨에 맞는 음식, 식당추천, 아니요"로서 선택 버튼을 눌렀을 때 챗봇에 전달될 메시지로 세미콜론으로 구분된다. 사용자의 응답을 기다렸다가 사용자의 응답을 '날씨 부가정보 추천 여부' 에 저장한다.In the fourth line, the command is AskListen, and the first argument is the name of a variable to store the message to be received as “whether to recommend additional weather information”. The second argument is "Would you like to check more information related to the current weather?" and is a message to send to the user. The third argument is "dressing for the weather, food for the weather, restaurant recommendations, no", which is a message to be displayed on the selection button, separated by semicolons. On the screen, 'dress for the weather', 'food according to the weather', 'recommended restaurant', and 'no' are displayed for the user to select. The fourth parameter is "dressing according to the weather, food suitable for the weather, restaurant recommendation, no", which is a message to be delivered to the chatbot when the selection button is pressed, separated by semicolons. After waiting for the user's response, the user's response is stored in 'Whether to recommend additional weather information'.

다섯 번째 행은 명령어가 Logic, 첫 번째 인자는 "논리 연산 결과"로 논리연산 결과를 저장할 변수 이름이고, 두 번째 인자는 "날씨 부가정보 추천 여부!=아니오"로 논리 연산식이다. 날씨 부가정보 추천 여부의 값이 아니오 인지 아닌지를 판단하여 "논리연산 결과"라는 변수에 저장하며 '날씨 부가정보 추천 여부'가 '아니오'가 아니면 true를 '아니오'이면 false를 저장한다.In the fifth line, the command is Logic, the first argument is the name of a variable to store the logical operation result as “Logical operation result”, and the second argument is “Whether to recommend additional weather information!=No”, which is a logical operation expression. It is determined whether the value of whether or not to recommend weather additional information is No or not, and stored in a variable called "Logical operation result".

여섯 번째 행은 명령어가 Branch, 첫 번째 인자는 "논리연산 결과" 두 번째 인자는 "추천 희망", 세 번째 인자는 "추천 필요 없음"이고 논리 연산 결과가 true인 경우에는 추천 희망이라는 레이블이 있는 행으로 이동하고 false인 경우는 추천 필요 없음 레이블이 있는 행으로 이동한다. In the sixth line, the instruction is Branch, the first argument is “logical operation result”, the second argument is “recommended”, the third argument is “no recommendation required”, and if the logical operation result is true, there is a label labeled “recommended.” Go to the row, and if false, go to the row labeled No Recommendation.

일곱 번째 행은 명령어가 Exit이고 첫 번째 인자가 "날씨 부가정보 추천 여부"이고 두 번째 인자가 ""이다. "날씨 부가정보 추천 여부" 변수에 있는 내용에 해당하는 다음 대화 작업을 찾고 "" 변수의 값을 전달해서 다음 대화 작업을 실행한다. 현재 대화 작업은 종료된다. In the seventh line, the command is Exit, the first argument is "whether to recommend additional weather information", and the second argument is "". It finds the next dialog action that corresponds to the content in the "Whether to recommend additional weather information" variable, and executes the next dialog action by passing the value of the "" variable. The current conversation task is ended.

여덟 번째 행은 여섯 번째 행의 분기에서 이어 실행된 행으로서 명령어는 Send이고 인자는 "날씨 관련 대답을 종료하겠습니다"이다. "날씨 관련 대답을 종료하겠습니다."라는 메시지를 사용자에게 보여준다.The eighth line is the line executed after the branch of the sixth line, the command is Send and the argument is "I will end the weather related answer". Shows the message to the user, "I'm going to end weather-related answers."

날씨에 맞는 옷차림 대화 작업(150c), 날씨에 맞는 음식 대화 작업(150d), 식당추천 대화작업(150e)은 앞에서 살펴본 도 5의 대화작업에서 사용된 예시와 유사하게 Http 명령어를 통한 외부 API연계를 이용하여 도메인별로 구현될 수 있다. Similar to the example used in the conversation task of FIG. 5, the external API connection through the Http command was performed in the dress conversation task (150c) suitable for the weather, the food dialog task (150d), and the restaurant recommendation dialog task (150e). It can be implemented for each domain using

도 6은 도 4의 대화작업들과 도 5에 정의된 대화작업 스크립트를 이용한 사용자와의 대화를 예시한다. 사용자의 반응에 따라 도 6과 다른 대화작업이 처리될 수 있음은 물론이다.FIG. 6 exemplifies a conversation with a user using the dialog tasks of FIG. 4 and the dialog task script defined in FIG. 5 . Of course, a conversation job different from that of FIG. 6 may be processed according to the user's reaction.

참고로, 본 발명의 일 실시예에 따른 위와 같은 챗봇의 대화흐름 관리 방법은 각 단위 대화 작업별로 대화 스크립트 실행기가 미리 정의된 대화 스크립트를 명령어 단위로 순차적으로 실행하면서 후행하는 단위 대화 작업을 지정하도록 함으로써 각각의 단위 대화 작업을 동적으로 연결한다. 이러한 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독가능매체에 기록될 수 있다. 상기 컴퓨터 판독가능매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계 되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. For reference, in the chatbot conversation flow management method according to an embodiment of the present invention, the dialog script executor sequentially executes a predefined dialog script in units of commands for each unit conversation task while designating a subsequent unit conversation task. By doing so, it dynamically connects each unit conversational task. This method may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the present invention, or may be known and available to those skilled in the art of computer software.

컴퓨터 판독가능매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크 (floptical disk)와 같은 자기-광 매체, 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함될 수 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어코드뿐 만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급언어코드를 포함한다. 상술한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지다.Examples of computer-readable media include hard disks, magnetic media such as floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floppy disks, and ROM, RAM, A hardware device specifically configured to store and execute program instructions, such as flash memory, may be included. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter as well as machine codes such as those generated by a compiler. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

본 발명의 보호범위가 이상에서 명시적으로 설명한 실시예의 기재와 표현에 제한되는 것은 아니다. 또한, 본 발명이 속하는 기술분야에서 자명한 변경이나 치환으로 말미암아 본 발명이 보호범위가 제한될 수도 없음을 다시 한 번 첨언한다.The protection scope of the present invention is not limited to the description and expression of the embodiments explicitly described above. In addition, it is added once again that the protection scope of the present invention cannot be limited due to obvious changes or substitutions in the technical field to which the present invention pertains.

Claims (5)

컴퓨터 장치는 대화를 처리하는 독립적인 스레드를 갖는 컴포넌트 단위로서 대화 스크립트로 미리 설계된 하나 이상의 단위 대화 작업을 포함하면서 이 단위 대화 작업을 서로 연결하여 대화를 처리하는 챗봇 대화처리 소프트웨어가 설치되어 있으며, 사용자 단말이 상기 컴퓨터 장치로 사용자 메시지를 입력함으로써 개시되는 챗봇의 대화 흐름 관리 방법으로서:
상기 사용자 단말이 사용자 인터페이스를 통해 상기 컴퓨터 장치로 사용자 메시지를 입력하고,
상기 컴퓨터 장치의 메시지 처리기가 상기 사용자 메시지를 사용자별로 구분하여 대화 작업 관리자에 전달하고,
상기 대화 작업 관리자가 복잡한 대화 시나리오 전체를 각각의 단위 대화 작업으로 분할하되, 사용자 메시지를 수신할 때 기 실행되는 단위 대화 작업이 존재한다면 사용자 메시지를 실행 중인 모든 단위 대화 작업에 전달하고, 사용자 메시지를 수신할 때 단위 대화 작업이 없다면 상기 사용자 메시지의 의도를 분류하여 어떤 단위 대화 작업에 해당하는지를 판단하고 해당 단위 대화 작업을 실행하며,
각 단위 대화 작업별로 대화 스크립트 실행기가 미리 정의된 대화 스크립트를 명령어 단위로 순차적으로 실행하면서 후행하는 단위 대화 작업을 지정하는 단계를 포함하며, 각각의 단위 대화 작업을 동적으로 연결하는 것을 특징으로 하는, 챗봇의 대화 흐름 관리 방법.
The computer device is a component unit having an independent thread for processing a conversation, and includes one or more unit conversation tasks pre-designed as a dialog script, and a chatbot conversation processing software that processes the conversation by linking these unit conversation tasks with each other is installed; A chatbot conversation flow management method initiated by a terminal inputting a user message to the computer device, comprising:
The user terminal inputs a user message to the computer device through the user interface,
The message processor of the computer device divides the user message by user and transmits it to the conversation task manager,
The conversation task manager divides the entire complex conversation scenario into each unit conversation task, but if there is a unit conversation task that is already executed when receiving a user message, the user message is delivered to all the running unit conversation tasks, and the user message is transmitted. If there is no unit conversation operation when receiving, classify the intent of the user message to determine which unit conversation operation corresponds to, and execute the corresponding unit conversation operation,
A dialog script executor for each unit dialog task, comprising the step of sequentially executing a predefined dialog script in command units and designating a subsequent unit dialog task, characterized in that each unit dialog task is dynamically connected, How chatbots manage conversation flow.
제1항에 있어서,
단위 대화 작업마다 각각 별개의 메시지 송수신 모듈 및 대화 흐름 제어모듈이 구성되어 있으며, 상기 메시지 송수신 모듈은 사용자 단말에 메시지를 송수신하는 통신 포트로 기능하며, 상기 대화 흐름 제어모듈은 후행하는 단위 대화 작업으로 대화 흐름을 전달하는 제어모듈 포트로 기능하는 것인, 챗봇의 대화 흐름 관리 방법.
The method of claim 1,
A separate message sending/receiving module and a dialog flow control module are configured for each unit conversation task, the message sending/receiving module functions as a communication port for sending and receiving messages to a user terminal, and the dialog flow control module is configured as a subsequent unit conversation task A method for managing a conversation flow of a chatbot, which functions as a port of a control module that transmits the conversation flow.
제1항에 있어서,
상기 단위 대화 작업이 미리 정의된 명령어를 이용하여 의도 분류를 수행하는 단계를 더 포함하는, 챗봇의 대화 흐름 관리 방법.
The method of claim 1,
The method for managing a conversation flow of a chatbot further comprising the step of performing intention classification using a command in which the unit conversation task is predefined.
제1항에 있어서,
상기 대화 스크립트는 상기 단위 대화 작업마다 별개로 구성되는 대화스크립트저장소에서 읽어들이는 것인, 챗봇의 대화 흐름 관리 방법.
The method of claim 1,
The dialog script is read from a dialog script storage configured separately for each unit dialog task, the chatbot conversation flow management method.
제1항에 있어서,
상기 대화 스크립트는 Send, Receive, AskListen, Jump, Branch, Exit, Logic, GetEntity, GetIntent, Http 명령어를 포함하여 이루어져 있는 것인 챗봇의 대화 흐름 관리 방법.
The method of claim 1,
The dialog script is a method for managing a conversation flow of a chatbot that includes Send, Receive, AskListen, Jump, Branch, Exit, Logic, GetEntity, GetIntent, and Http commands.
KR1020200175115A 2020-12-15 2020-12-15 The method of managing chatbot conversation flow using script KR102472887B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200175115A KR102472887B1 (en) 2020-12-15 2020-12-15 The method of managing chatbot conversation flow using script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200175115A KR102472887B1 (en) 2020-12-15 2020-12-15 The method of managing chatbot conversation flow using script

Publications (2)

Publication Number Publication Date
KR20220085221A true KR20220085221A (en) 2022-06-22
KR102472887B1 KR102472887B1 (en) 2022-12-01

Family

ID=82217037

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200175115A KR102472887B1 (en) 2020-12-15 2020-12-15 The method of managing chatbot conversation flow using script

Country Status (1)

Country Link
KR (1) KR102472887B1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101830857B1 (en) * 2017-07-14 2018-02-21 코웨이 주식회사 Method for simplifying a list of questions provided by chatbot by analyzing physiological data and sleep environment data and device for providing chatbot using the same
KR101840420B1 (en) * 2017-04-21 2018-05-04 주식회사 닐리리아 Method and apparatus for providing chatbot platform
KR101858206B1 (en) * 2017-12-07 2018-05-15 디비손해보험 주식회사 Method for providing conversational administration service of chatbot based on artificial intelligence
US20180219921A1 (en) * 2017-01-31 2018-08-02 Telia Company Ab Methods for Providing Continuity in Chatbot Communications
KR20190066988A (en) * 2017-12-06 2019-06-14 주식회사 케이티 Chatbot system based on artificial intelligence markup language and method for proding chatbot service
KR102119404B1 (en) * 2018-11-28 2020-06-05 주식회사 와이즈넛 Interactive information providing system by collaboration of multiple chatbots and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180219921A1 (en) * 2017-01-31 2018-08-02 Telia Company Ab Methods for Providing Continuity in Chatbot Communications
KR101840420B1 (en) * 2017-04-21 2018-05-04 주식회사 닐리리아 Method and apparatus for providing chatbot platform
KR101830857B1 (en) * 2017-07-14 2018-02-21 코웨이 주식회사 Method for simplifying a list of questions provided by chatbot by analyzing physiological data and sleep environment data and device for providing chatbot using the same
KR20190066988A (en) * 2017-12-06 2019-06-14 주식회사 케이티 Chatbot system based on artificial intelligence markup language and method for proding chatbot service
KR101858206B1 (en) * 2017-12-07 2018-05-15 디비손해보험 주식회사 Method for providing conversational administration service of chatbot based on artificial intelligence
KR102119404B1 (en) * 2018-11-28 2020-06-05 주식회사 와이즈넛 Interactive information providing system by collaboration of multiple chatbots and method thereof

Also Published As

Publication number Publication date
KR102472887B1 (en) 2022-12-01

Similar Documents

Publication Publication Date Title
Myers et al. Patterns for how users overcome obstacles in voice user interfaces
CN112632961B (en) Natural language understanding processing method, device and equipment based on context reasoning
CN108922564B (en) Emotion recognition method and device, computer equipment and storage medium
US8024194B2 (en) Dynamic switching between local and remote speech rendering
US7921214B2 (en) Switching between modalities in a speech application environment extended for interactive text exchanges
CN110704594A (en) Task type dialogue interaction processing method and device based on artificial intelligence
US11431657B2 (en) Visual trigger configuration of a conversational bot
US11450318B2 (en) Speech skill creating method and system
WO2010087995A1 (en) Aspect oriented programmalbe dialogue manager and apparatus operated thereby
US20140028780A1 (en) Producing content to provide a conversational video experience
US11361755B2 (en) Personalization of conversational agents through macro recording
US10540973B2 (en) Electronic device for performing operation corresponding to voice input
US11765104B2 (en) Method and system for chatbot-enabled web forms and workflows
Lee Voice user interface projects: build voice-enabled applications using dialogflow for google home and Alexa skills kit for Amazon Echo
CN113987149A (en) Intelligent session method, system and storage medium for task robot
KR102472887B1 (en) The method of managing chatbot conversation flow using script
US20230177263A1 (en) Identifying chat correction pairs for trainig model to automatically correct chat inputs
KR102566822B1 (en) Method and apparatus for providing chatbot service
WO2012068050A1 (en) Cooperative voice dialog and business logic interpreters for a voice-enabled software application
CN112487142B (en) Conversational intelligent interaction method and system based on natural language processing
CN115019781A (en) Conversation service execution method, device, storage medium and electronic equipment
KR20200017272A (en) Method for executing function based on voice and electronic device for supporting the same
CN111352360A (en) Robot control method, robot control device, robot, and computer storage medium
Rozga et al. Applying our learnings: Alexa skills kit
KR102504445B1 (en) System and method for supporting artificial intelligence speech recognition and conversation services

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant