KR102549144B1 - 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
KR102549144B1
KR102549144B1 KR1020210007091A KR20210007091A KR102549144B1 KR 102549144 B1 KR102549144 B1 KR 102549144B1 KR 1020210007091 A KR1020210007091 A KR 1020210007091A KR 20210007091 A KR20210007091 A KR 20210007091A KR 102549144 B1 KR102549144 B1 KR 102549144B1
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
KR20220104595A (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
    • 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)
  • Feedback Control In General (AREA)
  • Logic Circuits (AREA)
  • Control Of Electric Motors In General (AREA)
  • Telephone Function (AREA)

Abstract

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

Description

중단 없는 기계학습 클러스터 재구성 방법 {METHOD TO RECONFIGURE A MACHINE LEARNING CLUSTER WITHOUT INTERRUPTION}How to reconstruct a machine learning cluster without disruption {METHOD TO RECONFIGURE A MACHINE LEARNING CLUSTER WITHOUT INTERRUPTION}

본 명세서는 분산학습 환경에서, 클라우드 자원의 효율성을 위해 중단 없이 기계학습 클러스터를 재구성하기 위한 방법 및 장치에 관한 것이다.The present specification relates to a method and apparatus for reconfiguring 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 learn with the same learning model, and at the end of each iteration, the model can be updated by collecting gradient values and obtaining an average value.

이러한 학습 진행의 특성상 기존의 분산 딥러닝 프레임워크들은 학습을 중단하지 않고 학습 모델을 동기화하기 어려워 중단 없이 컴퓨팅 노드를 추가하는 기능을 제공하고 있지 않다. Due to the nature of this learning progress, existing distributed deep learning frameworks do not provide a function to add computing nodes without stopping 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 without interrupting the learning process during distributed learning in a distributed learning environment.

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

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

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

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

또한, 상기 텐서는 상기 분산학습을 위한 기울기 값과 동일한 타입을 갖고, 0으로 초기화 될 수 있다.In addition, the tensor may have the same type as the gradient value for the distributed learning and 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 a second gradient value related to the next repeated distributed learning from the node of the cluster; 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 is 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, the AI processor receives the learning model for the distributed learning from the second node included in the cluster through the transceiver, 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, performs an Allreduce operation for the distributed learning through the tensor, and performs the Allreduce operation Through, it is possible to apply the obtained first gradient values to the learning model.

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

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

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

도 1은 본 명세서와 관련된 전자 기기를 설명하기 위한 블록도이다.
도 2는 본 명세서의 일 실시예에 따른 AI 장치의 블록도이다.
도 3은 본 명세서가 적용될 수 있는 분산학습 모델의 예시이다.
도 4는 본 명세서가 적용될 수 있는 클러스터 재구성 방법의 예시이다.
도 5는 본 명세서가 적용될 수 있는 일 실시예이다.
도 6은 본 명세서가 적용될 수 있는 장치 일반의 예시이다.
본 명세서에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 명세서에 대한 실시예를 제공하고, 상세한 설명과 함께 본 명세서의 기술적 특징을 설명한다.
1 is a block diagram for explaining 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 the present specification can be applied.
4 is an example of a cluster reconstruction method to which the present specification can be applied.
5 is an embodiment to which the present specification may be applied.
6 is an example of a device in general to which the present disclosure may be applied.
The accompanying drawings, which are included as part of the detailed description to aid understanding of the present specification, provide examples of the present specification and describe technical features of the present specification together with the detailed description.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

다른 예로서, 전원공급부(190)는 상기 연결포트를 이용하지 않고 무선방식으로 배터리를 충전하도록 이루어질 수 있다. 이 경우에, 전원공급부(190)는 외부의 무선 전력 전송장치로부터 자기 유도 현상에 기초한 유도 결합(Inductive Coupling) 방식이나 전자기적 공진 현상에 기초한 공진 결합(Magnetic Resonance Coupling) 방식 중 하나 이상을 이용하여 전력을 전달받을 수 있다. 본 명세서에서 전자기기(100)는 단말 및 서버를 포함할 수 있다. As another example, the power supply unit 190 may charge the battery in a wireless manner without using the connection port. In this case, the power supply unit 190 uses at least one of an inductive coupling method based on magnetic induction from an external wireless power transmitter or a magnetic resonance coupling method based on electromagnetic resonance. power can be delivered. 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. In addition, the AI device 20 may be included in at least a portion of the electronic device 100 shown in FIG. 1 to perform at least a portion 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 a 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 the structure of a human brain on a computer, and may include a plurality of network nodes having weights that simulate neurons of the human neural network. A plurality of network modes may transmit and receive data according to a connection relationship, respectively, so as to simulate synaptic activity of neurons that transmit and receive signals through synapses. Here, the neural network may include a deep learning model developed from a neural network model. In the deep learning model, a plurality of network nodes may exchange data according to a convolution connection relationship while being located in different layers. Examples of neural network models are deep neural networks (DNN), convolutional deep neural networks (CNN), recurrent Boltzmann machines (RNNs), restricted Boltzmann machines (RBMs), deep trust It includes various deep learning techniques such as deep belief networks (DBN) and deep Q-network, and can be applied to fields such as computer vision, voice recognition, natural language processing, and voice/signal processing.

한편, 전술한 바와 같은 기능을 수행하는 프로세서는 범용 프로세서(예를 들어, CPU)일 수 있으나, 인공지능 학습을 위한 AI 전용 프로세서(예를 들어, GPU)일 수 있다.Meanwhile, the processor performing the functions described above may be a general-purpose processor (eg, CPU), or 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/modifying/deleting/updating of data by the AI processor 21 can be performed. In addition, 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 criteria 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 acquire learning data to be used for learning and learn the deep learning model by applying the obtained 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 manufactured as a part of a general-purpose processor (CPU) or a graphics-only processor (GPU) for the AI device 20. may be mounted. Also, 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 recording medium (non-transitory computer readable media). In this case, at least one software module may be provided by an Operating System (OS) or an application.

데이터 학습부(22)는 학습 데이터 획득부(23) 및 모델 학습부(24)를 포함할 수 있다. The data learning unit 22 may include a training data acquisition 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 learning data acquisition unit 23 may acquire vehicle data and/or sample data to be input to a neural network model as learning data.

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

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

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

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

또한, 학습 데이터 선택부는, 학습 데이터 획득부(23)에서 획득된 학습 데이터 또는 전처리부에서 전처리된 학습 데이터 중 학습에 필요한 데이터를 선택할 수 있다. 선택된 학습 데이터는 모델 학습부(24)에 제공될 수 있다. 예를 들어, 학습 데이터 선택부는, 차량의 카메라를 통해 획득한 영상 중 특정 영역을 검출함으로써, 특정 영역에 포함된 객체에 대한 데이터만을 학습 데이터로 선택할 수 있다.In addition, the learning data selector may select data necessary for learning from among the learning data acquired by the learning data acquisition unit 23 or the learning data preprocessed by the preprocessor. The selected learning data may be provided to the model learning unit 24 . For example, the learning data selection unit may select only data about an object included in the specific region as training 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) to improve the analysis result of the neural network model.

모델 평가부는, 신경망 모델에 평가 데이터를 입력하고, 평가 데이터로부터 출력되는 분석 결과가 소정 기준을 만족하지 못하는 경우, 모델 학습부(22)로 하여금 다시 학습하도록 할 수 있다. 이 경우, 평가 데이터는 인식 모델을 평가하기 위한 기 정의된 데이터일 수 있다. 일 예로, 모델 평가부는 평가 데이터에 대한 학습된 인식 모델의 분석 결과 중, 분석 결과가 정확하지 않은 평가 데이터의 개수 또는 비율이 미리 설정되 임계치를 초과하는 경우, 소정 기준을 만족하지 못한 것으로 평가할 수 있다.The model evaluation unit inputs evaluation data to the neural network model, and when an analysis result output from the evaluation data does not satisfy a predetermined criterion, it 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. For example, the model evaluator may evaluate that the predetermined criterion is not satisfied when the number or ratio of the evaluation data for which the analysis result is inaccurate among the analysis results of the learned recognition model for the evaluation data exceeds a preset threshold. there is.

통신부(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. Also, the AI device 20 may be implemented through a server or network.

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

도 3은 본 명세서가 적용될 수 있는 분산학습 모델의 예시이다.3 is an example of a distributed learning model to which the present 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 gradient values of nodes connected in such a ring structure, a 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 can be divided by the number of nodes. A set of gradient values divided in this way 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 merged with each node's chunk.

즉, 각 노드들은 로컬 청크를 수신된 청크에 추가하여, 다음 노드로 전달할 수 있다. 모든 청크는 링을 통해, 전달되며, 각 노드에서 청크가 합쳐질 수 있다. 이를 통해, 청크가 모든 노드들을 방문한 경우(예를 들어, 상기 프로세스가 노드들의 수만큼 수행되는 경우), 각 노드는 모든 노드들의 결과가 합쳐진 하나의 청크를 보유할 수 있다.That is, each node can add a 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 (for example, when the process is performed as many as the number of nodes), each node may hold one chunk in which the results of all nodes are combined.

이러한 분산 학습 모델에서 컴퓨팅 노드가 추가 또는 제거되는 방식은 다음과 같을 수 있다.A method of adding or removing computing nodes in this 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 did not participate in learning before does not have an up-to-date learning model, so the learning model should be saved (checkpoint) in the form of a file when learning was stopped and passed to the new computing node. .

2. 브로드캐스트 방식: 학습 도중 노드 구성 변경에 대한 수요가 발생하면 기존 컴퓨팅 노드 중 하나가 브로드캐스트 통신을 이용해 변경된 구성과 학습 모델을 포함한 정보들을 모든 노드에게 전달한다. 이 동기화 과정을 마치면 학습을 재개한다.2. Broadcast method: When a demand for changing node configuration occurs during learning, one of the existing computing nodes delivers 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 suspended from the point of saving the learning model until learning is resumed with a new configuration, and in method 2, learning is suspended until the synchronization process of transmitting the learning model through broadcast communication is finished. Therefore, it is not possible to fully utilize the changing computing resources 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 transferred to a new computing node, a new technique to minimize this time is needed.

도 4는 본 명세서가 적용될 수 있는 클러스터 재구성 방법의 예시이다.4 is an example of a cluster reconstruction 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, learning model synchronization process

예를 들어, 기존의 클러스터들에 새로운 노드 추가가 요청된 경우, 기존의 컴퓨팅 노드 중 하나는 진행 중이던 학습을 마치고, 현재까지 학습된 모델을 추가 요청된 노드에 전달 할 수 있다. 이 때, 전달 과정 동안 학습된 모델이 변경되어선 안되기 때문에, 학습된 모델을 전달하는 노드는 잠시 학습과정에서 제외될 수 있다. For example, when adding a new node to existing clusters is requested, one of the existing computing nodes may complete learning in progress and transfer the model learned so far to the additionally requested node. At this time, since the learned model should not be changed during the transmission process, the node transmitting 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 the background thread in order 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 existing computing nodes are connected, and the operation of the next node to be added 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 progresses while the learning preparation process is performed and the learning model is loaded.

추가될 노드의 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. If the existing computing nodes perform 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 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 can sequentially store the gradient values obtained through the above process in memory, and the Main Thread can secure the latest learning model by sequentially applying the gradient values stored in memory to the learning model.

2. 최신 학습 모델을 확보한 노드의 클러스터 참여 과정2. Cluster participation process of nodes that have secured 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 at the same time that the existing nodes finish learning the next iteration. Upon application, the new node participates in learning along with the existing computing nodes. Then, the new node can perform an Allreduce operation with the gradient value calculated through learning without preparing a 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 can respond to changes in computing resources used in the learning process that is performed for a long time, and the efficiency of using cloud resources can be greatly increased.

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

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

추가될 제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, the second node may stop the distributed learning in order to transfer the learning model to the first node when the first node requests to join the cluster. This can be managed by a system node that manages the distributed learning.

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

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

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

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

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

도 6을 참조하면 제안하는 실시 예에 따른 서버(X200)는, 통신모듈(X210), 프로세서(X220) 및 메모리(X230)를 포함할 수 있다. 통신모듈(X210)은 무선 주파수(radio frequency, RF) 유닛으로 칭해지기도 한다. 통신모듈(X210)은 외부 장치로 각종 신호, 데이터 및 정보를 전송하고, 외부 장치로 각종 신호, 데이터 및 정보를 수신하도록 구성될 수 있다. 서버(X200)는 외부 장치와 유선 및/또는 무선으로 연결될 수 있다. 통신모듈(X210)은 전송부와 수신부로 분리되어 구현될 수도 있다. 프로세서(X220)는 서버(X200) 전반의 동작을 제어할 수 있으며, 서버(X200)가 외부 장치와 송수신할 정보 등을 연산 처리하는 기능을 수행하도록 구성될 수 있다. 또한, 프로세서(X220)는 본 명세서에서 제안하는 서버 동작을 수행하도록 구성될 수 있다. 프로세서(X220)은 본 명세서의 제안에 따라 데이터 혹은 메시지를 UE 혹은 다른 차량, 다른 서버에 전송하도록 통신모듈(X110)을 제어할 수 있다. 메모리(X230)는 연산 처리된 정보 등을 소정시간 동안 저장할 수 있으며, 버퍼 등의 구성요소로 대체될 수 있다.Referring to FIG. 6 , a 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 transmission unit and a reception unit. The processor X220 may control overall operations of the server X200, and may be configured to perform a function of calculating and processing information to be transmitted and received by the server X200 to and from an external device. Also, the processor X220 may be configured to perform a server operation proposed in this specification. The processor X220 may control the communication module X110 to transmit data or messages to a UE, another vehicle, or another server according to the proposal of this specification. The memory X230 may store information processed for a predetermined period of time, and may be replaced with components 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 for their specific configuration, the matters described in the various embodiments of the present specification described above are applied independently or two or more embodiments are simultaneously applied. It can be implemented to be applied, and descriptions of overlapping contents are omitted for clarity.

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

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

Claims (10)

컴퓨팅 장치에 의해 수행되는 제1 노드가 분산학습(Distributed learning)을 위한 클러스터에 합류하는 방법에 있어서,
상기 클러스터에 포함된 제2 노드로부터, 상기 분산학습을 위한 학습모델을 수신하는 단계;
백그라운드 스레드(Background Thread)를 상기 분산학습을 위한 클러스터에 참여시키는 단계로서, 상기 백그라운드 스레드는 상기 분산학습을 위한 기울기 값과 관련된 텐서(tensor)를 생성함;
상기 텐서를 통해, 상기 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행하는 단계; 및
상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는 단계;
를 포함하는, 방법.
A method in which a first node performed by a computing device joins a cluster for distributed learning,
receiving a learning model for the distributed learning from a second node included in the cluster;
Involving a background thread in the cluster for distributed learning, wherein the background thread creates a tensor related to a gradient value for distributed learning;
performing an allreduce operation for the distributed learning through the tensor; and
applying first gradient values obtained through the all-reduce operation to the learning model;
Including, method.
제1항에 있어서,
상기 제2 노드는
상기 제1 노드가 상기 클러스터에 합류를 요청하는 경우, 상기 제1 노드에 상기 학습모델을 전달하기 위해, 상기 분산학습을 중단하는, 방법.
According to claim 1,
The second node is
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.
제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
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;
Further comprising a method.
제1항에 있어서,
상기 클러스터의 노드로부터, 다음으로 반복된 분산학습과 관련된 제2 기울기 값을 수신하는 단계;
상기 제2 기울기 값을 상기 학습모델에 적용하는 단계; 및
상기 클러스터에 합류하는 단계;
를 더 포함하는, 방법.
According to claim 1,
Receiving, from a node of the cluster, a second gradient value related to the next repeated distributed learning;
applying the second gradient value to the learning model; and
joining the cluster;
Further comprising a method.
분산학습(Distributed learning)을 위한 클러스터에 합류하는 제1 노드를 구현하는 장치에 있어서,
신호를 송수신하기 위한 송수신부;
메모리; 및
상기 송수신부 및 상기 메모리를 기능적으로 제어하기 위한 AI 프로세서;
를 포함하며,
상기 AI 프로세서는
상기 송수신부를 통해, 상기 클러스터에 포함된 제2 노드로부터, 상기 분산학습을 위한 학습모델을 수신하고, 백그라운드 스레드(Background Thread)를 상기 분산학습을 위한 클러스터에 참여시키며, 상기 백그라운드 스레드는 상기 분산학습을 위한 기울기 값과 관련된 텐서(tensor)를 생성하고, 상기 텐서를 통해, 상기 분산학습을 위한 올-리듀스(Allreduce) 연산을 수행하며, 상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하는, 장치.
An apparatus for implementing a first node joining a cluster for distributed learning,
a transceiver for transmitting and receiving signals;
Memory; and
an AI processor for functionally controlling the transceiver and the memory;
Including,
The AI processor
Through the transceiver, the learning model for the distributed learning is received from the second node included in the cluster, a background thread participates in the cluster for the distributed learning, and the background thread is configured to participate in the distributed learning cluster. Generating a tensor related to a gradient value for , performing an Allreduce operation for the distributed learning through the tensor, and obtaining a first gradient through the Allreduce operation Apparatus for applying values to the learning model.
제6항에 있어서,
상기 제2 노드는
상기 제1 노드가 상기 클러스터에 합류를 요청하는 경우, 상기 제1 노드에 상기 학습모델을 전달하기 위해, 상기 분산학습을 중단하는, 장치.
According to claim 6,
The second node is
When the first node requests to join the cluster, stopping the distributed learning to deliver the learning model to the first node.
제6항에 있어서,
상기 텐서는 상기 분산학습을 위한 기울기 값과 동일한 타입을 갖고, 0으로 초기화된, 장치.
According to claim 6,
The tensor has the same type as the gradient value for the distributed learning and is initialized to 0.
제6항에 있어서,
상기 AI 프로세서는
상기 올-리듀스 연산을 통해, 획득된 제1 기울기 값들을 상기 학습모델에 적용하기 위해,
상기 획득된 제1 기울기 값들을 상기 메모리에 저장하고, 메인 스레드(Main Thread)를 통해, 상기 메모리에 저장된 제1 기울기 값들을 순서대로 상기 학습모델에 적용하는, 장치.
According to claim 6,
The AI processor
To apply the first gradient values obtained through the all-reduce operation to the learning model,
Apparatus for 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 기울기 값을 상기 학습모델에 적용하며, 상기 클러스터에 합류하는, 장치.
According to claim 6,
The AI processor
Receives, from the node of the cluster, a second gradient value related to the next repeated distributed learning, applies the second gradient value to the learning model, and joins 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 KR20220104595A (en) 2022-07-26
KR102549144B1 true 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7483868B2 (en) * 2002-04-19 2009-01-27 Computer Associates Think, Inc. Automatic neural-net model generation and maintenance

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
KR20220104595A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
US11348329B2 (en) Method and apparatus for recognizing a business card using federated learning
US10936904B2 (en) Method and apparatus for recognizing handwritten characters using federated learning
KR102225984B1 (en) Device including battery
US11416588B2 (en) Mobile terminal with enhanced security by having explicit authentication and implicit authentication
KR102384641B1 (en) Method for controlling an intelligent system that performs multilingual processing
KR20190103090A (en) Method and apparatus for learning a model to generate poi data using federated learning
US11073541B2 (en) Intelligent method for controlling home appliance, apparatus and intelligent computing device for controlling home appliance
KR102421487B1 (en) Artificial intelligent device
KR20190106950A (en) Artificial device and method for controlling the same
US11057750B2 (en) Intelligent device controlling method, mobile terminal and intelligent computing device
KR20210128074A (en) Audio zoom based on speaker detection using lip learding
KR20190106942A (en) Artificial device and method for controlling the same
US11423696B2 (en) Method for recognizing face using intelligent electronic device
US20190294954A1 (en) Artificial intelligence server
KR102468118B1 (en) Electronic device and method for controlling the same
KR102172772B1 (en) Artificial intelligence artificial server and artificial intelligence device
US20220158888A1 (en) Method to remove abnormal clients in a federated learning model
KR20220005106A (en) Control method of augmented reality electronic device
US20190163436A1 (en) Electronic device and method for controlling the same
US20200356647A1 (en) Electronic device and control method therefor
KR102251076B1 (en) Method to estimate blueprint using indoor image
KR102549144B1 (en) Method to reconfigure a machine learning cluster without interruption
KR102663389B1 (en) Electronic device and its control method
KR102114064B1 (en) Mobile terminal
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