KR20230031056A - Data learning method using sentiment analysis system - Google Patents

Data learning method using sentiment analysis system Download PDF

Info

Publication number
KR20230031056A
KR20230031056A KR1020210113440A KR20210113440A KR20230031056A KR 20230031056 A KR20230031056 A KR 20230031056A KR 1020210113440 A KR1020210113440 A KR 1020210113440A KR 20210113440 A KR20210113440 A KR 20210113440A KR 20230031056 A KR20230031056 A KR 20230031056A
Authority
KR
South Korea
Prior art keywords
token
data
input data
weight
input
Prior art date
Application number
KR1020210113440A
Other languages
Korean (ko)
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 KR1020210113440A priority Critical patent/KR20230031056A/en
Publication of KR20230031056A publication Critical patent/KR20230031056A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Abstract

A data learning method performed by a sentiment analysis system according to one embodiment of the present specification comprises: a step of calculating a weight of input data; a step of determining a specific token among tokens according to the input data based on the weight, wherein the weight is related to a sentiment classification; and a step of performing multitask learning (MTL) using preprocessing data wherein the specific token is changed to a mask token in the input data. Therefore, the present invention enables performance of the sentiment analysis system to be prevented from being deteriorated.

Description

감성 분석 시스템을 이용한 데이터 학습 방법{DATA LEARNING METHOD USING SENTIMENT ANALYSIS SYSTEM}Data learning method using sentiment analysis system {DATA LEARNING METHOD USING SENTIMENT ANALYSIS SYSTEM}

본 명세서는 감성 분석 시스템을 이용한 데이터 학습 방법에 관한 것이다.This specification relates to a data learning method using a sentiment analysis system.

감성 분석 시스템은 주어진 데이터에 포함된 화자의 감성을 긍정(Positive) 또는 부정(Negative)으로 판별하는 시스템이다. 감성 분석 시스템은 도메인 정보를 학습하는 것이 성능에 큰 영향을 주며, 그 효과의 예는 다음과 같다. 일반적으로 '킬러(killer)'라는 단어는 부정 극성을 나타내지만, '킬러 콘텐츠(killer contents)'라는 표현은 몇몇 도메인에서 긍정 극성으로 사용될 수 있다. 즉, 같은 단어라도 도메인에 따라 내포하는 의미가 달라질 수 있다. 따라서 주어진 데이터의 도메인 정보를 학습하는 것은 감성 분석 연구에서 매우 중요하다.The emotion analysis system is a system that determines the emotion of a speaker included in given data as positive or negative. In the sentiment analysis system, learning domain information has a great effect on performance, and examples of the effect are as follows. In general, the word 'killer' indicates negative polarity, but the expression 'killer contents' can be used with positive polarity in some domains. That is, even the same word may have different meanings depending on the domain. Therefore, learning domain information of given data is very important in sentiment analysis research.

그러나 시스템이 도메인 정보를 충분히 학습할 수 있을 만큼 많은 양의 데이터를 구축하는 것은 현실적으로 매우 큰 비용이 요구된다. 따라서 감성 분석 성능 향상에는 상기의 문제를 효과적으로 다룰 방안이 필요하다.However, it is realistically very costly to build a large amount of data for the system to learn enough domain information. Therefore, to improve the performance of sentiment analysis, a plan to effectively deal with the above problem is required.

본 발명의 목적은 적은 양의 데이터만으로도 도메인 정보를 효과적으로 학습하고, 나아가 감성 분석 성능을 높이는 것이다. 이를 위해 본 발명에서는 자기지도학습(Self-supervised Learning) 방법의 하나인 MLM(Masked Language Model)을 이용해 계산된 단어들의 가중치를 활용한다. An object of the present invention is to effectively learn domain information even with a small amount of data, and further improve sentiment analysis performance. To this end, in the present invention, weights of words calculated using a masked language model (MLM), which is one of self-supervised learning methods, are utilized.

보다 상세하게는 설명하면, 본 발명은 감성 분류(sentiment classification)에 상기 MLM을 적용함에 있어, 입력 데이터의 토큰(token)이 중요도 분별없이 마스킹(masking)이 되는 종래 기술의 문제점을 해결하는 것을 목적으로 한다.More specifically, the present invention aims to solve the problem of the prior art in which tokens of input data are masked without classifying importance in applying the MLM to sentiment classification. to be

본 명세서가 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 이하의 발명의 상세한 설명으로부터 본 명세서가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical problems to be achieved by this specification are not limited to the above-mentioned technical problems, and other technical problems not mentioned are clear to those skilled in the art from the detailed description of the invention below. will be understandable.

본 명세서의 일 실시예에 따른 감성 분석 시스템에 의해 수행되는 데이터 학습 방법은 입력 데이터의 가중치를 계산하는 단계, 상기 가중치는 감성 분류(sentiment classification)와 관련되며, 상기 가중치에 기초하여 상기 입력 데이터에 따른 토큰들(tokens) 중 특정 토큰(specific token)을 결정하는 단계 및 상기 입력 데이터에서 상기 특정 토큰이 마스크 토큰(MASK token)으로 변경된 전처리 데이터를 이용하여 멀티 태스크 학습(Multi Task Learning, MTL)을 수행하는 단계를 포함한다.A data learning method performed by a sentiment analysis system according to an embodiment of the present specification includes calculating weights of input data, the weights are related to sentiment classification, and based on the weights, the input data Determining a specific token among the following tokens and performing multi-task learning (MTL) using pre-processing data in which the specific token is changed to a MASK token in the input data. It includes steps to perform.

상기 멀티 태스크 학습은, i) 상기 입력 데이터와 관련된 감성에 대한 판별 및 ii) 상기 특정 토큰의 추정과 관련되고, 상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률과 관련된다.The multi-task learning is related to i) determination of emotion related to the input data and ii) estimation of the specific token, and the weight is determined as each token among tokens according to the input data as the specific token related to probability.

상기 입력 데이터에 따른 토큰들 중, 제1 토큰의 가중치가 제2 토큰의 가중치보다 낮은 경우, 상기 제1 토큰에 기반하는 상기 감성 분류와 관련된 중요도는 상기 제2 토큰에 기반하는 상기 감성 분류와 관련된 중요도보다 높은 것을 특징으로 한다.Among the tokens according to the input data, when the weight of a first token is lower than that of a second token, the importance related to the emotion classification based on the first token is related to the emotion classification based on the second token. It is characterized by being higher than the importance.

상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰별로 계산된 하나 이상의 가중치들을 포함할 수 있다.The weight may include one or more weights calculated for each token among tokens according to the input data.

상기 하나 이상의 가중치들의 개수는 상기 입력 데이터에 따른 토큰들의 개수에 기반할 수 있다.The number of the one or more weights may be based on the number of tokens according to the input data.

상기 감성 분류와 관련된 중요도는, 상기 입력 데이터에 따른 토큰들 중 각각의 토큰을 상기 마스크 토큰으로 변경하여 생성된 제1 전처리 데이터들을, 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때 획득되는 감성 분류 정확도에 기반할 수 있다.The importance associated with the emotion classification is obtained when first preprocessing data generated by changing each token among the tokens according to the input data to the mask token is input to a pre-learned model in relation to the emotion classification It can be based on sentiment classification accuracy.

상기 감성 분류 정확도는, 상기 제1 전처리 데이터들을 각각 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때, 상기 입력 데이터와 관련된 정답 레이블이 출력될 제1 확률로 표현될 수 있다.The emotion classification accuracy may be expressed as a first probability of outputting a correct answer label related to the input data when each of the first pre-processed data is input to a pre-learned model related to the emotion classification.

상기 가중치는 상기 제1 확률 및 제2 확률의 차이에 기반하여 계산되며, 상기 제2 확률은 상기 입력 데이터를 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때, 상기 입력 데이터와 관련된 정답 레이블이 출력될 확률일 수 있다.The weight is calculated based on the difference between the first probability and the second probability, and the second probability is a correct answer label related to the input data when the input data is input to a pre-learned model related to the sentiment classification. may be the probability of being output.

상기 가중치는 다음의 수학식을 만족하며,The weight satisfies the following equation,

[수학식][mathematical expression]

Figure pat00001
Figure pat00001

Figure pat00002
는 상기 하나 이상의 가중치들 중 j번째 가중치이고,
Figure pat00003
는 상기 입력 데이터와 관련된 정답 레이블이고,
Figure pat00004
는 상기 입력 데이터이며,
Figure pat00005
는 상기 입력 데이터에 따른 토큰들 중 j번째 토큰이 상기 마스크 토큰으로 변경되어 생성된 상기 제1 전처리 데이터이며,
Figure pat00006
은 상기 제2 확률,
Figure pat00007
은 상기 제1 확률일 수 있다.
Figure pat00002
Is the j-th weight among the one or more weights,
Figure pat00003
Is a correct answer label related to the input data,
Figure pat00004
is the input data,
Figure pat00005
Is the first pre-processed data generated by changing the j-th token among the tokens according to the input data to the mask token,
Figure pat00006
Is the second probability,
Figure pat00007
may be the first probability.

상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률은, 상기 하나 이상의 가중치들을 입력으로 하는 소프트맥스 함수(SOFTMAX function)의 출력에 기반할 수 있다.The probability that each token among the tokens according to the input data is determined as the specific token may be based on an output of a SOFTMAX function that takes the one or more weights as inputs.

본 명세서의 다른 실시예에 따른 데이터 학습을 수행하는 감성 분석 시스템은 프로세서 및 상기 프로세서와 동작 가능하게 연결된 메모리를 포함하고, 상기 메모리는 상기 프로세서에 의해 실행될 때 상기 프로세서가 동작들을 수행하도록 설정하는 지시들을 저장한다.A sentiment analysis system for performing data learning according to another embodiment of the present specification includes a processor and a memory operatively connected to the processor, wherein the memory instructions configure the processor to perform operations when executed by the processor. save them

상기 동작들은 입력 데이터의 가중치를 계산하는 단계, 상기 가중치는 감성 분류(sentiment classification)와 관련되며, 상기 가중치에 기초하여 상기 입력 데이터에 따른 토큰들(tokens) 중 특정 토큰(specific token)을 결정하는 단계 및 상기 입력 데이터에서 상기 특정 토큰이 마스크 토큰(MASK token)으로 변경된 전처리 데이터를 이용하여 멀티 태스크 학습(Multi Task Learning, MTL)을 수행하는 단계를 포함한다.The operations include calculating weights of input data, the weights being related to sentiment classification, and determining a specific token among tokens according to the input data based on the weights. and performing multi-task learning (MTL) using pre-processed data in which the specific token is changed to a mask token in the input data.

상기 멀티 태스크 학습은, i) 상기 입력 데이터와 관련된 감성에 대한 판별 및 ii) 상기 특정 토큰의 추정과 관련되고, 상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률과 관련된다.The multi-task learning is related to i) determination of emotion related to the input data and ii) estimation of the specific token, and the weight is determined as each token among tokens according to the input data as the specific token related to probability.

상기 입력 데이터에 따른 토큰들 중, 제1 토큰의 가중치가 제2 토큰의 가중치보다 낮은 경우, 상기 제1 토큰에 기반하는 상기 감성 분류와 관련된 중요도는 상기 제2 토큰에 기반하는 상기 감성 분류와 관련된 중요도보다 높은 것을 특징으로 한다.Among the tokens according to the input data, when the weight of a first token is lower than that of a second token, the importance related to the emotion classification based on the first token is related to the emotion classification based on the second token. It is characterized by being higher than the importance.

상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰별로 계산된 하나 이상의 가중치들을 포함할 수 있다.The weight may include one or more weights calculated for each token among tokens according to the input data.

본 명세서의 실시예에 따르면, 감성 분석 및 토큰 추정과 관련된 데이터 학습은 기 설정된 방법에 따라 계산된 가중치를 이용하여 수행되는 바, 전처리 데이터의 생성을 위한 마스킹 동작에서 감성 분석과 관련된 중요도가 높은 토큰이 제외될 수 있다. According to an embodiment of the present specification, data learning related to sentiment analysis and token estimation is performed using weights calculated according to a preset method, and tokens of high importance related to sentiment analysis in a masking operation for generating preprocessed data this may be excluded.

따라서, 감성 분류와 관련된 중요도의 분별 없이 수행되는 마스킹을 통해 생성된 전처리 데이터들이 상기 데이터 학습에 사용됨으로 인해 감성 분석 시스템의 성능이 저하되는 것을 방지할 수 있다.Therefore, it is possible to prevent the performance of the sentiment analysis system from deteriorating due to the use of preprocessing data generated through masking performed without discrimination of importance related to sentiment classification for data learning.

본 명세서에서 얻을 수 있는 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 명세서가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Effects obtainable in the present specification are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the description below. .

도 1은 본 명세서와 관련된 전자 기기를 설명하기 위한 블록도이다.
도 2는 MLM과 관련된 종래 기술의 문제점을 설명하기 위한 도면이다.
도 3은 본 명세서의 실시예에 따른 멀티 태스크 학습을 설명하기 위한 도면이다.
도 4는 본 명세서의 실시예에 따른 가중치의 계산을 설명하기 위한 도면이다.
도 5는 본 명세서의 실시예에 따른 감성 분석 시스템의 데이터 학습 방법을 설명하기 위한 흐름도이다.
본 명세서에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 명세서에 대한 실시예를 제공하고, 상세한 설명과 함께 본 명세서의 기술적 특징을 설명한다.
1 is a block diagram for explaining an electronic device related to the present specification.
Figure 2 is a diagram for explaining the problems of the prior art related to MLM.
3 is a diagram for explaining multi-task learning according to an embodiment of the present specification.
4 is a diagram for explaining calculation of weights according to an embodiment of the present specification.
5 is a flowchart illustrating a data learning method of a sentiment analysis system according to an embodiment of the present specification.
The accompanying drawings, which are included as part of the detailed description to aid understanding of the present specification, provide examples of the present specification and describe technical features of the present specification together with the detailed description.

이하, 첨부된 도면을 참조하여 본 명세서에 개시된 실시예를 상세히 설명하되, 도면 부호에 관계없이 동일하거나 유사한 구성요소는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 이하의 설명에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. 또한, 본 명세서에 개시된 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 명세서에 개시된 실시예의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 명세서에 개시된 실시예를 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 명세서에 개시된 기술적 사상이 제한되지 않으며, 본 명세서의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. Hereinafter, the embodiments disclosed in this specification will be described in detail with reference to the accompanying drawings, but the same or similar components are given the same reference numerals regardless of reference numerals, and redundant description thereof will be omitted. The suffixes "module" and "unit" for components used in the following description are given or used together in consideration of ease of writing the specification, and do not have meanings or roles that are distinct from each other by themselves. In addition, in describing the embodiments disclosed in this specification, if it is determined that a detailed description of a related known technology may obscure the gist of the embodiment disclosed in this specification, the detailed description thereof will be omitted. In addition, the accompanying drawings are only for easy understanding of the embodiments disclosed in this specification, the technical idea disclosed in this specification is not limited by the accompanying drawings, and all changes included in the spirit and technical scope of this specification , it should be understood to include equivalents or substitutes.

제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되지는 않는다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms including ordinal numbers, such as first and second, may be used to describe various components, but the components are not limited by the terms. These terms are only used for the purpose of distinguishing one component from another.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.It is understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, but other elements may exist in the middle. It should be. On the other hand, when an element is referred to as “directly connected” or “directly connected” to another element, it should be understood that no other element exists in the middle.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다.Singular expressions include plural expressions unless the context clearly dictates otherwise.

본 출원에서, "포함한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.In this application, terms such as "comprise" or "have" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that the presence or addition of numbers, steps, operations, components, parts, or combinations thereof is not precluded.

도 1은 본 명세서와 관련된 전자 기기를 설명하기 위한 블록도이다.1 is a block diagram for explaining an electronic device related to the present specification.

도 1을 참조하면, 상기 전자 기기(100)는 무선 통신부(110), 입력부(120), 센싱부(140), 출력부(150), 인터페이스부(160), 메모리(170), 제어부(180) 및 전원 공급부(190) 등을 포함할 수 있다. 도 1에 도시된 구성요소들은 후술하는 본 명세서의 실시예에 따른 감성 분석 시스템을 구현하는데 있어서 필수적인 것은 아니어서, 본 명세서 상에서 설명되는 감성 분석 시스템은 위에서 열거된 구성요소들 보다 많거나, 또는 적은 구성요소들을 가질 수 있다. Referring to FIG. 1 , the electronic device 100 includes a wireless communication unit 110, an input unit 120, a sensing unit 140, an output unit 150, an interface unit 160, a memory 170, and a control unit 180. ) and a power supply unit 190. The components shown in FIG. 1 are not essential in implementing a sentiment analysis system according to an embodiment of the present specification to be described later, so the sentiment analysis system described in this specification has more or less than the components listed above. can have components.

보다 구체적으로, 상기 구성요소들 중 무선 통신부(110)는, 전자 기기(100)와 무선 통신 시스템 사이, 전자 기기(100)와 다른 전자 기기(100) 사이, 또는 전자 기기(100)와 외부서버 사이의 무선 통신을 가능하게 하는 하나 이상의 모듈을 포함할 수 있다. 또한, 상기 무선 통신부(110)는, 전자 기기(100)를 하나 이상의 네트워크에 연결하는 하나 이상의 모듈을 포함할 수 있다.More specifically, among the components, the wireless communication unit 110 is between the electronic device 100 and the wireless communication system, between the electronic device 100 and other electronic devices 100, or between the electronic device 100 and an external server. It may include one or more modules enabling wireless communication between Also, the wireless communication unit 110 may include one or more modules that connect the electronic device 100 to one or more networks.

이러한 무선 통신부(110)는, 방송 수신 모듈(111), 이동통신 모듈(112), 무선 인터넷 모듈(113), 근거리 통신 모듈(114), 위치정보 모듈(115) 중 적어도 하나를 포함할 수 있다.The wireless communication unit 110 may include at least one of a broadcast reception module 111, a mobile communication module 112, a wireless Internet module 113, a short-distance communication module 114, and a location information module 115. .

입력부(120)는, 영상 신호 입력을 위한 카메라(121) 또는 영상 입력부, 오디오 신호 입력을 위한 마이크로폰(microphone, 122), 또는 오디오 입력부, 사용자로부터 정보를 입력받기 위한 사용자 입력부(123, 예를 들어, 터치키(touch key), 푸시키(mechanical key) 등)를 포함할 수 있다. 입력부(120)에서 수집한 음성 데이터나 이미지 데이터는 분석되어 사용자의 제어명령으로 처리될 수 있다.The input unit 120 includes a camera 121 or video input unit for inputting a video signal, a microphone 122 for inputting an audio signal, or a user input unit 123 for receiving information from a user, for example , a touch key, a push key (mechanical key, etc.). Voice data or image data collected by the input unit 120 may be analyzed and processed as a user's control command.

센싱부(140)는 전자 기기 내 정보, 전자 기기를 둘러싼 주변 환경 정보 및 사용자 정보 중 적어도 하나를 센싱하기 위한 하나 이상의 센서를 포함할 수 있다. 예를 들어, 센싱부(140)는 근접센서(141, proximity sensor), 조도 센서(142, illumination sensor), 터치 센서(touch sensor), 가속도 센서(acceleration sensor), 자기 센서(magnetic sensor), 중력 센서(G-sensor), 자이로스코프 센서(gyroscope sensor), 모션 센서(motion sensor), RGB 센서, 적외선 센서(IR 센서: infrared sensor), 지문인식 센서(finger scan sensor), 초음파 센서(ultrasonic sensor), 광 센서(optical sensor, 예를 들어, 카메라(121 참조)), 마이크로폰(microphone, 122 참조), 배터리 게이지(battery gauge), 환경 센서(예를 들어, 기압계, 습도계, 온도계, 방사능 감지 센서, 열 감지 센서, 가스 감지 센서 등), 화학 센서(예를 들어, 전자 코, 헬스케어 센서, 생체 인식 센서 등) 중 적어도 하나를 포함할 수 있다. 한편, 본 명세서에 개시된 전자 기기는, 이러한 센서들 중 적어도 둘 이상의 센서에서 센싱되는 정보들을 조합하여 활용할 수 있다.The sensing unit 140 may include one or more sensors for sensing at least one of information within the electronic device, environmental information surrounding the electronic device, and user information. For example, the sensing unit 140 may include a proximity sensor 141, an illumination sensor 142, a touch sensor, an acceleration sensor, a magnetic sensor, and gravity. Sensor (G-sensor), gyroscope sensor (gyroscope sensor), motion sensor (motion sensor), RGB sensor, infrared sensor (IR sensor), finger scan sensor, ultrasonic sensor , an optical sensor (eg, a camera (see 121)), a microphone (see 122), a battery gauge, an environmental sensor (eg, a barometer, a hygrometer, a thermometer, a radiation detection sensor, It may include at least one of a heat detection sensor, a gas detection sensor, etc.), a chemical sensor (eg, an electronic nose, a healthcare sensor, a biometric sensor, etc.). Meanwhile, the electronic device disclosed in this specification may combine and utilize information sensed by at least two or more of these sensors.

출력부(150)는 시각, 청각 또는 촉각 등과 관련된 출력을 발생시키기 위한 것으로, 디스플레이부(151), 음향 출력부(152), 햅팁 모듈(153), 광 출력부(154) 중 적어도 하나를 포함할 수 있다. 디스플레이부(151)는 터치 센서와 상호 레이어 구조를 이루거나 일체형으로 형성됨으로써, 터치 스크린을 구현할 수 있다. 이러한 터치 스크린은, 전자 기기(100)와 사용자 사이의 입력 인터페이스를 제공하는 사용자 입력부(123)로써 기능함과 동시에, 전자 기기(100)와 사용자 사이의 출력 인터페이스를 제공할 수 있다.The output unit 150 is for generating an output related to sight, hearing, or touch, and includes at least one of a display unit 151, a sound output unit 152, a haptic module 153, and an optical output unit 154. can do. The display unit 151 may implement a touch screen by forming a mutual layer structure or integrally with the touch sensor. Such a touch screen may function as a user input unit 123 providing an input interface between the electronic device 100 and the user and provide an output interface between the electronic device 100 and the user.

인터페이스부(160)는 전자 기기(100)에 연결되는 다양한 종류의 외부 기기와의 통로 역할을 수행한다. 이러한 인터페이스부(160)는, 유/무선 헤드셋 포트(port), 외부 충전기 포트(port), 유/무선 데이터 포트(port), 메모리 카드(memory card) 포트, 식별 모듈이 구비된 장치를 연결하는 포트(port), 오디오 I/O(Input/Output) 포트(port), 비디오 I/O(Input/Output) 포트(port), 이어폰 포트(port) 중 적어도 하나를 포함할 수 있다. 전자 기기(100)에서는, 상기 인터페이스부(160)에 외부 기기가 연결되는 것에 대응하여, 연결된 외부 기기와 관련된 적절할 제어를 수행할 수 있다.The interface unit 160 serves as a passage for various types of external devices connected to the electronic device 100 . The interface unit 160 connects a device equipped with a wired/wireless headset port, an external charger port, a wired/wireless data port, a memory card port, and an identification module. It may include at least one of a port, an audio input/output (I/O) port, a video input/output (I/O) port, and an earphone port. In response to the external device being connected to the interface unit 160, the electronic device 100 may perform appropriate control related to the connected external device.

또한, 메모리(170)는 전자 기기(100)의 다양한 기능을 지원하는 데이터를 저장한다. 메모리(170)는 전자 기기(100)에서 구동되는 다수의 응용 프로그램(application program 또는 애플리케이션(application)), 전자 기기(100)의 동작을 위한 데이터들, 명령어들을 저장할 수 있다. 이러한 응용 프로그램 중 적어도 일부는, 무선 통신을 통해 외부 서버로부터 다운로드 될 수 있다. 또한 이러한 응용 프로그램 중 적어도 일부는, 전자 기기(100)의 기본적인 기능(예를 들어, 전화 착신, 발신 기능, 메시지 수신, 발신 기능)을 위하여 출고 당시부터 전자 기기(100)상에 존재할 수 있다. 한편, 응용 프로그램은, 메모리(170)에 저장되고, 전자 기기(100) 상에 설치되어, 제어부(180)에 의하여 상기 전자 기기의 동작(또는 기능)을 수행하도록 구동될 수 있다.Also, the memory 170 stores data supporting various functions of the electronic device 100 . The memory 170 may store a plurality of application programs (application programs or applications) running in the electronic device 100 , data for operating the electronic device 100 , and commands. At least some of these application programs may be downloaded from an external server through wireless communication. In addition, at least some of these application programs may exist on the electronic device 100 from the time of shipment for basic functions of the electronic device 100 (eg, incoming and outgoing calls, outgoing functions, message receiving, and outgoing functions). Meanwhile, the application program may be stored in the memory 170, installed on the electronic device 100, and driven by the control unit 180 to perform an operation (or function) of the electronic device.

제어부(180)는 상기 응용 프로그램과 관련된 동작 외에도, 통상적으로 전자 기기(100)의 전반적인 동작을 제어한다. 제어부(180)는 위에서 살펴본 구성요소들을 통해 입력 또는 출력되는 신호, 데이터, 정보 등을 처리하거나 메모리(170)에 저장된 응용 프로그램을 구동함으로써, 사용자에게 적절한 정보 또는 기능을 제공 또는 처리할 수 있다.The controller 180 controls general operations of the electronic device 100 in addition to operations related to the application program. The control unit 180 may provide or process appropriate information or functions to the user by processing signals, data, information, etc. input or output through the components described above or by running an application program stored in the memory 170.

또한, 제어부(180)는 메모리(170)에 저장된 응용 프로그램을 구동하기 위하여, 도 1과 함께 살펴본 구성요소들 중 적어도 일부를 제어할 수 있다. 나아가, 제어부(180)는 상기 응용 프로그램의 구동을 위하여, 전자 기기(100)에 포함된 구성요소들 중 적어도 둘 이상을 서로 조합하여 동작시킬 수 있다.In addition, the controller 180 may control at least some of the components discussed in conjunction with FIG. 1 in order to drive an application program stored in the memory 170 . Furthermore, the controller 180 may combine and operate at least two or more of the components included in the electronic device 100 to drive the application program.

전원공급부(190)는 제어부(180)의 제어 하에서, 외부의 전원, 내부의 전원을 인가 받아 전자 기기(100)에 포함된 각 구성요소들에 전원을 공급한다. 이러한 전원공급부(190)는 배터리를 포함하며, 상기 배터리는 내장형 배터리 또는 교체가능한 형태의 배터리가 될 수 있다.The power supply unit 190 receives external power and internal power under the control of the controller 180 and supplies power to each component included in the electronic device 100 . The power supply unit 190 includes a battery, and the battery may be a built-in battery or a replaceable battery.

상기 각 구성요소들 중 적어도 일부는, 이하에서 설명되는 다양한 실시 예들에 따른 전자 기기의 동작, 제어, 또는 제어방법을 구현하기 위하여 서로 협력하여 동작할 수 있다. 또한, 상기 전자 기기의 동작, 제어, 또는 제어방법은 상기 메모리(170)에 저장된 적어도 하나의 응용 프로그램의 구동에 의하여 전자 기기 상에서 구현될 수 있다. At least some of the components may operate in cooperation with each other in order to implement an operation, control, or control method of an electronic device according to various embodiments described below. Also, the operation, control, or control method of the electronic device may be implemented on the electronic device by driving at least one application program stored in the memory 170 .

이하에서는, 위에서 살펴본 전자 기기(100)를 통하여 구현되는 다양한 실시 예들을 살펴보기에 앞서, 위에서 열거된 구성요소들에 대하여 보다 구체적으로 살펴본다.Hereinafter, prior to examining various embodiments implemented through the electronic device 100 discussed above, the components listed above will be examined in more detail.

먼저, 무선 통신부(110)에 대하여 살펴보면, 무선 통신부(110)의 방송 수신 모듈(111)은 방송 채널을 통하여 외부의 방송 관리 서버로부터 방송 신호 및/또는 방송 관련된 정보를 수신한다. 상기 방송 채널은 위성 채널, 지상파 채널을 포함할 수 있다. 적어도 두 개의 방송 채널들에 대한 동시 방송 수신 또는 방송 채널 스위칭을 위해 둘 이상의 상기 방송 수신 모듈이 상기 전자 기기(100)에 제공될 수 있다.First, looking at the wireless communication unit 110, the broadcast reception module 111 of the wireless communication unit 110 receives a broadcast signal and/or broadcast-related information from an external broadcast management server through a broadcast channel. The broadcast channel may include a satellite channel and a terrestrial channel. Two or more broadcast receiving modules may be provided in the electronic device 100 to receive simultaneous broadcasting of at least two broadcast channels or to switch broadcast channels.

이동통신 모듈(112)은, 이동통신을 위한 기술표준들 또는 통신방식(예를 들어, GSM(Global System for Mobile communication), CDMA(Code Division Multi Access), CDMA2000(Code Division Multi Access 2000), EV-DO(Enhanced Voice-Data Optimized or Enhanced Voice-Data Only), WCDMA(Wideband CDMA), HSDPA(High Speed Downlink Packet Access), HSUPA(High Speed Uplink Packet Access), LTE(Long Term Evolution), LTE-A(Long Term Evolution-Advanced) 등)에 따라 구축된 이동 통신망 상에서 기지국, 외부의 단말, 서버 중 적어도 하나와 무선 신호를 송수신한다. The mobile communication module 112 complies with technical standards or communication methods for mobile communication (eg, Global System for Mobile communication (GSM), Code Division Multi Access (CDMA), Code Division Multi Access 2000 (CDMA2000), EV) -DO(Enhanced Voice-Data Optimized or Enhanced Voice-Data Only), WCDMA(Wideband CDMA), HSDPA(High Speed Downlink Packet Access), HSUPA(High Speed Uplink Packet Access), LTE(Long Term Evolution), LTE-A (Long Term Evolution-Advanced), etc.) to transmit and receive radio signals with at least one of a base station, an external terminal, and a server on a mobile communication network.

상기 무선 신호는, 음성 호 신호, 화상 통화 호 신호 또는 문자/멀티미디어 메시지 송수신에 따른 다양한 형태의 데이터를 포함할 수 있다. The wireless signal may include a voice call signal, a video call signal, or various types of data according to text/multimedia message transmission/reception.

무선 인터넷 모듈(113)은 무선 인터넷 접속을 위한 모듈을 말하는 것으로, 전자 기기(100)에 내장되거나 외장될 수 있다. 무선 인터넷 모듈(113)은 무선 인터넷 기술들에 따른 통신망에서 무선 신호를 송수신하도록 이루어진다.The wireless Internet module 113 refers to a module for wireless Internet access, and may be built into or external to the electronic device 100 . The wireless Internet module 113 is configured to transmit and receive radio signals in a communication network according to wireless Internet technologies.

무선 인터넷 기술로는, 예를 들어 WLAN(Wireless LAN), Wi-Fi(Wireless-Fidelity), Wi-Fi(Wireless Fidelity) Direct, DLNA(Digital Living Network Alliance), WiBro(Wireless Broadband), WiMAX(World Interoperability for Microwave Access), HSDPA(High Speed Downlink Packet Access), HSUPA(High Speed Uplink Packet Access), LTE(Long Term Evolution), LTE-A(Long Term Evolution-Advanced) 등이 있으며, 상기 무선 인터넷 모듈(113)은 상기에서 나열되지 않은 인터넷 기술까지 포함한 범위에서 적어도 하나의 무선 인터넷 기술에 따라 데이터를 송수신하게 된다.Wireless Internet technologies include, for example, WLAN (Wireless LAN), Wi-Fi (Wireless-Fidelity), Wi-Fi (Wireless Fidelity) Direct, DLNA (Digital Living Network Alliance), WiBro (Wireless Broadband), WiMAX (World Interoperability for Microwave Access), HSDPA (High Speed Downlink Packet Access), HSUPA (High Speed Uplink Packet Access), LTE (Long Term Evolution), LTE-A (Long Term Evolution-Advanced), etc., and the wireless Internet module ( 113) transmits and receives data according to at least one wireless Internet technology within a range including Internet technologies not listed above.

WiBro, HSDPA, HSUPA, GSM, CDMA, WCDMA, LTE, LTE-A 등에 의한 무선인터넷 접속은 이동통신망을 통해 이루어진다는 관점에서 본다면, 상기 이동통신망을 통해 무선인터넷 접속을 수행하는 상기 무선 인터넷 모듈(113)은 상기 이동통신 모듈(112)의 일종으로 이해될 수도 있다.From the viewpoint that wireless Internet access by WiBro, HSDPA, HSUPA, GSM, CDMA, WCDMA, LTE, LTE-A, etc. is made through a mobile communication network, the wireless Internet module (113) performing wireless Internet access through the mobile communication network ) may be understood as a kind of the mobile communication module 112.

근거리 통신 모듈(114)은 근거리 통신(Short range communication)을 위한 것으로서, 블루투스(Bluetooth??), RFID(Radio Frequency Identification), 적외선 통신(Infrared Data Association; IrDA), UWB(Ultra Wideband), ZigBee, NFC(Near Field Communication), Wi-Fi(Wireless-Fidelity), Wi-Fi Direct, Wireless USB(Wireless Universal Serial Bus), MST(Magnetic Secure Transmission) 기술 중 적어도 하나를 이용하여, 근거리 통신을 지원할 수 있다. 이러한, 근거리 통신 모듈(114)은, 근거리 무선 통신망(Wireless Area Networks)을 통해 전자 기기(100)와 무선 통신 시스템 사이, 전자 기기(100)와 다른 전자 기기(100) 사이, 또는 전자 기기(100)와 다른 전자 기기(100, 또는 외부서버)가 위치한 네트워크 사이의 무선 통신을 지원할 수 있다. 상기 근거리 무선 통신망은 근거리 무선 개인 통신망(Wireless Personal Area Networks)일 수 있다.The short range communication module 114 is for short range communication, and includes Bluetooth??, Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wideband (UWB), ZigBee, Near field communication (NFC), wireless-fidelity (Wi-Fi), Wi-Fi Direct, wireless universal serial bus (USB), and magnetic secure transmission (MST) technologies may be used to support short-range communication. . The short-range communication module 114 may be used between the electronic device 100 and a wireless communication system, between the electronic device 100 and other electronic devices 100, or between the electronic device 100 through wireless area networks. ) and a network where another electronic device 100 (or an external server) is located. The local area wireless communication network may be a local area wireless personal area network (Wireless Personal Area Networks).

여기에서, 다른 전자 기기(100)는 본 명세서에 따른 전자 기기(100)와 데이터를 상호 교환하는 것이 가능한(또는 연동 가능한) 웨어러블 디바이스(wearable device, 예를 들어, 스마트워치(smartwatch), 스마트 글래스(smart glass), HMD(head mounted display))가 될 수 있다. 근거리 통신 모듈(114)은, 전자 기기(100) 주변에, 상기 전자 기기(100)와 통신 가능한 웨어러블 디바이스를 감지(또는 인식)할 수 있다. 나아가, 제어부(180)는 상기 감지된 웨어러블 디바이스가 본 명세서에 따른 전자 기기(100)와 통신하도록 인증된 디바이스인 경우, 전자 기기(100)에서 처리되는 데이터의 적어도 일부를, 상기 근거리 통신 모듈(114)을 통해 웨어러블 디바이스로 전송할 수 있다. 따라서, 웨어러블 디바이스의 사용자는, 전자 기기(100)에서 처리되는 데이터를, 웨어러블 디바이스를 통해 이용할 수 있다. 예를 들어, 이에 따르면 사용자는, 전자 기기(100)에 전화가 수신된 경우, 웨어러블 디바이스를 통해 전화 통화를 수행하거나, 전자 기기(100)에 메시지가 수신된 경우, 웨어러블 디바이스를 통해 상기 수신된 메시지를 확인하는 것이 가능하다.Here, the other electronic device 100 is a wearable device capable of exchanging (or interlocking) data with the electronic device 100 according to the present specification (for example, a smart watch), smart glasses (smart glass) or HMD (head mounted display). The short-range communication module 114 may detect (or recognize) a wearable device capable of communicating with the electronic device 100 around the electronic device 100 . Furthermore, if the detected wearable device is a device authorized to communicate with the electronic device 100 according to the present specification, the control unit 180 transmits at least a portion of data processed by the electronic device 100 to the short-range communication module ( 114) can be transmitted to the wearable device. Accordingly, the user of the wearable device may use data processed by the electronic device 100 through the wearable device. For example, according to this, when a call is received in the electronic device 100, the user makes a phone call through the wearable device, or when a message is received in the electronic device 100, the user receives the received message through the wearable device. It is possible to check the message.

위치정보 모듈(115)은 전자 기기의 위치(또는 현재 위치)를 획득하기 위한 모듈로서, 그의 대표적인 예로는 GPS(Global Positioning System) 모듈 또는 WiFi(Wireless Fidelity) 모듈이 있다. 예를 들어, 전자 기기는 GPS모듈을 활용하면, GPS 위성에서 보내는 신호를 이용하여 전자 기기의 위치를 획득할 수 있다. 다른 예로서, 전자 기기는 Wi-Fi모듈을 활용하면, Wi-Fi모듈과 무선신호를 송신 또는 수신하는 무선 AP(Wireless Access Point)의 정보에 기반하여, 전자 기기의 위치를 획득할 수 있다. 필요에 따라서, 위치정보모듈(115)은 치환 또는 부가적으로 전자 기기의 위치에 관한 데이터를 얻기 위해 무선 통신부(110)의 다른 모듈 중 어느 기능을 수행할 수 있다. 위치정보모듈(115)은 전자 기기의 위치(또는 현재 위치)를 획득하기 위해 이용되는 모듈로, 전자 기기의 위치를 직접적으로 계산하거나 획득하는 모듈로 한정되지는 않는다.The location information module 115 is a module for obtaining the location (or current location) of the electronic device, and representative examples thereof include a Global Positioning System (GPS) module or a Wireless Fidelity (WiFi) module. For example, when an electronic device utilizes a GPS module, the location of the electronic device may be obtained using a signal transmitted from a GPS satellite. As another example, when an electronic device utilizes a Wi-Fi module, the location of the electronic device may be obtained based on information about the Wi-Fi module and a wireless access point (AP) that transmits or receives a wireless signal. If necessary, the location information module 115 may perform any function among other modules of the wireless communication unit 110 in order to obtain data on the location of the electronic device in substitution or addition. The location information module 115 is a module used to obtain the location (or current location) of the electronic device, and is not limited to a module that directly calculates or acquires the location of the electronic device.

다음으로, 입력부(120)는 영상 정보(또는 신호), 오디오 정보(또는 신호), 데이터, 또는 사용자로부터 입력되는 정보의 입력을 위한 것으로서, 영상 정보의 입력을 위하여, 전자 기기(100) 는 하나 또는 복수의 카메라(121)를 구비할 수 있다. 카메라(121)는 화상 통화모드 또는 촬영 모드에서 이미지 센서에 의해 얻어지는 정지영상 또는 동영상 등의 화상 프레임을 처리한다. 처리된 화상 프레임은 디스플레이부(151)에 표시되거나 메모리(170)에 저장될 수 있다. 한편, 전자 기기(100)에 구비되는 복수의 카메라(121)는 매트릭스 구조를 이루도록 배치될 수 있으며, 이와 같이 매트릭스 구조를 이루는 카메라(121)를 통하여, 전자 기기(100)에는 다양한 각도 또는 초점을 갖는 복수의 영상정보가 입력될 수 있다. 또한, 복수의 카메라(121)는 입체영상을 구현하기 위한 좌 영상 및 우 영상을 획득하도록, 스트레오 구조로 배치될 수 있다.Next, the input unit 120 is for inputting image information (or signals), audio information (or signals), data, or information input from a user. For inputting image information, the electronic device 100 has one Alternatively, a plurality of cameras 121 may be provided. The camera 121 processes an image frame such as a still image or a moving image obtained by an image sensor in a video call mode or a photographing mode. The processed image frame may be displayed on the display unit 151 or stored in the memory 170 . Meanwhile, the plurality of cameras 121 provided in the electronic device 100 may be arranged to form a matrix structure, and through the cameras 121 forming the matrix structure, various angles or focal points may be provided to the electronic device 100. A plurality of image information having may be input. In addition, the plurality of cameras 121 may be arranged in a stereo structure to obtain left and right images for realizing a stereoscopic image.

마이크로폰(122)은 외부의 음향 신호를 전기적인 음성 데이터로 처리한다. 처리된 음성 데이터는 전자 기기(100)에서 수행 중인 기능(또는 실행 중인 응용 프로그램)에 따라 다양하게 활용될 수 있다. 한편, 마이크로폰(122)에는 외부의 음향 신호를 입력 받는 과정에서 발생되는 잡음(noise)을 제거하기 위한 다양한 잡음 제거 알고리즘이 구현될 수 있다.The microphone 122 processes external sound signals into electrical voice data. The processed voice data may be utilized in various ways according to the function (or application program being executed) being performed in the electronic device 100 . Meanwhile, various noise cancellation algorithms for removing noise generated in the process of receiving an external sound signal may be implemented in the microphone 122 .

사용자 입력부(123)는 사용자로부터 정보를 입력받기 위한 것으로서, 사용자 입력부(123)를 통해 정보가 입력되면, 제어부(180)는 입력된 정보에 대응되도록 전자 기기(100)의 동작을 제어할 수 있다. 이러한, 사용자 입력부(123)는 기계식 (mechanical) 입력수단(또는, 메커니컬 키, 예를 들어, 전자 기기(100)의 전면, 후면 또는 측면에 위치하는 버튼, 돔 스위치 (dome switch), 조그 휠, 조그 스위치 등) 및 터치식 입력수단을 포함할 수 있다. 일 예로서, 터치식 입력수단은, 소프트웨어적인 처리를 통해 터치스크린에 표시되는 가상 키(virtual key), 소프트 키(soft key) 또는 비주얼 키(visual key)로 이루어지거나, 상기 터치스크린 이외의 부분에 배치되는 터치 키(touch key)로 이루어질 수 있다. 한편, 상기 가상키 또는 비주얼 키는, 다양한 형태를 가지면서 터치스크린 상에 표시되는 것이 가능하며, 예를 들어, 그래픽(graphic), 텍스트(text), 아이콘(icon), 비디오(video) 또는 이들의 조합으로 이루어질 수 있다. The user input unit 123 is for receiving information from a user, and when information is input through the user input unit 123, the control unit 180 can control the operation of the electronic device 100 to correspond to the input information. . The user input unit 123 is a mechanical input means (or a mechanical key, for example, a button located on the front, rear or side of the electronic device 100, a dome switch, a jog wheel, jog switch, etc.) and a touch input means. As an example, the touch input means consists of a virtual key, soft key, or visual key displayed on a touch screen through software processing, or a part other than the touch screen. It can be made of a touch key (touch key) disposed on. On the other hand, the virtual key or visual key can be displayed on the touch screen while having various forms, for example, graphic (graphic), text (text), icon (icon), video (video) or these can be made of a combination of

한편, 센싱부(140)는 전자 기기 내 정보, 전자 기기를 둘러싼 주변 환경 정보 및 사용자 정보 중 적어도 하나를 센싱하고, 이에 대응하는 센싱 신호를 발생시킨다. 제어부(180)는 이러한 센싱 신호에 기초하여, 전자 기기(100)의 구동 또는 동작을 제어하거나, 전자 기기(100)에 설치된 응용 프로그램과 관련된 데이터 처리, 기능 또는 동작을 수행 할 수 있다. 센싱부(140)에 포함될 수 있는 다양한 센서 중 대표적인 센서들의 대하여, 보다 구체적으로 살펴본다.Meanwhile, the sensing unit 140 senses at least one of information in the electronic device, surrounding environment information surrounding the electronic device, and user information, and generates a sensing signal corresponding thereto. Based on these sensing signals, the controller 180 may control driving or operation of the electronic device 100 or perform data processing, functions, or operations related to an application program installed in the electronic device 100 . Representative sensors among various sensors that may be included in the sensing unit 140 will be described in more detail.

먼저, 근접 센서(141)는 소정의 검출면에 접근하는 물체, 혹은 근방에 존재하는 물체의 유무를 전자계의 힘 또는 적외선 등을 이용하여 기계적 접촉이 없이 검출하는 센서를 말한다. 이러한 근접 센서(141)는 위에서 살펴본 터치 스크린에 의해 감싸지는 전자 기기의 내부 영역 또는 상기 터치 스크린의 근처에 근접 센서(141)가 배치될 수 있다. First, the proximity sensor 141 refers to a sensor that detects the presence or absence of an object approaching a predetermined detection surface or an object existing nearby without mechanical contact by using the force of an electromagnetic field or infrared rays. The proximity sensor 141 may be disposed in an inner area of the electronic device covered by the touch screen as described above or in the vicinity of the touch screen.

근접 센서(141)의 예로는 투과형 광전 센서, 직접 반사형 광전 센서, 미러 반사형 광전 센서, 고주파 발진형 근접 센서, 정전 용량형 근접 센서, 자기형 근접 센서, 적외선 근접 센서 등이 있다. 터치 스크린이 정전식인 경우에, 근접 센서(141)는 전도성을 갖는 물체의 근접에 따른 전계의 변화로 상기 물체의 근접을 검출하도록 구성될 수 있다. 이 경우 터치 스크린(또는 터치 센서) 자체가 근접 센서로 분류될 수 있다. Examples of the proximity sensor 141 include a transmission type photoelectric sensor, a direct reflection type photoelectric sensor, a mirror reflection type photoelectric sensor, a high frequency oscillation type proximity sensor, a capacitance type proximity sensor, a magnetic type proximity sensor, an infrared proximity sensor, and the like. If the touch screen is a capacitive type, the proximity sensor 141 may be configured to detect the proximity of a conductive object as a change in electric field according to the proximity of the object. In this case, the touch screen (or touch sensor) itself may be classified as a proximity sensor.

한편, 설명의 편의를 위해, 터치 스크린 상에 물체가 접촉되지 않으면서 근접되어 상기 물체가 상기 터치 스크린 상에 위치함이 인식되도록 하는 행위를 "근접 터치(proximity touch)"라고 명명하고, 상기 터치 스크린 상에 물체가 실제로 접촉되는 행위를 "접촉 터치(contact touch)"라고 명명한다. 상기 터치 스크린 상에서 물체가 근접 터치 되는 위치라 함은, 상기 물체가 근접 터치될 때 상기 물체가 상기 터치 스크린에 대해 수직으로 대응되는 위치를 의미한다. 상기 근접 센서(141)는, 근접 터치와, 근접 터치 패턴(예를 들어, 근접 터치 거리, 근접 터치 방향, 근접 터치 속도, 근접 터치 시간, 근접 터치 위치, 근접 터치 이동 상태 등)을 감지할 수 있다. 한편, 제어부(180)는 위와 같이, 근접 센서(141)를 통해 감지된 근접 터치 동작 및 근접 터치 패턴에 상응하는 데이터(또는 정보)를 처리하며, 나아가, 처리된 데이터에 대응하는 시각적인 정보를 터치 스크린상에 출력시킬 수 있다. 나아가, 제어부(180)는, 터치 스크린 상의 동일한 지점에 대한 터치가, 근접 터치인지 또는 접촉 터치인지에 따라, 서로 다른 동작 또는 데이터(또는 정보)가 처리되도록 전자 기기(100)를 제어할 수 있다.On the other hand, for convenience of description, an action of approaching a touch screen without contacting an object to recognize that the object is located on the touch screen is referred to as a "proximity touch", and the touch An act of actually touching an object on a screen is called a "contact touch". The location at which an object is proximity-touched on the touch screen means a location at which the object corresponds vertically to the touch screen when the object is proximity-touched. The proximity sensor 141 may detect a proximity touch and a proximity touch pattern (eg, proximity touch distance, proximity touch direction, proximity touch speed, proximity touch time, proximity touch position, proximity touch movement state, etc.) there is. Meanwhile, as described above, the controller 180 processes data (or information) corresponding to the proximity touch operation and proximity touch pattern detected through the proximity sensor 141, and furthermore, visual information corresponding to the processed data. It can be output on the touch screen. Furthermore, the controller 180 may control the electronic device 100 to process different operations or data (or information) depending on whether a touch to the same point on the touch screen is a proximity touch or a contact touch. .

터치 센서는 저항막 방식, 정전용량 방식, 적외선 방식, 초음파 방식, 자기장 방식 등 여러 가지 터치방식 중 적어도 하나를 이용하여 터치 스크린(또는 디스플레이부(151))에 가해지는 터치(또는 터치입력)을 감지한다.The touch sensor detects a touch (or touch input) applied to the touch screen (or the display unit 151) using at least one of various touch methods such as a resistive film method, a capacitive method, an infrared method, an ultrasonic method, and a magnetic field method. detect

일 예로서, 터치 센서는, 터치 스크린의 특정 부위에 가해진 압력 또는 특정 부위에 발생하는 정전 용량 등의 변화를 전기적인 입력신호로 변환하도록 구성될 수 있다. 터치 센서는, 터치 스크린 상에 터치를 가하는 터치 대상체가 터치 센서 상에 터치 되는 위치, 면적, 터치 시의 압력, 터치 시의 정전 용량 등을 검출할 수 있도록 구성될 수 있다. 여기에서, 터치 대상체는 상기 터치 센서에 터치를 인가하는 물체로서, 예를 들어, 손가락, 터치펜 또는 스타일러스 펜(Stylus pen), 포인터 등이 될 수 있다. As an example, the touch sensor may be configured to convert a change in pressure applied to a specific part of the touch screen or capacitance generated in a specific part into an electrical input signal. The touch sensor may be configured to detect a location, area, pressure upon touch, capacitance upon touch, and the like, at which a touch object that applies a touch to the touch screen is touched on the touch sensor. Here, the touch object is an object that applies a touch to the touch sensor, and may be, for example, a finger, a touch pen, a stylus pen, or a pointer.

이와 같이, 터치 센서에 대한 터치 입력이 있는 경우, 그에 대응하는 신호(들)는 터치 제어기로 보내진다. 터치 제어기는 그 신호(들)를 처리한 다음 대응하는 데이터를 제어부(180)로 전송한다. 이로써, 제어부(180)는 디스플레이부(151)의 어느 영역이 터치 되었는지 여부 등을 알 수 있게 된다. 여기에서, 터치 제어기는, 제어부(180)와 별도의 구성요소일 수 있고, 제어부(180) 자체일 수 있다. As such, when there is a touch input to the touch sensor, the corresponding signal(s) is sent to the touch controller. The touch controller processes the signal(s) and then transmits corresponding data to the controller 180. Thus, the controller 180 can know which area of the display unit 151 has been touched. Here, the touch controller may be a component separate from the controller 180 or may be the controller 180 itself.

한편, 제어부(180)는, 터치 스크린(또는 터치 스크린 이외에 구비된 터치키)을 터치하는, 터치 대상체의 종류에 따라 서로 다른 제어를 수행하거나, 동일한 제어를 수행할 수 있다. 터치 대상체의 종류에 따라 서로 다른 제어를 수행할지 또는 동일한 제어를 수행할 지는, 현재 전자 기기(100)의 동작상태 또는 실행 중인 응용 프로그램에 따라 결정될 수 있다. Meanwhile, the controller 180 may perform different controls or the same control according to the type of the touch object that touches the touch screen (or a touch key provided other than the touch screen). Whether to perform different controls or the same control according to the type of the touch object may be determined according to an operating state of the electronic device 100 or an application program being executed.

한편, 위에서 살펴본 터치 센서 및 근접 센서는 독립적으로 또는 조합되어, 터치 스크린에 대한 숏(또는 탭) 터치(short touch), 롱 터치(long touch), 멀티 터치(multi touch), 드래그 터치(drag touch), 플리크 터치(flick touch), 핀치-인 터치(pinch-in touch), 핀치-아웃 터치(pinch-out 터치), 스와이프(swype) 터치, 호버링(hovering) 터치 등과 같은, 다양한 방식의 터치를 센싱할 수 있다.On the other hand, the touch sensor and proximity sensor described above are independently or combined, short (or tap) touch, long touch, multi-touch, drag touch on the touch screen ), flick touch, pinch-in touch, pinch-out touch, swipe touch, hovering touch, etc. Touch can be sensed.

초음파 센서는 초음파를 이용하여, 감지대상의 위치정보를 인식할 수 있다. 한편 제어부(180)는 광 센서와 복수의 초음파 센서로부터 감지되는 정보를 통해, 파동 발생원의 위치를 산출하는 것이 가능하다. 파동 발생원의 위치는, 광이 초음파보다 매우 빠른 성질, 즉, 광이 광 센서에 도달하는 시간이 초음파가 초음파 센서에 도달하는 시간보다 매우 빠름을 이용하여, 산출될 수 있다. 보다 구체적으로 광을 기준 신호로 초음파가 도달하는 시간과의 시간차를 이용하여 파동 발생원의 위치가 산출될 수 있다.The ultrasonic sensor may recognize location information of a sensing object by using ultrasonic waves. Meanwhile, the controller 180 may calculate the location of the wave generating source through information detected by the optical sensor and the plurality of ultrasonic sensors. The position of the wave generating source can be calculated using the property that light is much faster than ultrasonic waves, that is, the time for light to reach the optical sensor is much faster than the time for ultrasonic waves to reach the ultrasonic sensor. More specifically, the location of the wave generating source may be calculated by using light as a reference signal and a time difference between the arrival time of ultrasonic waves.

한편, 입력부(120)의 구성으로 살펴본, 카메라(121)는 카메라 센서(예를 들어, CCD, CMOS 등), 포토 센서(또는 이미지 센서) 및 레이저 센서 중 적어도 하나를 포함한다.Meanwhile, looking at the configuration of the input unit 120, the camera 121 includes at least one of a camera sensor (eg, CCD, CMOS, etc.), a photo sensor (or image sensor), and a laser sensor.

카메라(121)와 레이저 센서는 서로 조합되어, 3차원 입체영상에 대한 감지대상의 터치를 감지할 수 있다. 포토 센서는 디스플레이 소자에 적층될 수 있는데, 이러한 포토 센서는 터치 스크린에 근접한 감지대상의 움직임을 스캐닝하도록 이루어진다. 보다 구체적으로, 포토 센서는 행/열에 Photo Diode와 TR(Transistor)를 실장하여 Photo Diode에 인가되는 빛의 양에 따라 변화되는 전기적 신호를 이용하여 포토 센서 위에 올려지는 내용물을 스캔한다. 즉, 포토 센서는 빛의 변화량에 따른 감지대상의 좌표 계산을 수행하며, 이를 통하여 감지대상의 위치정보가 획득될 수 있다.The camera 121 and the laser sensor may be combined with each other to detect a touch of a sensing target for a 3D stereoscopic image. A photo sensor may be stacked on a display device, and the photo sensor is configured to scan a motion of a sensing target close to the touch screen. More specifically, the photo sensor scans the content placed on the photo sensor by mounting photo diodes and transistors (TRs) in rows/columns and using electrical signals that change according to the amount of light applied to the photo diodes. That is, the photo sensor calculates the coordinates of the sensing object according to the change in light, and through this, the location information of the sensing object can be obtained.

디스플레이부(151)는 전자 기기(100)에서 처리되는 정보를 표시(출력)한다. 예를 들어, 디스플레이부(151)는 전자 기기(100)에서 구동되는 응용 프로그램의 실행화면 정보, 또는 이러한 실행화면 정보에 따른 UI(User Interface), GUI(Graphic User Interface) 정보를 표시할 수 있다. The display unit 151 displays (outputs) information processed by the electronic device 100 . For example, the display unit 151 may display execution screen information of an application program driven in the electronic device 100 or UI (User Interface) and GUI (Graphic User Interface) information according to such execution screen information. .

또한, 상기 디스플레이부(151)는 입체영상을 표시하는 입체 디스플레이부로서 구성될 수 있다.Also, the display unit 151 may be configured as a 3D display unit that displays a 3D image.

상기 입체 디스플레이부에는 스테레오스코픽 방식(안경 방식), 오토 스테레오스코픽 방식(무안경 방식), 프로젝션 방식(홀로그래픽 방식) 등의 3차원 디스플레이 방식이 적용될 수 있다. A 3D display method such as a stereoscopic method (glasses method), an auto stereoscopic method (non-glasses method), or a projection method (holographic method) may be applied to the 3D display unit.

음향 출력부(152)는 호신호 수신, 통화모드 또는 녹음 모드, 음성인식 모드, 방송수신 모드 등에서 무선 통신부(110)로부터 수신되거나 메모리(170)에 저장된 오디오 데이터를 출력할 수 있다. 음향 출력부(152)는 전자 기기(100)에서 수행되는 기능(예를 들어, 호신호 수신음, 메시지 수신음 등)과 관련된 음향 신호를 출력하기도 한다. 이러한 음향 출력부(152)에는 리시버(receiver), 스피커(speaker), 버저(buzzer) 등이 포함될 수 있다.The audio output unit 152 may output audio data received from the wireless communication unit 110 or stored in the memory 170 in a call signal reception, a call mode or a recording mode, a voice recognition mode, a broadcast reception mode, and the like. The sound output unit 152 also outputs sound signals related to functions performed by the electronic device 100 (eg, call signal reception sound, message reception sound, etc.). The sound output unit 152 may include a receiver, a speaker, a buzzer, and the like.

햅틱 모듈(haptic module)(153)은 사용자가 느낄 수 있는 다양한 촉각 효과를 발생시킨다. 햅틱 모듈(153)이 발생시키는 촉각 효과의 대표적인 예로는 진동이 될 수 있다. 햅틱 모듈(153)에서 발생하는 진동의 세기와 패턴 등은 사용자의 선택 또는 제어부의 설정에 의해 제어될 수 있다. 예를 들어, 상기 햅틱 모듈(153)은 서로 다른 진동을 합성하여 출력하거나 순차적으로 출력할 수도 있다.The haptic module 153 generates various tactile effects that a user can feel. A representative example of the tactile effect generated by the haptic module 153 may be vibration. The strength and pattern of the vibration generated by the haptic module 153 may be controlled by a user's selection or a setting of a controller. For example, the haptic module 153 may synthesize and output different vibrations or sequentially output them.

햅틱 모듈(153)은, 진동 외에도, 접촉 피부면에 대해 수직 운동하는 핀 배열, 분사구나 흡입구를 통한 공기의 분사력이나 흡입력, 피부 표면에 대한 스침, 전극(electrode)의 접촉, 정전기력 등의 자극에 의한 효과와, 흡열이나 발열 가능한 소자를 이용한 냉온감 재현에 의한 효과 등 다양한 촉각 효과를 발생시킬 수 있다.In addition to vibration, the haptic module 153 responds to stimuli such as an array of pins that move vertically with respect to the contact skin surface, air blowing force or suction force through a nozzle or suction port, rubbing against the skin surface, electrode contact, and electrostatic force. It is possible to generate various tactile effects, such as the effect of heat absorption and the effect of reproducing the feeling of coolness and warmth using an element capable of absorbing heat or generating heat.

햅틱 모듈(153)은 직접적인 접촉을 통해 촉각 효과를 전달할 수 있을 뿐만 아니라, 사용자가 손가락이나 팔 등의 근 감각을 통해 촉각 효과를 느낄 수 있도록 구현할 수도 있다. 햅틱 모듈(153)은 전자 기기(100)의 구성 태양에 따라 2개 이상이 구비될 수 있다.The haptic module 153 not only transmits a tactile effect through direct contact, but also can be implemented so that a user can feel a tactile effect through a muscle sense such as a finger or an arm. Two or more haptic modules 153 may be provided according to the configuration of the electronic device 100 .

광출력부(154)는 전자 기기(100)의 광원의 빛을 이용하여 이벤트 발생을 알리기 위한 신호를 출력한다. 전자 기기(100)에서 발생 되는 이벤트의 예로는 메시지 수신, 호 신호 수신, 부재중 전화, 알람, 일정 알림, 이메일 수신, 애플리케이션을 통한 정보 수신 등이 될 수 있다.The light output unit 154 outputs a signal for notifying occurrence of an event using light from a light source of the electronic device 100 . Examples of events occurring in the electronic device 100 may include message reception, call signal reception, missed calls, alarms, schedule notifications, e-mail reception, and information reception through applications.

광출력부(154)가 출력하는 신호는 전자 기기가 전면이나 후면으로 단색이나 복수색의 빛을 발광함에 따라 구현된다. 상기 신호 출력은 전자 기기가 사용자의 이벤트 확인을 감지함에 의하여 종료될 수 있다.A signal output from the light output unit 154 is implemented as the electronic device emits light of a single color or multiple colors to the front or back side. The signal output may be terminated when the electronic device detects the user's confirmation of the event.

인터페이스부(160)는 전자 기기(100)에 연결되는 모든 외부 기기와의 통로 역할을 한다. 인터페이스부(160)는 외부 기기로부터 데이터를 전송받거나, 전원을 공급받아 전자 기기(100) 내부의 각 구성요소에 전달하거나, 전자 기기(100) 내부의 데이터가 외부 기기로 전송되도록 한다. 예를 들어, 유/무선 헤드셋 포트(port), 외부 충전기 포트(port), 유/무선 데이터 포트(port), 메모리 카드(memory card) 포트(port), 식별 모듈이 구비된 장치를 연결하는 포트(port), 오디오 I/O(Input/Output) 포트(port), 비디오 I/O(Input/Output) 포트(port), 이어폰 포트(port) 등이 인터페이스부(160)에 포함될 수 있다.The interface unit 160 serves as a passage for all external devices connected to the electronic device 100 . The interface unit 160 receives data from an external device or receives power and transmits it to each component inside the electronic device 100, or transmits data inside the electronic device 100 to an external device. For example, a wired/wireless headset port, an external charger port, a wired/wireless data port, a memory card port, and a port for connecting a device having an identification module. The interface unit 160 may include an audio I/O (Input/Output) port, a video I/O (Input/Output) port, an earphone port, and the like.

한편, 식별 모듈은 전자 기기(100)의 사용 권한을 인증하기 위한 각종 정보를 저장한 칩으로서, 사용자 인증 모듈(user identify module; UIM), 가입자 인증 모듈(subscriber identity module; SIM), 범용 사용자 인증 모듈(universal subscriber identity module; USIM) 등을 포함할 수 있다. 식별 모듈이 구비된 장치(이하 '식별 장치')는, 스마트 카드(smart card) 형식으로 제작될 수 있다. 따라서 식별 장치는 상기 인터페이스부(160)를 통하여 단말기(100)와 연결될 수 있다.On the other hand, the identification module is a chip that stores various types of information for authenticating the right to use the electronic device 100, and includes a user identification module (UIM), a subscriber identity module (SIM), and universal user authentication. module (universal subscriber identity module; USIM) and the like. A device equipped with an identification module (hereinafter referred to as 'identification device') may be manufactured in the form of a smart card. Accordingly, the identification device may be connected to the terminal 100 through the interface unit 160 .

또한, 상기 인터페이스부(160)는 전자 기기(100)가 외부 크래들(cradle)과 연결될 때 상기 크래들로부터의 전원이 상기 전자 기기(100)에 공급되는 통로가 되거나, 사용자에 의해 상기 크래들에서 입력되는 각종 명령 신호가 상기 전자 기기(100)로 전달되는 통로가 될 수 있다. 상기 크래들로부터 입력되는 각종 명령 신호 또는 상기 전원은 상기 전자 기기(100)가 상기 크래들에 정확히 장착되었음을 인지하기 위한 신호로 동작될 수 있다.In addition, the interface unit 160 becomes a passage through which power from the cradle is supplied to the electronic device 100 when the electronic device 100 is connected to an external cradle, or a user inputs power from the cradle. It may be a passage through which various command signals are transmitted to the electronic device 100 . Various command signals or the power input from the cradle may operate as a signal for recognizing that the electronic device 100 is correctly mounted on the cradle.

메모리(170)는 제어부(180)의 동작을 위한 프로그램을 저장할 수 있고, 입/출력되는 데이터들(예를 들어, 폰북, 메시지, 정지영상, 동영상 등)을 임시 저장할 수도 있다. 상기 메모리(170)는 상기 터치 스크린 상의 터치 입력시 출력되는 다양한 패턴의 진동 및 음향에 관한 데이터를 저장할 수 있다.The memory 170 may store programs for operation of the controller 180 and may temporarily store input/output data (eg, phonebook, message, still image, video, etc.). The memory 170 may store data related to vibration and sound of various patterns output when a touch is input on the touch screen.

메모리(170)는 플래시 메모리 타입(flash memory type), 하드디스크 타입(hard disk type), SSD 타입(Solid State Disk type), SDD 타입(Silicon Disk Drive type), 멀티미디어 카드 마이크로 타입(multimedia card micro type), 카드 타입의 메모리(예를 들어 SD 또는 XD 메모리 등), 램(random access memory; RAM), SRAM(static random access memory), 롬(read-only memory; ROM), EEPROM(electrically erasable programmable read-only memory), PROM(programmable read-only memory), 자기 메모리, 자기 디스크 및 광디스크 중 적어도 하나의 타입의 저장매체를 포함할 수 있다. 전자 기기(100)는 인터넷(internet)상에서 상기 메모리(170)의 저장 기능을 수행하는 웹 스토리지(web storage)와 관련되어 동작될 수도 있다.The memory 170 may be a flash memory type, a hard disk type, a solid state disk type, a silicon disk drive type, or a multimedia card micro type. ), card-type memory (eg SD or XD memory, etc.), RAM (random access memory; RAM), SRAM (static random access memory), ROM (read-only memory; ROM), EEPROM (electrically erasable programmable read -only memory), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, and an optical disk. The electronic device 100 may operate in relation to a web storage that performs a storage function of the memory 170 on the Internet.

한편, 앞서 살펴본 것과 같이, 제어부(180)는 응용 프로그램과 관련된 동작과, 통상적으로 전자 기기(100)의 전반적인 동작을 제어한다. 예를 들어, 제어부(180)는 상기 전자 기기의 상태가 설정된 조건을 만족하면, 애플리케이션들에 대한 사용자의 제어 명령의 입력을 제한하는 잠금 상태를 실행하거나, 해제할 수 있다.Meanwhile, as described above, the controller 180 controls operations related to application programs and general operations of the electronic device 100 in general. For example, if the state of the electronic device satisfies a set condition, the controller 180 may execute or release a locked state that restricts a user's control command input to applications.

또한, 제어부(180)는 음성 통화, 데이터 통신, 화상 통화 등과 관련된 제어 및 처리를 수행하거나, 터치 스크린 상에서 행해지는 필기 입력 또는 그림 그리기 입력을 각각 문자 및 이미지로 인식할 수 있는 패턴 인식 처리를 행할 수 있다. 나아가 제어부(180)는 이하에서 설명되는 다양한 실시 예들을 본 명세서에 따른 전자 기기(100) 상에서 구현하기 위하여, 위에서 살펴본 구성요소들을 중 어느 하나 또는 복수를 조합하여 제어할 수 있다.In addition, the controller 180 may perform control and processing related to voice calls, data communications, video calls, etc., or perform pattern recognition processing capable of recognizing handwriting input or drawing input performed on the touch screen as characters and images, respectively. can Furthermore, the control unit 180 may control any one or a combination of the components described above in order to implement various embodiments described below on the electronic device 100 according to the present specification.

전원 공급부(190)는 제어부(180)의 제어에 의해 외부의 전원, 내부의 전원을 인가 받아 각 구성요소들의 동작에 필요한 전원을 공급한다. 전원공급부(190)는 배터리를 포함하며, 배터리는 충전 가능하도록 이루어지는 내장형 배터리가 될 수 있으며, 충전 등을 위하여 단말기 바디에 착탈 가능하게 결합될 수 있다.The power supply unit 190 receives external power and internal power under the control of the controller 180 and supplies power necessary for the operation of each component. The power supply unit 190 includes a battery, and the battery may be a built-in battery capable of being charged, or may be detachably coupled to the terminal body for charging.

또한, 전원공급부(190)는 연결포트를 구비할 수 있으며, 연결포트는 배터리의 충전을 위하여 전원을 공급하는 외부 충전기가 전기적으로 연결되는 인터페이스(160)의 일 예로서 구성될 수 있다.In addition, the power supply unit 190 may have a connection port, and the connection port may be configured as an example of an interface 160 electrically connected to an external charger that supplies power to charge the battery.

다른 예로서, 전원공급부(190)는 상기 연결포트를 이용하지 않고 무선방식으로 배터리를 충전하도록 이루어질 수 있다. 이 경우에, 전원공급부(190)는 외부의 무선 전력 전송장치로부터 자기 유도 현상에 기초한 유도 결합(Inductive Coupling) 방식이나 전자기적 공진 현상에 기초한 공진 결합(Magnetic Resonance Coupling) 방식 중 하나 이상을 이용하여 전력을 전달받을 수 있다.As another example, the power supply unit 190 may charge the battery in a wireless manner without using the connection port. In this case, the power supply unit 190 uses at least one of an inductive coupling method based on magnetic induction from an external wireless power transmitter or a magnetic resonance coupling method based on electromagnetic resonance. power can be delivered.

후술하는 본 명세서의 실시예에 따른 감성 분석 시스템은 상술한 도 1의 전자 기기에 기반하여 구현될 수 있다. 다만, 전자 기기(100)의 각 구성이 감성 분석 시스템의 구현에 필수적인 것은 아니며 열거된 구성들보다 적거나 많은 구성들에 기초하여 구현될 수 있다.A sentiment analysis system according to an embodiment of the present specification described below may be implemented based on the electronic device of FIG. 1 described above. However, each component of the electronic device 100 is not essential to the implementation of the emotion analysis system, and may be implemented based on fewer or more configurations than the enumerated configurations.

일 예로, 본 명세서의 실시예에 따른 감성 분석 시스템은 프로세서 및 상기 프로세서에 동작 가능하도록 연결된 메모리를 포함하도록 구현될 수 있다. 상기 메모리는 상기 프로세서에 의해 수행될 때 상기 프로세서가 동작들을 수행하도록 설정하는 지시들을 저장할 수 있다. 상기 동작들은 후술하는 감성 분석 시스템에 의해 수행되는 데이터 학습 방법과 관련된다. For example, the sentiment analysis system according to an embodiment of the present specification may be implemented to include a processor and a memory operatively connected to the processor. The memory may store instructions that, when executed by the processor, set the processor to perform operations. The above operations are related to a data learning method performed by a sentiment analysis system described later.

일 실시예에 의하면, 상기 감성 분석 시스템은 많은 양의 영어 데이터로 사전 학습(Pre-trained)되어 공개된 Facebook의 로베르타(RoBERTa) 모델에 기반하여 구현될 수 있다. 구체적으로 상기 감성 분석 시스템은 상기 모델에 감성 분류(Sentiment Classification)와 MLM의 두 가지 태스크(Task)를 Multi Task Learning (MTL)로서 함께 학습함으로써 도메인 정보 및 감성 분석을 수행할 수 있다. According to an embodiment, the sentiment analysis system may be implemented based on Facebook's RoBERTa model, which is pre-trained and published with a large amount of English data. Specifically, the sentiment analysis system can perform domain information and sentiment analysis by learning two tasks, Sentiment Classification and MLM, together as Multi Task Learning (MTL) in the model.

이하에서는 데이터 증강을 위한 MLM에 관하여 구체적으로 설명한다.Hereinafter, MLM for data augmentation will be described in detail.

Masked Language Model for Data AugmentationMasked Language Model for Data Augmentation

본 명세서의 실시예에 따른 감성 분석 시스템은 Sentiment Classification과 MLM을 Multi Task Learning (MTL)로써 동시에 학습한다. MLM은 입력 데이터 내 하나 이상의 토큰을 무작위로 가린 후, 문맥 정보를 이용해 본래 토큰을 예측하는 학습 방법이다. MLM은 주어진 데이터에서 사용된 의미 표현을 학습하는 데 효과적인 방법이므로, 적은 양의 감성 분석 데이터가 주어졌을 때, 도메인 정보를 학습하는 데 효과적인 방법으로 사용될 수 있다. MLM을 활용하면 매 학습 단계마다 원본 데이터로부터 평균 15%개의 토큰이 [MASK]토큰으로 바뀌는 방식으로 가려지므로, 단순히 도메인 정보를 학습하는 것 뿐만 아니라 증강된 데이터를 이용하여 학습되는 효과도 얻을 수 있다. The sentiment analysis system according to the embodiment of the present specification simultaneously learns Sentiment Classification and MLM as Multi Task Learning (MTL). MLM is a learning method that randomly masks one or more tokens in the input data and then predicts the original token using contextual information. Since MLM is an effective method for learning semantic expressions used in given data, it can be used as an effective method for learning domain information when a small amount of sentiment analysis data is given. When using MLM, an average of 15% of tokens from the original data are covered in a way that changes to [MASK] tokens at each learning stage, so you can get the effect of learning not only by simply learning domain information, but also by using augmented data. .

Sentiment Classification과 MLM, 두 가지 Task의 손실(Loss)은 선형 결합(Linear Combination)으로 계산되며, 다음 수학식 1로 표현될 수 있다.The loss of two tasks, Sentiment Classification and MLM, is calculated by linear combination and can be expressed by Equation 1 below.

Figure pat00008
Figure pat00008

Figure pat00009
은 모델 전체 Loss이며,
Figure pat00010
은 정답 레이블과 모델의 예측 결과를 크로스 엔트로피(Cross Entropy)로 계산한 Sentiment Classification Task의 Loss다.
Figure pat00011
은 기존 BERT의 MLM Loss와 계산 방법이 동일하다.
Figure pat00012
는 MLM Loss를 조절하기 위한 하이퍼파라미터이다. 이때 본 발명의 Main Downstream Task는 Sentiment Classification이므로 해당 값이 너무 크면 오히려 시스템의 성능이 하락할 수 있다. 일 실시예에 의하면, 상술한 시스템의 성능 저하를 고려하여
Figure pat00013
는 0.2로 설정될 수 있다.
Figure pat00009
is the total loss of the model,
Figure pat00010
is the loss of the Sentiment Classification Task calculated by cross entropy between the correct answer label and the prediction result of the model.
Figure pat00011
has the same calculation method as the MLM Loss of the existing BERT.
Figure pat00012
is a hyperparameter for controlling MLM Loss. At this time, since the Main Downstream Task of the present invention is Sentiment Classification, if the corresponding value is too large, the performance of the system may deteriorate. According to one embodiment, in consideration of the performance degradation of the above-described system
Figure pat00013
may be set to 0.2.

본 발명은 추가적인 데이터 및 사람의 개입 없이 적은 양의 데이터를 다양한 형태로 모델에 입력함으로써 감성 분석 성능을 높이기 위한 데이터 학습 방법을 제안한다.The present invention proposes a data learning method for improving sentiment analysis performance by inputting a small amount of data to a model in various forms without additional data or human intervention.

다만, 본 발명이 상술한 로베르타(RoBERTa) 모델에 기반하는 데이터 학습 방법에만 적용되는 것은 아니며 그 밖의 다른 모델을 이용한 데이터 학습 방법에도 적용될 수 있다.However, the present invention is not applied only to the data learning method based on the above-described RoBERTa model, and may be applied to data learning methods using other models.

이하 본 명세서의 실시예에 따른 데이터 학습 방법과 관련, 종래 기술의 문제점을 도 2를 참조하여 설명한다.Hereinafter, problems of the prior art in relation to the data learning method according to an embodiment of the present specification will be described with reference to FIG. 2 .

도 2는 MLM과 관련된 종래 기술의 문제점을 설명하기 위한 도면이다.Figure 2 is a diagram for explaining the problems of the prior art related to MLM.

MLM 학습에 있어, 학습 과정에서 입력 데이터의 일부가 가려진다. 다시 말하면, 상기 입력 데이터의 토큰들 중 일부 토큰이 마스크 토큰(masked token)으로 변경된다. 본 명세서에서, 상기 마스크 토큰을 포함하는 상기 입력 데이터는 전처리 데이터로 지칭될 수 있다.In MLM learning, part of the input data is masked during the learning process. In other words, some of the tokens of the input data are changed to masked tokens. In this specification, the input data including the mask token may be referred to as preprocessing data.

모델은 매 학습마다 조금씩 다른 부분이 가려진 데이터를 이용하여 감성 분류 테스크(Sentiment Classification Task)를 학습할 수 있다. 이를 통해 추가적인 데이터 없이도 상기 모델의 학습을 위한 데이터가 증강되는 효과를 얻을 수 있다.The model can learn a Sentiment Classification Task using data in which slightly different parts are hidden for each learning. Through this, an effect of augmenting data for learning the model can be obtained without additional data.

그러나 상술한 종래기술에 따른 방식에 의하면 다음과 같은 문제가 발생한다.However, according to the method according to the prior art described above, the following problems occur.

도 2를 참조하면, "I love you"라는 문장에서 "love"가 가려지는 경우, 모델은 주어진 데이터의 극성을 올바르게 예측하기 어려워질 수 있다. 다시 말하면, 상기 입력 데이터의 토큰들(I, love, you) 중 감성 분류와 관련된 중요도가 높은"love"가 마스크 토큰([MASK])으로 변경되는 경우 모델은 주어진 데이터의 극성을 올바르게 예측하기 어려워질 수 있다.Referring to FIG. 2 , when “love” is hidden in the sentence “I love you”, it may be difficult for the model to accurately predict the polarity of given data. In other words, if “love”, which has a high importance related to sentiment classification, among the tokens (I, love, and you) of the input data is changed to a mask token ([MASK]), it is difficult for the model to accurately predict the polarity of the given data. can lose

따라서 종래 기술에 의하면, 데이터 증강 효과를 얻을 수 있는 반면에 중요도 분별없이 입력 데이터의 토큰에 마스킹이 적용되는 바, 해당 (전처리)데이터를 이용하여 학습된 모델의 성능이 저하될 수 있다.Therefore, according to the prior art, while a data augmentation effect can be obtained, since masking is applied to tokens of input data without discriminating importance, the performance of a model learned using the corresponding (preprocessing) data may deteriorate.

따라서 본 발명은 각 단어의 중요도(가중치)를 활용하는 방법을 추가 적용함으로써 주어진 데이터의 핵심 정보를 유지하면서 도메인 정보를 학습하고, 이를 통해 감성 분석 성능을 높인 시스템을 제안한다. 이하 도 3을 참조하여 본 명세서의 실시에에 따른 감성 분석 시스템의 동작을 설명한다.Therefore, the present invention proposes a system that learns domain information while maintaining key information of given data by additionally applying a method of utilizing the importance (weight) of each word, and thereby improves the performance of sentiment analysis. The operation of the sentiment analysis system according to an embodiment of the present specification will be described with reference to FIG. 3 below.

도 3은 본 명세서의 실시예에 따른 멀티 태스크 학습을 설명하기 위한 도면이다.3 is a diagram for explaining multi-task learning according to an embodiment of the present specification.

도 3을 참조하면, 본 명세서의 실시예에 따른 감성 분석 시스템의 전체 동작은 1) 단어 가중치 계산(Word Weights Calculation), 2) 단어 가중치 기반 MLM(Word Weights based Masked Language Model) 및 3) 멀티 태스크 학습(Multi Task Learning)의 세 단계로 구성된다. 설명의 편의를 위해 시간의 흐름에 따라 수행되는'단계'로 설명하나, 해당 용어로 한정되어 해석되도록 하기 위함은 아니다. Referring to FIG. 3, the overall operation of the sentiment analysis system according to an embodiment of the present specification includes 1) word weights calculation, 2) word weights based Masked Language Model (MLM), and 3) multi-tasks. It consists of three stages of learning (Multi Task Learning). For convenience of explanation, it is described as 'steps' performed according to the lapse of time, but it is not intended to be interpreted as being limited to the term.

일 예로, 감성 분석 시스템의 구현 측면에서, 후술하는 각 단계는 감성 분석 시스템의 각 구성으로 구현될 수 있다. 구체적으로, 후술하는 각 단계에 따른 동작은 메모리에 저장된 지시들이 프로세서에 의해 실행될 때, 상기 프로세서가 수행하는 동작들을 의미하는 것일 수 있다.For example, in terms of implementing a sentiment analysis system, each step to be described later may be implemented as each component of the sentiment analysis system. Specifically, an operation according to each step described later may refer to operations performed by a processor when instructions stored in a memory are executed by the processor.

다른 예로, 데이터 학습 방법의 수행 측면에서, 후술하는 각 단계는 서술된 순서에 따라 수행될 수 있으나, 어느 한 단계가 다른 단계와 병렬적으로 동시에 수행될 수도 있다.As another example, in terms of performing the data learning method, each step to be described later may be performed in the order described, but one step may be simultaneously performed in parallel with another step.

첫 번째 단계는 단어 가중치 계산(Word Weights Calculation) 단계이다. 본 단계는 주어진 데이터의 각 단어가 도메인과 Task에서 얼마나 큰 비중을 차지하는지, 그 가중치를 구하는 단계이다. 이 단계에는 Sentiment Classification을 단일 Task로 모델을 Fine-tuning한 후, 이를 이용해 각 단어의 가중치를 추정하는 과정이 포함된다. 이때 단일 Task로 학습된 모델은 도 3의 전체 구성도에 도시된 모델과는 별개의 모델이며, 단어 가중치 계산이 끝난 후에는 더 이상 사용되지 않는다.The first step is the word weights calculation step. This step is to find out how much weight each word of the given data occupies in the domain and task and its weight. This step includes the process of fine-tuning the model for Sentiment Classification as a single task and estimating the weight of each word using it. At this time, the model learned with a single task is a separate model from the model shown in the overall configuration diagram of FIG. 3, and is no longer used after word weight calculation is over.

두 번째 단계는 단어 가중치 기반 MLM(Word Weights based Masked Language Model) 수행 단계이다. 본 단계는 계산된 단어 가중치를 기반으로 입력 데이터의 일부를 [MASK] 토큰으로 가리는 단계다. 상기 과정에 있어, 종래 기술(기존 MLM)은 무작위로 가려질 토큰을 선정했으나, 본 명세서의 실시예에 따른 감성 분석 시스템은 단어 가중치를 기반으로 가려질 토큰을 선정한다. 이는 감성 분석 및 데이터의 도메인에서 중요한 단어의 정보를 보존하기 위함이다. The second step is a word weights based Masked Language Model (MLM) execution step. This step is to mask some of the input data with [MASK] tokens based on the calculated word weights. In the above process, the prior art (existing MLM) selects tokens to be hidden randomly, but the sentiment analysis system according to the embodiment of the present specification selects tokens to be hidden based on word weights. This is to preserve important word information in the domain of sentiment analysis and data.

마지막 세 번째 단계는 멀티 테스크 학습(Multi Task Learning)이다. 상기 두 단계는 입력 데이터의 최종 형태를 만들기 위한 전처리 단계로, 그 결과로는 데이터의 일부가 [MASK] 토큰으로 바뀐 데이터를 만든다.본 단계에서는 전처리된 데이터를 입력 받아 Sentiment Classication과 MLM, 두 가지 Task를 동시에 학습한다. The third and final step is multi-task learning. The above two steps are preprocessing steps to create the final form of the input data, and as a result, data in which part of the data is converted into [MASK] tokens is created. Learn tasks simultaneously.

Sentiment Classification은 입력 데이터가 내포한 감성이 긍정(Positive)인지, 또는 부정(Negative)를 예측하는 Task이다.Sentiment Classification is a task that predicts whether the sentiment contained in the input data is positive or negative.

이 때, 매 학습마다 다르게 가려진 데이터가 입력되므로 주어진 데이터보다 증강된 데이터를 이용하여 학습되는 효과를 얻을 수 있다.At this time, since different obscured data is input for each learning, it is possible to obtain an effect of learning using augmented data than given data.

MLM은 입력된 데이터에 [MASK] 토큰이 포함된 경우, 문맥 정보를 이용해 해당 토큰이 원래 어떤 토큰이었는지 예측하는 Task이다(3B). MLM은 데이터의 의미 표현을 학습하는 데 효과적이며, 본 시스템에는 도메인 정보 학습을 위해 활용되었다. MLM is a task that predicts what kind of token the original token was by using context information when the [MASK] token is included in the input data (3B). MLM is effective in learning the semantic expression of data, and this system is used for domain information learning.

도 3을 참조하면, 각 토큰별 가중치들(word weights of each token)에 기초하여 토큰별 마스킹 확률(masking probabilities)이 결정된다. 이 때, 감성 분석과 관련된 중요도가 높은 토큰(예: "boring")은 낮은 마스킹 확률(예: 0.03)을 갖는다. 해당 모델에 의해, 전처리 데이터("the mode [MASK] boring despite the scenery")는 부정(negative)적인 감성을 가지며(3A), [MASK] 토큰은 "grows"(3B)인 것으로 판별/학습될 수 있다. Referring to FIG. 3 , masking probabilities for each token are determined based on word weights of each token. At this time, a token with high importance related to sentiment analysis (eg, “boring”) has a low masking probability (eg, 0.03). By the model, the preprocessing data ("the mode [MASK] boring despite the scenery") has a negative sensibility (3A), and the [MASK] token is determined/learned to be "grows" (3B). can

상기와 같이 본 명세서는, 단어 가중치를 기반으로 두 가지 Task를 동시에 학습함으로써, 도메인 정보에 대한 지식이 기반된 감성 분석 시스템을 제안한다. 이하에서는 상술한 단어 가중치의 계산과 관련하여 도 4를 참조하여 구체적으로 설명한다.As described above, the present specification proposes a sentiment analysis system based on knowledge of domain information by simultaneously learning two tasks based on word weights. Hereinafter, the above-described calculation of word weights will be described in detail with reference to FIG. 4 .

도 4는 본 명세서의 실시예에 따른 가중치의 계산을 설명하기 위한 도면이다.4 is a diagram for explaining calculation of weights according to an embodiment of the present specification.

앞서 설명한 바와 같이, 감성 분석과 관련된 중요도가 높은 토큰이 [MASK] 토큰으로 가려지는 경우, 입력 데이터는 감성 분석을 위한 핵심정보를 잃게 된다. 이러한 종류의 데이터는 모델이 올바르게 학습하는 것을 방해하므로, 본 명세서의 실시예에 따라 계산된 각 단어의 가중치는 상기 문제점을 방지하기 위한 용도로 활용된다.As described above, if a token with high importance related to sentiment analysis is covered by the [MASK] token, the input data loses key information for sentiment analysis. Since this kind of data prevents the model from learning correctly, the weight of each word calculated according to the embodiment of the present specification is used to prevent the problem.

이때 각 단어의 가중치는 MLM을 활용해 계산하며, 그 과정은 다음과 같다. At this time, the weight of each word is calculated using MLM, and the process is as follows.

4A를 참조하면, 먼저 Sentiment Classification을 단일 Task로 BERT와 같은 사전학습된 모델을 Fine-tuning한다. 그 다음, Fine-tuning을 통해 감성 분석에 대한 지식이 학습된 모델(M)에 전체 학습 데이터를 다시 입력해 각 데이터마다 정답 레이블

Figure pat00014
와 입력 데이터
Figure pat00015
에 대한 예측 확률
Figure pat00016
(P2)를 얻는다. 이어서 원본 데이터의 각 토큰을 하나씩 [MASK] 토큰으로 가린 후, 이를 학습된 모델에 넣어 확률
Figure pat00017
(P1)를 구한다.Referring to 4A, first fine-tuning a pretrained model such as BERT with a single task for Sentiment Classification. Then, through fine-tuning, the entire training data is re-entered into the model (M) where the knowledge of sentiment analysis has been learned, and the correct answer label for each data
Figure pat00014
with input data
Figure pat00015
predicted probability for
Figure pat00016
(P2) is obtained. Then, after masking each token of the original data one by one with [MASK] tokens, put them into the trained model to calculate the probability
Figure pat00017
Find (P1).

Figure pat00018
는 원본 데이터(D0)의 j번째 토큰이 [MASK] 토큰으로 가려진 데이터(D1~D3)이며, 이 때문에
Figure pat00019
Figure pat00020
의 토큰 개수만큼 생성된다. 따라서 각각의 입력 데이터
Figure pat00021
Figure pat00022
집합을 가지게 된다. 예를들어 원본 데이터가 "I love you"라면 마스킹된 데이터의 집합은 {"[MASK] love you", "I [MASK] you", "I love [MASK]"}가 된다.
Figure pat00018
is the data (D1 to D3) where the j-th token of the original data (D0) is covered by the [MASK] token, so
Figure pat00019
Is
Figure pat00020
is generated as many as the number of tokens in Therefore, each input data
Figure pat00021
Is
Figure pat00022
have a set For example, if the original data is "I love you", the set of masked data is {"[MASK] love you", "I [MASK] you", "I love [MASK]"}.

4B를 참조하면, j번째 토큰의 단어 가중치는

Figure pat00023
Figure pat00024
두 확률의 차이를 이용해 계산하며, 아래 수학식 2와 같이 표현될 수 있다. Referring to 4B, the word weight of the jth token is
Figure pat00023
and
Figure pat00024
It is calculated using the difference between the two probabilities and can be expressed as in Equation 2 below.

Figure pat00025
Figure pat00025

Figure pat00026
Figure pat00027
두 확률의 차이가 클수록 [MASK] 토큰으로 가려진 본래의 토큰이 감성 분석에서 큰 영향을 끼친다고 볼 수 있다. 본 명세서에서는 감성 분석을 위한 핵심 단어들의 정보를 보존하는 것을 목표로 하므로, 상기 수학식 2와 같이 두 확률의 차이를 다시 1에서 빼주어 중요한 토큰에 낮은 가중치가 부여된다. 따라서 각 가중치의 범위는 [0, 1]이 되며, 데이터 내 모든 단어의 가중치는 상기 과정을 통해 자동으로 계산된다. 계산된 가중치는 가려질 토큰을 선정하기 위한 마스킹 확률을 구하는데 활용되며, 본 명세서에서는 이 과정에 소프트 맥스 함수(softmax function)가 활용된다. 1. 여기서 softmax 함수란, 입력받은 값을 출력으로 0~1사이의 값으로 모두 정규화하며 출력된 값들의 총합은 항상 1이 되는 특성을 가진 함수이다.
Figure pat00026
and
Figure pat00027
It can be seen that the larger the difference between the two probabilities, the greater the influence of the original token covered by the [MASK] token in sentiment analysis. Since the present specification aims to preserve the information of key words for sentiment analysis, a low weight is given to an important token by subtracting the difference between the two probabilities from 1 again as shown in Equation 2 above. Therefore, the range of each weight is [0, 1], and the weight of all words in the data is automatically calculated through the above process. The calculated weight is used to obtain a masking probability for selecting a token to be hidden, and in this specification, a softmax function is used in this process. 1. The softmax function here is a function that normalizes all input values to values between 0 and 1 as output, and the sum of the output values is always 1.

상기 마스킹 확률은 아래 수학식 3과 같이 표현될 수 있다.The masking probability may be expressed as in Equation 3 below.

Figure pat00028
Figure pat00028

본 발명에서는 감성 분석에서 중요한 단어일수록 낮은 가중치를 가지며, 이때문에 실제 Fine-tuning 과정에서는 핵심적인 단어들이 가려질 빈도가 줄어든다. 이는 MLM 학습이 Main Downstream Task인 Sentiment Classification의 학습에 악영향을 끼칠 위험을 줄일 뿐만 아니라, 시스템이 감성 분석 뿐만 아니라 도메인 정보도 함께 학습될 수 있다.In the present invention, the more important words in sentiment analysis have lower weights, and because of this, the frequency of covering key words in the actual fine-tuning process is reduced. This not only reduces the risk that MLM learning has an adverse effect on the learning of Sentiment Classification, which is the Main Downstream Task, but also allows the system to learn domain information as well as sentiment analysis.

이하 본 명세서의 실시예에 따른 감성 분석 시스템에 입력되는 데이터에 따른 시스템 결과들을 예시한다.Hereinafter, system results according to data input to the sentiment analysis system according to an embodiment of the present specification are exemplified.

[예시 1] [Example 1]

입력 데이터 : 로코 굉장히 즐겨보는데, 이 영화는 좀 별로였다. 뭔가 사랑도 개그도 억지스런 느낌..Input data: Rocco I enjoy watching it very much, but this movie was a bit disappointing. Something about love and gag feels forced..

시스템 결과 : Negative (0)System Result: Negative (0)

상기 예시 1에서, 입력 데이터의 토큰들 중 감성 분석(negative)과 관련된 중요도가 높은 토큰은 "별로였다", "억지스런"일 수 있다.In Example 1, among the tokens of the input data, a token having a high importance related to sentiment analysis (negative) may be "not good" or "unreasonable".

[예시 2][Example 2]

입력 데이터 : 세븐을 생각하면서 봤다가 큰코다친 영화, 모건프리먼의 연기는 좋았으나.Input data: A movie that hurt my nose while thinking of Seven, although Morgan Freeman's acting was good.

시스템 결과 : Negative (0)System Result: Negative (0)

상기 예시 2에서, 입력 데이터의 토큰들 중 감성 분석(negative)과 관련된 중요도가 높은 토큰은 "큰코다친", "좋았으나"일 수 있다.In Example 2, among the tokens of the input data, tokens with high importance related to sentiment analysis (negative) may be "big nose" and "good".

[예시 3][Example 3]

입력 데이터 : 피는 물보다 진하다. 이 한마디로 모든게 표현되는 영화Input data: Blood is thicker than water. A movie that expresses everything in one word

시스템 결과 : Positive (1)System Result: Positive (1)

상기 예시 3에서, 입력 데이터의 토큰들 중 감성 분석(positive)과 관련된 중요도가 높은 토큰은 "모든게", "표현되는"일 수 있다.In Example 3, among the tokens of the input data, tokens with high importance related to sentiment analysis (positive) may be “everything” and “expressed”.

[예시 4][Example 4]

입력 데이터 : 마지막 도서카드에 그려진 모습을 보고 우는 이츠키의 모습을 보고 저도 울었습니다... 지금 본지 3달은 지난거 같은데 아직도 그 모습을 떠올리면 먹먹해지네요Input data: When I saw Itsuki crying when I saw the picture drawn on the last book card, I cried too... It feels like it's been 3 months since I saw it, but I still get choked up when I think of it.

시스템 결과 : Positive (1)System Result: Positive (1)

상기 예시 4에서, 입력 데이터의 토큰들 중 감성 분석(positive)과 관련된 중요도가 높은 토큰은 "울었습니다", "먹먹해지네요"일 수 있다.In Example 4, among the tokens of the input data, tokens with high importance related to sentiment analysis (positive) may be "I cried" and "I feel depressed."

이하에서는 상술한 실시예들을 전자 기기의 동작 측면에서 도 5를 참조하여 구체적으로 설명한다. 이하 설명되는 방법들은 설명의 편의를 위하여 구분된 것일 뿐, 어느 한 방법의 일부 구성이 다른 방법의 일부 구성과 치환되거나, 상호 간에 결합되어 적용될 수 있음은 물론이다.Hereinafter, the above-described embodiments will be described in detail with reference to FIG. 5 in terms of operation of an electronic device. The methods described below are only classified for convenience of explanation, and it goes without saying that some components of one method may be substituted with some components of another method, or may be applied in combination with each other.

도 5는 본 명세서의 실시예에 따른 감성 분석 시스템의 데이터 학습 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a data learning method of a sentiment analysis system according to an embodiment of the present specification.

도 5를 참조하면, 본 명세서의 실시예에 따른 감성 분석 시스템의 데이터 학습 방법은 가중치 계산 단계(S510), 특정 토큰 결정 단계(S520) 및 멀티 태스크 학습 단계(S530)를 포함한다. 상기 각 단계는 도 1에서 상술한 전자 기기에 의해 수행될 수 있다. 일 예로, 상기 각 단계는 메모리에 저장된 지시들이 프로세서에 의해 실행될 때, 상기 프로세서가 수행하는 동작에 해당할 수 있다. 이하, 편의상 프로세서에 의한 동작으로 설명한다.Referring to FIG. 5 , the data learning method of the sentiment analysis system according to an embodiment of the present specification includes a weight calculation step (S510), a specific token determination step (S520), and a multi-task learning step (S530). Each of the above steps may be performed by the electronic device described above with reference to FIG. 1 . For example, each step may correspond to an operation performed by the processor when instructions stored in a memory are executed by the processor. Hereinafter, for convenience, an operation by a processor will be described.

S510에서, 프로세서는 입력 데이터의 가중치를 계산한다. 상기 가중치는 감성 분류(sentiment classification)와 관련될 수 있다.In S510, the processor calculates the weight of the input data. The weight may be related to sentiment classification.

일 실시예에 의하면, 상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률과 관련될 수 있다.According to an embodiment, the weight may be related to a probability that each token among tokens according to the input data is determined as the specific token.

일 실시예에 의하면, 감성 분류와 관련된 중요도가 높은 토큰이 마스크 토큰으로 변경되는 것을 방지하기 위한 동작이 적용될 수 있다. 구체적으로, 상기 입력 데이터에 따른 토큰들 중, 제1 토큰의 가중치가 제2 토큰의 가중치보다 낮은 경우, 상기 제1 토큰에 기반하는 상기 감성 분류와 관련된 중요도는 상기 제2 토큰에 기반하는 상기 감성 분류와 관련된 중요도보다 높을 수 있다.According to an embodiment, an operation for preventing a token having a high importance related to emotion classification from being changed into a mask token may be applied. Specifically, among the tokens according to the input data, when the weight of a first token is lower than that of a second token, the importance related to the emotion classification based on the first token is the emotion based on the second token. It may be higher than the importance associated with classification.

일 실시예에 의하면, 상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰별로 계산된 하나 이상의 가중치들을 포함할 수 있다. 상기 하나 이상의 가중치들의 개수는 상기 입력 데이터에 따른 토큰들의 개수에 기반할 수 있다.According to an embodiment, the weight may include one or more weights calculated for each token among tokens according to the input data. The number of the one or more weights may be based on the number of tokens according to the input data.

일 실시예에 의하면, 상기 감성 분류와 관련된 중요도는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰을 상기 마스크 토큰으로 변경하여 생성된 제1 전처리 데이터들을, 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때 획득되는 감성 분류 정확도에 기반할 수 있다.According to an embodiment, the importance related to the emotion classification is determined by assigning first pre-processed data generated by changing each token among the tokens according to the input data to the mask token a pre-learned model related to the emotion classification. It may be based on the emotion classification accuracy obtained when inputting the emotion.

상기 감성 분류 정확도는 상기 제1 전처리 데이터들을 각각 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때, 상기 입력 데이터와 관련된 정답 레이블이 출력될 제1 확률로 표현될 수 있다. 상기 제1 확률은 도 4의 P1에 기반할 수 있다. 이 때, 가려지는 토큰의 중요도가 높을수록 상기 제1 확률은 낮아질 것인 바, 상기 감성 분류와 관련된 중요도는 1-P1으로 표현될 수 있다.The emotion classification accuracy may be expressed as a first probability that a correct answer label related to the input data is output when each of the first preprocessed data is input to a pre-learned model related to the emotion classification. The first probability may be based on P1 of FIG. 4 . In this case, the higher the importance of the hidden token, the lower the first probability, and thus the importance associated with the emotion classification may be expressed as 1-P1.

상기 가중치는 상기 제1 확률 및 제2 확률의 차이에 기반하여 계산될 수 있다. 상기 제2 확률은 상기 입력 데이터를 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때, 상기 입력 데이터와 관련된 정답 레이블이 출력될 확률일 수 있다. 상기 제2 확률은 도 4의 P2에 기반할 수 있다.The weight may be calculated based on a difference between the first probability and the second probability. The second probability may be a probability that a correct answer label related to the input data is output when the input data is input to a pre-learned model related to the emotion classification. The second probability may be based on P2 of FIG. 4 .

상기 가중치는 다음의 수학식을 만족한다.The weight satisfies the following equation.

[수학식][mathematical expression]

Figure pat00029
Figure pat00029

Figure pat00030
는 상기 하나 이상의 가중치들 중 j번째 가중치이고,
Figure pat00031
는 상기 입력 데이터와 관련된 정답 레이블이고,
Figure pat00032
는 상기 입력 데이터이며,
Figure pat00033
는 상기 입력 데이터에 따른 토큰들 중 j번째 토큰이 상기 마스크 토큰으로 변경되어 생성된 상기 제1 전처리 데이터이며,
Figure pat00034
은 상기 제2 확률,
Figure pat00035
은 상기 제1 확률일 수 있다.
Figure pat00030
Is the j-th weight among the one or more weights,
Figure pat00031
Is a correct answer label related to the input data,
Figure pat00032
is the input data,
Figure pat00033
Is the first pre-processed data generated by changing the j-th token among the tokens according to the input data to the mask token,
Figure pat00034
Is the second probability,
Figure pat00035
may be the first probability.

S520에서, 프로세서는 상기 가중치에 기초하여 상기 입력 데이터에 따른 토큰들(tokens) 중 특정 토큰(specific token)을 결정한다.In S520, the processor determines a specific token among tokens according to the input data based on the weight.

일 실시예에 의하면, 상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률은, 상기 하나 이상의 가중치들을 입력으로 하는 소프트맥스 함수(SOFTMAX function)의 출력에 기반할 수 있다. 본 실시예는 상기 수학식 3과 관련된 설명에 기반할 수 있다.According to an embodiment, the probability that each token among the tokens according to the input data is determined as the specific token may be based on an output of a SOFTMAX function that takes the one or more weights as inputs. This embodiment may be based on the description related to Equation 3 above.

S530에서, 프로세서는 상기 입력 데이터에서 상기 특정 토큰이 마스크 토큰(MASK token)으로 변경된 전처리 데이터를 이용하여 멀티 태스크 학습(Multi Task Learning, MTL)을 수행한다. In S530, the processor performs multi-task learning (MTL) using pre-processed data in which the specific token is changed to a mask token in the input data.

상기 멀티 태스크 학습은, i) 상기 입력 데이터와 관련된 감성에 대한 판별 및 ii) 상기 특정 토큰의 추정과 관련된다. 상기 i)와 관련, 상기 입력 데이터와 관련된 감성은 긍정(positive) 또는 부정(negative)으로 판별될 수 있다.The multi-task learning is related to i) determination of emotion related to the input data and ii) estimation of the specific token. Regarding i), the emotion related to the input data may be determined as positive or negative.

전술한 본 명세서는, 프로그램이 기록된 매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 매체의 예로는, HDD(Hard Disk Drive), SSD(Solid State Disk), SDD(Silicon Disk Drive), ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있으며, 또한 캐리어 웨이브(예를 들어, 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 따라서, 상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 명세서의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 명세서의 등가적 범위 내에서의 모든 변경은 본 명세서의 범위에 포함된다.The above specification can be implemented as computer readable code on a medium on which a program is recorded. The computer-readable medium includes all types of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable media include Hard Disk Drive (HDD), Solid State Disk (SSD), Silicon Disk Drive (SDD), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. , and also includes those implemented in the form of a carrier wave (eg, transmission over the Internet). Accordingly, the above detailed description should not be construed as limiting in all respects and should be considered illustrative. The scope of this specification should be determined by reasonable interpretation of the appended claims, and all changes within the equivalent scope of this specification are included in the scope of this specification.

또한, 본 명세서가 속하는 분야의 통상의 지식을 가진 자라면 상술한 실시예들의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시 예들에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부한 청구 범위에서 규정하는 본 명세서의 범위에 포함되는 것으로 해석되어야 할 것이다.In addition, those skilled in the art to which this specification belongs will know that various modifications and applications not exemplified above are possible without departing from the essential characteristics of the above-described embodiments. For example, each component specifically shown in the embodiments can be modified and implemented. And differences related to these modifications and applications should be construed as being included in the scope of the present specification as defined in the appended claims.

Claims (10)

감성 분석 시스템에 의해 수행되는 데이터 학습 방법에 있어서,
입력 데이터의 가중치를 계산하는 단계, 상기 가중치는 감성 분류(sentiment classification)와 관련되며;
상기 가중치에 기초하여 상기 입력 데이터에 따른 토큰들(tokens) 중 특정 토큰(specific token)을 결정하는 단계; 및
상기 입력 데이터에서 상기 특정 토큰이 마스크 토큰(MASK token)으로 변경된 전처리 데이터를 이용하여 멀티 태스크 학습(Multi Task Learning, MTL)을 수행하는 단계를 포함하며,
상기 멀티 태스크 학습은, i) 상기 입력 데이터와 관련된 감성에 대한 판별 및 ii) 상기 특정 토큰의 추정과 관련되며,
상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률과 관련되고,
상기 입력 데이터에 따른 토큰들 중, 제1 토큰의 가중치가 제2 토큰의 가중치보다 낮은 경우:
상기 제1 토큰에 기반하는 상기 감성 분류와 관련된 중요도는 상기 제2 토큰에 기반하는 상기 감성 분류와 관련된 중요도보다 높은 것을 특징으로 하는 데이터 학습 방법.
In the data learning method performed by the sentiment analysis system,
calculating weights of the input data, the weights being related to sentiment classification;
determining a specific token among tokens according to the input data based on the weight; and
Performing multi-task learning (MTL) using preprocessing data in which the specific token is changed to a mask token in the input data,
The multi-task learning is related to i) determination of emotion related to the input data and ii) estimation of the specific token,
The weight is related to a probability that each token among the tokens according to the input data is determined as the specific token,
Among the tokens according to the input data, when the weight of the first token is lower than the weight of the second token:
The data learning method, characterized in that the importance associated with the emotion classification based on the first token is higher than the importance associated with the emotion classification based on the second token.
제1 항에 있어서,
상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰별로 계산된 하나 이상의 가중치들을 포함하는 것을 특징으로 하는 데이터 학습 방법.
According to claim 1,
Wherein the weights include one or more weights calculated for each token among the tokens according to the input data.
제2 항에 있어서,
상기 하나 이상의 가중치들의 개수는 상기 입력 데이터에 따른 토큰들의 개수에 기반하는 것을 특징으로 하는 데이터 학습 방법.
According to claim 2,
The number of the one or more weights is based on the number of tokens according to the input data.
제2 항에 있어서,
상기 감성 분류와 관련된 중요도는,
상기 입력 데이터에 따른 토큰들 중 각각의 토큰을 상기 마스크 토큰으로 변경하여 생성된 제1 전처리 데이터들을, 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때 획득되는 감성 분류 정확도에 기반하는 것을 특징으로 하는 데이터 학습 방법.
According to claim 2,
The importance associated with the emotion classification is,
Based on emotion classification accuracy obtained when first preprocessing data generated by changing each token among the tokens according to the input data to the mask token is input to a pre-learned model in relation to the emotion classification data learning method.
제4 항에 있어서,
상기 감성 분류 정확도는,
상기 제1 전처리 데이터들을 각각 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때, 상기 입력 데이터와 관련된 정답 레이블이 출력될 제1 확률로 표현되는 것을 특징으로 하는 데이터 학습 방법.
According to claim 4,
The emotion classification accuracy is,
Data learning method, characterized in that when each of the first preprocessing data is input to a pre-learned model related to the emotion classification, a correct answer label related to the input data is expressed as a first probability to be output.
제5 항에 있어서,
상기 가중치는 상기 제1 확률 및 제2 확률의 차이에 기반하여 계산되며,
상기 제2 확률은 상기 입력 데이터를 상기 감성 분류와 관련하여 기 학습된 모델에 입력하였을 때, 상기 입력 데이터와 관련된 정답 레이블이 출력될 확률인 것을 특징으로 하는 데이터 학습 방법.
According to claim 5,
The weight is calculated based on the difference between the first probability and the second probability,
Wherein the second probability is a probability that a correct answer label related to the input data is output when the input data is input to a pre-learned model related to the emotion classification.
제6 항에 있어서,
상기 가중치는 다음의 수학식을 만족하며,
[수학식]
Figure pat00036

Figure pat00037
는 상기 하나 이상의 가중치들 중 j번째 가중치이고,
Figure pat00038
는 상기 입력 데이터와 관련된 정답 레이블이고,
Figure pat00039
는 상기 입력 데이터이며,
Figure pat00040
는 상기 입력 데이터에 따른 토큰들 중 j번째 토큰이 상기 마스크 토큰으로 변경되어 생성된 상기 제1 전처리 데이터이며,
Figure pat00041
은 상기 제2 확률,
Figure pat00042
은 상기 제1 확률인 것을 특징으로 하는 데이터 학습 방법.
According to claim 6,
The weight satisfies the following equation,
[mathematical expression]
Figure pat00036

Figure pat00037
Is the j-th weight among the one or more weights,
Figure pat00038
Is a correct answer label related to the input data,
Figure pat00039
is the input data,
Figure pat00040
Is the first pre-processed data generated by changing the j-th token among the tokens according to the input data to the mask token,
Figure pat00041
Is the second probability,
Figure pat00042
Is the data learning method, characterized in that the first probability.
제2 항에 있어서,
상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률은, 상기 하나 이상의 가중치들을 입력으로 하는 소프트맥스 함수(SOFTMAX function)의 출력에 기반하는 것을 특징으로 하는 데이터 학습 방법.
According to claim 2,
The probability that each token among the tokens according to the input data is determined as the specific token is based on an output of a softmax function that takes the one or more weights as input. Data learning method.
데이터 학습을 수행하는 감성 분석 시스템에 있어서,
프로세서; 및
상기 프로세서와 동작 가능하게 연결된 메모리;를 포함하고,
상기 메모리는 상기 프로세서에 의해 실행될 때 상기 프로세서가 동작들을 수행하도록 설정하는 지시들을 저장하며,
상기 동작들은,
입력 데이터의 가중치를 계산하는 단계, 상기 가중치는 감성 분류(sentiment classification)와 관련되며;
상기 가중치에 기초하여 상기 입력 데이터에 따른 토큰들(tokens) 중 특정 토큰(specific token)을 결정하는 단계; 및
상기 입력 데이터에서 상기 특정 토큰이 마스크 토큰(MASK token)으로 변경된 전처리 데이터를 이용하여 멀티 태스크 학습(Multi Task Learning, MTL)을 수행하는 단계를 포함하며,
상기 멀티 태스크 학습은, i) 상기 입력 데이터와 관련된 감성에 대한 판별 및 ii) 상기 특정 토큰의 추정과 관련되며,
상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰이 상기 특정 토큰으로 결정되는 확률과 관련되고,
상기 입력 데이터에 따른 토큰들 중, 제1 토큰의 가중치가 제2 토큰의 가중치보다 낮은 경우:
상기 제1 토큰에 기반하는 상기 감성 분류와 관련된 중요도는 상기 제2 토큰에 기반하는 상기 감성 분류와 관련된 중요도보다 높은 것을 특징으로 하는 감성 분석 시스템.
In the sentiment analysis system for performing data learning,
processor; and
A memory operatively connected to the processor;
the memory stores instructions which, when executed by the processor, set the processor to perform operations;
These actions are
calculating weights of the input data, the weights being related to sentiment classification;
determining a specific token among tokens according to the input data based on the weight; and
Performing multi-task learning (MTL) using preprocessing data in which the specific token is changed to a mask token in the input data,
The multi-task learning is related to i) determination of emotion related to the input data and ii) estimation of the specific token,
The weight is related to a probability that each token among the tokens according to the input data is determined as the specific token,
Among the tokens according to the input data, when the weight of the first token is lower than the weight of the second token:
Sentiment analysis system, characterized in that the importance associated with the emotion classification based on the first token is higher than the importance associated with the emotion classification based on the second token.
제9 항에 있어서,
상기 가중치는 상기 입력 데이터에 따른 토큰들 중 각각의 토큰별로 계산된 하나 이상의 가중치들을 포함하는 것을 특징으로 하는 감성 분석 시스템.
According to claim 9,
The weights include one or more weights calculated for each token among the tokens according to the input data.
KR1020210113440A 2021-08-26 2021-08-26 Data learning method using sentiment analysis system KR20230031056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210113440A KR20230031056A (en) 2021-08-26 2021-08-26 Data learning method using sentiment analysis system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210113440A KR20230031056A (en) 2021-08-26 2021-08-26 Data learning method using sentiment analysis system

Publications (1)

Publication Number Publication Date
KR20230031056A true KR20230031056A (en) 2023-03-07

Family

ID=85512260

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210113440A KR20230031056A (en) 2021-08-26 2021-08-26 Data learning method using sentiment analysis system

Country Status (1)

Country Link
KR (1) KR20230031056A (en)

Similar Documents

Publication Publication Date Title
KR102384641B1 (en) Method for controlling an intelligent system that performs multilingual processing
KR102225984B1 (en) Device including battery
KR102389041B1 (en) Mobile terminal and method using machine learning for controlling mobile terminal
EP3509061A1 (en) Electronic device and method of controlling the same
US11164581B2 (en) Artificial intelligence device
US10593322B2 (en) Electronic device and method for controlling the same
US20170243578A1 (en) Voice processing method and device
US20200026939A1 (en) Electronic device and method for controlling the same
KR102391683B1 (en) An audio device and method for controlling the same
KR102421487B1 (en) Artificial intelligent device
US10464570B2 (en) Electronic device and method using machine learning for identifying characteristics of users located within a specific space
KR102479499B1 (en) Mobile terminal
KR102353486B1 (en) Mobile terminal and method for controlling the same
US11531864B2 (en) Artificial intelligence server
KR102172772B1 (en) Artificial intelligence artificial server and artificial intelligence device
US11734400B2 (en) Electronic device and control method therefor
US20190163436A1 (en) Electronic device and method for controlling the same
KR20220067926A (en) Method to remove abnormal clients in a federated learning model
US20210287665A1 (en) Voice recognition system
KR102251076B1 (en) Method to estimate blueprint using indoor image
KR20190031829A (en) Electric terminal and method for controlling the same
KR20230031056A (en) Data learning method using sentiment analysis system
KR20190009202A (en) Mobile terminal and method for controlling the same
CN111837377B (en) Mobile terminal and control method thereof
KR20180106731A (en) Mobile terminal having artificial intelligence agent