KR102566928B1 - Electronic apparatus which generates a training set for performing reinforcement learning of the deep learning model for distinguishing user intention, and the operating method thereof - Google Patents
Electronic apparatus which generates a training set for performing reinforcement learning of the deep learning model for distinguishing user intention, and the operating method thereof Download PDFInfo
- Publication number
- KR102566928B1 KR102566928B1 KR1020210116371A KR20210116371A KR102566928B1 KR 102566928 B1 KR102566928 B1 KR 102566928B1 KR 1020210116371 A KR1020210116371 A KR 1020210116371A KR 20210116371 A KR20210116371 A KR 20210116371A KR 102566928 B1 KR102566928 B1 KR 102566928B1
- Authority
- KR
- South Korea
- Prior art keywords
- user
- sentence
- keyword
- sentences
- collection
- Prior art date
Links
- 238000012549 training Methods 0.000 title claims abstract description 61
- 238000013136 deep learning model Methods 0.000 title claims abstract description 45
- 230000002787 reinforcement Effects 0.000 title claims abstract description 32
- 238000011017 operating method Methods 0.000 title abstract description 7
- 238000000034 method Methods 0.000 claims abstract description 13
- 239000013598 vector Substances 0.000 claims description 92
- 238000012545 processing Methods 0.000 claims description 17
- 230000009193 crawling Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 5
- 230000007717 exclusion Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000005226 mechanical processes and functions Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005728 strengthening Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
- G06F40/35—Discourse or dialogue representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/906—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/092—Reinforcement learning
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/08—Speech classification or search
- G10L15/18—Speech classification or search using natural language modelling
- G10L15/1822—Parsing for meaning understanding
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/48—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
- G10L25/51—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
- G10L25/54—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for retrieval
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Software Systems (AREA)
- Computational Mathematics (AREA)
- Computing Systems (AREA)
- Multimedia (AREA)
- Pure & Applied Mathematics (AREA)
- Acoustics & Sound (AREA)
- Biomedical Technology (AREA)
- Signal Processing (AREA)
- Probability & Statistics with Applications (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Evolutionary Computation (AREA)
- Algebra (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치 및 그 동작 방법이 개시된다. 본 발명은 관리자에 의해, 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들로부터 복수의 수집 문장들을 획득하여, 상기 복수의 수집 문장들을 사용자 의도별로 분류한 후, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 전자 장치 및 그 동작 방법에 대한 것이다.Disclosed are an electronic device for generating a training set for performing reinforcement learning of a deep learning model that determines user intention and an operating method thereof. In the present invention, when a command for generating a training set for reinforcement learning of a deep learning model is applied by an administrator, a plurality of collected sentences are obtained from a plurality of pre-designated web pages, and the plurality of collected sentences are classified according to user intention. After doing so, an electronic device and method of operating the same generate a training set composed of the plurality of collected sentences and information on user intention to which each collected sentence belongs.
Description
본 발명은 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치 및 그 동작 방법에 대한 것이다.The present invention relates to an electronic device for generating a training set for performing reinforcement learning of a deep learning model that determines user intention and an operating method thereof.
ARS(Automatic Response System) 시스템이란, 각종 정보를 음성으로 저장해 둔 상태에서, 사용자가 전화를 통해 시스템에 접속하면, 음성으로 필요한 정보를 검색할 수 있도록 사용법을 알려주고, 사용자가 필요한 정보를 찾으면, 이를 음성으로 사용자에게 제공하는 시스템을 의미한다.The ARS (Automatic Response System) system is a state in which various information is stored in voice, and when a user accesses the system through a phone call, it tells how to use it to search for necessary information by voice, and when the user finds the necessary information, It means a system that provides users with voice.
이러한 ARS 시스템은, 비교적 저렴한 비용으로 구축이 가능하다는 점에서, 다양한 분야에서, 사용자에게 동일한 내용의 정보를 반복하여 제공해야 하는 필요가 있는 경우에, 인력과 비용을 절감하기 위한 목적으로 널리 활용되고 있다. Since this ARS system can be built at a relatively low cost, it is widely used in various fields for the purpose of reducing manpower and costs when there is a need to repeatedly provide the same information to users, there is.
한편 최근에는, 음성 인식과 관련된 다양한 기술이 발전함에 따라, ARS 시스템에 있어서, 사용자가 음성을 입력하면, 사용자 의도 판별을 위한 기계 학습 기반의 딥러닝 모델을 활용하여, 사용자에 의해 입력된 음성으로부터, 사용자 의도를 판별하여 사용자에게 필요한 정보가 무엇인지를 판단하는 기술에 대한 연구가 활발히 진행되고 있다.On the other hand, as various technologies related to voice recognition have recently developed, in the ARS system, when a user inputs a voice, a machine learning-based deep learning model is used to determine the user's intention, and from the voice input by the user , Research on technology for determining what information the user needs by determining the user's intention is being actively conducted.
이와 관련해서, 사용자 의도 판별을 위한 딥러닝 모델은 사전 수집된 문장들과 각 문장이 속하는 사용자 의도에 대한 정보를 기초로 기계 학습을 수행하여 구축된 모델을 의미하는 것으로, 관리자는 훈련 세트를 추가로 확보하여, 확보된 훈련 세트를 기초로, 딥러닝 모델을 강화하기 위한 강화 학습을 수행함으로써, 딥러닝 모델의 정확도를 증대시킬 수 있다.In this regard, a deep learning model for determining user intention refers to a model built by performing machine learning based on pre-collected sentences and information on user intention to which each sentence belongs, and an administrator adds a training set. , it is possible to increase the accuracy of the deep learning model by performing reinforcement learning for strengthening the deep learning model based on the secured training set.
하지만, 딥러닝 모델에 대한 강화 학습을 수행하기 위한 훈련 세트를, 관리자가 일일이 만들어내는 데에는 많은 시간과 비용이 소요되기 때문에, 관리자가 필요한 훈련 세트를 효율적으로 확보하기 어렵다는 문제점이 존재한다.However, since it takes a lot of time and money for a manager to individually create a training set for performing reinforcement learning on a deep learning model, there is a problem in that it is difficult for a manager to efficiently secure a necessary training set.
따라서, 소정의 웹 페이지들로부터 복수의 수집 문장들을 획득하여, 획득된 복수의 수집 문장들을 기초로, 딥러닝 모델에 대한 강화 학습을 수행하기 위한 훈련 세트를 생성함으로써, 관리자가 보다 효율적으로, 딥러닝 모델에 대한 강화 학습을 수행하기 위한 훈련 세트를 확보할 수 있도록 지원하는 기술에 대한 연구가 필요하다.Therefore, by acquiring a plurality of collected sentences from predetermined web pages and generating a training set for performing reinforcement learning on a deep learning model based on the acquired plurality of collected sentences, the administrator can more efficiently, deep Research on a technology that can help secure a training set for performing reinforcement learning on a learning model is needed.
본 발명은 관리자에 의해, 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들로부터 복수의 수집 문장들을 획득하여, 상기 복수의 수집 문장들을 사용자 의도별로 분류한 후, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 전자 장치 및 그 동작 방법을 제시함으로써, 관리자가 보다 효율적으로, 사용자 의도를 판별하는 딥러닝 모델에 대한 강화 학습을 수행하기 위한 훈련 세트를 확보할 수 있도록 지원하고자 한다.In the present invention, when a command for generating a training set for reinforcement learning of a deep learning model is applied by an administrator, a plurality of collected sentences are obtained from a plurality of pre-designated web pages, and the plurality of collected sentences are classified according to user intention. After that, by presenting an electronic device and its operation method for generating a training set composed of the plurality of collected sentences and information on user intention to which each collected sentence belongs, a deep learning manager more efficiently determines user intention. We want to help you secure a training set to perform reinforcement learning on your learning model.
본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치는 사전 설정된 복수의 사용자 의도들에 대한 정보가 저장되어 있는 사용자 의도 저장부, 사전 수집된 복수의 예시 문장들이 저장되어 있는 예시 문장 저장부, 사전 구축된 딥러닝 모델 - 상기 딥러닝 모델은 문장이 입력되면, 상기 복수의 사용자 의도들 중 입력된 문장에 매칭되는 사용자 의도를 판별하는 모델임 - 을 통해서 수행 완료된, 상기 복수의 예시 문장들 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있는 판별 결과 저장부, 관리자에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득하는 수집 문장 획득부, 상기 복수의 수집 문장들이 획득되면, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번을 랜덤하게 할당하는 순번 할당부, 상기 복수의 수집 문장들 중 상기 순번이 작은 순으로 어느 하나의 수집 문장을 하나씩 분류 작업의 대상이 되는 문장으로 선택하여, 상기 선택된 수집 문장과 상기 복수의 예시 문장들 간의 연관도를 기초로, 상기 선택된 수집 문장을 상기 복수의 사용자 의도들 중 최대로 매칭되는 사용자 의도에 속하는 것으로 분류하는 분류 작업을 반복 수행함으로써, 상기 복수의 수집 문장들을 사용자 의도별로 분류하는 분류 작업 수행부 및 상기 복수의 수집 문장들이 사용자 의도별로 분류되면, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 훈련 세트 생성부를 포함한다.According to an embodiment of the present invention, an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining user intention includes a user intention storage unit storing information on a plurality of preset user intentions; An example sentence storage unit in which a plurality of pre-collected example sentences are stored, and a pre-built deep learning model - When a sentence is input, the deep learning model determines the user intention matching the input sentence among the plurality of user intentions. A determination result storage unit in which a determination result for a user's intention matched to each of the plurality of example sentences, which has been completed through execution, is stored, and a training set for reinforcement learning of the deep learning model by a manager. When the generation command is applied, a collection sentence acquisition unit that obtains a plurality of collection sentences by accessing a plurality of pre-specified web pages and performing web crawling on the plurality of web pages, and the plurality of collection sentences are obtained Then, an order assigning unit that randomly assigns an order number for classification to each of the plurality of collection sentences, and a target of classification work for one collection sentence in descending order among the plurality of collection sentences. A classification task of classifying the selected collection sentence as belonging to the user intention that matches the maximum among the plurality of user intentions based on the degree of association between the selected collection sentence and the plurality of example sentences. When the classification task performer classifies the plurality of collected sentences according to user intention by performing repetition, and the plurality of collected sentences are classified according to user intention, information about the plurality of collected sentences and the user's intention to which each collected sentence belongs. and a training set generation unit for generating a training set consisting of
또한, 본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 동작 방법은 사전 설정된 복수의 사용자 의도들에 대한 정보가 저장되어 있는 사용자 의도 저장부를 유지하는 단계, 사전 수집된 복수의 예시 문장들이 저장되어 있는 예시 문장 저장부를 유지하는 단계, 사전 구축된 딥러닝 모델 - 상기 딥러닝 모델은 문장이 입력되면, 상기 복수의 사용자 의도들 중 입력된 문장에 매칭되는 사용자 의도를 판별하는 모델임 - 을 통해서 수행 완료된, 상기 복수의 예시 문장들 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있는 판별 결과 저장부를 유지하는 단계, 관리자에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득하는 단계, 상기 복수의 수집 문장들이 획득되면, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번을 랜덤하게 할당하는 단계, 상기 복수의 수집 문장들 중 상기 순번이 작은 순으로 어느 하나의 수집 문장을 하나씩 분류 작업의 대상이 되는 문장으로 선택하여, 상기 선택된 수집 문장과 상기 복수의 예시 문장들 간의 연관도를 기초로, 상기 선택된 수집 문장을 상기 복수의 사용자 의도들 중 최대로 매칭되는 사용자 의도에 속하는 것으로 분류하는 분류 작업을 반복 수행함으로써, 상기 복수의 수집 문장들을 사용자 의도별로 분류하는 단계 및 상기 복수의 수집 문장들이 사용자 의도별로 분류되면, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 단계를 포함한다.In addition, a method of operating an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining user intention according to an embodiment of the present invention includes storing information about a plurality of preset user intentions. Maintaining a user intention storage unit, maintaining an example sentence storage unit in which a plurality of pre-collected example sentences are stored, a pre-built deep learning model - when a sentence is input to the deep learning model, the plurality of user intentions are stored. A model for determining the user's intention matching the input sentence of - maintaining a determination result storage unit in which the determination result for the user's intention matched with each of the plurality of example sentences, which has been completed through the process, is stored, to the manager , when a command for generating a training set for reinforcement learning of the deep learning model is applied, a plurality of collected sentences are collected by accessing a plurality of pre-designated web pages and performing web crawling on the plurality of web pages. Obtaining, if the plurality of collected sentences are acquired, randomly allocating an order number for a classification task to each of the plurality of collected sentences, in order of decreasing order among the plurality of collected sentences. A user who selects collected sentences one by one as a target sentence for classification, and matches the selected collected sentence to the maximum among the plurality of user intentions based on the degree of association between the selected collected sentence and the plurality of example sentences. Classifying the plurality of collected sentences according to user intention by repeatedly performing a classification operation of classifying them as belonging to the intention, and when the plurality of collected sentences are classified according to user intention, the plurality of collected sentences and each collected sentence and generating a training set composed of information about user intent to which it belongs.
본 발명은 관리자에 의해, 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들로부터 복수의 수집 문장들을 획득하여, 상기 복수의 수집 문장들을 사용자 의도별로 분류한 후, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 전자 장치 및 그 동작 방법을 제시함으로써, 관리자가 보다 효율적으로, 사용자 의도를 판별하는 딥러닝 모델에 대한 강화 학습을 수행하기 위한 훈련 세트를 확보할 수 있도록 지원할 수 있다.In the present invention, when a command for generating a training set for reinforcement learning of a deep learning model is applied by an administrator, a plurality of collected sentences are obtained from a plurality of pre-designated web pages, and the plurality of collected sentences are classified according to user intention. After that, by presenting an electronic device and its operation method for generating a training set composed of the plurality of collected sentences and information on user intention to which each collected sentence belongs, a deep learning manager more efficiently determines user intention. It can assist in securing a training set for performing reinforcement learning on a learning model.
도 1은 본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 구조를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 동작 방법을 도시한 순서도이다.1 is a diagram showing the structure of an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining a user's intention according to an embodiment of the present invention.
2 is a flowchart illustrating an operating method of an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining a user's intention according to an embodiment of the present invention.
이하에서는 본 발명에 따른 실시예들을 첨부된 도면을 참조하여 상세하게 설명하기로 한다. 이러한 설명은 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였으며, 다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 본 명세서 상에서 사용되는 모든 용어들은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 사람에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다.Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings. This description is not intended to limit the present invention to specific embodiments, but should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. While describing each drawing, similar reference numerals have been used for similar components, and unless otherwise defined, all terms used in this specification, including technical or scientific terms, are common knowledge in the art to which the present invention belongs. has the same meaning as commonly understood by the person who has it.
본 문서에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있다는 것을 의미한다. 또한, 본 발명의 다양한 실시예들에 있어서, 각 구성요소들, 기능 블록들 또는 수단들은 하나 또는 그 이상의 하부 구성요소로 구성될 수 있고, 각 구성요소들이 수행하는 전기, 전자, 기계적 기능들은 전자회로, 집적회로, ASIC(Application Specific Integrated Circuit) 등 공지된 다양한 소자들 또는 기계적 요소들로 구현될 수 있으며, 각각 별개로 구현되거나 2 이상이 하나로 통합되어 구현될 수도 있다. In this document, when a certain component is said to "include", it means that it may further include other components without excluding other components unless otherwise stated. In addition, in various embodiments of the present invention, each component, functional block, or means may be composed of one or more sub-components, and the electrical, electronic, and mechanical functions performed by each component are electronic It may be implemented with various known elements or mechanical elements such as circuits, integrated circuits, ASICs (Application Specific Integrated Circuits), and may be implemented separately or two or more may be integrated into one.
한편, 첨부된 블록도의 블록들이나 흐름도의 단계들은 범용 컴퓨터, 특수용 컴퓨터, 휴대용 노트북 컴퓨터, 네트워크 컴퓨터 등 데이터 프로세싱이 가능한 장비의 프로세서나 메모리에 탑재되어 지정된 기능들을 수행하는 컴퓨터 프로그램 명령들(instructions)을 의미하는 것으로 해석될 수 있다. 이들 컴퓨터 프로그램 명령들은 컴퓨터 장치에 구비된 메모리 또는 컴퓨터에서 판독 가능한 메모리에 저장될 수 있기 때문에, 블록도의 블록들 또는 흐름도의 단계들에서 설명된 기능들은 이를 수행하는 명령 수단을 내포하는 제조물로 생산될 수도 있다. 아울러, 각 블록 또는 각 단계는 특정된 논리적 기능(들)을 실행하기 위한 하나 이상의 실행 가능한 명령들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 가능한 실시예들에서는 블록들 또는 단계들에서 언급된 기능들이 정해진 순서와 달리 실행되는 것도 가능함을 주목해야 한다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들 또는 단계들은 실질적으로 동시에 수행되거나, 역순으로 수행될 수 있으며, 경우에 따라 일부 블록들 또는 단계들이 생략된 채로 수행될 수도 있다.On the other hand, the blocks of the accompanying block diagram or the steps of the flowchart are computer program instructions that perform designated functions by being loaded into a processor or memory of a device capable of data processing, such as a general-purpose computer, a special purpose computer, a portable notebook computer, and a network computer. can be interpreted as meaning Since these computer program instructions may be stored in a memory included in a computer device or in a computer readable memory, the functions described in blocks of a block diagram or steps of a flowchart are produced as a product containing instruction means for performing them. It could be. Further, each block or each step may represent a module, segment or portion of code that includes one or more executable instructions for executing specified logical function(s). Also, it should be noted that in some alternative embodiments, functions mentioned in blocks or steps may be executed out of a predetermined order. For example, two blocks or steps shown in succession may be performed substantially simultaneously or in reverse order, and in some cases, some blocks or steps may be omitted.
도 1은 본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 구조를 도시한 도면이다. 1 is a diagram showing the structure of an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining a user's intention according to an embodiment of the present invention.
도 1을 참조하면, 본 발명에 따른 전자 장치(110)는 사용자 의도 저장부(111), 예시 문장 저장부(112), 판별 결과 저장부(113), 수집 문장 획득부(114), 순번 할당부(115), 분류 작업 수행부(116) 및 훈련 세트 생성부(117)를 포함한다.Referring to FIG. 1 , the
사용자 의도 저장부(111)에는 사전 설정된 복수의 사용자 의도들에 대한 정보가 저장되어 있다.Information on a plurality of preset user intentions is stored in the user
관련해서, 사전 설정된 복수의 사용자 의도들을 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3'이라고 하는 경우, 사용자 의도 저장부(111)에는 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3'에 대한 정보가 저장되어 있을 수 있다.In this regard, when a plurality of preset user intentions are referred to as 'User Intent 1, User Intent 2, and User Intent 3', the user
여기서, 사용자 의도란 사용자가 상담원과 통화를 하고 싶어 하는지, 사용자가 자신의 개인 정보를 조회하고 싶어 하는지 등과 같은, 무엇을 하고자 하는 생각이나 계획 따위를 의미한다.Here, user intention means a thought or plan to do something, such as whether the user wants to talk to a counselor or whether the user wants to inquire about his or her personal information.
예시 문장 저장부(112)에는 사전 수집된 복수의 예시 문장들이 저장되어 있다.The example
여기서, 상기 복수의 예시 문장들은, ARS(Automatic Response System) 시스템을 통해 입력된 사용자의 음성을 기초로, 사전 수집된 문장들일 수 있다.Here, the plurality of example sentences may be pre-collected sentences based on a user's voice input through an Automatic Response System (ARS) system.
관련해서, 사전 수집된 복수의 예시 문장들을 '예시 문장 1, 예시 문장 2, 예시 문장 3, 예시 문장 4, 예시 문장 5'라고 하는 경우, 예시 문장 저장부(112)에는 '예시 문장 1, 예시 문장 2, 예시 문장 3, 예시 문장 4, 예시 문장 5'가 저장되어 있을 수 있다.In this regard, when the plurality of pre-collected example sentences are referred to as 'Example Sentence 1, Example Sentence 2, Example Sentence 3, Example Sentence 4, and Example Sentence 5', the example
판별 결과 저장부(113)에는 사전 구축된 딥러닝 모델을 통해서 수행 완료된, 상기 복수의 예시 문장들 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있다.The determination
여기서, 상기 딥러닝 모델은 문장이 입력되면, 상기 복수의 사용자 의도들 중 입력된 문장에 매칭되는 사용자 의도를 판별하는 모델을 의미한다.Here, the deep learning model refers to a model for determining a user intention matching an input sentence among the plurality of user intentions when a sentence is input.
예컨대, 전술한 예와 같이, 상기 복수의 예시 문장들을 '예시 문장 1, 예시 문장 2, 예시 문장 3, 예시 문장 4, 예시 문장 5'라고 하는 경우, 판별 결과 저장부(113)에는 하기의 표 1과 같이, '예시 문장 1, 예시 문장 2, 예시 문장 3, 예시 문장 4, 예시 문장 5' 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있을 수 있다.For example, as in the above example, when the plurality of example sentences are 'Example Sentence 1, Example Sentence 2, Example Sentence 3, Example Sentence 4, and Example Sentence 5', the determination
수집 문장 획득부(114)는 관리자(130)에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득한다.When a command to generate a training set for reinforcement learning of the deep learning model is applied by the
순번 할당부(115)는 수집 문장 획득부(114)에 의해 상기 복수의 수집 문장들이 획득되면, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번을 랜덤하게 할당한다.When the plurality of collected sentences are acquired by the collected
이하에서는, 수집 문장 획득부(114) 및 순번 할당부(115)의 동작을 예를 들어, 상세히 설명하기로 한다.Hereinafter, operations of the collection
먼저, 전자 장치(110)에, 관리자(130)에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되었다고 하는 경우, 수집 문장 획득부(114)는 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득할 수 있다.First, when it is assumed that a command to generate a training set for reinforcement learning of the deep learning model is applied to the
이때, 상기 복수의 수집 문장들로, '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4'가 획득되었다고 하는 경우, 순번 할당부(115)는 하기의 표 2와 같이, '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4' 각각에, 분류 작업을 위한 순번을 랜덤하게 할당할 수 있다.At this time, when it is assumed that 'collection sentence 1, collection sentence 2, collection sentence 3, and collection sentence 4' are acquired as the plurality of collection sentences, the
이렇게, 순번 할당부(115)에 의해, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번이 랜덤하게 할당되면, 분류 작업 수행부(116)는 상기 복수의 수집 문장들 중 상기 순번이 작은 순으로 어느 하나의 수집 문장을 하나씩 분류 작업의 대상이 되는 문장으로 선택하여, 상기 선택된 수집 문장과 상기 복수의 예시 문장들 간의 연관도를 기초로, 상기 선택된 수집 문장을 상기 복수의 사용자 의도들 중 최대로 매칭되는 사용자 의도에 속하는 것으로 분류하는 분류 작업을 반복 수행함으로써, 상기 복수의 수집 문장들을 사용자 의도별로 분류한다.In this way, when a sequence number for classification is randomly assigned to each of the plurality of collected sentences by the
이때, 본 발명의 일실시예에 따르면, 분류 작업 수행부(116)는 상기 복수의 수집 문장들을 사용자 의도별로 분류하기 위한 구체적인 구성으로, 키워드 사전 데이터베이스(118), 제1 키워드 선택부(119), 제2 키워드 선택부(120), 분류 처리부(121)를 포함할 수 있다.At this time, according to one embodiment of the present invention, the
키워드 사전 데이터베이스(118)에는 사전 설정된 n(n은 5 이상의 자연수임)개의 키워드들이 저장되어 있다. In the
예컨대, n을 '5'라고 하고, 사전 설정된 '5'개의 키워드들을 '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5'라고 하는 경우, 키워드 사전 데이터베이스(118)에는 '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5'가 저장되어 있을 수 있다.For example, if n is '5' and '5' preset keywords are 'keyword 1, keyword 2, keyword 3, keyword 4, and keyword 5', the
제1 키워드 선택부(119)는 상기 복수의 수집 문장들 중 t(t는 자연수임)번째 순번이 할당된 제1 수집 문장이 분류 작업의 대상이 되는 문장으로 선택되면, 상기 n개의 키워드들 중 상기 제1 수집 문장에서 1회 이상 등장하는 적어도 하나의 제1 키워드를 선택한다.The first
제2 키워드 선택부(120)는 판별 결과 저장부(113)를 참조하여, 상기 복수의 사용자 의도들 각각에 매칭되는 것으로 판별된 예시 문장들을 확인한 후, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 매칭되는 것으로 판별된 예시 문장들에서, 상기 n개의 키워드들 각각이 등장하는 등장 횟수가 많은 순으로 k(k는 2 이상의 자연수임)개의 제2 키워드들을 선택함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 지정한다.The second
이하에서는, 제1 키워드 선택부(119) 및 제2 키워드 선택부(120)의 동작을 예를 들어, 상세히 설명하기로 한다.Hereinafter, operations of the first
먼저, 전술한 예와 같이, n을 '5'라고 하고, k를 '3'이라고 하며, 순번 할당부(115)에 의해 상기 복수의 수집 문장들인 '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4' 각각에, 상기 표 2와 같은 순번이 랜덤하게 할당된 이후, 분류 작업 수행부(116)에 의해 분류 작업의 대상이 되는 문장으로, '1'의 순번이 할당된 '수집 문장 2'가 선택되었다고 가정하자.First, as in the above example, let n be '5' and k be '3', and the plurality of collection sentences 'collection sentence 1, collection sentence 2, collection sentence 3' by the
그러면, 제1 키워드 선택부(119)는 상기 '5'개의 키워드들인 '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 중 '수집 문장 2'에서 1회 이상 등장하는 적어도 하나의 제1 키워드를 선택할 수 있다. Then, the
관련해서, '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 중 수집 문장 2'에서 1회 이상 등장하는 키워드가 '키워드 1, 키워드 3'이라고 하는 경우, 제1 키워드 선택부(119)는 '키워드 1, 키워드 3'을 상기 적어도 하나의 제1 키워드로 선택할 수 있다.In this regard, when the keywords appearing one or more times in the collection sentence 2 of 'keyword 1, keyword 2, keyword 3, keyword 4, and keyword 5' are 'keyword 1 and keyword 3', the first keyword selection unit (119 ) may select 'keyword 1, keyword 3' as the at least one first keyword.
그러고 나서, 제2 키워드 선택부(120)는 상기 표 1과 같은 판별 결과 저장부(113)를 참조하여, 상기 복수의 사용자 의도들인 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 매칭되는 것으로 판별된 예시 문장들을 확인한 후, '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대해, 각 사용자 의도에 매칭되는 것으로 판별된 예시 문장들에서, '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 각각이 등장하는 등장 횟수가 많은 순으로 '3'개의 제2 키워드들을 선택함으로써, '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대응되는 제2 키워드들을 지정할 수 있다.Then, the second
관련해서, 상기 표 1과 같은 판별 결과 저장부(113)에서는, '사용자 의도 1'에 매칭되는 것으로 판별된 예시 문장들이 '예시 문장 3, 예시 문장 4'이므로, 제2 키워드 선택부(120)는 '사용자 의도 1'에 매칭되는 것으로 판별된 예시 문장들로, '예시 문장 3, 예시 문장 4'를 확인한 후, '예시 문장 3, 예시 문장 4'에서, '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 각각이 등장하는 등장 횟수를 확인할 수 있다. In this regard, in the determination
그 결과, '예시 문장 3, 예시 문장 4'에서 '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 각각이 등장하는 등장 횟수가, '1회, 2회, 0회, 4회, 3회'와 같이 확인되었다고 하는 경우, '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 중 상기 등장 횟수가 많은 순으로 '3'개의 키워드들이 '키워드 4, 키워드 5, 키워드 2'이므로, 제2 키워드 선택부(120)는 '예시 문장 3, 예시 문장 4'에서, '키워드 2, 키워드 4, 키워드 5'를 선택함으로써, '사용자 의도 1'에 대응되는 제2 키워드들로, '키워드 2, 키워드 4, 키워드 5'를 지정할 수 있다.As a result, the number of appearances of each of 'keyword 1, keyword 2, keyword 3, keyword 4, and keyword 5' in 'example sentence 3 and example sentence 4' was '1 time, 2 times, 0 times, 4 times, If it is confirmed as '3 times', '3' keywords in the order of the highest number of occurrences among 'keyword 1, keyword 2, keyword 3, keyword 4, and keyword 5' are 'keyword 4, keyword 5, keyword 2' Therefore, the second
이러한 방식으로, 제2 키워드 선택부(120)는 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대응되는 제2 키워드들을 하기의 표 3과 같이 지정할 수 있다.In this way, the
이렇게, 제1 키워드 선택부(119)에 의해 적어도 하나의 제1 키워드가 선택되고, 제2 키워드 선택부(120)에 의해 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들이 지정되면, 분류 처리부(121)는 상기 적어도 하나의 제1 키워드와, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 서로 비교하여, 상기 제1 수집 문장을, 상기 복수의 사용자 의도들 중 상기 제1 수집 문장과의 매칭도가 최대인 제1 사용자 의도에 속하는 것으로 분류한다.In this way, when at least one first keyword is selected by the
이때, 본 발명의 일실시예에 따르면, 분류 처리부(121)는 상기 제1 수집 문장을 상기 복수의 사용자 의도들 중 상기 제1 사용자 의도에 속하는 것으로 분류하기 위한 구체적인 구성으로, 원-핫 벡터 저장부(122), 키워드 벡터 생성부(123), 특성 벡터 생성부(124) 및 사용자 의도 선택부(125)를 포함할 수 있다.At this time, according to an embodiment of the present invention, the
원-핫 벡터 저장부(122)에는 상기 n개의 키워드들 각각에 대응되는 것으로 사전 설정된 서로 다른 n차원의 원-핫(one-hot) 벡터가 저장되어 있다.The one-hot
예컨대, 전술한 예와 같이, n을 '5'라고 하고, '5'개의 키워드들을 '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5'라고 하는 경우, 원-핫 벡터 저장부(122)에는 하기의 표 4와 같은, '키워드 1, 키워드 2, 키워드 3, 키워드 4, 키워드 5' 각각에 대응되는 것으로 사전 설정된 서로 다른 '5'차원의 원-핫 벡터가 저장되어 있을 수 있다.For example, as in the above example, when n is '5' and '5' keywords are 'Keyword 1, Keyword 2, Keyword 3, Keyword 4, Keyword 5', the one-hot vector storage unit 122 ) may store different '5'-dimensional one-hot vectors preset to correspond to 'keyword 1, keyword 2, keyword 3, keyword 4, and keyword 5', respectively, as shown in Table 4 below.
키워드 벡터 생성부(123)는 제1 키워드 선택부(119)에 의해 상기 적어도 하나의 제1 키워드가 선택되면, 원-핫 벡터 저장부(122)를 참조하여, 상기 적어도 하나의 제1 키워드 각각에 대응되는 원-핫 벡터를 합산함으로써, 상기 제1 수집 문장에 대한 키워드 벡터를 생성한다.When the at least one first keyword is selected by the first
특성 벡터 생성부(124)는 제2 키워드 선택부(120)에 의해 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들이 선택되면, 원-핫 벡터 저장부(122)를 참조하여, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 대응되는 제2 키워드들의 원-핫 벡터를 모두 합산함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터를 생성한다.When the second keywords corresponding to each of the plurality of user intentions are selected by the second
사용자 의도 선택부(125)는 상기 키워드 벡터와 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터 간의 코사인 유사도를 연산하여, 상기 복수의 사용자 의도들 중 상기 코사인 유사도가 최대인 사용자 의도를, 상기 제1 수집 문장과의 매칭도가 최대인 상기 제1 사용자 의도로 선택함으로써, 상기 제1 수집 문장을 상기 제1 사용자 의도에 속하는 것으로 분류한다.The user
여기서, 상기 코사인 유사도는 하기의 수학식 1에 따라 연산될 수 있다.Here, the cosine similarity may be calculated according to Equation 1 below.
상기 수학식 1에서, S는 벡터 A와 벡터 B 사이의 코사인 유사도로, -1에서 1 사이의 값을 가지며, Ai는 벡터 A의 i번째 성분, Bi는 벡터 B의 i번째 성분을 의미한다. 관련해서, 두 벡터 사이의 코사인 유사도가 클수록 두 벡터가 서로 유사한 벡터라고 볼 수 있다.In Equation 1, S is the cosine similarity between vector A and vector B, and has a value between -1 and 1, A i denotes the i-th component of vector A, and B i denotes the i-th component of vector B. do. In this regard, the greater the cosine similarity between two vectors, the more similar the two vectors are to each other.
이하에서는, 키워드 벡터 생성부(123), 특성 벡터 생성부(124) 및 사용자 의도 선택부(125)의 동작을 예를 들어, 상세히 설명하기로 한다.Hereinafter, operations of the
먼저, 전술한 예와 같이, 제1 키워드 선택부(119)에 의해, '키워드 1, 키워드 3'이 상기 적어도 하나의 제1 키워드로 선택되었다고 하고, 제2 키워드 선택부(120)에 의해, 상기 복수의 사용자 의도들인 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대응되는 제2 키워드들이, 상기 표 3과 같이 선택되었다고 가정하자. First, as in the above example, it is assumed that 'keyword 1 and keyword 3' are selected as the at least one first keyword by the first
그러면, 키워드 벡터 생성부(123)는 상기 표 4와 같은 원-핫 벡터 저장부(122)를 참조하여, '키워드 1, 키워드 3' 각각에 대응되는 원-핫 벡터를 합산함으로써, '수집 문장 2'에 대한 키워드 벡터를 생성할 수 있다.Then, the
관련해서, 상기 표 4와 같은 원-핫 벡터 저장부(122)에서는, '키워드 1, 키워드 3' 각각에 대응되는 원-핫 벡터가 '[0 0 0 0 1], [0 0 1 0 0]'이므로, 키워드 벡터 생성부(123)는 '[0 0 0 0 1], [0 0 1 0 0]'을 합산함으로써, '수집 문장 2'에 대한 키워드 벡터를, '[0 0 1 0 1]'과 같이 생성할 수 있다.In relation to this, in the one-hot
그러고 나서, 특성 벡터 생성부(124)는 상기 표 4와 같은 원-핫 벡터 저장부(122)를 참조하여, '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대해, 각 사용자 의도에 대응되는 제2 키워드들의 원-핫 벡터를 모두 합산함으로써, '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대응되는 특성 벡터를 생성할 수 있다.Then, the
관련해서, 상기 표 3에서는, '사용자 의도 1'에 대응되는 제2 키워드들이 '키워드 2, 키워드 4, 키워드 5'이고, 상기 표 4와 같은 원-핫 벡터 저장부에서는, '키워드 2, 키워드 4, 키워드 5' 각각에 대응되는 원-핫 벡터가 '[0 0 0 1 0], [0 1 0 0 0], [1 0 0 0 0]'이므로, 특성 벡터 생성부(124)는 '[0 0 0 1 0], [0 1 0 0 0], [1 0 0 0 0]'을 모두 합산함으로써, '사용자 의도 1'에 대응되는 특성 벡터를 '[1 1 0 1 0]'과 같이 생성할 수 있다.Relatedly, in Table 3, the second keywords corresponding to 'user intention 1' are 'keyword 2, keyword 4, and keyword 5', and in the one-hot vector storage unit as shown in Table 4, 'keyword 2, keyword Since the one-hot vectors corresponding to each of '4, keyword 5' are '[0 0 0 1 0], [0 1 0 0 0], [1 0 0 0 0]', the feature vector generator 124 ' By summing [0 0 0 1 0], [0 1 0 0 0], and [1 0 0 0 0], the feature vector corresponding to 'User Intention 1' is '[1 1 0 1 0]' and can be created together.
이러한 방식으로, 특성 벡터 생성부(124)는 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대응되는 특성 벡터를, '[1 1 0 1 0], [1 1 0 0 1], [0 0 1 1 1]'과 같이 생성할 수 있다. In this way, the
그러고 나서, 사용자 의도 선택부(125)는 상기 수학식 1에 따라, 상기 키워드 벡터인 '[0 0 1 0 1]'과 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 각각에 대응되는 특성 벡터인 '[1 1 0 1 0], [1 1 0 0 1], [0 0 1 1 1]' 간의 코사인 유사도를, '0, 0.41, 0.82'와 같이 연산할 수 있다.Then, the user
그러면, 사용자 의도 선택부(125)는 '사용자 의도 1, 사용자 의도 2, 사용자 의도 3' 중 상기 코사인 유사도가 최대인 '사용자 의도 3'을, '수집 문장 2'와의 매칭도가 최대인 상기 제1 사용자 의도로 선택함으로써, '수집 문장 2'를 '사용자 의도 3'에 속하는 것으로 분류할 수 있다.Then, the
이렇게, '수집 문장 2'에 대한 분류 작업이 완료되면, 분류 작업 수행부(116)는 '수집 문장 1, 수집 문장 3, 수집 문장 4, 수집 문장 5'에 대한 분류 작업을 같은 방식으로, 반복 수행함으로써, '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4, 수집 문장 5'를 하기의 표 5와 같이, 사용자 의도별로 분류할 수 있다. In this way, when the classification task for 'collected sentence 2' is completed, the classification
이렇게, 분류 작업 수행부(116)에 의해, 상기 복수의 수집 문장들이 사용자 의도별로 분류되면, 훈련 세트 생성부(117)는 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성한다.In this way, when the plurality of collected sentences are classified according to user intention by the
예컨대, 전술한 예와 같이, 분류 작업 수행부(116)에 의해, 상기 표 5와 같이, '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4, 수집 문장 5'가 사용자 의도별로 분류되었다고 하는 경우, 훈련 세트 생성부(117)는 '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4, 수집 문장 5'와, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성할 수 있다.For example, as in the foregoing example, as shown in Table 5, 'Collected Sentence 1, Collected Sentence 2, Collected Sentence 3, Collected Sentence 4, and Collected Sentence 5' are classified according to user intention by the classification
한편, 본 발명의 일실시예에 따르면, 전자 장치(110)는 보다 고품질의 훈련 세트를 생성하기 위해, 상기 제1 수집 문장이 상기 제1 사용자 의도에 속하는 것으로 분류되었다고 하더라도, 상기 제1 수집 문장과 상기 제1 사용자 의도 간의 매칭도가 사전 설정된 기준을 초과하지 않는 경우에는, 상기 제1 수집 문장을 상기 복수의 수집 문장들에서 제외하여, 상기 제1 수집 문장이 상기 훈련 세트에 포함되지 않도록 처리할 수 있다.Meanwhile, according to an embodiment of the present invention, in order to generate a higher quality training set, the
이와 관련해서, 분류 작업 수행부(116)는 문장 제외 처리부(126)를 더 포함할 수 있다.In this regard, the classification
문장 제외 처리부(126)는 분류 처리부(121)에 의해 상기 제1 수집 문장이 상기 제1 사용자 의도에 속하는 것으로 분류되면, 상기 제1 사용자 의도에 대응되는 특성 벡터와 상기 키워드 벡터 간의 제1 코사인 유사도가, 사전 설정된 기준 유사도를 초과하는지 여부를 확인하여, 상기 제1 코사인 유사도가 상기 기준 유사도를 초과하지 않는 것으로 확인되는 경우, 상기 복수의 수집 문장들에서 상기 제1 수집 문장을 삭제함으로써, 상기 제1 수집 문장이 상기 훈련 세트에 포함되지 않도록 처리한다.If the sentence
예컨대, 사전 설정된 기준 유사도를 '0.85'라고 하고, 전술한 예와 같이, 분류 처리부(121)에 의해, '수집 문장 2'가 '사용자 의도 3'에 속하는 것으로 분류되었다고 가정하자.For example, suppose that the preset standard similarity is '0.85' and, as in the above-described example, the 'collected sentence 2' is classified as belonging to 'user intention 3' by the
이때, 전술한 예에 따르면, '사용자 의도 3'에 대응되는 특성 벡터인 '[0 0 1 1 1]'과 상기 키워드 벡터인 '[0 0 1 0 1]' 간의 제1 코사인 유사도가, '0.82'이므로, 분류 작업 수행부(116)는 상기 제1 코사인 유사도가 상기 기준 유사도를 초과하는지 여부를 확인하여, 상기 제1 코사인 유사도가 상기 기준 유사도를 초과하지 않는 것으로 확인할 수 있다.In this case, according to the above example, the first cosine similarity between '[0 0 1 1 1]', which is the feature vector corresponding to 'user intention 3', and '[0 0 1 0 1]', which is the keyword vector, is ' 0.82', the
그러면, 문장 제외 처리부(126)는 상기 복수의 수집 문장들인 '수집 문장 1, 수집 문장 2, 수집 문장 3, 수집 문장 4'에서, '수집 문장 2'를 삭제함으로써, '수집 문장 2'가 상기 훈련 세트에 포함되지 않도록 처리할 수 있다. Then, the sentence
이로 인해, 훈련 세트 생성부(117)는 상기 복수의 수집 문장들 중 각 문장이 속하는 사용자 의도와의 매칭도가, 상기 기준 유사도를 초과하는 수집 문장들로만 구성된 훈련 세트를 생성함으로써, 보다 고품질의 훈련 세트를 생성할 수 있다.For this reason, the training set
이렇게, 본 발명의 전자 장치(110)를 통해서 훈련 세트가 생성되면, 관리자(130)는 상기 훈련 세트를 이용하여 상기 딥러닝 모델에 대한 강화 학습을 수행함으로써, 상기 딥러닝 모델의 사용자 의도에 대한 판별 정확도를 한층 더 높일 수 있다.In this way, when a training set is generated through the
도 2는 본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 동작 방법을 도시한 순서도이다.2 is a flowchart illustrating an operating method of an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining a user's intention according to an embodiment of the present invention.
단계(S210)에서는 사전 설정된 복수의 사용자 의도들에 대한 정보가 저장되어 있는 사용자 의도 저장부를 유지한다.In step S210, a user intention storage unit in which information on a plurality of preset user intentions is stored is maintained.
단계(S220)에서는 사전 수집된 복수의 예시 문장들이 저장되어 있는 예시 문장 저장부를 유지한다.In step S220, an example sentence storage unit in which a plurality of pre-collected example sentences are stored is maintained.
단계(S230)에서는 사전 구축된 딥러닝 모델(상기 딥러닝 모델은 문장이 입력되면, 상기 복수의 사용자 의도들 중 입력된 문장에 매칭되는 사용자 의도를 판별하는 모델임)을 통해서 수행 완료된, 상기 복수의 예시 문장들 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있는 판별 결과 저장부를 유지한다.In step S230, the execution is completed through a pre-built deep learning model (the deep learning model is a model for determining a user intention matching an input sentence among the plurality of user intentions when a sentence is input), the plurality of A determination result storage unit in which a determination result of a user's intention matched with each of the example sentences of is stored is maintained.
단계(S240)에서는 관리자에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득한다.In step S240, when a command to generate a training set for reinforcement learning of the deep learning model is applied by the administrator, a plurality of pre-designated web pages are accessed, and web crawling is performed on the plurality of web pages. By doing so, a plurality of collection sentences are obtained.
단계(S250)에서는 상기 복수의 수집 문장들이 획득되면, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번을 랜덤하게 할당한다.In step S250, when the plurality of collected sentences are obtained, an order for classification is randomly assigned to each of the plurality of collected sentences.
단계(S260)에서는 상기 복수의 수집 문장들 중 상기 순번이 작은 순으로 어느 하나의 수집 문장을 하나씩 분류 작업의 대상이 되는 문장으로 선택하여, 상기 선택된 수집 문장과 상기 복수의 예시 문장들 간의 연관도를 기초로, 상기 선택된 수집 문장을 상기 복수의 사용자 의도들 중 최대로 매칭되는 사용자 의도에 속하는 것으로 분류하는 분류 작업을 반복 수행함으로써, 상기 복수의 수집 문장들을 사용자 의도별로 분류한다.In step S260, any one collected sentence from among the plurality of collected sentences in descending order is selected as a sentence to be classified, and the relationship between the selected collected sentence and the plurality of example sentences is also selected. The plurality of collected sentences are classified according to user intention by repeatedly performing a classification operation of classifying the selected collected sentence as belonging to the user's intention that most matches among the plurality of user's intentions.
단계(S270)에서는 상기 복수의 수집 문장들이 사용자 의도별로 분류되면, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성한다.In step S270, when the plurality of collected sentences are classified according to user intention, a training set composed of the plurality of collected sentences and information on the user's intention to which each collected sentence belongs is generated.
이때, 본 발명의 일실시예에 따르면, 단계(S260)에서는 사전 설정된 n(n은 5이상의 자연수임)개의 키워드들이 저장되어 있는 키워드 사전 데이터베이스를 유지하는 단계, 상기 복수의 수집 문장들 중 t(t는 자연수임)번째 순번이 할당된 제1 수집 문장이 분류 작업의 대상이 되는 문장으로 선택되면, 상기 n개의 키워드들 중 상기 제1 수집 문장에서 1회 이상 등장하는 적어도 하나의 제1 키워드를 선택하는 단계, 상기 판별 결과 저장부를 참조하여, 상기 복수의 사용자 의도들 각각에 매칭되는 것으로 판별된 예시 문장들을 확인한 후, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 매칭되는 것으로 판별된 예시 문장들에서, 상기 n개의 키워드들 각각이 등장하는 등장 횟수가 많은 순으로 k(k는 2이상의 자연수임)개의 제2 키워드들을 선택함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 지정하는 단계 및 상기 적어도 하나의 제1 키워드와, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 서로 비교하여, 상기 제1 수집 문장을, 상기 복수의 사용자 의도들 중 상기 제1 수집 문장과의 매칭도가 최대인 제1 사용자 의도에 속하는 것으로 분류하는 단계를 포함할 수 있다.At this time, according to one embodiment of the present invention, in step S260, maintaining a keyword dictionary database in which preset n (n is a natural number of 5 or more) keywords are stored, t (of the plurality of collected sentences) t is a natural number) when the first collection sentences to which the th order number is assigned are selected as sentences to be classified, at least one first keyword that appears one or more times in the first collection sentences among the n keywords Selecting, referring to the determination result storage unit, checking example sentences determined to match each of the plurality of user intentions, and then determining that each of the plurality of user intentions matches each user intention. In the example sentences, the second keyword corresponding to each of the plurality of user intentions is selected by selecting k (k is a natural number equal to or greater than 2) second keywords in the order of the number of occurrences of each of the n keywords. designating and comparing the at least one first keyword and second keywords corresponding to each of the plurality of user intentions to obtain the first collected sentence, and classifying the object as belonging to a first user intention having a maximum matching degree with the sentence.
이때, 본 발명의 일실시예에 따르면, 상기 제1 수집 문장을, 상기 복수의 사용자 의도들 중 상기 제1 수집 문장과의 매칭도가 최대인 제1 사용자 의도에 속하는 것으로 분류하는 단계는 상기 n개의 키워드들 각각에 대응되는 것으로 사전 설정된 서로 다른 n차원의 원-핫 벡터가 저장되어 있는 원-핫 벡터 저장부를 유지하는 단계, 상기 적어도 하나의 제1 키워드를 선택하는 단계에 의해 상기 적어도 하나의 제1 키워드가 선택되면, 상기 원-핫 벡터 저장부를 참조하여, 상기 적어도 하나의 제1 키워드 각각에 대응되는 원-핫 벡터를 합산함으로써, 상기 제1 수집 문장에 대한 키워드 벡터를 생성하는 단계, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 지정하는 단계에 의해 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들이 선택되면, 상기 원-핫 벡터 저장부를 참조하여, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 대응되는 제2 키워드들의 원-핫 벡터를 모두 합산함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터를 생성하는 단계 및 상기 키워드 벡터와 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터 간의 코사인 유사도를 연산하여, 상기 복수의 사용자 의도들 중 상기 코사인 유사도가 최대인 사용자 의도를, 상기 제1 수집 문장과의 매칭도가 최대인 상기 제1 사용자 의도로 선택함으로써, 상기 제1 수집 문장을 상기 제1 사용자 의도에 속하는 것으로 분류하는 단계를 포함할 수 있다.In this case, according to an embodiment of the present invention, the step of classifying the first collected sentence as belonging to the first user intention having the maximum matching degree with the first collected sentence among the plurality of user intentions includes the n maintaining a one-hot vector storage unit storing different n-dimensional one-hot vectors corresponding to each of the keywords; selecting the at least one first keyword; If a first keyword is selected, generating a keyword vector for the first collection of sentences by adding one-hot vectors corresponding to each of the at least one first keyword with reference to the one-hot vector storage unit; When second keywords corresponding to each of the plurality of user intentions are selected by the step of designating second keywords corresponding to each of the plurality of user intentions, the one-hot vector storage unit refers to the plurality of user intentions. Generating a feature vector corresponding to each of the plurality of user intentions by summing all of the one-hot vectors of second keywords corresponding to each user intention for each of the intentions, and the keyword vector and the plurality of user intentions. A cosine similarity between feature vectors corresponding to each of the intentions is calculated, and the user intention having the maximum cosine similarity among the plurality of user intentions is converted into the first user intention having the maximum matching degree with the first collection sentence. By making a selection, classifying the first collection sentence as belonging to the first user intention.
이때, 본 발명의 일실시예에 따르면, 단계(S260)에서는 상기 제1 수집 문장이 상기 제1 사용자 의도에 속하는 것으로 분류되면, 상기 제1 사용자 의도에 대응되는 특성 벡터와 상기 키워드 벡터 간의 제1 코사인 유사도가, 사전 설정된 기준 유사도를 초과하는지 여부를 확인하여, 상기 제1 코사인 유사도가 상기 기준 유사도를 초과하지 않는 것으로 확인되는 경우, 상기 복수의 수집 문장들에서 상기 제1 수집 문장을 삭제함으로써, 상기 제1 수집 문장이 상기 훈련 세트에 포함되지 않도록 처리하는 단계를 더 포함할 수 있다.At this time, according to one embodiment of the present invention, in step S260, if the first collection sentence is classified as belonging to the first user intention, the first between the feature vector corresponding to the first user intention and the keyword vector By checking whether the cosine similarity exceeds a preset criterion similarity, and when it is confirmed that the first cosine similarity does not exceed the criterion similarity, the first collection sentence is deleted from the plurality of collection sentences, The method may further include processing so that the first collected sentences are not included in the training set.
이상, 도 2를 참조하여 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 동작 방법에 대해 설명하였다. 여기서, 본 발명의 일실시예에 따른 상기 전자 장치의 동작 방법은 도 1을 이용하여 설명한 전자 장치(110)의 동작에 대한 구성과 대응될 수 있으므로, 이에 대한 보다 상세한 설명은 생략하기로 한다.In the above, a method of operating an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining a user's intention has been described with reference to FIG. 2 . Here, since the operating method of the electronic device according to an embodiment of the present invention may correspond to the configuration of the operation of the
본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 동작 방법은 컴퓨터와의 결합을 통해 실행시키기 위한 저장매체에 저장된 컴퓨터 프로그램으로 구현될 수 있다.An operating method of an electronic device generating a training set for performing reinforcement learning of a deep learning model for determining user intention according to an embodiment of the present invention is a computer program stored in a storage medium for execution through combination with a computer. can be implemented
또한, 본 발명의 일실시예에 따른 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치의 동작 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.In addition, a method of operating an electronic device for generating a training set for performing reinforcement learning of a deep learning model for determining user intention according to an embodiment of the present invention is implemented in the form of program instructions that can be executed through various computer means. and can be recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. Program instructions recorded on the medium may be those specially designed and configured for the present invention or those known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. - includes hardware devices specially configured to store and execute program instructions, such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler.
이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.As described above, the present invention has been described by specific details such as specific components and limited embodiments and drawings, but these are provided to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments. , Those skilled in the art in the field to which the present invention belongs can make various modifications and variations from these descriptions.
따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be limited to the described embodiments, and it will be said that not only the claims to be described later, but also all modifications equivalent or equivalent to these claims belong to the scope of the present invention. .
110: 사용자 의도를 판별하는 딥러닝 모델의 강화 학습을 수행하기 위한 훈련 세트를 생성하는 전자 장치
111: 사용자 의도 저장부 112: 예시 문장 저장부
113: 판별 결과 저장부 114: 수집 문장 획득부
115: 순번 할당부 116: 분류 작업 수행부
117: 훈련 세트 생성부 118: 키워드 사전 데이터베이스
119: 제1 키워드 선택부 120: 제2 키워드 선택부
121: 분류 처리부 122: 원-핫 벡터 저장부
123: 키워드 벡터 생성부 124: 특성 벡터 생성부
125: 사용자 의도 선택부 126: 문장 제외 처리부
130: 관리자110: Electronic device for generating a training set for performing reinforcement learning of a deep learning model that determines user intention
111: user intention storage unit 112: example sentence storage unit
113: determination result storage unit 114: collection sentence acquisition unit
115: sequence number allocation unit 116: classification operation unit
117: training set generator 118: keyword dictionary database
119: first keyword selection unit 120: second keyword selection unit
121: classification processing unit 122: one-hot vector storage unit
123: keyword vector generator 124: feature vector generator
125: user intention selection unit 126: sentence exclusion processing unit
130: manager
Claims (10)
사전 설정된 복수의 사용자 의도들에 대한 정보가 저장되어 있는 사용자 의도 저장부;
사전 수집된 복수의 예시 문장들이 저장되어 있는 예시 문장 저장부;
사전 구축된 딥러닝 모델 - 상기 딥러닝 모델은 문장이 입력되면, 상기 복수의 사용자 의도들 중 입력된 문장에 매칭되는 사용자 의도를 판별하는 모델임 - 을 통해서 수행 완료된, 상기 복수의 예시 문장들 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있는 판별 결과 저장부;
관리자에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득하는 수집 문장 획득부;
상기 복수의 수집 문장들이 획득되면, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번을 랜덤하게 할당하는 순번 할당부;
상기 복수의 수집 문장들 중 상기 순번이 작은 순으로 어느 하나의 수집 문장을 하나씩 분류 작업의 대상이 되는 문장으로 선택하여, 상기 선택된 수집 문장과 상기 복수의 예시 문장들 간의 연관도를 기초로, 상기 선택된 수집 문장을 상기 복수의 사용자 의도들 중 최대로 매칭되는 사용자 의도에 속하는 것으로 분류하는 분류 작업을 반복 수행함으로써, 상기 복수의 수집 문장들을 사용자 의도별로 분류하는 분류 작업 수행부; 및
상기 복수의 수집 문장들이 사용자 의도별로 분류되면, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 훈련 세트 생성부
를 포함하고,
상기 분류 작업 수행부는
사전 설정된 n(n은 5 이상의 자연수임)개의 키워드들이 저장되어 있는 키워드 사전 데이터베이스;
상기 복수의 수집 문장들 중 t(t는 자연수임)번째 순번이 할당된 제1 수집 문장이 분류 작업의 대상이 되는 문장으로 선택되면, 상기 n개의 키워드들 중 상기 제1 수집 문장에서 1회 이상 등장하는 적어도 하나의 제1 키워드를 선택하는 제1 키워드 선택부;
상기 판별 결과 저장부를 참조하여, 상기 복수의 사용자 의도들 각각에 매칭되는 것으로 판별된 예시 문장들을 확인한 후, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 매칭되는 것으로 판별된 예시 문장들에서, 상기 n개의 키워드들 각각이 등장하는 등장 횟수가 많은 순으로 k(k는 2이상의 자연수임)개의 제2 키워드들을 선택함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 지정하는 제2 키워드 선택부; 및
상기 적어도 하나의 제1 키워드와, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 서로 비교하여, 상기 제1 수집 문장을, 상기 복수의 사용자 의도들 중 상기 제1 수집 문장과의 매칭도가 최대인 제1 사용자 의도에 속하는 것으로 분류하는 분류 처리부
를 포함하며,
상기 분류 처리부는
상기 n개의 키워드들 각각에 대응되는 것으로 사전 설정된 서로 다른 n차원의 원-핫(one-hot) 벡터가 저장되어 있는 원-핫 벡터 저장부;
상기 제1 키워드 선택부에 의해 상기 적어도 하나의 제1 키워드가 선택되면, 상기 원-핫 벡터 저장부를 참조하여, 상기 적어도 하나의 제1 키워드 각각에 대응되는 원-핫 벡터를 합산함으로써, 상기 제1 수집 문장에 대한 키워드 벡터를 생성하는 키워드 벡터 생성부;
상기 제2 키워드 선택부에 의해 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들이 선택되면, 상기 원-핫 벡터 저장부를 참조하여, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 대응되는 제2 키워드들의 원-핫 벡터를 모두 합산함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터를 생성하는 특성 벡터 생성부; 및
상기 키워드 벡터와 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터 간의 코사인 유사도를 연산하여, 상기 복수의 사용자 의도들 중 상기 코사인 유사도가 최대인 사용자 의도를, 상기 제1 수집 문장과의 매칭도가 최대인 상기 제1 사용자 의도로 선택함으로써, 상기 제1 수집 문장을 상기 제1 사용자 의도에 속하는 것으로 분류하는 사용자 의도 선택부
를 포함하는 전자 장치.An electronic device for generating a training set for performing reinforcement learning of a deep learning model that determines user intention,
a user intention storage unit storing information on a plurality of preset user intentions;
an example sentence storage unit in which a plurality of pre-collected example sentences are stored;
Each of the plurality of example sentences that have been executed through a pre-built deep learning model - the deep learning model is a model that, when a sentence is input, determines a user intention matching the input sentence among the plurality of user intentions a determination result storage unit for storing a determination result for a user's intention matched with;
When a command for generating a training set for reinforcement learning of the deep learning model is applied by an administrator, a plurality of collections are performed by accessing a plurality of pre-designated web pages and performing web crawling on the plurality of web pages. a collection sentence acquisition unit that acquires sentences;
If the plurality of collected sentences are obtained, a sequence allocator randomly assigns a sequence number for classification to each of the plurality of collected sentences;
Among the plurality of collected sentences, one of the collected sentences in the order of the smallest order is selected as a sentence to be classified, and based on the degree of association between the selected collected sentence and the plurality of example sentences, a classification task performing unit that classifies the plurality of collected sentences according to user intention by repeatedly performing a classification task of classifying the selected collection sentence as belonging to the user intention that most matches among the plurality of user intentions; and
When the plurality of collected sentences are classified according to user intentions, a training set generator for generating a training set composed of the plurality of collected sentences and information about user intentions to which each collected sentence belongs.
including,
The classification task performing unit
a keyword dictionary database in which n (n is a natural number of 5 or more) preset keywords are stored;
When the first collection sentence to which the t (t is a natural number) th order number is assigned among the plurality of collection sentences is selected as a sentence to be classified, one or more times in the first collection sentence among the n keywords a first keyword selector selecting at least one first keyword to appear;
After checking the example sentences determined to match each of the plurality of user intentions with reference to the determination result storage unit, in the example sentences determined to match each user intention with respect to each of the plurality of user intentions. , Designating second keywords corresponding to each of the plurality of user intentions by selecting k (k is a natural number equal to or greater than 2) second keywords in the order of the number of occurrences of each of the n keywords. 2 keyword selection unit; and
A degree of matching of the first collection sentence with the first collection sentence among the plurality of user intentions by comparing the at least one first keyword with second keywords corresponding to each of the plurality of user intentions. Classification processing unit for classifying as belonging to the first user intention with a maximum
Including,
The classification processing unit
a one-hot vector storage unit storing different n-dimensional one-hot vectors preset to correspond to each of the n keywords;
When the at least one first keyword is selected by the first keyword selector, the one-hot vector storage unit sums up one-hot vectors corresponding to each of the at least one first keyword, with reference to the one-hot vector storage unit. 1 a keyword vector generator for generating keyword vectors for collected sentences;
When second keywords corresponding to each of the plurality of user intentions are selected by the second keyword selector, with reference to the one-hot vector storage unit, for each of the plurality of user intentions, corresponding to each user intention a feature vector generating unit generating a feature vector corresponding to each of the plurality of user intentions by summing all one-hot vectors of second keywords; and
By calculating the cosine similarity between the keyword vector and the feature vector corresponding to each of the plurality of user intentions, the user intention having the largest cosine similarity among the plurality of user intentions has a matching degree with the first collection sentence. A user intention selector configured to classify the first collection sentence as belonging to the first user intention by selecting the maximum first user intention.
An electronic device comprising a.
상기 분류 작업 수행부는
상기 제1 수집 문장이 상기 제1 사용자 의도에 속하는 것으로 분류되면, 상기 제1 사용자 의도에 대응되는 특성 벡터와 상기 키워드 벡터 간의 제1 코사인 유사도가, 사전 설정된 기준 유사도를 초과하는지 여부를 확인하여, 상기 제1 코사인 유사도가 상기 기준 유사도를 초과하지 않는 것으로 확인되는 경우, 상기 복수의 수집 문장들에서 상기 제1 수집 문장을 삭제함으로써, 상기 제1 수집 문장이 상기 훈련 세트에 포함되지 않도록 처리하는 문장 제외 처리부
를 더 포함하는 전자 장치.According to claim 1,
The classification task performing unit
If the first collection sentence is classified as belonging to the first user intention, it is checked whether a first cosine similarity between a feature vector corresponding to the first user intention and the keyword vector exceeds a preset reference similarity, When it is determined that the first cosine similarity does not exceed the criterion similarity, the first collection sentence is deleted from the plurality of collection sentences so that the first collection sentence is not included in the training set. exclusion processing unit
An electronic device further comprising a.
사전 설정된 복수의 사용자 의도들에 대한 정보가 저장되어 있는 사용자 의도 저장부를 유지하는 단계;
사전 수집된 복수의 예시 문장들이 저장되어 있는 예시 문장 저장부를 유지하는 단계;
사전 구축된 딥러닝 모델 - 상기 딥러닝 모델은 문장이 입력되면, 상기 복수의 사용자 의도들 중 입력된 문장에 매칭되는 사용자 의도를 판별하는 모델임 - 을 통해서 수행 완료된, 상기 복수의 예시 문장들 각각에 매칭되는 사용자 의도에 대한 판별 결과가 저장되어 있는 판별 결과 저장부를 유지하는 단계;
관리자에 의해, 상기 딥러닝 모델의 강화 학습을 위한 훈련 세트의 생성 명령이 인가되면, 사전 지정된 복수의 웹 페이지들에 접속하여, 상기 복수의 웹 페이지들에 대한 웹 크롤링을 수행함으로써, 복수의 수집 문장들을 획득하는 단계;
상기 복수의 수집 문장들이 획득되면, 상기 복수의 수집 문장들 각각에, 분류 작업을 위한 순번을 랜덤하게 할당하는 단계;
상기 복수의 수집 문장들 중 상기 순번이 작은 순으로 어느 하나의 수집 문장을 하나씩 분류 작업의 대상이 되는 문장으로 선택하여, 상기 선택된 수집 문장과 상기 복수의 예시 문장들 간의 연관도를 기초로, 상기 선택된 수집 문장을 상기 복수의 사용자 의도들 중 최대로 매칭되는 사용자 의도에 속하는 것으로 분류하는 분류 작업을 반복 수행함으로써, 상기 복수의 수집 문장들을 사용자 의도별로 분류하는 단계; 및
상기 복수의 수집 문장들이 사용자 의도별로 분류되면, 상기 복수의 수집 문장들과, 각 수집 문장이 속하는 사용자 의도에 대한 정보로 구성된 훈련 세트를 생성하는 단계
를 포함하고,
상기 복수의 수집 문장들을 사용자 의도별로 분류하는 단계는
사전 설정된 n(n은 5이상의 자연수임)개의 키워드들이 저장되어 있는 키워드 사전 데이터베이스를 유지하는 단계;
상기 복수의 수집 문장들 중 t(t는 자연수임)번째 순번이 할당된 제1 수집 문장이 분류 작업의 대상이 되는 문장으로 선택되면, 상기 n개의 키워드들 중 상기 제1 수집 문장에서 1회 이상 등장하는 적어도 하나의 제1 키워드를 선택하는 단계;
상기 판별 결과 저장부를 참조하여, 상기 복수의 사용자 의도들 각각에 매칭되는 것으로 판별된 예시 문장들을 확인한 후, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 매칭되는 것으로 판별된 예시 문장들에서, 상기 n개의 키워드들 각각이 등장하는 등장 횟수가 많은 순으로 k(k는 2이상의 자연수임)개의 제2 키워드들을 선택함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 지정하는 단계; 및
상기 적어도 하나의 제1 키워드와, 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 서로 비교하여, 상기 제1 수집 문장을, 상기 복수의 사용자 의도들 중 상기 제1 수집 문장과의 매칭도가 최대인 제1 사용자 의도에 속하는 것으로 분류하는 단계
를 포함하며,
상기 제1 수집 문장을, 상기 복수의 사용자 의도들 중 상기 제1 수집 문장과의 매칭도가 최대인 제1 사용자 의도에 속하는 것으로 분류하는 단계는
상기 n개의 키워드들 각각에 대응되는 것으로 사전 설정된 서로 다른 n차원의 원-핫(one-hot) 벡터가 저장되어 있는 원-핫 벡터 저장부를 유지하는 단계;
상기 적어도 하나의 제1 키워드를 선택하는 단계에 의해 상기 적어도 하나의 제1 키워드가 선택되면, 상기 원-핫 벡터 저장부를 참조하여, 상기 적어도 하나의 제1 키워드 각각에 대응되는 원-핫 벡터를 합산함으로써, 상기 제1 수집 문장에 대한 키워드 벡터를 생성하는 단계;
상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들을 지정하는 단계에 의해 상기 복수의 사용자 의도들 각각에 대응되는 제2 키워드들이 선택되면, 상기 원-핫 벡터 저장부를 참조하여, 상기 복수의 사용자 의도들 각각에 대해, 각 사용자 의도에 대응되는 제2 키워드들의 원-핫 벡터를 모두 합산함으로써, 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터를 생성하는 단계; 및
상기 키워드 벡터와 상기 복수의 사용자 의도들 각각에 대응되는 특성 벡터 간의 코사인 유사도를 연산하여, 상기 복수의 사용자 의도들 중 상기 코사인 유사도가 최대인 사용자 의도를, 상기 제1 수집 문장과의 매칭도가 최대인 상기 제1 사용자 의도로 선택함으로써, 상기 제1 수집 문장을 상기 제1 사용자 의도에 속하는 것으로 분류하는 단계
를 포함하는 전자 장치의 동작 방법.A method of operating an electronic device that generates a training set for performing reinforcement learning of a deep learning model that determines user intention,
maintaining a user intention storage unit in which information on a plurality of preset user intentions is stored;
maintaining an example sentence storage unit in which a plurality of pre-collected example sentences are stored;
Each of the plurality of example sentences that have been executed through a pre-built deep learning model - the deep learning model is a model that, when a sentence is input, determines a user intention matching the input sentence among the plurality of user intentions maintaining a determination result storage unit in which a determination result for a user's intention matched with is stored;
When a command for generating a training set for reinforcement learning of the deep learning model is applied by an administrator, a plurality of collections are performed by accessing a plurality of pre-designated web pages and performing web crawling on the plurality of web pages. obtaining sentences;
randomly allocating a sequence number for a classification task to each of the plurality of collected sentences when the plurality of collected sentences are obtained;
Among the plurality of collected sentences, one of the collected sentences in the order of the smallest order is selected as a sentence to be classified, and based on the degree of association between the selected collected sentence and the plurality of example sentences, classifying the plurality of collected sentences according to user intentions by repeatedly performing a classification task of classifying the selected collected sentences as those belonging to the user's intention that best matches among the plurality of user's intentions; and
If the plurality of collected sentences are classified according to user intention, generating a training set composed of the plurality of collected sentences and information on user intention to which each collected sentence belongs.
including,
The step of classifying the plurality of collection sentences by user intention
maintaining a keyword dictionary database in which preset n (n is a natural number equal to or greater than 5) keywords are stored;
When the first collection sentence to which the t (t is a natural number) th order number is assigned among the plurality of collection sentences is selected as a sentence to be classified, one or more times in the first collection sentence among the n keywords selecting at least one first keyword to appear;
After checking the example sentences determined to match each of the plurality of user intentions with reference to the determination result storage unit, in the example sentences determined to match each user intention with respect to each of the plurality of user intentions. designating second keywords corresponding to each of the plurality of user intentions by selecting k (k is a natural number equal to or greater than 2) second keywords in the order of the number of occurrences of each of the n keywords. ; and
A degree of matching of the first collection sentence with the first collection sentence among the plurality of user intentions by comparing the at least one first keyword with second keywords corresponding to each of the plurality of user intentions. classifying as belonging to the first user intention in which
Including,
Classifying the first collection sentence as belonging to a first user intention having the maximum matching degree with the first collection sentence among the plurality of user intentions;
maintaining a one-hot vector storage unit in which different n-dimensional one-hot vectors preset to correspond to each of the n keywords are stored;
If the at least one first keyword is selected by the step of selecting the at least one first keyword, one-hot vectors corresponding to each of the at least one first keyword are obtained with reference to the one-hot vector storage unit. generating a keyword vector for the first collection sentence by summing;
When second keywords corresponding to each of the plurality of user intentions are selected by the step of designating second keywords corresponding to each of the plurality of user intentions, the one-hot vector storage unit refers to the plurality of user intentions. generating a feature vector corresponding to each of the plurality of user intentions by summing all one-hot vectors of second keywords corresponding to each user intention for each of the intentions; and
By calculating the cosine similarity between the keyword vector and the feature vector corresponding to each of the plurality of user intentions, the user intention having the largest cosine similarity among the plurality of user intentions has a matching degree with the first collection sentence. classifying the first collection sentence as belonging to the first user intent by selecting the first user intent that is maximal;
A method of operating an electronic device comprising a.
상기 복수의 수집 문장들을 사용자 의도별로 분류하는 단계는
상기 제1 수집 문장이 상기 제1 사용자 의도에 속하는 것으로 분류되면, 상기 제1 사용자 의도에 대응되는 특성 벡터와 상기 키워드 벡터 간의 제1 코사인 유사도가, 사전 설정된 기준 유사도를 초과하는지 여부를 확인하여, 상기 제1 코사인 유사도가 상기 기준 유사도를 초과하지 않는 것으로 확인되는 경우, 상기 복수의 수집 문장들에서 상기 제1 수집 문장을 삭제함으로써, 상기 제1 수집 문장이 상기 훈련 세트에 포함되지 않도록 처리하는 단계
를 더 포함하는 전자 장치의 동작 방법.According to claim 5,
The step of classifying the plurality of collection sentences by user intention
If the first collection sentence is classified as belonging to the first user intention, it is checked whether a first cosine similarity between a feature vector corresponding to the first user intention and the keyword vector exceeds a preset reference similarity, When it is determined that the first cosine similarity does not exceed the reference similarity, processing the first collection sentence not to be included in the training set by deleting the first collection sentence from the plurality of collection sentences.
Method of operating an electronic device further comprising a.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210116371A KR102566928B1 (en) | 2021-09-01 | 2021-09-01 | Electronic apparatus which generates a training set for performing reinforcement learning of the deep learning model for distinguishing user intention, and the operating method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210116371A KR102566928B1 (en) | 2021-09-01 | 2021-09-01 | Electronic apparatus which generates a training set for performing reinforcement learning of the deep learning model for distinguishing user intention, and the operating method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20230033424A KR20230033424A (en) | 2023-03-08 |
KR102566928B1 true KR102566928B1 (en) | 2023-08-14 |
Family
ID=85508115
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210116371A KR102566928B1 (en) | 2021-09-01 | 2021-09-01 | Electronic apparatus which generates a training set for performing reinforcement learning of the deep learning model for distinguishing user intention, and the operating method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102566928B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118095443B (en) * | 2024-04-19 | 2024-07-05 | 深圳爱莫科技有限公司 | Training method and equipment for generating large text model according to facts |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102280490B1 (en) * | 2021-01-27 | 2021-07-22 | 주식회사 두유비 | Training data construction method for automatically generating training data for artificial intelligence model for counseling intention classification |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102570278B1 (en) * | 2017-07-31 | 2023-08-24 | 삼성전자주식회사 | Apparatus and method for generating training data used to training student model from teacher model |
KR20190133931A (en) * | 2018-05-24 | 2019-12-04 | 한국과학기술원 | Method to response based on sentence paraphrase recognition for a dialog system |
KR102361597B1 (en) * | 2019-05-03 | 2022-02-11 | 주식회사 자이냅스 | A program recording medium on which a program for labeling sentiment information in news articles using big data is recoded |
-
2021
- 2021-09-01 KR KR1020210116371A patent/KR102566928B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102280490B1 (en) * | 2021-01-27 | 2021-07-22 | 주식회사 두유비 | Training data construction method for automatically generating training data for artificial intelligence model for counseling intention classification |
Also Published As
Publication number | Publication date |
---|---|
KR20230033424A (en) | 2023-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110837550B (en) | Knowledge graph-based question answering method and device, electronic equipment and storage medium | |
WO2017045443A1 (en) | Image retrieval method and system | |
KR101516712B1 (en) | Semantic visual search engine | |
AU2008261153B2 (en) | Generic Filtering Technique Based on Matching Scores | |
US8243988B1 (en) | Clustering images using an image region graph | |
CN109543516A (en) | Signing intention judgment method, device, computer equipment and storage medium | |
JP2014534540A (en) | Interactive multi-mode image search | |
JPH10240759A (en) | Retrieval device | |
JP6607061B2 (en) | Information processing apparatus, data comparison method, and data comparison program | |
CN111222005B (en) | Voiceprint data reordering method and device, electronic equipment and storage medium | |
CN112347223A (en) | Document retrieval method, document retrieval equipment and computer-readable storage medium | |
KR102566928B1 (en) | Electronic apparatus which generates a training set for performing reinforcement learning of the deep learning model for distinguishing user intention, and the operating method thereof | |
CN103226601B (en) | A kind of method and apparatus of picture searching | |
JP4325370B2 (en) | Document-related vocabulary acquisition device and program | |
KR102300427B1 (en) | Learning word collection device for improving the recognition rate of speech recognizer and operating method thereof | |
CN116628142B (en) | Knowledge retrieval method, device, equipment and readable storage medium | |
CN110968723A (en) | Image characteristic value searching method and device and electronic equipment | |
CN109992666A (en) | Method, apparatus and non-transitory machine readable media for processing feature library | |
KR102028155B1 (en) | Document scoring method and document searching system | |
JP2003263441A (en) | Keyword determination database preparing method, keyword determining method, device, program and recording medium | |
KR102417824B1 (en) | Document management server that interlocks with a plurality of document repositories to load a document file similar to a scanned image of a paper document received from a client terminal and operating method thereof | |
CN114385777A (en) | Text data processing method and device, computer equipment and storage medium | |
JP3497713B2 (en) | Information classification method, apparatus and system | |
CN115858797A (en) | Method and system for generating Chinese near-meaning words based on OCR technology | |
KR102545256B1 (en) | Data processing apparatus that supports classification, storage and retrieval of machine learning data, and the operating method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |