KR20220104595A - Method to reconfigure a machine learning cluster without interruption - Google Patents

Method to reconfigure a machine learning cluster without interruption Download PDF

Info

Publication number
KR20220104595A
KR20220104595A KR1020210007091A KR20210007091A KR20220104595A KR 20220104595 A KR20220104595 A KR 20220104595A KR 1020210007091 A KR1020210007091 A KR 1020210007091A KR 20210007091 A KR20210007091 A KR 20210007091A KR 20220104595 A KR20220104595 A KR 20220104595A
Authority
KR
South Korea
Prior art keywords
learning
node
cluster
electronic device
data
Prior art date
Application number
KR1020210007091A
Other languages
Korean (ko)
Other versions
KR102549144B1 (en
Inventor
서의성
김경록
오승민
Original Assignee
성균관대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 성균관대학교산학협력단 filed Critical 성균관대학교산학협력단
Priority to KR1020210007091A priority Critical patent/KR102549144B1/en
Publication of KR20220104595A publication Critical patent/KR20220104595A/en
Application granted granted Critical
Publication of KR102549144B1 publication Critical patent/KR102549144B1/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
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0454
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Control Of Electric Motors In General (AREA)
  • Feedback Control In General (AREA)
  • Logic Circuits (AREA)
  • Telephone Function (AREA)

Abstract

The present specification relates to a method for a first node to join a cluster for distributed learning, comprising: receiving a learning model for the distributed learning from a second node included in the cluster; enabling a background thread to participate in the cluster for the distributed learning, wherein the background thread generates a tensor related to an inclination value for the distributed learning; performing an Allreduce operation for the distributed learning through the tensor; and enabling first inclination values obtained through the Allreduce operation to be applied to the learning model.

Description

중단 없는 기계학습 클러스터 재구성 방법 {METHOD TO RECONFIGURE A MACHINE LEARNING CLUSTER WITHOUT INTERRUPTION}METHOD TO RECONFIGURE A MACHINE LEARNING CLUSTER WITHOUT INTERRUPTION

본 명세서는 분산학습 환경에서, 클라우드 자원의 효율성을 위해 중단 없이 기계학습 클러스터를 재구성하기 위한 방법 및 장치에 관한 것이다.The present specification relates to a method and apparatus for reconstructing a machine learning cluster without interruption for efficiency of cloud resources in a distributed learning environment.

기계학습에서 동기적 분산 학습을 위해, 모든 컴퓨팅 노드는 동일한 학습 모델로 학습을 진행할 수 있으며, 매 반복(iteration)이 끝날 때마다 기울기 값을 취합하고 평균값을 구해 모델을 갱신할 수 있다. For synchronous distributed learning in machine learning, all computing nodes can train with the same learning model, and at the end of each iteration, the gradient values are collected and the average value is obtained to update the model.

이러한 학습 진행의 특성상 기존의 분산 딥러닝 프레임워크들은 학습을 중단하지 않고 학습 모델을 동기화하기 어려워 중단 없이 컴퓨팅 노드를 추가하는 기능을 제공하고 있지 않다. Due to the nature of this learning process, existing distributed deep learning frameworks do not provide the ability to add computing nodes without interruption because it is difficult to synchronize the learning model without stopping learning.

본 명세서의 목적은, 분산학습 환경에서, 분산 학습 진행 중 학습 과정을 중단하지 않고도 컴퓨팅 노드를 추가할 수 있는 방법을 제공하는 것이다.An object of the present specification is to provide a method for adding a computing node in a distributed learning environment without interrupting the learning process while distributed learning is in progress.

또한, 본 명세서의 목적은, 분산학습 환경에서, 새로 추가될 컴퓨팅 노드의 학습 모델을 현재 학습이 진행 중인 모델과 동기화하는 방법을 제공하는 것이다,In addition, an object of the present specification is to provide a method for synchronizing a learning model of a computing node to be newly added with a model in which learning is currently in progress in a distributed learning environment,

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

본 명세서의 일 양상은, 제1 노드가 분산학습(Distributed learning)을 위한 클러스터에 합류하는 방법에 있어서, 상기 클러스터에 포함된 제2 노드로부터, 상기 분산학습을 위한 학습모델을 수신하는 단계; 백그라운드 스레드(Background Thread)를 상기 분산학습을 위한 클러스터에 참여시키는 단계로서, 상기 백그라운드 스레드는 상기 분산학습을 위한 기울기 값과 관련된 텐서(tensor)를 생성함; 상기 텐서를 통해, 상기 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행하는 단계; 및 상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는 단계; 를 포함할 수 있다.An aspect of the present specification is a method in which a first node joins a cluster for distributed learning, the method comprising: receiving a learning model for distributed learning from a second node included in the cluster; joining a background thread to the cluster for distributed learning, wherein the background thread generates a tensor related to a gradient value for the distributed learning; performing an All-reduce operation for the distributed learning through the tensor; and applying the first gradient values obtained through the all-reduce operation to the learning model. may include.

또한, 상기 제2 노드는 상기 제1 노드가 상기 클러스터에 합류를 요청하는 경우, 상기 제1 노드에 상기 학습모델을 전달하기 위해, 상기 분산학습을 중단할 수 있다.Also, when the first node requests to join the cluster, the second node may stop the distributed learning in order to transfer the learning model to the first node.

또한, 상기 텐서는 상기 분산학습을 위한 기울기 값과 동일한 타입을 갖고, 0으로 초기화 될 수 있다.Also, the tensor may have the same type as the gradient value for distributed learning, and may be initialized to 0.

또한, 상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는 단계는 상기 획득된 제1 기울기 값들을 메모리에 저장하는 단계; 및 메인 스레드(Main Thread)를 통해, 상기 메모리에 저장된 제1 기울기 값들을 순서대로 상기 학습모델에 적용하는 단계; 를 더 포함할 수 있다.In addition, the step of applying the first gradient values obtained through the all-reduce operation to the learning model may include: storing the obtained first gradient values in a memory; and sequentially applying the first gradient values stored in the memory to the learning model through a main thread. may further include.

또한, 상기 클러스터의 노드로부터, 다음으로 반복된 분산학습과 관련된 제2 기울기 값을 수신하는 단계; 상기 제2 기울기 값을 상기 학습모델에 적용하는 단계; 및 상기 클러스터에 합류하는 단계; 를 더 포함할 수 있다.In addition, receiving, from the nodes of the cluster, a second gradient value related to the next iterated distributed learning; applying the second gradient value to the learning model; and joining the cluster; may further include.

본 명세서의 또 다른 일 양상은, 분산학습(Distributed learning)을 위한 클러스터에 합류하는 제1 노드를 구현하는 장치에 있어서, 신호를 송수신하기 위한 송수신부; 메모리; 및 상기 송수신부 및 상기 메모리를 기능적으로 제어하기 위한 AI 프로세서; 를 포함하며, 상기 AI 프로세서는 상기 송수신부를 통해, 상기 클러스터에 포함된 제2 노드로부터, 상기 분산학습을 위한 학습모델을 수신하고, 백그라운드 스레드(Background Thread)를 상기 분산학습을 위한 클러스터에 참여시키며, 상기 백그라운드 스레드는 상기 분산학습을 위한 기울기 값과 관련된 텐서(tensor)를 생성하고, 상기 텐서를 통해, 상기 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행하며, 상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용할 수 있다.Another aspect of the present specification provides an apparatus for implementing a first node joining a cluster for distributed learning, comprising: a transceiver for transmitting and receiving a signal; Memory; and an AI processor for functionally controlling the transceiver and the memory. Including, wherein the AI processor receives the learning model for the distributed learning from the second node included in the cluster through the transceiver, and participates a background thread in the cluster for the distributed learning, , the background thread generates a tensor related to the gradient value for the distributed learning, and performs an All-reduce operation for the distributed learning through the tensor, and the all-reduce operation Through , the obtained first gradient values may be applied to the learning model.

본 명세서의 실시예에 따르면, 분산학습 환경에서, 분산 학습 진행 중 학습 과정을 중단하지 않고도 컴퓨팅 노드를 추가하거나 제거할 수 있는 방법을 제공할 수 있다.According to an embodiment of the present specification, in a distributed learning environment, it is possible to provide a method for adding or removing a computing node without stopping the learning process during distributed learning.

또한, 본 명세서의 목적은, 분산학습 환경에서, 새로 추가될 컴퓨팅 노드의 학습 모델을 현재 학습이 진행 중인 모델과 동기화하는 방법을 제공할 수 있다.In addition, it is an object of the present specification to provide a method of synchronizing a learning model of a computing node to be newly added with a model currently in progress in a distributed learning environment.

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

도 1은 본 명세서와 관련된 전자 기기를 설명하기 위한 블록도이다.
도 2는 본 명세서의 일 실시예에 따른 AI 장치의 블록도이다.
도 3은 본 명세서가 적용될 수 있는 분산학습 모델의 예시이다.
도 4는 본 명세서가 적용될 수 있는 클러스터 재구성 방법의 예시이다.
도 5는 본 명세서가 적용될 수 있는 일 실시예이다.
도 6은 본 명세서가 적용될 수 있는 장치 일반의 예시이다.
본 명세서에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 명세서에 대한 실시예를 제공하고, 상세한 설명과 함께 본 명세서의 기술적 특징을 설명한다.
1 is a block diagram illustrating an electronic device related to the present specification.
2 is a block diagram of an AI device according to an embodiment of the present specification.
3 is an example of a distributed learning model to which this specification can be applied.
4 is an example of a cluster reconfiguration method to which the present specification can be applied.
5 is an embodiment to which the present specification can be applied.
6 is an example of a general apparatus to which this specification can be applied.
BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are included as part of the detailed description to help the understanding of the present specification, provide embodiments of the present specification, and together with the detailed description, explain the technical features of the present specification.

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

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

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

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

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

도 1은 본 명세서와 관련된 전자 기기를 설명하기 위한 블록도이다.1 is a block diagram illustrating 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 190 and the like. The components shown in FIG. 1 are not essential for implementing the electronic device, and thus the electronic device described herein may have more or fewer components than those listed above.

보다 구체적으로, 상기 구성요소들 중 무선 통신부(110)는, 전자 기기(100)와 무선 통신 시스템 사이, 전자 기기(100)와 다른 전자 기기(100) 사이, 또는 전자 기기(100)와 외부서버 사이의 무선 통신을 가능하게 하는 하나 이상의 모듈을 포함할 수 있다. 또한, 상기 무선 통신부(110)는, 전자 기기(100)를 하나 이상의 네트워크에 연결하는 하나 이상의 모듈을 포함할 수 있다. More specifically, the wireless communication unit 110 among the components, between the electronic device 100 and the wireless communication system, between the electronic device 100 and another electronic device 100, or the electronic device 100 and an external server It may include one or more modules that enable wireless communication between them. Also, the wireless communication unit 110 may include one or more modules for connecting 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-range 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 an image input unit for inputting an image signal, a microphone 122 or an audio input unit for inputting an audio signal, and a user input unit 123 for receiving information from a user, for example, , a touch key, a push key, etc.). The 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, surrounding environment information surrounding the electronic device, and user information. For example, the sensing unit 140 may include a proximity sensor 141, an illumination sensor 142, an illumination sensor, a touch sensor, an acceleration sensor, a magnetic sensor, and gravity. Sensor (G-sensor), gyroscope sensor, motion sensor, RGB sensor, infrared sensor (IR sensor: infrared sensor), fingerprint sensor (finger scan sensor), ultrasonic sensor , optical sensors (eg, cameras (see 121)), microphones (see 122), battery gauges, environmental sensors (eg, barometers, hygrometers, thermometers, radiation sensors, It may include at least one of a thermal sensor, a gas sensor, etc.) and a chemical sensor (eg, an electronic nose, a healthcare sensor, a biometric sensor, etc.). Meanwhile, the electronic device disclosed in the present 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 visual, auditory or tactile sense, and includes at least one of a display unit 151 , a sound output unit 152 , a haptip module 153 , and an optical output unit 154 . can do. The display unit 151 may implement a touch screen by forming a layer structure with the touch sensor or being formed integrally with the touch sensor. Such a touch screen may function as the user input unit 123 providing an input interface between the electronic device 100 and the user, and may 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 with various types of external devices connected to the electronic device 100 . Such an interface unit 160, a wired / wireless headset port (port), an external charger port (port), a wired / wireless data port (port), a memory card (memory card) port, for connecting a device equipped with an identification module It may include at least one of a port, an audio I/O (Input/Output) port, a video I/O (Input/Output) port, and an earphone port. In response to the connection of the external device 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)에 의하여 상기 전자 기기의 동작(또는 기능)을 수행하도록 구동될 수 있다. In addition, the memory 170 stores data supporting various functions of the electronic device 100 . The memory 170 may store a plurality of application programs (or applications) driven in the electronic device 100 , data for operation of 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 (eg, incoming calls, outgoing functions, message reception, and outgoing functions) of the electronic device 100 . Meanwhile, the application program may be stored in the memory 170 , installed on the electronic device 100 , and driven to perform an operation (or function) of the electronic device by the controller 180 .

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

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

전원공급부(190)는 제어부(180)의 제어 하에서, 외부의 전원, 내부의 전원을 인가 받아 전자 기기(100)에 포함된 각 구성요소들에 전원을 공급한다. 이러한 전원공급부(190)는 배터리를 포함하며, 상기 배터리는 내장형 배터리 또는 교체가능한 형태의 배터리가 될 수 있다.The power supply unit 190 receives external power and internal power under the control of the control unit 180 to supply 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 respective components may operate cooperatively to implement an operation, control, or control method of an electronic device according to various embodiments described below. In addition, 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, before looking at various embodiments implemented through the electronic device 100 as described above, the above-listed components will be described in more detail.

먼저, 무선 통신부(110)에 대하여 살펴보면, 무선 통신부(110)의 방송 수신 모듈(111)은 방송 채널을 통하여 외부의 방송 관리 서버로부터 방송 신호 및/또는 방송 관련된 정보를 수신한다. 상기 방송 채널은 위성 채널, 지상파 채널을 포함할 수 있다. 적어도 두 개의 방송 채널들에 대한 동시 방송 수신 또는 방송 채널 스위칭을 위해 둘 이상의 상기 방송 수신 모듈이 상기 전자 기기(100)에 제공될 수 있다. First, referring to 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 of the broadcast reception modules may be provided to the electronic device 100 for simultaneous broadcast reception or broadcast channel switching for at least two 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) 등)에 따라 구축된 이동 통신망 상에서 기지국, 외부의 단말, 서버 중 적어도 하나와 무선 신호를 송수신한다. Mobile communication module 112, the 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.) transmits and receives radio signals to and from at least one of a base station, an external terminal, and a server on a mobile communication network constructed according to (Long Term Evolution-Advanced).

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

무선 인터넷 모듈(113)은 무선 인터넷 접속을 위한 모듈을 말하는 것으로, 전자 기기(100)에 내장되거나 외장될 수 있다. 무선 인터넷 모듈(113)은 무선 인터넷 기술들에 따른 통신망에서 무선 신호를 송수신하도록 이루어진다. The wireless Internet module 113 refers to a module for wireless Internet access, and may be built-in or external to the electronic device 100 . The wireless Internet module 113 is configured to transmit and receive wireless 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)은 상기에서 나열되지 않은 인터넷 기술까지 포함한 범위에서 적어도 하나의 무선 인터넷 기술에 따라 데이터를 송수신하게 된다. As wireless Internet technology, 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), High Speed Downlink Packet Access (HSDPA), High Speed Uplink Packet Access (HSUPA), Long Term Evolution (LTE), Long Term Evolution-Advanced (LTE-A), 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 point of view 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 performs wireless Internet access through the mobile communication network. ) may be understood as a type 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)일 수 있다. Short-range communication module 114 is for short-range communication, Bluetooth (Bluetooth??), RFID (Radio Frequency Identification), infrared communication (Infrared Data Association; IrDA), UWB (Ultra Wideband), ZigBee, At least one of Near Field Communication (NFC), Wireless-Fidelity (Wi-Fi), Wi-Fi Direct, Wireless Universal Serial Bus (USB), and Magnetic Secure Transmission (MST) may be used to support short-distance communication. . The short-distance communication module 114, between the electronic device 100 and the wireless communication system, between the electronic device 100 and another electronic device 100, or the electronic device 100 through wireless area networks (Wireless Area Networks) ) and a network in which another electronic device 100 or an external server is located may support wireless communication. The local area network may be local area networks (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 interworking) data with the electronic device 100 according to the present specification, for example, a smart watch, smart glasses. (smart glass), 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 in the vicinity of the electronic device 100 . Furthermore, when the sensed wearable device is a device authenticated to communicate with the electronic device 100 according to the present specification, the controller 180 transmits at least a portion of data processed by the electronic device 100 to the short-range communication module ( 114) to transmit 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 performs a phone call through the wearable device, or when a message is received in the electronic device 100, the user receives the received call 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 acquiring a location (or current location) of an electronic device, and a representative example thereof includes a Global Positioning System (GPS) module or a Wireless Fidelity (WiFi) module. For example, if the electronic device utilizes a GPS module, the electronic device may acquire the location of the electronic device by using a signal transmitted from a GPS satellite. As another example, if the electronic device utilizes the Wi-Fi module, it may acquire the location of the electronic device based on information of 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 of the other modules of the wireless communication unit 110 to obtain data on the location of the electronic device as a substitute or additionally. 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 obtains the location of the electronic device.

다음으로, 입력부(120)는 영상 정보(또는 신호), 오디오 정보(또는 신호), 데이터, 또는 사용자로부터 입력되는 정보의 입력을 위한 것으로서, 영상 정보의 입력을 위하여, 전자 기기(100) 는 하나 또는 복수의 카메라(121)를 구비할 수 있다. 카메라(121)는 화상 통화모드 또는 촬영 모드에서 이미지 센서에 의해 얻어지는 정지영상 또는 동영상 등의 화상 프레임을 처리한다. 처리된 화상 프레임은 디스플레이부(151)에 표시되거나 메모리(170)에 저장될 수 있다. 한편, 전자 기기(100)에 구비되는 복수의 카메라(121)는 매트릭스 구조를 이루도록 배치될 수 있으며, 이와 같이 매트릭스 구조를 이루는 카메라(121)를 통하여, 전자 기기(100)에는 다양한 각도 또는 초점을 갖는 복수의 영상정보가 입력될 수 있다. 또한, 복수의 카메라(121)는 입체영상을 구현하기 위한 좌 영상 및 우 영상을 획득하도록, 스트레오 구조로 배치될 수 있다. Next, the input unit 120 is for input of image information (or signal), audio information (or signal), data, or information input from a user. For input of 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 shooting mode. The processed image frame may be displayed on the display unit 151 or stored in the memory 170 . On the other hand, 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 in this way, various angles or focal points are applied to the electronic device 100 . A plurality of image information having a plurality of images may be input. In addition, the plurality of cameras 121 may be arranged in a stereo structure to acquire a left image and a right image for realizing a stereoscopic image.

마이크로폰(122)은 외부의 음향 신호를 전기적인 음성 데이터로 처리한다. 처리된 음성 데이터는 전자 기기(100)에서 수행 중인 기능(또는 실행 중인 응용 프로그램)에 따라 다양하게 활용될 수 있다. 한편, 마이크로폰(122)에는 외부의 음향 신호를 입력 받는 과정에서 발생되는 잡음(noise)을 제거하기 위한 다양한 잡음 제거 알고리즘이 구현될 수 있다. The microphone 122 processes an external sound signal as electrical voice data. The processed voice data may be variously utilized according to a function (or a running application program) being performed by the electronic device 100 . Meanwhile, various noise removal 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 controller 180 may control the operation of the electronic device 100 to correspond to the input information. . Such, 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 (dome switch), a jog wheel, jog switch, etc.) and a touch-type input means. As an example, the touch input means consists of a virtual key, a soft key, or a visual key displayed on the touch screen through software processing, or a part other than the touch screen. It may be made of a touch key (touch key) disposed on the. On the other hand, the virtual key or the visual key, it is possible to be displayed on the touch screen while having various forms, for example, a graphic (graphic), text (text), an icon (icon), a video (video) or these can be made by 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. The controller 180 may control the driving or operation of the electronic device 100 or perform data processing, function, or operation related to an application program installed in the electronic device 100 based on the sensing signal. 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 in the vicinity without mechanical contact using the force of an electromagnetic field or infrared rays. The proximity sensor 141 may be disposed in an inner region of the electronic device covered by the touch screen as described above or near 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 capacitive type proximity sensor, a magnetic type proximity sensor, an infrared proximity sensor, and the like. When the touch screen is capacitive, the proximity sensor 141 may be configured to detect the proximity of an object having conductivity by a change in an 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, the act of approaching an object on the touch screen without contacting it so that the object is recognized that it is located on the touch screen is called “proximity touch”, and the touch The act of actually touching an object on the screen is called "contact touch". The position where the object is touched in proximity on the touch screen means a position where the object is perpendicular to the touch screen when the object is touched in proximity. 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.) have. Meanwhile, the controller 180 processes data (or information) corresponding to the proximity touch operation and the proximity touch pattern sensed through the proximity sensor 141 as described above, and furthermore, provides visual information corresponding to the processed data. It can be printed on the touch screen. Furthermore, the controller 180 may control the electronic device 100 to process different operations or data (or information) according to whether a touch to the same point on the touch screen is a proximity touch or a contact touch. .

터치 센서는 저항막 방식, 정전용량 방식, 적외선 방식, 초음파 방식, 자기장 방식 등 여러 가지 터치방식 중 적어도 하나를 이용하여 터치 스크린(또는 디스플레이부(151))에 가해지는 터치(또는 터치입력)을 감지한다. The touch sensor receives 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 a change in capacitance occurring in a specific part of the touch screen into an electrical input signal. The touch sensor may be configured to detect a position, an area, a pressure at the time of touch, capacitance at the time of touch, and the like where a touch object applying a touch on 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, a signal(s) corresponding thereto is sent to the touch controller. The touch controller processes the signal(s) and then transmits corresponding data to the controller 180 . Accordingly, the controller 180 can know which area of the display unit 151 has been touched, and the like. 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 may perform the same control according to the type of the touch object that touches the touch screen (or a touch key provided in addition to the touch screen). Whether to perform different control or the same control according to the type of the touch object may be determined according to the current operating state of the electronic device 100 or a running application program.

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

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

한편, 입력부(120)의 구성으로 살펴본, 카메라(121)는 카메라 센서(예를 들어, CCD, CMOS 등), 포토 센서(또는 이미지 센서) 및 레이저 센서 중 적어도 하나를 포함한다. On the other hand, the camera 121 as seen in the configuration of the input unit 120 includes at least one of a camera sensor (eg, CCD, CMOS, etc.), a photo sensor (or an 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. The photo sensor may be stacked on the display device, and the photo sensor is configured to scan the motion of the sensing target close to the touch screen. More specifically, the photo sensor mounts photo diodes and transistors (TRs) in rows/columns and scans the contents placed on the photo sensor 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 target according to the amount of change in light, and through this, location information of the sensing target 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 the execution screen information. .

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

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

음향 출력부(152)는 호신호 수신, 통화모드 또는 녹음 모드, 음성인식 모드, 방송수신 모드 등에서 무선 통신부(110)로부터 수신되거나 메모리(170)에 저장된 오디오 데이터를 출력할 수 있다. 음향 출력부(152)는 전자 기기(100)에서 수행되는 기능(예를 들어, 호신호 수신음, 메시지 수신음 등)과 관련된 음향 신호를 출력하기도 한다. 이러한 음향 출력부(152)에는 리시버(receiver), 스피커(speaker), 버저(buzzer) 등이 포함될 수 있다. The sound 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 a sound signal related to a function (eg, a call signal reception sound, a message reception sound, etc.) performed by the electronic device 100 . 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 the user can feel. A representative example of the tactile effect generated by the haptic module 153 may be vibration. The intensity and pattern of vibration generated by the haptic module 153 may be controlled by a user's selection or setting of the controller. For example, the haptic module 153 may synthesize and output different vibrations or output them sequentially.

햅틱 모듈(153)은, 진동 외에도, 접촉 피부면에 대해 수직 운동하는 핀 배열, 분사구나 흡입구를 통한 공기의 분사력이나 흡입력, 피부 표면에 대한 스침, 전극(electrode)의 접촉, 정전기력 등의 자극에 의한 효과와, 흡열이나 발열 가능한 소자를 이용한 냉온감 재현에 의한 효과 등 다양한 촉각 효과를 발생시킬 수 있다. In addition to vibration, the haptic module 153 is configured to respond to stimuli such as a pin arrangement that moves vertically with respect to the contact skin surface, a jet or suction force of air through a nozzle or an inlet, a brush against the skin surface, contact of an electrode, an electrostatic force, etc. Various tactile effects can be generated, such as an effect caused by heat absorption and an effect by reproducing a feeling of cold and heat using an element capable of absorbing heat or generating heat.

햅틱 모듈(153)은 직접적인 접촉을 통해 촉각 효과를 전달할 수 있을 뿐만 아니라, 사용자가 손가락이나 팔 등의 근 감각을 통해 촉각 효과를 느낄 수 있도록 구현할 수도 있다. 햅틱 모듈(153)은 전자 기기(100)의 구성 태양에 따라 2개 이상이 구비될 수 있다. The haptic module 153 may not only deliver a tactile effect through direct contact, but may also be implemented so that the user can feel the tactile effect through a muscle sense such as a finger or 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 the occurrence of an event by using the light of the light source of the electronic device 100 . Examples of the event generated in the electronic device 100 may be message reception, call signal reception, missed call, alarm, schedule notification, email reception, information reception through an application, and the like.

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

인터페이스부(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 with all external devices connected to the electronic device 100 . The interface unit 160 receives data from an external device, 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, a port for connecting a device equipped with an identification module (port), audio I/O (Input/Output) port (port), video I/O (Input/Output) port (port), earphone port (port), etc. may be included in the interface unit 160 .

한편, 식별 모듈은 전자 기기(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 storing various information for authenticating the use authority of the electronic device 100, a user identification module (UIM), a subscriber identity module (subscriber identity module; SIM), universal user authentication It may include a universal subscriber identity module (USIM) and the like. A device equipped with an identification module (hereinafter, '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, when the electronic device 100 is connected to an external cradle, the interface unit 160 serves as a passage through which power from the cradle is supplied to the electronic device 100 or is input from the cradle by a user. It may be a path through which various command signals are transmitted to the electronic device 100 . The various command signals or the power input from the cradle may be operated as signals for recognizing that the electronic device 100 is correctly mounted on the cradle.

메모리(170)는 제어부(180)의 동작을 위한 프로그램을 저장할 수 있고, 입/출력되는 데이터들(예를 들어, 폰북, 메시지, 정지영상, 동영상 등)을 임시 저장할 수도 있다. 상기 메모리(170)는 상기 터치 스크린 상의 터치 입력시 출력되는 다양한 패턴의 진동 및 음향에 관한 데이터를 저장할 수 있다. The memory 170 may store a program for the operation of the controller 180 and may temporarily store input/output data (eg, a phone book, a message, a still image, a moving picture, etc.). The memory 170 may store data related to vibrations and sounds of various patterns output when a touch input is performed 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)와 관련되어 동작될 수도 있다. Memory 170 is a flash memory type (flash memory type), a hard disk type (hard disk type), an SSD type (Solid State Disk type), an SDD type (Silicon Disk Drive type), a multimedia card micro type ), card-type memory (such as SD or XD memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read (EEPROM) -only memory), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, and an optical disk may include at least one type of storage medium. The electronic device 100 may be operated 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 an operation related to an application program and generally an overall operation of the electronic device 100 . For example, when the state of the electronic device satisfies a set condition, the controller 180 may execute or release a lock state that restricts input of a user's control command to applications.

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

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

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

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

도 2는 본 명세서의 일 실시예에 따른 AI 장치의 블록도이다.2 is a block diagram of an AI device according to an embodiment of the present specification.

상기 AI 장치(20)는 AI 프로세싱을 수행할 수 있는 AI 모듈을 포함하는 전자 기기 또는 상기 AI 모듈을 포함하는 서버 등을 포함할 수 있다. 또한, 상기 AI 장치(20)는 도 1에 도시된 전자기기(100)의 적어도 일부의 구성으로 포함되어 AI 프로세싱 중 적어도 일부를 함께 수행하도록 구비될 수도 있다.The AI device 20 may include an electronic device including an AI module capable of performing AI processing, or a server including the AI module. Also, the AI device 20 may be included as a component of at least a part of the electronic device 100 shown in FIG. 1 to perform at least a part of AI processing together.

상기 AI 장치(20)는 AI 프로세서(21), 메모리(25) 및/또는 통신부(27)를 포함할 수 있다.The AI device 20 may include an AI processor 21 , a memory 25 and/or a communication unit 27 .

상기 AI 장치(20)는 신경망을 학습할 수 있는 컴퓨팅 장치로서, 서버, 데스크탑 PC, 노트북 PC, 태블릿 PC 등과 같은 다양한 전자 장치로 구현될 수 있다.The AI device 20 is a computing device capable of learning a neural network, and may be implemented in various electronic devices such as a server, a desktop PC, a notebook PC, and a tablet PC.

AI 프로세서(21)는 메모리(25)에 저장된 프로그램을 이용하여 신경망을 학습할 수 있다. 특히, AI 프로세서(21)는 차량 관련 데이터를 인식하기 위한 신경망을 학습할 수 있다. 여기서, 차량 관련 데이터를 인식하기 위한 신경망은 인간의 뇌 구조를 컴퓨터 상에서 모의하도록 설계될 수 있으며, 인간의 신경망의 뉴런(neuron)을 모의하는, 가중치를 갖는 복수의 네트워크 노드들을 포함할 수 있다. 복수의 네트워크 모드들은 뉴런이 시냅스(synapse)를 통해 신호를 주고 받는 뉴런의 시냅틱 활동을 모의하도록 각각 연결 관계에 따라 데이터를 주고 받을 수 있다. 여기서 신경망은 신경망 모델에서 발전한 딥러닝 모델을 포함할 수 있다. 딥 러닝 모델에서 복수의 네트워크 노드들은 서로 다른 레이어에 위치하면서 컨볼루션(convolution) 연결 관계에 따라 데이터를 주고 받을 수 있다. 신경망 모델의 예는 심층 신경망(DNN, deep neural networks), 합성곱 신경망(CNN, convolutional deep neural networks), 순환 신경망(RNN, Recurrent Boltzmann Machine), 제한 볼츠만 머신(RBM, Restricted Boltzmann Machine), 심층 신뢰 신경망(DBN, deep belief networks), 심층 Q-네트워크(Deep Q-Network)와 같은 다양한 딥 러닝 기법들을 포함하며, 컴퓨터비젼, 음성인식, 자연어처리, 음성/신호처리 등의 분야에 적용될 수 있다.The AI processor 21 may learn the neural network using a program stored in the memory 25 . In particular, the AI processor 21 may learn a neural network for recognizing vehicle-related data. Here, the neural network for recognizing vehicle-related data may be designed to simulate a human brain structure on a computer, and may include a plurality of network nodes having weights that simulate neurons of the human neural network. The plurality of network modes may transmit and receive data according to a connection relationship, respectively, so as to simulate a synaptic activity of a neuron in which a neuron sends and receives a signal through a synapse. Here, the neural network may include a deep learning model developed from a neural network model. In a deep learning model, a plurality of network nodes can exchange data according to a convolutional connection relationship while being located in different layers. Examples of neural network models include deep neural networks (DNN), convolutional deep neural networks (CNN), Recurrent Boltzmann Machine (RNN), Restricted Boltzmann Machine (RBM), deep trust It includes various deep learning techniques such as neural networks (DBN, deep belief networks) and deep Q-networks, and can be applied to fields such as computer vision, speech recognition, natural language processing, and voice/signal processing.

한편, 전술한 바와 같은 기능을 수행하는 프로세서는 범용 프로세서(예를 들어, CPU)일 수 있으나, 인공지능 학습을 위한 AI 전용 프로세서(예를 들어, GPU)일 수 있다.Meanwhile, the processor performing the above-described function may be a general-purpose processor (eg, CPU), but may be an AI-only processor (eg, GPU) for artificial intelligence learning.

메모리(25)는 AI 장치(20)의 동작에 필요한 각종 프로그램 및 데이터를 저장할 수 있다. 메모리(25)는 비 휘발성 메모리, 휘발성 메모리, 플래시 메모리(flash-memory), 하드디스크 드라이브(HDD) 또는 솔리드 스테이트 드라이브(SDD) 등으로 구현할 수 있다. 메모리(25)는 AI 프로세서(21)에 의해 액세스되며, AI 프로세서(21)에 의한 데이터의 독취/기록/수정/삭제/갱신 등이 수행될 수 있다. 또한, 메모리(25)는 본 명세서의 일 실시예에 따른 데이터 분류/인식을 위한 학습 알고리즘을 통해 생성된 신경망 모델(예를 들어, 딥 러닝 모델(26))을 저장할 수 있다.The memory 25 may store various programs and data necessary for the operation of the AI device 20 . The memory 25 may be implemented as a non-volatile memory, a volatile memory, a flash-memory, a hard disk drive (HDD), or a solid state drive (SDD). The memory 25 is accessed by the AI processor 21 , and reading/writing/modification/deletion/update of data by the AI processor 21 may be performed. Also, the memory 25 may store a neural network model (eg, the deep learning model 26 ) generated through a learning algorithm for data classification/recognition according to an embodiment of the present specification.

한편, AI 프로세서(21)는 데이터 분류/인식을 위한 신경망을 학습하는 데이터 학습부(22)를 포함할 수 있다. 데이터 학습부(22)는 데이터 분류/인식을 판단하기 위하여 어떤 학습 데이터를 이용할지, 학습 데이터를 이용하여 데이터를 어떻게 분류하고 인식할지에 관한 기준을 학습할 수 있다. 데이터 학습부(22)는 학습에 이용될 학습 데이터를 획득하고, 획득된 학습데이터를 딥러닝 모델에 적용함으로써, 딥러닝 모델을 학습할 수 있다. Meanwhile, the AI processor 21 may include a data learning unit 22 that learns a neural network for data classification/recognition. The data learning unit 22 may learn a criterion regarding which training data to use to determine data classification/recognition and how to classify and recognize data using the training data. The data learning unit 22 may learn the deep learning model by acquiring learning data to be used for learning and applying the acquired learning data to the deep learning model.

데이터 학습부(22)는 적어도 하나의 하드웨어 칩 형태로 제작되어 AI 장치(20)에 탑재될 수 있다. 예를 들어, 데이터 학습부(22)는 인공지능(AI)을 위한 전용 하드웨어 칩 형태로 제작될 수도 있고, 범용 프로세서(CPU) 또는 그래픽 전용 프로세서(GPU)의 일부로 제작되어 AI 장치(20)에 탑재될 수도 있다. 또한, 데이터 학습부(22)는 소프트웨어 모듈로 구현될 수 있다. 소프트웨어 모듈(또는 인스트럭션(instruction)을 포함하는 프로그램 모듈)로 구현되는 경우, 소프트웨어 모듈은 컴퓨터로 읽을 수 있는 판독 가능한 비일시적 판독 가능 기록 매체(non-transitory computer readable media)에 저장될 수 있다. 이 경우, 적어도 하나의 소프트웨어 모듈은 OS(Operating System)에 의해 제공되거나, 애플리케이션에 의해 제공될 수 있다. The data learning unit 22 may be manufactured in the form of at least one hardware chip and mounted on the AI device 20 . For example, the data learning unit 22 may be manufactured in the form of a dedicated hardware chip for artificial intelligence (AI), or may be manufactured as a part of a general-purpose processor (CPU) or graphics-only processor (GPU) to the AI device 20 . may be mounted. In addition, the data learning unit 22 may be implemented as a software module. When implemented as a software module (or a program module including instructions), the software module may be stored in a computer-readable non-transitory computer readable medium. In this case, the at least one software module may be provided by an operating system (OS) or may be provided by an application.

데이터 학습부(22)는 학습 데이터 획득부(23) 및 모델 학습부(24)를 포함할 수 있다. The data learning unit 22 may include a training data acquiring unit 23 and a model learning unit 24 .

학습 데이터 획득부(23)는 데이터를 분류하고 인식하기 위한 신경망 모델에 필요한 학습 데이터를 획득할 수 있다. 예를 들어, 학습 데이터 획득부(23)는 학습 데이터로서, 신경망 모델에 입력하기 위한 차량 데이터 및/또는 샘플 데이터를 획득할 수 있다.The training data acquisition unit 23 may acquire training data required for a neural network model for classifying and recognizing data. For example, the training data acquisition unit 23 may acquire vehicle data and/or sample data to be input to the neural network model as training data.

모델 학습부(24)는 상기 획득된 학습 데이터를 이용하여, 신경망 모델이 소정의 데이터를 어떻게 분류할지에 관한 판단 기준을 가지도록 학습할 수 있다. 이 때 모델 학습부(24)는 학습 데이터 중 적어도 일부를 판단 기준으로 이용하는 지도 학습(supervised learning)을 통하여, 신경망 모델을 학습시킬 수 있다. 또는 모델 학습부(24)는 지도 없이 학습 데이터를 이용하여 스스로 학습함으로써, 판단 기준을 발견하는 비지도 학습(unsupervised learning)을 통해 신경망 모델을 학습시킬 수 있다. 또한, 모델 학습부(24)는 학습에 따른 상황 판단의 결과가 올바른지에 대한 피드백을 이용하여 강화 학습(reinforcement learning)을 통하여, 신경망 모델을 학습시킬 수 있다. 또한, 모델 학습부(24)는 오류 역전파법(error back-propagation) 또는 경사 하강법(gradient decent)을 포함하는 학습 알고리즘을 이용하여 신경망 모델을 학습시킬 수 있다. The model learning unit 24 may use the acquired training data to learn the neural network model to have a criterion for determining how to classify predetermined data. In this case, the model learning unit 24 may train the neural network model through supervised learning using at least a portion of the training data as a criterion for determination. Alternatively, the model learning unit 24 may learn the neural network model through unsupervised learning for discovering a judgment criterion by self-learning using learning data without guidance. Also, the model learning unit 24 may train the neural network model through reinforcement learning using feedback on whether the result of the situation determination according to the learning is correct. Also, the model learning unit 24 may train the neural network model by using a learning algorithm including an error back-propagation method or a gradient decent method.

신경망 모델이 학습되면, 모델 학습부(24)는 학습된 신경망 모델을 메모리에 저장할 수 있다. 모델 학습부(24)는 학습된 신경망 모델을 AI 장치(20)와 유선 또는 무선 네트워크로 연결된 서버의 메모리에 저장할 수도 있다.When the neural network model is trained, the model learning unit 24 may store the learned neural network model in a memory. The model learning unit 24 may store the learned neural network model in the memory of the server connected to the AI device 20 through a wired or wireless network.

데이터 학습부(22)는 인식 모델의 분석 결과를 향상시키거나, 인식 모델의 생성에 필요한 리소스 또는 시간을 절약하기 위해 학습 데이터 전처리부(미도시) 및 학습 데이터 선택부(미도시)를 더 포함할 수도 있다. The data learning unit 22 further includes a training data preprocessing unit (not shown) and a training data selection unit (not shown) in order to improve the analysis result of the recognition model or to save resources or time required for generating the recognition model. You may.

학습 데이터 전처리부는 획득된 데이터가 상황 판단을 위한 학습에 이용될 수 있도록, 획득된 데이터를 전처리할 수 있다. 예를 들어, 학습 데이터 전처리부는, 모델 학습부(24)가 이미지 인식을 위한 학습을 위하여 획득된 학습 데이터를 이용할 수 있도록, 획득된 데이터를 기 설정된 포맷으로 가공할 수 있다.The learning data preprocessor may preprocess the acquired data so that the acquired data can be used for learning for situation determination. For example, the training data preprocessor may process the acquired data into a preset format so that the model learning unit 24 may use the acquired training data for image recognition learning.

또한, 학습 데이터 선택부는, 학습 데이터 획득부(23)에서 획득된 학습 데이터 또는 전처리부에서 전처리된 학습 데이터 중 학습에 필요한 데이터를 선택할 수 있다. 선택된 학습 데이터는 모델 학습부(24)에 제공될 수 있다. 예를 들어, 학습 데이터 선택부는, 차량의 카메라를 통해 획득한 영상 중 특정 영역을 검출함으로써, 특정 영역에 포함된 객체에 대한 데이터만을 학습 데이터로 선택할 수 있다.In addition, the learning data selection unit may select data necessary for learning from among the learning data acquired by the learning data acquiring unit 23 or the training data pre-processed by the preprocessing unit. The selected training data may be provided to the model learning unit 24 . For example, the learning data selector may select only data about an object included in the specific region as the learning data by detecting a specific region among images acquired through a vehicle camera.

또한, 데이터 학습부(22)는 신경망 모델의 분석 결과를 향상시키기 위하여 모델 평가부(미도시)를 더 포함할 수도 있다.In addition, the data learning unit 22 may further include a model evaluation unit (not shown) in order to improve the analysis result of the neural network model.

모델 평가부는, 신경망 모델에 평가 데이터를 입력하고, 평가 데이터로부터 출력되는 분석 결과가 소정 기준을 만족하지 못하는 경우, 모델 학습부(22)로 하여금 다시 학습하도록 할 수 있다. 이 경우, 평가 데이터는 인식 모델을 평가하기 위한 기 정의된 데이터일 수 있다. 일 예로, 모델 평가부는 평가 데이터에 대한 학습된 인식 모델의 분석 결과 중, 분석 결과가 정확하지 않은 평가 데이터의 개수 또는 비율이 미리 설정되 임계치를 초과하는 경우, 소정 기준을 만족하지 못한 것으로 평가할 수 있다.The model evaluator may input evaluation data to the neural network model and, when an analysis result output from the evaluation data does not satisfy a predetermined criterion, may cause the model learning unit 22 to learn again. In this case, the evaluation data may be predefined data for evaluating the recognition model. As an example, the model evaluation unit may evaluate as not satisfying a predetermined criterion when, among the analysis results of the learned recognition model for the evaluation data, the number or ratio of evaluation data for which the analysis result is not accurate exceeds a preset threshold value. have.

통신부(27)는 AI 프로세서(21)에 의한 AI 프로세싱 결과를 외부 전자 기기로 전송할 수 있다.The communication unit 27 may transmit the AI processing result by the AI processor 21 to an external electronic device.

여기서 외부 전자 기기는 단말 또는 클라이언트로 정의될 수 있다. 또한, AI 장치(20)는 서버 또는 네트워크를 통해 구현될 수도 있다.Here, the external electronic device may be defined as a terminal or a client. In addition, the AI device 20 may be implemented through a server or a network.

한편, 도 2에 도시된 AI 장치(20)는 AI 프로세서(21)와 메모리(25), 통신부(27) 등으로 기능적으로 구분하여 설명하였지만, 전술한 구성요소들이 하나의 모듈로 통합되어 AI 모듈로 호칭될 수도 있음을 밝혀둔다.On the other hand, although the AI device 20 shown in FIG. 2 has been functionally divided into the AI processor 21, the memory 25, the communication unit 27, and the like, the above-described components are integrated into one module and the AI module Note that it may also be called

도 3은 본 명세서가 적용될 수 있는 분산학습 모델의 예시이다.3 is an example of a distributed learning model to which this specification can be applied.

도 3을 참조하면, 분산 학습을 위한 노드들은 링 구조를 이루어, Tensorflow 또는 Pytorch와 같은, 프레임워크를 통해 연결되어 분산학습을 수행할 수 있다. 이러한 링 구조로 연결되어 있는 노드들의 기울기(gradient) 값을 수집하기 위해, Ring Allreduce 방법이 사용될 수 있다. Ring Allreduce는 모든 프로세서의 대상 배열을 단일 배열로 줄이고, 결과 배열을 모든 프로세스로 반환하는 작업이다.Referring to FIG. 3 , nodes for distributed learning form a ring structure, and are connected through a framework, such as Tensorflow or Pytorch, to perform distributed learning. In order to collect the gradient values of nodes connected in such a ring structure, the Ring Allreduce method may be used. Ring Allreduce is an operation that reduces the target array of all processors to a single array and returns the resulting array to all processes.

예를 들어, 수집된 기울기 값은 노드들의 수로 나누어질 수 있다. 이렇게 분할된 기울기 값들의 셋은 청크(chunk)로 지칭될 수 있다. 각 노드는 다음 노드에게 하나의 청크를 병렬적으로 전달할 수 있고, 전달된 청크는 각 노드의 청크와 합쳐질 수 있다. For example, the collected gradient value may be divided by the number of nodes. This divided set of gradient values may be referred to as a chunk. Each node can pass one chunk to the next node in parallel, and the delivered chunk can be combined with each node's chunk.

즉, 각 노드들은 로컬 청크를 수신된 청크에 추가하여, 다음 노드로 전달할 수 있다. 모든 청크는 링을 통해, 전달되며, 각 노드에서 청크가 합쳐질 수 있다. 이를 통해, 청크가 모든 노드들을 방문한 경우(예를 들어, 상기 프로세스가 노드들의 수만큼 수행되는 경우), 각 노드는 모든 노드들의 결과가 합쳐진 하나의 청크를 보유할 수 있다.That is, each node can add the local chunk to the received chunk and forward it to the next node. All chunks are passed through the ring, and chunks can be merged at each node. Through this, when a chunk visits all nodes (eg, when the process is performed as many as the number of nodes), each node may have one chunk in which the results of all nodes are combined.

이러한 분산 학습 모델에서 컴퓨팅 노드가 추가 또는 제거되는 방식은 다음과 같을 수 있다.A method in which computing nodes are added or removed in such a distributed learning model may be as follows.

1. 체크포인트 방식: 기본적으로 노드 구성이 변경될 때 학습을 중단하고 변경된 구성으로 학습을 재개한다. 이 때 이전에 학습에 참여하지 않았던 컴퓨팅 노드는 up-to-date한 학습 모델을 확보하고 있지 않으므로 학습이 중단된 때의 파일 형태로 학습 모델을 저장(체크포인트)하고 새 컴퓨팅 노드에 전달해주어야 한다.1. Checkpoint method: Basically, when the node configuration is changed, learning is stopped and learning is resumed with the changed configuration. At this time, the computing node that has not previously participated in training does not have an up-to-date training model, so the training model must be saved (checkpointed) in the form of a file when training is stopped and delivered to the new computing node. .

2. 브로드캐스트 방식: 학습 도중 노드 구성 변경에 대한 수요가 발생하면 기존 컴퓨팅 노드 중 하나가 브로드캐스트 통신을 이용해 변경된 구성과 학습 모델을 포함한 정보들을 모든 노드에게 전달한다. 이 동기화 과정을 마치면 학습을 재개한다.2. Broadcast method: When there is a demand to change the node configuration during training, one of the existing computing nodes transmits information including the changed configuration and learning model to all nodes using broadcast communication. After completing this synchronization process, learning resumes.

1번 방식에서는 학습 모델을 저장하는 시점부터 새로운 구성으로 학습을 재개할 때까지 학습이 중단되고, 2번 방식에서는 브로드캐스트 통신을 통해 학습 모델을 전달하는 동기화 과정이 끝날 때까지 학습이 중단된다. 따라서 장시간의 학습 과정에서 변화하는 사용 컴퓨팅 자원을 충분히 활용할 수 없게 된다. 즉, 클라우드 자원 제공의 효율성이 크게 낮아지는 것이다. 특히 가장 큰 처리 시간이 발생하는 구간은 학습 모델을 새 컴퓨팅 노드에게 전달하는 부분이기 때문에 이 시간을 최소화할 새로운 기법이 필요하다.In method 1, learning is stopped from the time the learning model is saved until learning is resumed with a new configuration, and in method 2, learning is stopped until the synchronization process of delivering the learning model through broadcast communication is finished. Therefore, it is not possible to fully utilize the changing computing resources used in the long-term learning process. That is, the efficiency of providing cloud resources is greatly reduced. In particular, since the section where the largest processing time occurs is the part where the learning model is delivered to a new computing node, a new technique to minimize this time is needed.

도 4는 본 명세서가 적용될 수 있는 클러스터 재구성 방법의 예시이다.4 is an example of a cluster reconfiguration method to which the present specification can be applied.

도 4를 참조하면, 본 명세서의 클러스터 재구성 방법은 추가될 노드의 백그라운드 스레드(Background Thread) 및 메인 스레드(Main Thread)를 통해 수행될 수 있다. Referring to FIG. 4 , the cluster reconfiguration method of the present specification may be performed through a background thread and a main thread of a node to be added.

1. 기존의 클러스터들의 학습이 진행 중에 새로운 노드가 추가되는 경우, 학습 모델 동기화 과정1. When a new node is added while learning of existing clusters is in progress, the learning model synchronization process

예를 들어, 기존의 클러스터들에 새로운 노드 추가가 요청된 경우, 기존의 컴퓨팅 노드 중 하나는 진행 중이던 학습을 마치고, 현재까지 학습된 모델을 추가 요청된 노드에 전달 할 수 있다. 이 때, 전달 과정 동안 학습된 모델이 변경되어선 안되기 때문에, 학습된 모델을 전달하는 노드는 잠시 학습과정에서 제외될 수 있다. For example, when a new node addition is requested to the existing clusters, one of the existing computing nodes may finish the ongoing learning and transfer the model learned so far to the additional requested node. At this time, since the learned model should not be changed during the transfer process, the node that transfers the learned model may be temporarily excluded from the learning process.

추가될 노드는 학습 모델을 전달받으면서, 이후에 계산되는 기울기 값들을 수신하기 위해 Background Thread를 기존 컴퓨팅 노드들이 연결되어 있는 communication pool에 참여시킨다. 또한, 학습된 모델을 전달하는 노드의 Background Thread도 기존 컴퓨팅 노드들이 연결되어 있는 communication pool에 참여될 수 있고, 다음의 추가될 노드의 동작이 동일하게 수행될 수 있다. 이는 추가될 노드가 학습 모델을 전달받은 이후, 학습 준비 과정을 수행하고 학습 모델을 불러오는 동안, 기존 컴퓨팅 노드들의 학습이 진행되어 학습 모델이 변화하기 때문이다. The node to be added participates in the communication pool to which the existing computing nodes are connected to receive the gradient values calculated later while receiving the learning model. In addition, the background thread of the node that delivers the learned model can also participate in the communication pool to which the existing computing nodes are connected, and the operation of the node to be added next can be performed in the same way. This is because, after the node to be added receives the learning model, the learning model changes as the learning of the existing computing nodes proceeds while performing the learning preparation process and loading the learning model.

추가될 노드의 Background Thread는 기존의 컴퓨팅 노드들이 교환하는 기울기 값과 동일한 타입의 텐서(tensor)를 준비하고, 값을 0으로 초기화한다. 기존 컴퓨팅 노드들이 기울기의 평균값을 구하기 위해 Allreduce 연산을 수행하면, Background Thread는 앞서 준비한 텐서를 통해, Allreduce 연산에 참여할 수 있다. 즉, Allreduce 연산은 각 노드들이 전송한 텐서들의 합 결과로 도출되기 때문에, 추가될 노드는 학습 연산 과정에 영향을 주지 않고 기존 컴퓨팅 노드들과 같은 기울기 값을 수신할 수 있다. The background thread of the node to be added prepares a tensor of the same type as the gradient value exchanged by existing computing nodes, and initializes the value to 0. When the existing computing nodes perform the Allreduce operation to obtain the average value of the gradient, the Background Thread can participate in the Allreduce operation through the previously prepared tensor. That is, since the Allreduce operation is derived as a result of the sum of the tensors transmitted by each node, the node to be added can receive the same gradient value as the existing computing nodes without affecting the learning operation process.

추가될 노드는 상기 프로세스를 통해 확보한 기울기 값들을 차례대로 메모리에 저장할 수 있고, Main Thread는 메모리에 저장된 기울기 값들을 순서대로 학습 모델에 적용함으로써, 최신 학습 모델을 확보할 수 있다. The node to be added may sequentially store the gradient values secured through the above process in the memory, and the Main Thread may secure the latest learning model by sequentially applying the gradient values stored in the memory to the learning model.

2. 최신 학습 모델을 확보한 노드의 클러스터 참여 과정2. The process of joining the cluster of nodes with the latest learning model

최신 학습 모델을 확보한 추가될 노드는 기존의 노드들이 다음 반복(iteration) 학습을 마침과 동시에 마지막으로 수신된 기울기 값을 최신 학습 모델에 적용시킬 수 있다. 적용과 동시에 새 노드는 기존 컴퓨팅 노드들과 함께 학습에 참여한다. 이후, 새 노드는 기울기 값을 수신하기 위해 텐서를 준비하지 않고, 학습을 통해 계산된 기울기 값으로 Allreduce 연산을 수행할 수 있다. The node to be added that has secured the latest learning model can apply the last received gradient value to the latest learning model as soon as the existing nodes finish the next iteration learning. Upon application, the new node participates in learning along with the existing computing nodes. After that, the new node can perform Allreduce operation with the gradient value calculated through training without preparing the tensor to receive the gradient value.

이를 통해, 본 명세서에서는 학습 진행 중 자유롭게 학습 클러스터 구성을 변화시킬 수 있어 장시간 수행되는 학습 과정에서 사용 컴퓨팅 자원 변화에 대응할 수 있으며, 클라우드 자원 이용의 효율성을 크게 높일 수 있다. Through this, in the present specification, the configuration of the learning cluster can be freely changed during the learning process, so that it is possible to respond to changes in computing resources used in the learning process performed for a long time, and the efficiency of cloud resource use can be greatly improved.

도 5는 본 명세서가 적용될 수 있는 일 실시예이다.5 is an embodiment to which the present specification can be applied.

도 5를 참조하면, 노드는 전자기기(100)에 의해, 물리적으로 또는 가상화되어 구현될 수 있다. 이러한 전자기기(100)는 GPU(Graphic Processing Unit)을 포함할 수 있다. Referring to FIG. 5 , the node may be implemented physically or virtualized by the electronic device 100 . The electronic device 100 may include a graphic processing unit (GPU).

추가될 제1 노드는 기존의 클러스터에 포함되어 있는 제2 노드로부터, 분산학습을 위한 학습모델을 수신한다(S510). 예를 들어, 제2 노드는 제1 노드가 상기 클러스터에 합류를 요청하는 경우, 상기 제1 노드에 상기 학습모델을 전달하기 위해, 상기 분산학습을 중단할 수 있다. 이는 상기 분산학습을 관리하는 시스템 노드에 의해, 관리될 수 있다. The first node to be added receives a learning model for distributed learning from the second node included in the existing cluster (S510). For example, when the first node requests to join the cluster, the second node may stop the distributed learning in order to transfer the learning model to the first node. This can be managed by the system node that manages the distributed learning.

제1 노드는 백그라운드 스레드를 분산학습을 위한 클러스터에 참여시킨다(S520). 보다 자세하게, 백그라운드 스레드는 분산학습에 사용되는 기울기 값과 동일한 형태의 텐서(tensor)를 생성할 수 있다. 예를 들어, 이러한 텐서는 분산학습을 위한 기울기 값과 동일한 데이터 타입을 갖고, 각 데이터 필드들은 모두 0으로 초기화 될 수 있다. The first node joins the background thread to the cluster for distributed learning (S520). In more detail, the background thread may generate a tensor having the same shape as the gradient value used for distributed learning. For example, such a tensor has the same data type as the gradient value for distributed learning, and each data field may be initialized to 0.

제1 노드는 텐서를 통해, 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행한다(S530). The first node performs an All-reduce operation for distributed learning through the tensor (S530).

제1 노드는 올-리듀스(Allreduce) 연산을 통해, 획득된 기울기 값을 학습모델에 적용한다(S540). 예를 들어, 제1 노드는 텐서를 통해, 올-리듀스 연산에서 획득된 기울기 값들을 메모리에 저장하고, 메인 스레드(Main Thread)에서 이를 순서데로 학습모델에 적용할 수 있다. 이를 통해, 제1 노드는 기존 클러스터의 학습 프로세스 중단 없이, 최신의 학습모델을 획득할 수 있다. The first node applies the obtained gradient value to the learning model through an all-reduce operation (S540). For example, the first node may store the gradient values obtained in the all-reduce operation in the memory through the tensor, and apply them to the learning model in order in the main thread. Through this, the first node can acquire the latest learning model without interrupting the learning process of the existing cluster.

이후, 제1 노드는 바로 다음 반복을 통해, 분산학습을 한 기울기 값을 수신하고, 직전에 획득한 학습모델에 적용한다. 이후, 제1 노드는 클러스터에 합류하여, 별도 텐서 생성 없이, 기존의 클러스터에 포함된 노드들과 마찬가지로 분산학습을 수행할 수 있다. Thereafter, the first node receives the distributed learning gradient value through the next iteration and applies it to the learning model obtained immediately before. Thereafter, the first node joins the cluster and can perform distributed learning like the nodes included in the existing cluster without generating a separate tensor.

본 명세서가 적용될 수 있는 장치 일반General devices to which this specification may be applied

도 6을 참조하면 제안하는 실시 예에 따른 서버(X200)는, 통신모듈(X210), 프로세서(X220) 및 메모리(X230)를 포함할 수 있다. 통신모듈(X210)은 무선 주파수(radio frequency, RF) 유닛으로 칭해지기도 한다. 통신모듈(X210)은 외부 장치로 각종 신호, 데이터 및 정보를 전송하고, 외부 장치로 각종 신호, 데이터 및 정보를 수신하도록 구성될 수 있다. 서버(X200)는 외부 장치와 유선 및/또는 무선으로 연결될 수 있다. 통신모듈(X210)은 전송부와 수신부로 분리되어 구현될 수도 있다. 프로세서(X220)는 서버(X200) 전반의 동작을 제어할 수 있으며, 서버(X200)가 외부 장치와 송수신할 정보 등을 연산 처리하는 기능을 수행하도록 구성될 수 있다. 또한, 프로세서(X220)는 본 명세서에서 제안하는 서버 동작을 수행하도록 구성될 수 있다. 프로세서(X220)은 본 명세서의 제안에 따라 데이터 혹은 메시지를 UE 혹은 다른 차량, 다른 서버에 전송하도록 통신모듈(X110)을 제어할 수 있다. 메모리(X230)는 연산 처리된 정보 등을 소정시간 동안 저장할 수 있으며, 버퍼 등의 구성요소로 대체될 수 있다. Referring to FIG. 6 , the server X200 according to the proposed embodiment may include a communication module X210 , a processor X220 , and a memory X230 . The communication module X210 is also referred to as a radio frequency (RF) unit. The communication module X210 may be configured to transmit various signals, data and information to an external device and to receive various signals, data and information to an external device. The server X200 may be connected to an external device by wire and/or wirelessly. The communication module X210 may be implemented by being separated into a transmitter and a receiver. The processor X220 may control the overall operation of the server X200, and the server X200 may be configured to perform a function of calculating and processing information to be transmitted and received with an external device. In addition, the processor X220 may be configured to perform the server operation proposed in this specification. The processor X220 may control the communication module X110 to transmit data or a message to the UE, another vehicle, or another server according to the proposal of the present specification. The memory X230 may store arithmetic-processed information and the like for a predetermined time, and may be replaced with a component such as a buffer.

또한, 위와 같은 단말 장치(X100) 및 서버(X200)는 GPU를 포함할 수 있으며, 이들의 구체적인 구성은, 전술한 본 명세서의 다양한 실시예에서 설명한 사항들이 독립적으로 적용되거나 또는 2 이상의 실시예가 동시에 적용되도록 구현될 수 있으며, 중복되는 내용은 명확성을 위하여 설명을 생략한다. In addition, the terminal device X100 and the server X200 as described above may include a GPU, and their specific configuration, as described in the various embodiments of the present specification described above, are independently applied or two or more embodiments are simultaneously applied. It may be implemented to be applied, and the overlapping content will be omitted for clarity.

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

또한, 이상에서 서비스 및 실시 예들을 중심으로 설명하였으나 이는 단지 예시일 뿐 본 명세서를 한정하는 것이 아니며, 본 명세서가 속하는 분야의 통상의 지식을 가진 자라면 본 서비스 및 실시 예의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시 예들에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부한 청구 범위에서 규정하는 본 명세서의 범위에 포함되는 것으로 해석되어야 할 것이다.In addition, although the above description has been focused on services and embodiments, this is only an example and does not limit the present specification, and those of ordinary skill in the art to which this specification pertains within a range that does not deviate from the essential characteristics of the present service and embodiments. It can be seen that various modifications and applications not exemplified above are possible. For example, each component specifically shown in the embodiments may be implemented by modification. And differences related to such modifications and applications should be construed as being included in the scope of the present specification defined in the appended claims.

Claims (10)

제1 노드가 분산학습(Distributed learning)을 위한 클러스터에 합류하는 방법에 있어서,
상기 클러스터에 포함된 제2 노드로부터, 상기 분산학습을 위한 학습모델을 수신하는 단계;
백그라운드 스레드(Background Thread)를 상기 분산학습을 위한 클러스터에 참여시키는 단계로서, 상기 백그라운드 스레드는 상기 분산학습을 위한 기울기 값과 관련된 텐서(tensor)를 생성함;
상기 텐서를 통해, 상기 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행하는 단계; 및
상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는 단계;
를 포함하는, 방법.
In the method for the first node to join a cluster for distributed learning,
receiving a learning model for the distributed learning from a second node included in the cluster;
joining a background thread to the cluster for distributed learning, wherein the background thread generates a tensor related to a gradient value for the distributed learning;
performing an All-reduce operation for the distributed learning through the tensor; and
applying first gradient values obtained through the all-reduce operation to the learning model;
A method comprising
제1항에 있어서,
상기 제2 노드는
상기 제1 노드가 상기 클러스터에 합류를 요청하는 경우, 상기 제1 노드에 상기 학습모델을 전달하기 위해, 상기 분산학습을 중단하는, 방법.
According to claim 1,
the second node
When the first node requests to join the cluster, stopping the distributed learning to deliver the learning model to the first node.
제1항에 있어서,
상기 텐서는 상기 분산학습을 위한 기울기 값과 동일한 타입을 갖고, 0으로 초기화된, 방법.
According to claim 1,
The tensor has the same type as the gradient value for the distributed learning, and is initialized to 0, the method.
제1항에 있어서,
상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는 단계는
상기 획득된 제1 기울기 값들을 메모리에 저장하는 단계; 및
메인 스레드(Main Thread)를 통해, 상기 메모리에 저장된 제1 기울기 값들을 순서대로 상기 학습모델에 적용하는 단계;
를 더 포함하는, 방법.
According to claim 1,
The step of applying the first gradient values obtained through the all-reduce operation to the learning model includes:
storing the obtained first gradient values in a memory; and
applying the first gradient values stored in the memory to the learning model in order through a main thread;
A method further comprising:
제1항에 있어서,
상기 클러스터의 노드로부터, 다음으로 반복된 분산학습과 관련된 제2 기울기 값을 수신하는 단계;
상기 제2 기울기 값을 상기 학습모델에 적용하는 단계; 및
상기 클러스터에 합류하는 단계;
를 더 포함하는, 방법.
According to claim 1,
receiving, from the nodes of the cluster, a second gradient value related to the next iterated distributed learning;
applying the second gradient value to the learning model; and
joining the cluster;
A method further comprising:
분산학습(Distributed learning)을 위한 클러스터에 합류하는 제1 노드를 구현하는 장치에 있어서,
신호를 송수신하기 위한 송수신부;
메모리; 및
상기 송수신부 및 상기 메모리를 기능적으로 제어하기 위한 AI 프로세서;
를 포함하며,
상기 AI 프로세서는
상기 송수신부를 통해, 상기 클러스터에 포함된 제2 노드로부터, 상기 분산학습을 위한 학습모델을 수신하고, 백그라운드 스레드(Background Thread)를 상기 분산학습을 위한 클러스터에 참여시키며, 상기 백그라운드 스레드는 상기 분산학습을 위한 기울기 값과 관련된 텐서(tensor)를 생성하고, 상기 텐서를 통해, 상기 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행하며, 상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는, 장치.
In an apparatus for implementing a first node joining a cluster for distributed learning,
a transceiver for transmitting and receiving a signal;
Memory; and
an AI processor for functionally controlling the transceiver and the memory;
includes,
The AI processor
A learning model for distributed learning is received from the second node included in the cluster through the transceiver, and a background thread participates in the cluster for distributed learning, and the background thread is the distributed learning. Generates a tensor related to a gradient value for Applies values to the learning model.
제6항에 있어서,
상기 제2 노드는
상기 제1 노드가 상기 클러스터에 합류를 요청하는 경우, 상기 제1 노드에 상기 학습모델을 전달하기 위해, 상기 분산학습을 중단하는, 장치.
7. The method of claim 6,
the second node
When the first node requests to join the cluster, the distributed learning is stopped in order to transfer the learning model to the first node.
제6항에 있어서,
상기 텐서는 상기 분산학습을 위한 기울기 값과 동일한 타입을 갖고, 0으로 초기화된, 장치.
7. The method of claim 6,
The tensor has the same type as the gradient value for distributed learning, and is initialized to 0.
제6항에 있어서,
상기 AI 프로세서는
상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하기 위해,
상기 획득된 제1 기울기 값들을 상기 메모리에 저장하고, 메인 스레드(Main Thread)를 통해, 상기 메모리에 저장된 제1 기울기 값들을 순서대로 상기 학습모델에 적용하는, 장치.
7. The method of claim 6,
The AI processor
In order to apply the first gradient values obtained through the all-reduce operation to the learning model,
The apparatus of storing the obtained first gradient values in the memory, and sequentially applying the first gradient values stored in the memory to the learning model through a main thread.
제6항에 있어서,
상기 AI 프로세서는
상기 클러스터의 노드로부터, 다음으로 반복된 분산학습과 관련된 제2 기울기 값을 수신하고, 상기 제2 기울기 값을 상기 학습모델에 적용하며, 상기 클러스터에 합류하는, 장치.
7. The method of claim 6,
The AI processor
receiving, from a node of the cluster, a second gradient value associated with a next iterated distributed learning, applying the second gradient value to the learning model, and joining the cluster.
KR1020210007091A 2021-01-18 2021-01-18 Method to reconfigure a machine learning cluster without interruption KR102549144B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210007091A KR102549144B1 (en) 2021-01-18 2021-01-18 Method to reconfigure a machine learning cluster without interruption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210007091A KR102549144B1 (en) 2021-01-18 2021-01-18 Method to reconfigure a machine learning cluster without interruption

Publications (2)

Publication Number Publication Date
KR20220104595A true KR20220104595A (en) 2022-07-26
KR102549144B1 KR102549144B1 (en) 2023-06-30

Family

ID=82609618

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210007091A KR102549144B1 (en) 2021-01-18 2021-01-18 Method to reconfigure a machine learning cluster without interruption

Country Status (1)

Country Link
KR (1) KR102549144B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050007309A (en) * 2002-04-19 2005-01-17 컴퓨터 어소시에이츠 싱크, 인코포레이티드 Automatic neural-net model generation and maintenance
JP2012022558A (en) * 2010-07-15 2012-02-02 Hitachi Ltd Distributed computation system
JP2020030691A (en) * 2018-08-23 2020-02-27 株式会社日立製作所 Optimizing system and optimizing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050007309A (en) * 2002-04-19 2005-01-17 컴퓨터 어소시에이츠 싱크, 인코포레이티드 Automatic neural-net model generation and maintenance
JP2012022558A (en) * 2010-07-15 2012-02-02 Hitachi Ltd Distributed computation system
JP2020030691A (en) * 2018-08-23 2020-02-27 株式会社日立製作所 Optimizing system and optimizing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"A Hitchhiker`s Guide on Distributed Training of Deep Neural Networks", Journal of Parallel and Distributed Computing 137(2020)(pp. 65-76), 2019.10.31. *

Also Published As

Publication number Publication date
KR102549144B1 (en) 2023-06-30

Similar Documents

Publication Publication Date Title
KR102130503B1 (en) Mobile terminal
KR102384641B1 (en) Method for controlling an intelligent system that performs multilingual processing
KR102209511B1 (en) Wearable glass-type device and method of controlling the device
KR102225918B1 (en) Artificial intelligence device
KR20190096872A (en) Method and apparatus for recognizing handwritten characters using federated learning
KR20190103088A (en) Method and apparatus for recognizing a business card using federated learning
KR102421487B1 (en) Artificial intelligent device
US20200026939A1 (en) Electronic device and method for controlling the same
KR102479499B1 (en) Mobile terminal
KR20190090368A (en) Intelligent method for controlling home appliance, apparatus and intelligent computing device for controlling home appliance
KR20210128074A (en) Audio zoom based on speaker detection using lip learding
KR20220067926A (en) Method to remove abnormal clients in a federated learning model
KR102468118B1 (en) Electronic device and method for controlling the same
KR102172772B1 (en) Artificial intelligence artificial server and artificial intelligence device
KR102082418B1 (en) Electronic device and method for controlling the same
KR102399809B1 (en) Electric terminal and method for controlling the same
US20190163436A1 (en) Electronic device and method for controlling the same
KR102251076B1 (en) Method to estimate blueprint using indoor image
KR102549144B1 (en) Method to reconfigure a machine learning cluster without interruption
US20210287665A1 (en) Voice recognition system
KR102369559B1 (en) Terminal
KR102663389B1 (en) Electronic device and its control method
KR102114064B1 (en) Mobile terminal
KR102658400B1 (en) Mobile terminal and its control method
KR102583586B1 (en) Split autoencoder model with latent dimension separation for multi-class data

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant