KR20230068230A - Electronic device and method for preserving data in factory reset of the electronic device - Google Patents

Electronic device and method for preserving data in factory reset of the electronic device Download PDF

Info

Publication number
KR20230068230A
KR20230068230A KR1020210188159A KR20210188159A KR20230068230A KR 20230068230 A KR20230068230 A KR 20230068230A KR 1020210188159 A KR1020210188159 A KR 1020210188159A KR 20210188159 A KR20210188159 A KR 20210188159A KR 20230068230 A KR20230068230 A KR 20230068230A
Authority
KR
South Korea
Prior art keywords
memory
data
electronic device
area
processor
Prior art date
Application number
KR1020210188159A
Other languages
Korean (ko)
Inventor
이은성
신창훈
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to PCT/KR2022/014048 priority Critical patent/WO2023085589A1/en
Priority to US17/953,756 priority patent/US20230145690A1/en
Publication of KR20230068230A publication Critical patent/KR20230068230A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1456Hardware arrangements for backup
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0638Combination of memories, e.g. ROM and RAM such as to permit replacement or supplementing of words in one module by words in another module
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0661Format or protocol conversion arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명의 다양한 실시 예들은 제1 메모리, 상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리, 및 상기 제1 메모리 및 상기 제2 메모리 중 적어도 하나와 작동적으로 연결된 프로세서를 포함하고, 상기 프로세서는, 상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하고, 상기 생성된 논리 저장 영역에 지정된 데이터를 저장하고, 리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하고, 상기 제1 메모리를 포맷하고, 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하도록 설정된 방법 및 장치에 관하여 개시한다. 다양한 실시 예들이 가능하다.Various embodiments of the present invention include a first memory, a second memory having storage characteristics different from those of the first memory, and a processor operatively connected to at least one of the first memory and the second memory, wherein the processor creates a logical storage area in the data area of the first memory, stores specified data in the created logical storage area, enters a recovery mode, and stores the data stored in the logical storage area in the second memory; Disclosed is a method and apparatus configured to format the first memory and move data stored in the second memory to a data area of the first memory. Various embodiments are possible.

Description

전자 장치의 초기화 상황에서 데이터 보존 방법 및 그 전자 장치{ELECTRONIC DEVICE AND METHOD FOR PRESERVING DATA IN FACTORY RESET OF THE ELECTRONIC DEVICE}Method for preserving data in the initialization situation of an electronic device and the electronic device

본 발명의 다양한 실시예들은 전자 장치의 초기화 상황에서 데이터 보존 방법 및 그 전자 장치에 관하여 개시한다.Various embodiments of the present disclosure disclose a method for preserving data in an initialization situation of an electronic device and an electronic device thereof.

디지털 기술의 발달과 함께 이동통신 단말기, PDA(personal digital assistant), 전자수첩, 스마트 폰, 태블릿 PC(personal computer), 및 웨어러블 디바이스(wearable device)와 같은 다양한 유형의 전자 장치가 널리 사용되고 있다. 이러한, 전자 장치는 기능 지지 및 증대를 위해, 전자 장치의 하드웨어적인 부분 및/또는 소프트웨어적인 부분이 지속적으로 개량되고 있다.With the development of digital technology, various types of electronic devices such as mobile communication terminals, personal digital assistants (PDAs), electronic notebooks, smart phones, tablet PCs (personal computers), and wearable devices have been widely used. In order to support and increase functions of these electronic devices, hardware parts and/or software parts of electronic devices are continuously being improved.

한편, 전자 장치는 사용자의 사용 과정에서 메시지, 연락처, 사진, 동영상, 문서, 파일 또는 기타 데이터들이 저장될 수 있다. 전자 장치의 저장 크기(또는 용량)는 제조사나 각 전자 장치의 모델 별로 차이가 있을 수 있다. 전자 장치를 초기화 해야 하는 상황이 발생하면, 사용자는 전자 장치에 저장된 데이터 중 원하는 데이터를 선별적으로 골라 외부 저장 공간에 백업함으로써, 원하는 데이터가 삭제되는 것을 방지할 수 있다. 예를 들어, 외부 저장 공간은 컴퓨터(또는 노트북), 외장 메모리(예: SD Card) 또는 클라우드 서버일 수 있다. 백업 과정 없이 전자 장치를 초기화하면, 사용자에 의해 저장된 데이터가 사라지게 되며, 복구가 불가능할 수 있다.Meanwhile, an electronic device may store messages, contacts, photos, videos, documents, files, or other data during a user's use. The storage size (or capacity) of an electronic device may differ depending on the manufacturer or model of each electronic device. When a situation in which the electronic device needs to be initialized occurs, the user can prevent the desired data from being deleted by selectively selecting desired data from among data stored in the electronic device and backing it up to an external storage space. For example, the external storage space may be a computer (or laptop), an external memory (eg SD Card), or a cloud server. If an electronic device is initialized without a backup process, data stored by the user will disappear and recovery may be impossible.

한편, 원하는 데이터를 외부 저장 공간에 백업하는 과정은 일부 사용자에게 매우 어려운 것일 수 있다. 백업 과정 없이 전자 장치를 초기화 하게 되면 저장된 데이터가 모두 사라진다는 것을 알지 못하는 사용자도 있을 수 있다. 전자 장치에 대한 이해도가 낮은 사용자가 원하는 데이터를 외부 저장 공간에 백업하고, 전자 장치를 초기화한다는 것은 매우 어려울 수 있다. 다른 사용자(예: 지인, 수리 기사)의 도움을 받아 백업 후에 초기화할 수 있지만, 그 과정에서 다른 사용자에 의해 전자 장치에 저장된 데이터가 노출될 가능성도 있다. Meanwhile, the process of backing up desired data to an external storage space may be very difficult for some users. Some users may not know that all stored data will be lost if an electronic device is initialized without a backup process. It may be very difficult for a user who has little understanding of an electronic device to back up desired data to an external storage space and initialize the electronic device. It can be initialized after backup with the help of other users (eg acquaintances, repair technicians), but there is a possibility that data stored in the electronic device may be exposed by other users in the process.

다양한 실시예들에서는, 비휘발성 메모리의 설정된 영역에 논리 저장 영역을 생성하고, 생성된 논리 저장 영역에 보존 데이터를 저장하고, 리커버리 모드로 진입하여 논리 저장 영역에 저장된 보존 데이터를 휘발성 메모리에 저장하고, 비휘발성 메모리의 설정된 영역을 포맷하고, 휘발성 메모리에 저장된 보존 데이터를 비휘발성 메모리의 설정된 영역에 저장하는 방법 및 장치에 관하여 개시할 수 있다.In various embodiments, a logical storage area is created in a set area of a non-volatile memory, stored data is stored in the created logical storage area, a recovery mode is entered, and the stored data stored in the logical storage area is stored in a volatile memory. , a method and apparatus for formatting a set area of a non-volatile memory and storing stored data stored in the volatile memory in the set area of the non-volatile memory.

본 발명의 다양한 실시예들에 따른 전자 장치는 제1 메모리, 상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리, 및 상기 제1 메모리 및 상기 제2 메모리 중 적어도 하나와 작동적으로 연결된 프로세서를 포함하고, 상기 프로세서는, 상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하고, 상기 생성된 논리 저장 영역에 지정된 데이터를 저장하고, 리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하고, 상기 제1 메모리를 포맷하고, 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하도록 설정될 수 있다.An electronic device according to various embodiments of the present disclosure includes a first memory, a second memory having a storage characteristic different from that of the first memory, and a processor operatively connected to at least one of the first memory and the second memory. wherein the processor creates a logical storage area in the data area of the first memory, stores specified data in the created logical storage area, enters a recovery mode, and transfers the data stored in the logical storage area to the second memory area. 2 memory, format the first memory, and move data stored in the second memory to a data area of the first memory.

본 발명의 다양한 실시예들에 따른 제1 메모리 및 상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리를 포함하는 전자 장치의 동작 방법은 상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하는 동작, 상기 생성된 논리 저장 영역에 지정된 데이터를 저장하는 동작, 리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하는 동작, 상기 제1 메모리를 포맷하는 동작, 및 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하는 동작을 포함할 수 있다.An operating method of an electronic device including a first memory and a second memory having storage characteristics different from those of the first memory according to various embodiments of the present disclosure includes generating a logical storage area in a data area of the first memory. , storing specified data in the created logical storage area, entering a recovery mode and storing data stored in the logical storage area in the second memory, formatting the first memory, and An operation of moving data stored in a memory to a data area of the first memory may be included.

다양한 실시예들에 따르면, 외부 저장 공간을 활용하지 않고, 전자 장치에 저장된 데이터 중 원하는 데이터를 보존하면서, 전자 장치를 초기화할 수 있다.According to various embodiments, the electronic device may be initialized while preserving desired data among data stored in the electronic device without using an external storage space.

다양한 실시예들에 따르면, 원하는 데이터를 외부 저장 공간으로 백업했다가, 전자 장치의 초기화가 완료된 후, 다시 전자 장치에 저장하는 과정이 필요 없기 때문에 초기화 및 원하는 데이터를 보존하는데 걸리는 시간이 단축되고, 절차적으로 간소화할 수 있으며, 사용자의 불편함을 최소화할 수 있다. According to various embodiments, since a process of backing up desired data to an external storage space and then storing the desired data in the electronic device after completion of initialization of the electronic device is not required, the time required for initialization and preservation of desired data is reduced, It can be procedurally simplified and user's inconvenience can be minimized.

다양한 실시예들에 따르면, 원하는 데이터를 보존하기 위해 외부 저장 공간으로 백업하지 않아도 되기 때문에, 데이터가 외부로 노출될 위험을 감소시킬 수 있다.According to various embodiments, since it is not necessary to back up desired data to an external storage space in order to preserve it, the risk of data being exposed to the outside can be reduced.

다양한 실시예들에 따르면, 실수로 전자 장치를 초기화하는 경우에도, 사용자의 선택 없이도 지정된 데이터를 보존한 후 전자 장치를 초기화하므로, 중요한 데이터가 삭제되는 일을 미리 방지할 수 있다.According to various embodiments, even when an electronic device is initialized by mistake, it is possible to prevent important data from being deleted in advance because the electronic device is initialized after preserving designated data without a user's selection.

도 1은 다양한 실시예들에 따른 네트워크 환경 내의 전자 장치의 블록도이다.
도 2는 다양한 실시예들에 따른 전자 장치의 동작 방법을 도시한 흐름도이다.
도 3a 및 도 3b는 다양한 실시예들에 따른 전자 장치에서 데이터를 보존하면서 포맷하는 일례를 도시한 도면들이다.
도 4는 다양한 실시예들에 따른 전자 장치의 리커버리 모드를 실행하는 방법을 도시한 흐름도이다.
도 5는 다양한 실시예들에 따른 전자 장치에서 보존하려는 데이터를 선택하는 사용자 인터페이스를 도시한 도면이다.
도 6은 다양한 실시예들에 따른 전자 장치의 논리 저장 영역을 마운트하는 방법을 도시한 흐름도이다.
도 7은 다양한 실시예들에 따른 전자 장치에서 제2 리커버리 모드로 진입하여 논리 저장 영역을 마운트하는 일례를 도시한 도면이다.
도 8은 다양한 실시예들에 따른 전자 장치의 제1 리커버리 모드 및 제2 리커버리 모드를 비교한 일례를 도시한 도면이다.
도 9는 다양한 실시예들에 따른 전자 장치에서 제2 메모리의 크기에 기반하여 보존하려는 데이터를 선택하는 방법을 도시한 흐름도이다.
도 10은 다양한 실시예들에 따른 전자 장치에서 제2 메모리의 크기에 기반하여 보존하려는 데이터를 선택하는 일례를 도시한 도면이다.
1 is a block diagram of an electronic device in a network environment according to various embodiments.
2 is a flowchart illustrating a method of operating an electronic device according to various embodiments.
3A and 3B are diagrams illustrating an example of formatting while preserving data in an electronic device according to various embodiments.
4 is a flowchart illustrating a method of executing a recovery mode of an electronic device according to various embodiments.
5 is a diagram illustrating a user interface for selecting data to be preserved in an electronic device according to various embodiments.
6 is a flowchart illustrating a method of mounting a logical storage area of an electronic device according to various embodiments.
7 is a diagram illustrating an example of mounting a logical storage area by entering a second recovery mode in an electronic device according to various embodiments of the present disclosure;
8 is a diagram illustrating an example of comparing a first recovery mode and a second recovery mode of an electronic device according to various embodiments.
9 is a flowchart illustrating a method of selecting data to be preserved based on a size of a second memory in an electronic device according to various embodiments.
10 is a diagram illustrating an example of selecting data to be preserved based on a size of a second memory in an electronic device according to various embodiments.

도 1은 다양한 실시예들에 따른, 네트워크 환경(100) 내의 전자 장치(101)의 블록도이다. 1 is a block diagram of an electronic device 101 in a network environment 100 according to various embodiments.

도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108) 중 적어도 하나와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 모듈(150), 음향 출력 모듈(155), 디스플레이 모듈(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 연결 단자(178), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(178))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(176), 카메라 모듈(180), 또는 안테나 모듈(197))은 하나의 구성요소(예: 디스플레이 모듈(160))로 통합될 수 있다.Referring to FIG. 1 , in a network environment 100, an electronic device 101 communicates with an electronic device 102 through a first network 198 (eg, a short-range wireless communication network) or through a second network 199. It may communicate with at least one of the electronic device 104 or the server 108 through (eg, a long-distance wireless communication network). According to one embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108 . According to an embodiment, the electronic device 101 includes a processor 120, a memory 130, an input module 150, an audio output module 155, a display module 160, an audio module 170, a sensor module ( 176), interface 177, connection terminal 178, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, subscriber identification module 196 , or the antenna module 197 may be included. In some embodiments, in the electronic device 101, at least one of these components (eg, the connection terminal 178) may be omitted or one or more other components may be added. In some embodiments, some of these components (eg, sensor module 176, camera module 180, or antenna module 197) are integrated into a single component (eg, display module 160). It can be.

프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 저장하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(101)가 메인 프로세서(121) 및 보조 프로세서(123)를 포함하는 경우, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.The processor 120, for example, executes software (eg, the program 140) to cause at least one other component (eg, hardware or software component) of the electronic device 101 connected to the processor 120. It can control and perform various data processing or calculations. According to one embodiment, as at least part of data processing or operation, the processor 120 transfers instructions or data received from other components (e.g., sensor module 176 or communication module 190) to volatile memory 132. , processing commands or data stored in the volatile memory 132 , and storing resultant data in the non-volatile memory 134 . According to one embodiment, the processor 120 may include a main processor 121 (eg, a central processing unit or an application processor) or a secondary processor 123 (eg, a graphic processing unit, a neural network processing unit ( NPU: neural processing unit (NPU), image signal processor, sensor hub processor, or communication processor). For example, when the electronic device 101 includes the main processor 121 and the auxiliary processor 123, the auxiliary processor 123 may use less power than the main processor 121 or be set to be specialized for a designated function. can The secondary processor 123 may be implemented separately from or as part of the main processor 121 .

보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능 모델이 수행되는 전자 장치(101) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(108))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.The secondary processor 123 may, for example, take the place of the main processor 121 while the main processor 121 is in an inactive (eg, sleep) state, or the main processor 121 is active (eg, running an application). ) state, together with the main processor 121, at least one of the components of the electronic device 101 (eg, the display module 160, the sensor module 176, or the communication module 190) It is possible to control at least some of the related functions or states. According to one embodiment, the auxiliary processor 123 (eg, image signal processor or communication processor) may be implemented as part of other functionally related components (eg, camera module 180 or communication module 190). there is. According to an embodiment, the auxiliary processor 123 (eg, a neural network processing device) may include a hardware structure specialized for processing an artificial intelligence model. AI models can be created through machine learning. Such learning may be performed, for example, in the electronic device 101 itself where the artificial intelligence model is performed, or may be performed through a separate server (eg, the server 108). The learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning or reinforcement learning, but in the above example Not limited. The artificial intelligence model may include a plurality of artificial neural network layers. Artificial neural networks include deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), restricted boltzmann machines (RBMs), deep belief networks (DBNs), bidirectional recurrent deep neural networks (BRDNNs), It may be one of deep Q-networks or a combination of two or more of the foregoing, but is not limited to the foregoing examples. The artificial intelligence model may include, in addition or alternatively, software structures in addition to hardware structures.

메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다. The memory 130 may store various data used by at least one component (eg, the processor 120 or the sensor module 176) of the electronic device 101 . The data may include, for example, input data or output data for software (eg, program 140) and commands related thereto. The memory 130 may include volatile memory 132 or non-volatile memory 134 .

프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다. The program 140 may be stored as software in the memory 130 and may include, for example, an operating system 142 , middleware 144 , or an application 146 .

입력 모듈(150)은, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(150)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다. The input module 150 may receive a command or data to be used by a component (eg, the processor 120) of the electronic device 101 from the outside of the electronic device 101 (eg, a user). The input module 150 may include, for example, a microphone, a mouse, a keyboard, a key (eg, a button), or a digital pen (eg, a stylus pen).

음향 출력 모듈(155)은 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 모듈(155)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.The sound output module 155 may output sound signals to the outside of the electronic device 101 . The sound output module 155 may include, for example, a speaker or a receiver. The speaker can be used for general purposes such as multimedia playback or recording playback. A receiver may be used to receive an incoming call. According to one embodiment, the receiver may be implemented separately from the speaker or as part of it.

디스플레이 모듈(160)은 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(160)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다. The display module 160 may visually provide information to the outside of the electronic device 101 (eg, a user). The display module 160 may include, for example, a display, a hologram device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module 160 may include a touch sensor set to detect a touch or a pressure sensor set to measure the intensity of force generated by the touch.

오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(170)은, 입력 모듈(150)을 통해 소리를 획득하거나, 음향 출력 모듈(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.The audio module 170 may convert sound into an electrical signal or vice versa. According to one embodiment, the audio module 170 acquires sound through the input module 150, the sound output module 155, or an external electronic device connected directly or wirelessly to the electronic device 101 (eg: Sound may be output through the electronic device 102 (eg, a speaker or a headphone).

센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다. The sensor module 176 detects an operating state (eg, power or temperature) of the electronic device 101 or an external environmental state (eg, a user state), and generates an electrical signal or data value corresponding to the detected state. can do. According to one embodiment, the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a bio sensor, It may include a temperature sensor, humidity sensor, or light sensor.

인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.The interface 177 may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device 101 to an external electronic device (eg, the electronic device 102). According to one embodiment, the interface 177 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.The connection terminal 178 may include a connector through which the electronic device 101 may be physically connected to an external electronic device (eg, the electronic device 102). According to one embodiment, the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).

햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.The haptic module 179 may convert electrical signals into mechanical stimuli (eg, vibration or motion) or electrical stimuli that a user may perceive through tactile or kinesthetic senses. According to one embodiment, the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.The camera module 180 may capture still images and moving images. According to one embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.

전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.The power management module 188 may manage power supplied to the electronic device 101 . According to one embodiment, the power management module 188 may be implemented as at least part of a power management integrated circuit (PMIC), for example.

배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.The battery 189 may supply power to at least one component of the electronic device 101 . According to one embodiment, the battery 189 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.

통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제1 네트워크(198)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제2 네트워크(199)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제1 네트워크(198) 또는 제2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 또는 인증할 수 있다. The communication module 190 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (eg, the electronic device 102, the electronic device 104, or the server 108). Establishment and communication through the established communication channel may be supported. The communication module 190 may include one or more communication processors that operate independently of the processor 120 (eg, an application processor) and support direct (eg, wired) communication or wireless communication. According to one embodiment, the communication module 190 is a wireless communication module 192 (eg, a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (eg, : a local area network (LAN) communication module or a power line communication module). Among these communication modules, a corresponding communication module is a first network 198 (eg, a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network 199 (eg, a legacy communication module). It may communicate with the external electronic device 104 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a telecommunications network such as a computer network (eg, a LAN or a WAN). These various types of communication modules may be integrated as one component (eg, a single chip) or implemented as a plurality of separate components (eg, multiple chips). The wireless communication module 192 uses subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 196 within a communication network such as the first network 198 or the second network 199. The electronic device 101 may be identified or authenticated.

무선 통신 모듈(192)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(192)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(192)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(192)은 전자 장치(101), 외부 전자 장치(예: 전자 장치(104)) 또는 네트워크 시스템(예: 제2 네트워크(199))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(192)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.The wireless communication module 192 may support a 5G network after a 4G network and a next-generation communication technology, for example, NR access technology (new radio access technology). NR access technologies include high-speed transmission of high-capacity data (enhanced mobile broadband (eMBB)), minimization of terminal power and access of multiple terminals (massive machine type communications (mMTC)), or high reliability and low latency (ultra-reliable and low latency (URLLC)). -latency communications)) can be supported. The wireless communication module 192 may support a high frequency band (eg, mmWave band) to achieve a high data rate, for example. The wireless communication module 192 uses various technologies for securing performance in a high frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), and full-dimensional multiplexing. Technologies such as input/output (FD-MIMO: full dimensional MIMO), array antenna, analog beam-forming, or large scale antenna may be supported. The wireless communication module 192 may support various requirements defined for the electronic device 101, an external electronic device (eg, the electronic device 104), or a network system (eg, the second network 199). According to one embodiment, the wireless communication module 192 is a peak data rate for eMBB realization (eg, 20 Gbps or more), a loss coverage for mMTC realization (eg, 164 dB or less), or a U-plane latency for URLLC realization (eg, Example: downlink (DL) and uplink (UL) each of 0.5 ms or less, or round trip 1 ms or less) may be supported.

안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제1 네트워크(198) 또는 제2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다. The antenna module 197 may transmit or receive signals or power to the outside (eg, an external electronic device). According to one embodiment, the antenna module 197 may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (eg, PCB). According to one embodiment, the antenna module 197 may include a plurality of antennas (eg, an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 198 or the second network 199 is selected from the plurality of antennas by the communication module 190, for example. can be chosen A signal or power may be transmitted or received between the communication module 190 and an external electronic device through the selected at least one antenna. According to some embodiments, other components (eg, a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module 197 in addition to the radiator.

다양한 실시예에 따르면, 안테나 모듈(197)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.According to various embodiments, the antenna module 197 may form a mmWave antenna module. According to one embodiment, the mmWave antenna module includes a printed circuit board, an RFIC disposed on or adjacent to a first surface (eg, a lower surface) of the printed circuit board and capable of supporting a designated high frequency band (eg, mmWave band); and a plurality of antennas (eg, array antennas) disposed on or adjacent to a second surface (eg, a top surface or a side surface) of the printed circuit board and capable of transmitting or receiving signals of the designated high frequency band. can do.

상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.At least some of the components are connected to each other through a communication method between peripheral devices (eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)) and signal ( e.g. commands or data) can be exchanged with each other.

일실시예에 따르면, 명령 또는 데이터는 제2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(102, 또는 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(101)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(104)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(108)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일실시예에 따르면, 외부의 전자 장치(104) 또는 서버(108)는 제2 네트워크(199) 내에 포함될 수 있다. 전자 장치(101)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다. According to an embodiment, commands or data may be transmitted or received between the electronic device 101 and the external electronic device 104 through the server 108 connected to the second network 199 . Each of the external electronic devices 102 or 104 may be the same as or different from the electronic device 101 . According to an embodiment, all or part of operations executed in the electronic device 101 may be executed in one or more external electronic devices among the external electronic devices 102 , 104 , or 108 . For example, when the electronic device 101 needs to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device 101 instead of executing the function or service by itself. Alternatively or additionally, one or more external electronic devices may be requested to perform the function or at least part of the service. One or more external electronic devices receiving the request may execute at least a part of the requested function or service or an additional function or service related to the request, and deliver the execution result to the electronic device 101 . The electronic device 101 may provide the result as at least part of a response to the request as it is or additionally processed. To this end, for example, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used. The electronic device 101 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing. In another embodiment, the external electronic device 104 may include an internet of things (IoT) device. Server 108 may be an intelligent server using machine learning and/or neural networks. According to one embodiment, the external electronic device 104 or server 108 may be included in the second network 199 . The electronic device 101 may be applied to intelligent services (eg, smart home, smart city, smart car, or health care) based on 5G communication technology and IoT-related technology.

본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.Electronic devices according to various embodiments disclosed in this document may be devices of various types. The electronic device may include, for example, a portable communication device (eg, a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance. An electronic device according to an embodiment of the present document is not limited to the aforementioned devices.

본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제1", "제2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제1) 구성요소가 다른(예: 제2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.Various embodiments of this document and terms used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, like reference numbers may be used for like or related elements. The singular form of a noun corresponding to an item may include one item or a plurality of items, unless the relevant context clearly dictates otherwise. In this document, "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C", and "A Each of the phrases such as "at least one of , B, or C" may include any one of the items listed together in that phrase, or all possible combinations thereof. Terms such as "first", "second", or "first" or "secondary" may simply be used to distinguish that component from other corresponding components, and may refer to that component in other respects (eg, importance or order) is not limited. A (eg, first) component is said to be "coupled" or "connected" to another (eg, second) component, with or without the terms "functionally" or "communicatively." When mentioned, it means that the certain component may be connected to the other component directly (eg by wire), wirelessly, or through a third component.

본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다. The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and is interchangeable with terms such as, for example, logic, logical blocks, parts, or circuits. can be used as A module may be an integrally constructed component or a minimal unit of components or a portion thereof that performs one or more functions. For example, according to one embodiment, the module may be implemented in the form of an application-specific integrated circuit (ASIC).

본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(101)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(101))의 프로세서(예: 프로세서(120))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.Various embodiments of this document provide one or more instructions stored in a storage medium (eg, internal memory 136 or external memory 138) readable by a machine (eg, electronic device 101). It may be implemented as software (eg, the program 140) including them. For example, a processor (eg, the processor 120 ) of a device (eg, the electronic device 101 ) may call at least one command among one or more instructions stored from a storage medium and execute it. This enables the device to be operated to perform at least one function according to the at least one command invoked. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-temporary' only means that the storage medium is a tangible device and does not contain a signal (e.g. electromagnetic wave), and this term refers to the case where data is stored semi-permanently in the storage medium. It does not discriminate when it is temporarily stored.

일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments disclosed in this document may be included and provided in a computer program product. Computer program products may be traded between sellers and buyers as commodities. A computer program product is distributed in the form of a device-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store (eg Play Store TM ) or on two user devices ( It can be distributed (eg downloaded or uploaded) online, directly between smart phones. In the case of online distribution, at least part of the computer program product may be temporarily stored or temporarily created in a device-readable storage medium such as a manufacturer's server, an application store server, or a relay server's memory.

다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.According to various embodiments, each component (eg, module or program) of the above-described components may include a single object or a plurality of entities, and some of the plurality of entities may be separately disposed in other components. there is. According to various embodiments, one or more components or operations among the aforementioned corresponding components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (eg modules or programs) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by a corresponding component of the plurality of components prior to the integration. . According to various embodiments, the actions performed by a module, program, or other component are executed sequentially, in parallel, iteratively, or heuristically, or one or more of the actions are executed in a different order, or omitted. or one or more other actions may be added.

본 발명의 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))는 제1 메모리(예: 도 1의 비휘발성 메모리(134)), 상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리(예: 도 1의 휘발성 메모리(132)) 또는, 및 상기 제1 메모리 및 상기 제2 메모리 중 적어도 하나와 작동적으로 연결된 프로세서(예: 도 1의 프로세서(120))를 포함하고, 상기 프로세서는, 상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하고, 상기 생성된 논리 저장 영역에 지정된 데이터를 저장하고, 리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하고, 상기 제1 메모리를 포맷하고, 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하도록 설정될 수 있다.An electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments of the present disclosure has a first memory (eg, the non-volatile memory 134 of FIG. 1 ) and storage characteristics different from those of the first memory. a second memory having (e.g., volatile memory 132 of FIG. 1) or a processor (e.g., processor 120 of FIG. 1) operatively coupled to at least one of the first memory and the second memory. The processor creates a logical storage area in the data area of the first memory, stores specified data in the created logical storage area, enters a recovery mode, and stores the data stored in the logical storage area in the second memory area. It may be set to store in a memory, format the first memory, and move data stored in the second memory to a data area of the first memory.

상기 제1 메모리는, 비휘발성 메모리이고, 상기 제2 메모리는 휘발성 메모리인 것으로 설정될 수 있다.The first memory may be a non-volatile memory, and the second memory may be set to be a volatile memory.

상기 프로세서는, 상기 리커버리 모드의 실행이 요청되면, 상기 논리 저장 영역을 생성하도록 설정될 수 있다.The processor may be set to create the logical storage area when execution of the recovery mode is requested.

상기 프로세서는, 상기 전자 장치의 사용 이력에 기반하여 상기 지정된 데이터를 결정하거나, 사용자로부터 데이터를 저장할 때마다 상기 지정된 데이터를 선택받거나, 또는 상기 리커버리 모드의 실행 시 사용자로부터 상기 지정된 데이터를 선택받는 동작 중 적어도 하나를 수행하도록 설정될 수 있다.The processor determines the specified data based on the use history of the electronic device, receives a user selection of the specified data whenever data is stored, or selects the specified data from a user when the recovery mode is executed. It can be set to perform at least one of

상기 프로세서는, 상기 논리 저장 영역에 대응하는 메타데이터를 상기 제1 메모리의 지정된 영역에 저장하고, 상기 리커버리 모드로 진입하면, 상기 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하도록 설정될 수 있다.The processor may be configured to store metadata corresponding to the logical storage area in a designated area of the first memory and to mount the logical storage area based on the metadata when entering the recovery mode.

상기 프로세서는, 상기 메타데이터를 암호화하여 상기 지정된 영역에 저장하거나, 상기 메타데이터를 암호화하지 않고 상기 지정된 영역의 암호화된 공간에 저장하도록 설정될 수 있다.The processor may be configured to encrypt the metadata and store the metadata in the designated area or to store the metadata in an encrypted space of the designated area without encrypting the metadata.

상기 프로세서는, 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동한 후, 상기 메타데이터를 삭제하도록 설정될 수 있다.The processor may be set to delete the metadata after moving data stored in the second memory to a data area of the first memory.

상기 지정된 영역은, 상기 전자 장치가 일반 동작 모드일 때 RW(read & write) 형식의 저장 특성을 가지고, 상기 데이터 영역은 상기 전자 장치가 일반 동작 모드인 경우, RW 형식의 저장 특성을 가지나, 상기 리커버리 모드인 경우, 파일 시스템으로 마운트하지 않는 저장 특성을 가지도록 설정될 수 있다.The designated area has a storage characteristic of a read & write (RW) format when the electronic device is in a normal operation mode, and the data area has a storage characteristic of a RW format when the electronic device is in a normal operation mode. In the case of recovery mode, it can be set to have a storage property that does not mount as a file system.

상기 프로세서는, 상기 제1 메모리의 포맷 이후에, 상기 제1 메모리를 마운트하고, 상기 제2 메모리에 저장된 데이터를 복사하여 상기 제1 메모리의 데이터 영역에 이동시켜 저장하도록 설정될 수 있다.The processor may be set to mount the first memory after formatting the first memory, copy data stored in the second memory, move the copied data to a data area of the first memory, and store the copied data.

상기 프로세서는, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부에 기반하여 상기 지정된 데이터의 크기를 제어하도록 설정될 수 있다.The processor may be configured to control the size of the designated data based on whether the size of the designated data exceeds a storage size of the second memory.

상기 프로세서는, 상기 제2 메모리의 저장 크기를 식별하고, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부를 판단하고, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 상기 전자 장치의 사용 이력 또는 사용자 입력에 기반하여 일부 데이터를 선택하고, 상기 선택된 일부 데이터를 상기 지정된 데이터로서, 상기 논리 저장 영역에 백업하도록 설정될 수 있다.The processor identifies the storage size of the second memory, determines whether the size of the specified data exceeds the storage size of the second memory, and determines whether the size of the specified data exceeds the storage size of the second memory. If it exceeds, it may be configured to select some data based on a use history of the electronic device or a user input, and to back up the selected data in the logical storage area as the designated data.

도 2는 다양한 실시예들에 따른 전자 장치의 동작 방법을 도시한 흐름도(200)이다.2 is a flowchart 200 illustrating a method of operating an electronic device according to various embodiments.

도 2를 참조하면, 동작 201에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 제1 메모리의 데이터 영역에 논리 저장 영역을 생성할 수 있다. 상기 논리 저장 영역(또는 '논리 파티션', '논리 저장 공간')은 데이터를 포함할 수 있는 container와 같은 구조를 가질 수 있다. 전자 장치(101)의 메모리(예: 도 1의 메모리(130))는 휘발성 메모리(예: 도 1의 휘발성 메모리(132)) 또는 비휘발성 메모리(예: 도 1의 비휘발성 메모리(134))를 포함할 수 있다. 상기 제1 메모리는 비휘발성 메모리(134)를 의미할 수 있다. 전자 장치(101)는 메모리(130) 전체를 하나의 공간으로 사용하지 않고, 하나 이상의 개별 저장 공간으로 분할하여 사용할 수 있다. 상기 데이터 영역은 상기 제1 메모리의 저장 공간 중 하나로서, 파티션이라고 부를 수 있다. 이하에서는 파티션을 '영역'으로 통칭하기로 한다. 사용자에 의해 전자 장치(101)에 데이터를 저장하고자 하는 경우, 데이터는 상기 데이터 영역에 저장될 수 있다.Referring to FIG. 2 , in operation 201, a processor (eg, processor 120 of FIG. 1 ) of an electronic device (eg, electronic device 101 of FIG. 1 ) according to various embodiments sets a data area of a first memory. A logical storage area can be created in The logical storage area (or 'logical partition' or 'logical storage space') may have a structure such as a container capable of including data. The memory (eg, memory 130 of FIG. 1 ) of the electronic device 101 may be a volatile memory (eg, volatile memory 132 of FIG. 1 ) or a non-volatile memory (eg, non-volatile memory 134 of FIG. 1 ). can include The first memory may mean a non-volatile memory 134 . The electronic device 101 may divide and use the entire memory 130 into one or more individual storage spaces instead of using the entire memory 130 as one space. The data area is one of the storage spaces of the first memory and may be referred to as a partition. Hereinafter, the partition will be collectively referred to as a 'region'. When a user wants to store data in the electronic device 101, the data may be stored in the data area.

각각의 영역은 RO(read only) 형식 또는 RW(read & write) 형식의 저장 특성을 가질 수 있다. RO 형식은 전자 장치(101)의 사용자가 사용하지 못하는 영역(예: 접근 불가 영역)으로, 전자 장치(101)의 시스템적인 동작에 의해서만 쓰여지도록 제한되는 것일 수 있다. 상기 RO 형식은 소프트웨어 업데이트 시에만 쓰여질 수 있고, 사용자에 의해서는 쓰여지지 못하는 형식일 수 있다. RW 형식은 지속적으로 쓰고 지울 수 있는 형식일 수 있다. 상기 데이터 영역은 RW 형식의 저장 특성을 가질 수 있다. Each area may have a storage characteristic of a read only (RO) format or a read & write (RW) format. The RO format is an area (eg, an inaccessible area) that the user of the electronic device 101 cannot use, and may be restricted to be written only by a systematic operation of the electronic device 101 . The RO format may be written only when updating software, and may not be written by a user. The RW format can be a persistently writeable and erasable format. The data area may have a RW format storage characteristic.

다양한 실시예들에 따르면, 프로세서(120)는 전자 장치(101)의 리커버리 모드 중 제2 리커버리 모드의 실행을 요청받은 경우, 동작 201을 수행할 수 있다. 예를 들어, 사용자는 전자 장치(101)의 설정 메뉴에서 전자 장치(101)의 리커버리 모드 중 제2 리커버리 모드를 실행시킬 수 있다. 상기 리커버리 모드는 제1 리커버리 모드 또는 상기 제2 리커버리 모드를 포함할 수 있다. 청구항에 기재된 리커버리 모드는 "제2 리커버리 모드"를 의미할 수 있다. 상기 제1 리커버리 모드는 전자 장치(101)를 공장 초기화하는 것으로, 전자 장치(101)에 저장된 데이터가 모두 삭제되는 것일 수 있다. 상기 제2 리커버리 모드는 전자 장치(101)를 초기화하면서 일부 데이터를 보존하는 것일 수 있다. 상기 제1 리커버리 모드는 데이터 복원 기능(또는 모드)이 비활성화된 상태이고, 상기 제2 리커버리 모드는 데이터 복원 기능이 활성화된 상태일 수 있다. According to various embodiments, the processor 120 may perform operation 201 when execution of the second recovery mode among the recovery modes of the electronic device 101 is requested. For example, a user may execute a second recovery mode among recovery modes of the electronic device 101 in a setting menu of the electronic device 101 . The recovery mode may include the first recovery mode or the second recovery mode. The recovery mode described in the claims may mean a “second recovery mode”. The first recovery mode may be factory resetting the electronic device 101, and all data stored in the electronic device 101 may be deleted. The second recovery mode may preserve some data while initializing the electronic device 101 . The first recovery mode may be in a state in which a data restoration function (or mode) is inactivated, and the second recovery mode may be in a state in which a data restoration function is activated.

다양한 실시예들에 따르면, 상기 리커버리 모드는 데이터 복원 기능이 비활성화되는 제1 동작 또는 데이터 복원 기능이 활성화되는 제2 동작을 포함할 수 있다. 이 경우, 청구항에 기재된 리커버리 모드는 제2 동작을 의미할 수 있다.According to various embodiments, the recovery mode may include a first operation in which a data restoration function is deactivated or a second operation in which a data restoration function is activated. In this case, the recovery mode described in the claims may mean the second operation.

또는, 전자 장치(101)가 부팅되는 동안 설정된 사용자 입력(예: 볼륨 버튼 및 전원 버튼을 동시에 누름)이 검출되는 경우, 프로세서(120)는 제2 리커버리 모드의 실행을 요청받은 것으로 판단할 수 있다. 전자 장치(101)의 초기 설정 동작(예: 전자 장치(101)를 구매한 후 처음으로 전자 장치(101)를 설정하는 동작 또는, 전자 장치(101)를 출고하기 전 테스트하는 동작)에서 설정 동작을 완료하지 않고 재부팅하고, 재부팅되는 동안 설정된 사용자 입력(예: 볼륨 버튼 및 전원 버튼을 동시에 누름)이 검출되는 경우, 프로세서(120)는 제2 리커버리 모드의 실행을 요청받은 것으로 판단할 수 있다.Alternatively, when a set user input (eg, simultaneous pressing of a volume button and a power button) is detected while the electronic device 101 is booting, the processor 120 may determine that execution of the second recovery mode has been requested. . A setting operation in the initial setting operation of the electronic device 101 (eg, an operation of setting the electronic device 101 for the first time after purchasing the electronic device 101 or an operation of testing the electronic device 101 before shipment) When rebooting is performed without completing the recovery mode, and a set user input (eg, pressing a volume button and a power button simultaneously) is detected during the rebooting, the processor 120 may determine that execution of the second recovery mode has been requested.

또는, 전자 장치(101)에 유선으로 외부 전자 장치(예: 컴퓨터, 노트북)가 연결되고, 전자 장치(101)에서 제2 리커버리 모드가 선택된 경우, 프로세서(120)는 제2 리커버리 모드의 실행을 요청받은 것으로 판단할 수 있다. 전자 장치(101)에 유선으로 상기 외부 전자 장치가 연결되고, 상기 외부 전자 장치에서 백업이 요청된 경우, 프로세서(120)는 향후에 전자 장치(101)에서 리커버리 모드로 진입하여 전자 장치(101)를 모두 초기화할 가능성이 있다고 판단하여 그에 필요한 준비 작업들을 수행할 수 있다. Alternatively, when an external electronic device (eg, computer, notebook) is connected to the electronic device 101 by wire and the second recovery mode is selected in the electronic device 101, the processor 120 executes the second recovery mode. It can be judged that it has been requested. When the external electronic device is connected to the electronic device 101 by wire and a backup request is requested from the external electronic device, the processor 120 enters the recovery mode in the electronic device 101 in the future, and the electronic device 101 It is determined that there is a possibility of initializing all of them, and necessary preparations can be performed.

프로세서(120)는 상기 제2 리커버리 모드를 실행하기 전에 동작 201 및 동작 203을 수행할 수 있다. The processor 120 may perform operations 201 and 203 before executing the second recovery mode.

동작 203에서, 프로세서(120)는 논리 저장 영역에 지정된 데이터를 백업할 수 있다. 상기 지정된 데이터는 전자 장치(101) 또는 사용자에 의해 보존하기로 설정된(또는 결정) 데이터일 수 있다. 프로세서(120)는 전자 장치(101)의 사용 이력에 기반하여 지정된 데이터를 결정할 수 있다. 상기 사용 이력은 얼마나 자주(예: 사용 시간, 사용 횟수) 데이터(예: 어플리케이션, 사진, 문서, 파일)를 사용했는지, 지정된 기간(예: 24시간 이내, 7일 이내, 한달 이내)에 데이터를 사용한 것인지, 데이터가 얼마나 오래된 것인지, 또는 데이터의 중요도 중 적어도 하나를 포함할 수 있다. In operation 203, the processor 120 may back up data specified in the logical storage area. The designated data may be data set (or determined) to be preserved by the electronic device 101 or the user. The processor 120 may determine designated data based on the use history of the electronic device 101 . The above usage history includes how often (e.g., usage time, number of uses) data (e.g., applications, photos, documents, files) are used, and the data for a specified period (e.g., within 24 hours, within 7 days, within a month). It may include at least one of whether it has been used, how old the data is, or the importance of the data.

예를 들어, 가장 오래 전에 생성되어 보관된 데이터 순서, 가장 최근에 생성된 데이터 순서, 가장 자주 접근 되던 기록 순서, 또는 일반적으로 중요하다고 판단되는 데이터(예: 인증서) 순서로 상기 지정된 데이터가 지정될 수 있다. 또는, 사용자가 데이터를 저장할 때마다, 프로세서(120)는 사용자로부터 전자 장치(101)의 초기화 이후에도 보존하려는 데이터인지 선택받을 수 있다. 또는, 전자 장치(101)의 제2 리커버리 모드를 수행하기 전에 프로세서(120)는 사용자로부터 보존하려는 데이터를 선택받을 수 있다. 프로세서(120)는 상기 데이터 영역에 저장된 데이터 중에서, 상기 지정된 데이터를 복사하여 상기 논리 저장 영역으로 이동시켜 저장할 수 있다.For example, the data specified above may be specified in the order of the oldest created and stored data, the most recently created data, the most frequently accessed records, or data generally considered important (eg, certificates). can Alternatively, whenever the user stores data, the processor 120 may receive a selection from the user whether the data is to be preserved even after initialization of the electronic device 101 . Alternatively, before performing the second recovery mode of the electronic device 101, the processor 120 may receive data to be preserved selected by the user. The processor 120 may copy the designated data among the data stored in the data area, move it to the logical storage area, and store the copied data.

다양한 실시예들에 따르면, 프로세서(120)는 상기 논리 저장 영역에 대응하는 메타데이터를 상기 제1 메모리의 지정된 영역에 저장할 수 있다. 프로세서(120)는 상기 메타데이터를 추출하여 상기 제1 메모리의 지정된 영역에 저장할 수 있다. 상기 지정된 영역은 일반 동작 모드 및 제2 리커버리 모드에서 접근 가능하고, RW 형식의 저장 특성을 가질 수 있다. 상기 일반 동작 모드는 전자 장치(101)가 사용자에 의해 조작 가능한 상태를 의미할 수 있다. 상기 제2 리커버리 모드는 전자 장치(101)의 리커버리 모드 중 하나로서, 전자 장치(101)를 초기화하면서 일부 데이터를 보존하는 것일 수 있다. 프로세서(120)는 상기 메타데이터를 암호화하여 상기 지정된 영역에 저장하거나, 상기 메타데이터를 암호화하지 않고 상기 지정된 영역의 암호화된 공간(예: trust zone, 메타데이터 저장 공간)에 저장할 수도 있다. According to various embodiments, the processor 120 may store metadata corresponding to the logical storage area in a designated area of the first memory. The processor 120 may extract and store the metadata in a designated area of the first memory. The designated area may be accessible in the normal operation mode and the second recovery mode, and may have RW format storage characteristics. The normal operation mode may mean a state in which the electronic device 101 can be manipulated by a user. The second recovery mode is one of the recovery modes of the electronic device 101, and may preserve some data while initializing the electronic device 101. The processor 120 may encrypt the metadata and store the metadata in the designated area, or store the metadata in an encrypted space (eg, a trust zone, a metadata storage space) of the designated area without encrypting the metadata.

동작 205에서, 프로세서(120)는 제2 리커버리 모드로 진입하여 백업된 데이터를 제2 메모리에 저장할 수 있다. 상기 제2 메모리는 휘발성 메모리(132)일 수 있다. 휘발성 메모리(132)는 전자 장치(101)의 전원이 오프되거나, 부팅(또는 재부팅) 시에는 휘발성 메모리(132)에 저장된 데이터가 삭제되는 특성을 가질 수 있다. 전자 장치(101)를 부팅(또는 재부팅)하면, 상기 제2 메모리에 저장된 데이터가 모두 삭제되므로, 프로세서(120)는 전자 장치(101)를 재부팅하여 상기 제2 리커버리 모드로 진입할 수 있다. 프로세서(120)는 상기 백업된 데이터를 상기 제2 메모리에 저장할 수 있다. In operation 205, the processor 120 may enter a second recovery mode and store backed up data in a second memory. The second memory may be a volatile memory 132 . The volatile memory 132 may have a characteristic of deleting data stored in the volatile memory 132 when the power of the electronic device 101 is turned off or booted (or rebooted). When the electronic device 101 is booted (or rebooted), since all data stored in the second memory is deleted, the processor 120 may reboot the electronic device 101 to enter the second recovery mode. The processor 120 may store the backed up data in the second memory.

다양한 실시예들에 따르면, 상기 리커버리 모드(예: 제1 리커버리 모드 및 제2 리커버리 모드 모두 포함)로 진입하면, 상기 제1 메모리의 데이터 영역에 접근할 수 없을 수 있다. 상기 리커버리 모드에서는 보안성과 사용자 데이터 보호 차원에서 상기 데이터 영역이 마운트(mount)가 불가능할 수 있다. 만약, 상기 데이터 영역에 마운트되더라도, 데이터 영역에 저장된 데이터는 모두 암호화(encryption)되어 있기 때문에, 데이터에 접근할 수 없을 수 있다. 프로세서(120)는 상기 논리 저장 영역에 백업된 데이터를 상기 제2 메모리에 저장하기 위하여, 상기 지정된 영역에 저장된 메타데이터에 기반하여 상기 논리 저장 영역을 마운트할 수 있다. 상기 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하는 동작은 DM(device mapper)와 같은 기술을 사용하여 수행할 수 있다. According to various embodiments, when entering the recovery mode (eg, including both the first recovery mode and the second recovery mode), the data area of the first memory may not be accessible. In the recovery mode, it may be impossible to mount the data area in terms of security and user data protection. Even if mounted in the data area, since all data stored in the data area is encrypted, it may not be possible to access the data. The processor 120 may mount the logical storage area based on metadata stored in the designated area in order to store data backed up in the logical storage area in the second memory. The operation of mounting the logical storage area based on the metadata may be performed using a technology such as a device mapper (DM).

상기 논리 저장 영역의 마운트가 성공하면, 상기 논리 저장 영역에 저장된 데이터에 접근 가능할 수 있다. 프로세서(120)는 상기 데이터 영역 전체에 대해 마운트하지 않고, 상기 데이터 영역의 상기 논리 저장 영역만 마운트할 수 있다. 프로세서(120)는 상기 지정된 영역에 저장된 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하고, 마운트된 상기 논리 저장 영역에 백업된 데이터를 상기 제2 메모리에 저장할 수 있다. 상기 데이터 영역 및 상기 데이터 영역에 포함된 논리 저장 영역에 저장된 데이터는 전자 장치(101) 포맷 시 삭제되므로, 전자 장치(101)의 포맷 전에 프로세서(120)는 상기 논리 저장 영역에 백업된 데이터(예: 지정된 데이터)를 복사하여 상기 제2 메모리로 이동시켜 저장할 수 있다.If the logical storage area is successfully mounted, data stored in the logical storage area may be accessible. The processor 120 may mount only the logical storage area of the data area without mounting the entire data area. The processor 120 may mount the logical storage area based on metadata stored in the designated area and store data backed up in the mounted logical storage area in the second memory. Since the data stored in the data area and the logical storage area included in the data area is deleted when the electronic device 101 is formatted, the processor 120 prior to formatting the electronic device 101 may perform backup data (e.g., in the logical storage area). : designated data) may be copied, moved to the second memory, and stored.

다양한 실시예들에 따르면, 상기 메타데이터는 지정된 데이터가 안전하게 보존된 경우에 삭제될 수 있다. 상기 논리 저장 영역에 백업된 데이터를 제2 메모리로 복사하여 저장하는데 오류가 발생할 수 있으므로, 상기 메타데이터는 상기 지정된 데이터가 안전하게 보존된 경우(예: 동작 209 이후)에 한하여 삭제될 수 있다. 예를 들어, 상기 논리 저장 영역에 백업된 데이터를 제2 메모리로 복사하여 저장하는데 오류가 발생하는 경우, 상기 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하는 동작이 재시도될 수 있다.According to various embodiments, the metadata may be deleted when designated data is safely preserved. Since an error may occur in copying and storing data backed up in the logical storage area to the second memory, the metadata may be deleted only when the designated data is safely preserved (eg, after operation 209). For example, if an error occurs while copying and storing data backed up in the logical storage area to the second memory, an operation of mounting the logical storage area may be retried based on the metadata.

동작 207에서, 프로세서(120)는 상기 제1 메모리를 포맷할 수 있다. 상기 포맷은 전자 장치(101)를 공장 초기화하는 동작으로, 프로세서(120)는 상기 제1 메모리에 저장된 데이터를 삭제할 수 있다. 다양한 실시예들에 따르면, 상기 제1 메모리는 다수의 영역으로 분할되어 사용될 수 있다. 예를 들어, 상기 제1 메모리는 제1 영역(또는 저장 영역), 제2 영역, 제3 영역 또는 제4 영역 중 적어도 하나를 포함할 수 있다. 상기 제1 영역은 전자 장치(101)가 일반 동작 모드일 때 RO 형식의 저장 특성을 가지고, 상기 제2 영역 및 상기 제3 영역은 전자 장치(101)가 일반 동작 모드일 때 RW 형식의 저장 특성을 가질 수 있다. 상기 제4 영역은 전자 장치(101)가 일반 동작 모드일 때 RW 형식의 저장 특성을 가지나, 상기 리커버리 모드일 때는 파일 시스템으로 마운트하지 않는 저장 특성을 가질 수 있다. At operation 207, the processor 120 may format the first memory. The format is an operation of factory resetting the electronic device 101, and the processor 120 may delete data stored in the first memory. According to various embodiments, the first memory may be divided into a plurality of areas and used. For example, the first memory may include at least one of a first area (or a storage area), a second area, a third area, or a fourth area. The first area has a storage characteristic of an RO format when the electronic device 101 is in a normal operation mode, and the second area and the third area have a storage characteristic of an RW format when the electronic device 101 is in a normal operation mode. can have The fourth area may have a RW format storage characteristic when the electronic device 101 is in a normal operation mode, but may have a storage characteristic not mounted as a file system when the electronic device 101 is in the recovery mode.

예를 들어, 상기 제1 영역은 시스템 영역이고, 상기 제2 영역은 efs(encrypting file system)이며, 상기 제3 영역은 캐시 영역이고, 상기 제4 영역은 상기 데이터 영역일 수 있다. 상기와 같은 예시는 발명의 이해를 돕기 위한 것으로, 예시에 의해 본 발명이 제한되는 것은 아니다. 프로세서(120)는 상기 제1 메모리의 포맷 시, 상기 제3 영역 및 상기 제4 영역에 저장된 데이터를 삭제할 수 있다. 발명의 이해를 돕기 위해 상기 제1 메모리를 네 개의 영역으로 구분하여 사용한다고 기재하고 있지만, 상기 제1 메모리는 네 개의 영역보다 많거나 적게 구분하여 사용될 수 있다.For example, the first area may be a system area, the second area may be an encrypting file system (efs), the third area may be a cache area, and the fourth area may be the data area. The examples as described above are intended to aid understanding of the present invention, and the present invention is not limited by the examples. When formatting the first memory, the processor 120 may delete data stored in the third area and the fourth area. Although it is described that the first memory is divided into four areas to facilitate understanding of the present invention, the first memory may be divided into more or less than four areas and used.

동작 209에서, 프로세서(120)는 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동시킬 수 있다. 상기 제1 메모리의 포맷이 완료되면, 상기 제1 메모리의 상기 데이터 영역은 마운트 금지 모드 또는 암호화 모드와 같은 보안 관련 기능이 아직 켜지지 않은 초기 상태일 수 있다. 상기 제1 메모리의 포맷이 완료되면, 파일 시스템 측면에서도 아무런 데이터가 존재하지 않는 완전 기본적인 상태이므로, 상기 데이터 영역을 F2FS 와 같은 파일 시스템으로 마운트할 수 있다. 프로세서(120)는 상기 제1 메모리의 데이터 영역을 마운트하고, 마운트된 데이터 영역에 상기 제2 메모리에 저장된 데이터를 복사할 수 있다. 프로세서(120)는 상기 제2 메모리에 저장된 데이터를 복사하여 상기 제1 메모리의 데이터 영역에 이동시켜 저장할 수 있다. 프로세서(120)는 상기 제1 메모리의 포맷 후, 보존하려는 데이터를 상기 제1 메모리에 다시 저장한 이후, 전자 장치(101)를 재부팅할 수 있다. 프로세서(120)는 전자 장치(101)의 재부팅을 완료하면 전자 장치(101)를 일반 동작 모드로 동작할 수 있다.In operation 209, the processor 120 may move data stored in the second memory to a data area of the first memory. When formatting of the first memory is completed, the data area of the first memory may be in an initial state in which a security-related function such as a mount prohibition mode or an encryption mode is not turned on yet. When the formatting of the first memory is completed, the data area can be mounted as a file system such as F2FS because it is in a completely basic state in which no data exists in terms of the file system. The processor 120 may mount a data area of the first memory and copy data stored in the second memory to the mounted data area. The processor 120 may copy data stored in the second memory, move the copied data, and store the data in the data area of the first memory. The processor 120 may reboot the electronic device 101 after formatting the first memory and storing data to be preserved in the first memory again. When rebooting of the electronic device 101 is completed, the processor 120 may operate the electronic device 101 in a normal operation mode.

동작 201 내지 동작 203은 전자 장치(101)의 상기 일반 동작 모드에서 수행되는 동작이고, 동작 205 내지 동작 209는 전자 장치(101)의 상기 제2 리커버리 모드에서 수행되는 동작일 수 있다.Operations 201 to 203 may be operations performed in the normal operation mode of the electronic device 101, and operations 205 to 209 may be operations performed in the second recovery mode of the electronic device 101.

다양한 실시예들에 따르면, 프로세서(120)는 상기 지정된 데이터(예: 보존하려는 데이터)를 이전과 동일한 저장 공간(또는 저장 경로)에 저장하거나, 다른 저장 공간에 저장할 수도 있다. 동작 201 이전에 상기 지정된 데이터가 저장된(또는 존재하는) 공간과 상기 제1 메모리를 포맷한 후, 상기 지정된 데이터를 상기 제1 메모리에 다시 저장되는 공간은 동일할 수도 있고, 다를 수도 있다. 상기 제1 메모리를 포맷하면, 상기 제1 메모리의 데이터 영역에 아무것도 저장되지 않은 상태이므로, 상기 제1 메모리의 데이터 영역을 마운트할 때, 최적화된 저장 경로가 생성될 수 있다. 프로세서(120)는 상기 지정된 데이터를 최적화된 저장 경로에 저장할 수 있다. According to various embodiments, the processor 120 may store the designated data (eg, data to be preserved) in the same storage space (or storage path) as before or in another storage space. A space in which the designated data is stored (or exists) before operation 201 and a space in which the designated data is stored again in the first memory after formatting the first memory may be the same or different. When the first memory is formatted, since nothing is stored in the data area of the first memory, an optimized storage path can be created when the data area of the first memory is mounted. The processor 120 may store the designated data in an optimized storage path.

도 3a 및 도 3b는 다양한 실시예들에 따른 전자 장치에서 데이터를 보존하면서 포맷하는 일례를 도시한 도면들이다.3A and 3B are diagrams illustrating an example of formatting while preserving data in an electronic device according to various embodiments.

도 3a를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))는 일반 동작 모드로 동작하는 동안 사용자에 의해 조작 가능할 수 있다. 전자 장치(101)가 일반 동작 모드로 동작하는 동안, 처리되는 데이터는 메모리(예: 도 1의 메모리(130))에 저장될 수 있다. 메모리(130)는 제1 메모리 또는 제2 메모리를 포함할 수 있다. 상기 제1 메모리는 비휘발성 메모리(예: 도 1의 비휘발성 메모리(134))이고, 상기 제2 메모리는 휘발성 메모리(예: 도 1의 휘발성 메모리(132))일 수 있다. 전자 장치(101)는 비휘발성 메모리(134)의 전체 저장 공간(또는 영역)을 하나의 공간으로 사용하지 않고, 하나 이상의 개별 저장 공간으로 분할하여 사용할 수 있다. 예를 들어, 전자 장치(101)는 비휘발성 메모리(134)를 네 개의 영역으로 구분(또는 분할)하여 사용할 수 있다. 각각의 영역은 RO 형식 또는 RW 형식의 저장 특성을 가질 수 있다. Referring to FIG. 3A , an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments may be manipulated by a user while operating in a normal operation mode. While the electronic device 101 operates in the normal operation mode, processed data may be stored in a memory (eg, the memory 130 of FIG. 1 ). The memory 130 may include a first memory or a second memory. The first memory may be a non-volatile memory (eg, the non-volatile memory 134 of FIG. 1 ), and the second memory may be a volatile memory (eg, the volatile memory 132 of FIG. 1 ). The electronic device 101 may divide and use the entire storage space (or area) of the nonvolatile memory 134 into one or more individual storage spaces instead of using it as one space. For example, the electronic device 101 may divide (or divide) the nonvolatile memory 134 into four areas for use. Each area may have a storage characteristic of RO format or RW format.

제1 도면 부호(310)를 참조하면, 전자 장치(101)는 비휘발성 메모리(134)를 제1 영역(301), 제2 영역(303), 제3 영역(305) 및 제4 영역(307)으로 구분하여 사용할 수 있다. 도면에서는 비휘발성 메모리(134)를 네 개의 영역으로 구분한 것을 도시하고 있지만, 전자 장치(101)의 구현에 따라 네 개보다 많거나, 적은 영역으로 구분하여 사용될 수도 있다. 이는, 구현 이슈일 뿐, 예시에 의해 본 발명이 제한되는 것은 아니다.Referring to first reference numeral 310, the electronic device 101 divides the non-volatile memory 134 into first area 301, second area 303, third area 305 and fourth area 307. ) can be used separately. Although the figure shows that the non-volatile memory 134 is divided into four areas, it may be divided into more or less than four areas depending on the implementation of the electronic device 101. This is only an implementation issue, and the present invention is not limited by examples.

제1 영역(301)은 전자 장치(101)가 일반 동작 모드일 때 RO 형식의 저장 특성을 가지고, 제2 영역(303) 및 제3 영역(305)은 전자 장치(101)가 일반 동작 모드일 때 RW 형식의 저장 특성을 가질 수 있다. 제4 영역(307)은 전자 장치(101)가 일반 동작 모드일 때 RW 형식의 저장 특성을 가지나, 리커버리 모드일 때는 파일 시스템으로 마운트하지 않는 저장 특성을 가질 수 있다. 상기 리커버리 모드는 전자 장치(101)의 초기화 모드 중 하나로서, 제1 리커버리 모드 또는 제2 리커버리 모드를 포함할 수 있다. 상기 제1 리커버리 모드는 전자 장치(101)를 공장 초기화하는 것으로, 전자 장치(101)에 저장된 데이터가 모두 삭제되는 것일 수 있다. 상기 제2 리커버리 모드는 전자 장치(101)를 초기화하면서 일부 데이터를 보존하는 것일 수 있다. The first area 301 has RO format storage characteristics when the electronic device 101 is in normal operation mode, and the second area 303 and the third area 305 have storage characteristics when the electronic device 101 is in normal operation mode. can have the storage characteristics of the RW format when The fourth area 307 has a storage characteristic of a RW format when the electronic device 101 is in a normal operation mode, but may have a storage characteristic of not mounting as a file system when the electronic device 101 is in a recovery mode. The recovery mode is one of initialization modes of the electronic device 101 and may include a first recovery mode or a second recovery mode. The first recovery mode may be factory resetting the electronic device 101, and all data stored in the electronic device 101 may be deleted. The second recovery mode may preserve some data while initializing the electronic device 101 .

상기 제1 리커버리 모드는 데이터 복원 기능(또는 모드)이 비활성화된 상태이고, 상기 제2 리커버리 모드는 데이터 복원 기능이 활성화된 상태일 수 있다. 예를 들어, 제1 영역(301)은 시스템 영역이고, 제2 영역(303)은 efs이고, 제3 영역(305)은 캐시 영역이고, 제4 영역(307)은 상기 데이터 영역일 수 있다. 상기와 같은 예시는 발명의 이해를 돕기 위한 것으로, 예시에 의해 본 발명이 제한되는 것은 아니다.The first recovery mode may be in a state in which a data restoration function (or mode) is inactivated, and the second recovery mode may be in a state in which a data restoration function is activated. For example, the first area 301 may be a system area, the second area 303 may be an efs area, the third area 305 may be a cache area, and the fourth area 307 may be the data area. The examples as described above are intended to aid understanding of the present invention, and the present invention is not limited by the examples.

상기 제1 메모리에 저장된 데이터는 전자 장치(101)가 정상적으로 사용되고 있는 상황(예: 일반 동작 모드 실행 중)에서는 초기화할 수가 없을 수 있다. 전자 장치(101)는 상기 제1 메모리에 저장된 데이터의 접근이 일부 제한되는 상태인 제2 리커버리 모드를 두어, 상기 제2 리커버리 모드로 부팅한 후, 전자 장치(101)를 초기화할 수 있다. 상기 제2 리커버리 모드는 전자 장치(101)를 초기화하면서 일부 데이터를 보존하는 것이므로, 전자 장치(101)는 상기 제2 리커버리 모드로 진입하기 전에 데이터 보존에 필요한 동작을 수행할 수 있다. 전자 장치(101)는 상기 제2 리커버리 모드가 요청되면, 보안을 위해 전자 장치(101)의 비밀번호(또는 비밀 패턴) 입력 또는 생체 인증(예: 지문 인식, 홍채 인식 등)을 요청할 수 있다.The data stored in the first memory may not be initialized in a situation where the electronic device 101 is normally used (eg, normal operation mode is running). The electronic device 101 may set the second recovery mode in which access to data stored in the first memory is partially restricted, boot into the second recovery mode, and then initialize the electronic device 101 . Since the second recovery mode preserves some data while initializing the electronic device 101, the electronic device 101 can perform an operation necessary for data preservation before entering the second recovery mode. When the second recovery mode is requested, the electronic device 101 may request a password (or secret pattern) input or biometric authentication (eg, fingerprint recognition, iris recognition, etc.) of the electronic device 101 for security.

제2 도면 부호(330)를 참조하면, 전자 장치(101)는 상기 제2 리커버리 모드의 실행을 요청받은 경우, 제4 영역(307)에 논리 저장 영역(300)을 생성할 수 있다. 전자 장치(101)가 일반 동작 모드로 실행하는 동안, 처리되는 데이터는 상기 제1 메모리에 저장될 수 있다. 그 중에서, 상기 사용자에 의해 저장되는 데이터는 제3 영역(305) 또는 제4 영역(307)에 저장될 수 있다. 전자 장치(101)의 초기화는 제3 영역(305) 및 제4 영역(307)에 저장된 데이터를 삭제하는 것일 수 있다. 전자 장치(101)는 상기 제2 리커버리 모드로 진입하기 전에, 상기 일반 동작 모드에서 제4 영역(307)에 논리 저장 영역(300)을 생성할 수 있다. Referring to second reference numeral 330 , the electronic device 101 may create a logical storage area 300 in the fourth area 307 when the execution of the second recovery mode is requested. While the electronic device 101 is running in the normal operation mode, processed data may be stored in the first memory. Among them, data stored by the user may be stored in the third area 305 or the fourth area 307 . Initialization of the electronic device 101 may be deleting data stored in the third area 305 and the fourth area 307 . The electronic device 101 may create the logical storage area 300 in the fourth area 307 in the normal operation mode before entering the second recovery mode.

제3 도면 부호(350)를 참조하면, 전자 장치(101)는 제4 영역(307)에 저장된 데이터(예: photo(352), text(353), audio(354), video(355), data(356)) 중 지정된 데이터(예: photo(352), text(353), data(356))를 논리 저장 영역(300)에 백업할 수 있다. photo(352)는 상기 제1 메모리에 저장된 사진(예: 갤러리 어플리케이션에 저장된 사진, 연락처 어플리케이션에 저장된 사진 또는 아이콘)일 수 있다. text(353)는 노트 어플리케이션에 저장된 노트, 또는 연락처 어플리케이션에 저장된 연락처 정보일 수 있다. data(356)는 이미지, 오디오, 비디오, 또는 텍스트 중 적어도 하나로 구성된 것일 수 있다. 예를 들어, data(356)는 어플리케이션의 설정 정보 또는 어플리케이션의 업데이트 정보를 포함할 수 있다. 상기 지정된 데이터는 전자 장치(101) 또는 사용자에 의해 보존하기로 설정된(또는 결정) 데이터일 수 있다. 상기 지정된 데이터는 전자 장치(101)의 시스템 데이터이거나, 사용자에 의해 저장된 사용자 데이터를 포함할 수 있다.Referring to a third reference numeral 350, the electronic device 101 stores data stored in the fourth area 307 (eg photo(352), text(353), audio(354), video(355), data (356)), designated data (eg, photo(352), text(353), data(356)) may be backed up in the logical storage area 300. The photo 352 may be a photo stored in the first memory (eg, a photo stored in a gallery application, a photo or an icon stored in a contact application). text 353 may be a note stored in a note application or contact information stored in a contact application. data 356 may be composed of at least one of image, audio, video, or text. For example, data 356 may include application setting information or application update information. The designated data may be data set (or determined) to be preserved by the electronic device 101 or the user. The designated data may include system data of the electronic device 101 or user data stored by a user.

전자 장치(101)는 전자 장치(101)의 사용 이력에 기반하여 지정된 데이터를 결정할 수 있다. 상기 사용 이력은 얼마나 자주(예: 사용 시간, 사용 횟수) 데이터(예: 어플리케이션, 사진, 문서, 파일)를 사용했는지, 지정된 기간(예: 24시간 이내, 7일 이내, 한달 이내)에 데이터를 사용한 것인지, 데이터가 얼마나 오래된 것인지 또는 데이터의 중요도 중 적어도 하나를 포함할 수 있다. 예를 들어, 가장 오래 전에 생성되어 보관된 데이터 순서, 가장 최근에 생성된 데이터 순서, 가장 자주 접근 되던 기록 순서, 또는 일반적으로 중요하다고 판단되는 데이터(예: 인증서) 순서로 상기 지정된 데이터가 지정될 수 있다.The electronic device 101 may determine designated data based on the use history of the electronic device 101 . The above usage history includes how often (e.g., usage time, number of uses) data (e.g., applications, photos, documents, files) are used, and the data for a specified period (e.g., within 24 hours, within 7 days, within a month). It may include at least one of whether it has been used, how old the data is, or the importance of the data. For example, the data specified above may be specified in the order of the oldest created and stored data, the most recently created data, the most frequently accessed records, or data generally considered important (eg, certificates). can

또는, 사용자가 데이터를 저장할 때마다, 전자 장치(101)는 사용자로부터 전자 장치(101)의 초기화 이후에도 보존하려는 데이터인지 선택받을 수 있다. 또는, 전자 장치(101)의 초기화를 수행하기 전에 전자 장치(101)는 사용자로부터 보존하려는 데이터를 선택받을 수 있다. 전자 장치(101)는 제4 영역(307)에 저장된 데이터(예: photo(352), text(353), audio(354), video(355), data(356)) 중에서, 상기 지정된 데이터(예: photo(352), text(353), data(356))를 복사하여 논리 저장 영역(300)으로 이동시켜 저장할 수 있다.Alternatively, whenever the user stores data, the electronic device 101 may receive a selection of data to be preserved even after initialization of the electronic device 101 from the user. Alternatively, before initializing the electronic device 101, the electronic device 101 may receive selection of data to be preserved from the user. The electronic device 101 selects the designated data (eg, photo 352, text 353, audio 354, video 355, and data 356) stored in the fourth area 307. : photo(352), text(353), data(356)) may be copied, moved to the logical storage area 300, and stored.

도 3b의 제4 도면 부호(370)를 참조하면, 전자 장치(101)는 상기 제2 리커버리 모드로 진입하여 백업된 데이터를 제2 메모리(360)에 저장할 수 있다. 제2 메모리(360)는 휘발성 메모리(132)일 수 있다. 전자 장치(101)는 상기 제2 리커버리 모드로 진입하면, 상기 제1 메모리에 저장된 데이터에 접근할 수 없을 수 있다. 상기 제2 리커버리 모드에서는 보안성과 사용자 데이터 보호 차원에서 상기 제1 메모리의 제4 영역(307)이 마운트(mount)가 불가능할 수 있다. 전자 장치(101)는 상기 제2 리커버리 모드로 진입하기 전에, 제4 영역(307)에 생성된 논리 저장 영역(300)에 대응하는 메타데이터(metadata, 351)를 상기 제1 메모리의 지정된 영역에 저장할 수 있다. 상기 지정된 영역은 일반 동작 모드에서 접근 가능하고, RW 형식의 저장 특성을 가질 수 있다. 예를 들어, 상기 지정된 영역은 제2 영역(303)일 수 있다. 전자 장치(101)는 메타데이터(351)를 암호화하여 제2 영역(303)에 저장하거나, 메타데이터(351)를 암호화하지 않고 제2 영역(303)의 암호화된 공간(예: trust zone, 메타데이터 저장 공간)에 저장할 수도 있다. Referring to the fourth reference numeral 370 of FIG. 3B , the electronic device 101 may enter the second recovery mode and store backed up data in the second memory 360 . The second memory 360 may be a volatile memory 132 . When the electronic device 101 enters the second recovery mode, it may not be able to access data stored in the first memory. In the second recovery mode, it may be impossible to mount the fourth area 307 of the first memory in terms of security and user data protection. Before entering the second recovery mode, the electronic device 101 stores metadata 351 corresponding to the logical storage area 300 created in the fourth area 307 in a designated area of the first memory. can be saved The designated area may be accessible in a normal operation mode and may have a RW format storage characteristic. For example, the designated area may be the second area 303 . The electronic device 101 encrypts the metadata 351 and stores it in the second area 303, or encrypts the metadata 351 in an encrypted space of the second area 303 (eg, trust zone, meta data 351). data storage space).

메타데이터(351)는 논리 저장 영역(300)을 마운트하기 위한 정보들이 구성되어 있는 집합체일 수 있다. 상기 제1 메모리의 각 영역(또는 파티션)은 고유의 파일 시스템 형식으로 포맷되어 사용될 수 있다. 메타데이터(351)는 파일 시스템의 형식을 포함하거나, 논리 저장 영역(300)이 상기 제1 메모리의 어느 block부터 어디 block까지 공간을 차지하고 있는지, root폴더의 시작은 어디서부터 인지와 같은 정보가 포함될 수 있다. 도면에서는 발명의 이해를 돕기 위해, 메타데이터(351)가 제2 영역(303)에 저장하는 것으로 도시하고 있다. 메타데이터(351)는 전자 장치(101)의 일반 동작 모드 및 제2 리커버리 모드에서 RW 형식의 저장 특성을 가지면서, 상기 제1 메모리의 포맷 시 삭제되지 않는 영역에 저장될 수 있다.The metadata 351 may be an aggregate of information for mounting the logical storage area 300 . Each area (or partition) of the first memory may be formatted in a unique file system format and used. The metadata 351 includes the format of the file system, or includes information such as from which block to which block the logical storage area 300 occupies space in the first memory and from where the root folder starts. can In the drawing, it is shown that the metadata 351 is stored in the second area 303 to help understanding of the invention. The metadata 351 may have a storage characteristic of an RW format in the normal operation mode and the second recovery mode of the electronic device 101 and may be stored in an area that is not deleted when the first memory is formatted.

전자 장치(101)는 상기 제2 리커버리 모드로 진입하여 제2 영역(303)에 저장된 메타데이터(351)에 기반하여 논리 저장 영역(300)을 마운트할 수 있다. 전자 장치(101)는 논리 저장 영역(300)이 마운트가 성공하면, 논리 저장 영역(300)에 저장된 데이터(예: photo(352), text(353), data(356))에 접근 가능할 수 있다. 전자 장치(101)는 논리 저장 영역(300)에 저장된(또는 백업된) 데이터를 제2 메모리(360)에 저장할 수 있다. The electronic device 101 may enter the second recovery mode and mount the logical storage area 300 based on the metadata 351 stored in the second area 303 . When the logical storage area 300 is successfully mounted, the electronic device 101 may be able to access data (eg photo 352, text 353, data 356) stored in the logical storage area 300. . The electronic device 101 may store data stored in the logical storage area 300 (or backed up) in the second memory 360 .

제5 도면 부호(390)를 참조하면, 전자 장치(101)는 상기 제1 메모리를 포맷할 수 있다. 상기 제1 메모리의 포맷은 상기 제1 메모리에 포함된 제3 영역(305) 및 제4 영역(307)에 저장된 데이터를 삭제하는 것일 수 있다. 도면에서는 상기 제1 메모리의 포맷 시, 제3 영역(305) 및 제4 영역(307)에 저장된 데이터만 삭제되는 것으로 도시하고 있지만, 제1 영역(301) 또는 제2 영역(303)에 저장된 데이터도 삭제되거나, 업데이트될 수 있다. 이는, 전자 장치(101)의 구현 상의 이슈일 뿐, 설명에 의해 본 발명이 제한되는 것은 아니다. Referring to fifth reference numeral 390, the electronic device 101 may format the first memory. Formatting of the first memory may include deleting data stored in the third area 305 and the fourth area 307 included in the first memory. Although the drawing shows that only the data stored in the third area 305 and the fourth area 307 is deleted when the first memory is formatted, data stored in the first area 301 or the second area 303 is deleted. may also be deleted or updated. This is only an issue on the implementation of the electronic device 101, and the present invention is not limited by the description.

다만, 제1 영역(301) 및 제2 영역(303)에 저장된 데이터를 모두 삭제하는 경우, 전자 장치(101)의 사용성 측면에서 효율적이지 않을 수 있다. 제1 영역(301) 및 제2 영역(303)은 전자 장치(101)의 운영 체제 또는 파일 시스템이 저장되는 것이므로, 상기 제1 메모리의 포맷 시 제1 영역(301) 또는 제2 영역(303)에 저장된 데이터는 삭제하지 않고, 제3 영역(305) 및 제4 영역(307)에 저장된 데이터를 삭제할 수 있다. 상기 제1 메모리의 포맷 시 지정된 데이터(예: photo(352), text(353), data(356))는 제2 메모리(360)에 저장되어 있을 수 있다.However, deleting all data stored in the first area 301 and the second area 303 may not be efficient in terms of usability of the electronic device 101 . Since the first area 301 and the second area 303 store the operating system or file system of the electronic device 101, when the first memory is formatted, the first area 301 or the second area 303 Data stored in the third area 305 and the fourth area 307 may be deleted without deleting data stored in . Data designated when formatting the first memory (eg, photo 352 , text 353 , and data 356 ) may be stored in the second memory 360 .

제6 도면 부호(395)를 참조하면, 전자 장치(101)는 상기 제1 메모리의 포맷을 완료하면, 제2 메모리(360)에 저장된 데이터(예: photo(352), text(353), data(356))를 제4 영역(307)에 저장할 수 있다. 상기 제1 메모리의 포맷으로 인해, 제3 영역(305) 및 제4 영역(307)에 저장된 데이터는 모두 삭제될 수 있다. 상기 제1 메모리의 포맷으로 인해, 지정된 데이터 이외의 데이터는 모두 삭제되었으므로, 상기 제1 메모리의 포맷이 완료되면, 전자 장치(101)는 보존하려는 데이터를 다시 제4 영역(307)에 저장할 수 있다. 상기 제1 메모리의 포맷이 완료되면, 제3 영역(305) 및 제4 영역(307)은 완전 기본적인 상태이므로, 전자 장치(101)는 제3 영역(305) 또는 제4 영역(307)을 특정 파일 시스템으로 마운트할 수 있다. 전자 장치(101)는 상기 제1 메모리의 제4 영역(307)을 마운트하고, 마운트된 제4 영역(307)에 제2 메모리(360)에 저장된 데이터(예: photo(352), text(353), data(356))를 저장할 수 있다. Referring to sixth reference numeral 395, when the electronic device 101 completes formatting the first memory, data stored in the second memory 360 (eg, photo(352), text(353), data (356)) may be stored in the fourth area 307. Due to formatting of the first memory, all data stored in the third area 305 and the fourth area 307 may be deleted. Due to the formatting of the first memory, all data other than designated data is deleted. When the formatting of the first memory is completed, the electronic device 101 may store the data to be preserved in the fourth area 307 again. . When the formatting of the first memory is completed, since the third area 305 and the fourth area 307 are completely basic, the electronic device 101 specifies the third area 305 or the fourth area 307. Can be mounted as a file system. The electronic device 101 mounts the fourth area 307 of the first memory, and data (eg, photo(352), text(353) stored in the second memory 360 in the mounted fourth area 307 ), data (356)) can be stored.

전자 장치(101)는 제4 영역(307)에 지정된 데이터(예: photo(352), text(353), data(356))를 저장한 후, 전자 장치(101)를 재부팅할 수 있다. 전자 장치(101)는 상기 부팅을 완료하면 일반 동작 모드로 동작할 수 있다.The electronic device 101 may reboot the electronic device 101 after saving designated data (eg, photo 352 , text 353 , data 356 ) in the fourth area 307 . When the booting is completed, the electronic device 101 can operate in a normal operation mode.

도 4는 다양한 실시예들에 따른 전자 장치의 리커버리 모드를 실행하는 방법을 도시한 흐름도(400)이다.4 is a flowchart 400 illustrating a method of executing a recovery mode of an electronic device according to various embodiments.

도 4를 참조하면, 동작 401에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 전자 장치(101)의 초기화(예: 초기화 모드, 초기화 기능, 초기화 프로세스)를 요청받을 수 있다. 예를 들어, 프로세서(120)는 사용자로부터 전자 장치(101)의 초기화 실행을 요청받을 수 있다. 상기 초기화는 제1 리커버리 모드(또는 기능, 프로세스) 또는 제2 리커버리 모드를 포함할 수 있다. 상기 제1 리커버리 모드는 전자 장치(101)를 공장 초기화하는 것으로, 전자 장치(101)에 저장된 데이터가 모두 삭제되는 것일 수 있다. 상기 제2 리커버리 모드는 전자 장치(101)를 초기화하면서 일부 데이터를 보존하는 것일 수 있다. 상기 제1 리커버리 모드는 데이터 복원 기능(또는 모드)이 비활성화된 상태이고, 상기 제2 리커버리 모드는 데이터 복원 기능이 활성화된 상태일 수 있다. 청구항에 기재된 리커버리 모드는 "제2 리커버리 모드"를 의미할 수 있다.Referring to FIG. 4 , in operation 401, a processor (eg, the processor 120 of FIG. 1 ) of an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments of the present invention Initialization (e.g. initialization mode, initialization function, initialization process) may be requested. For example, the processor 120 may receive a request to initialize the electronic device 101 from a user. The initialization may include a first recovery mode (or function or process) or a second recovery mode. The first recovery mode may be factory resetting the electronic device 101, and all data stored in the electronic device 101 may be deleted. The second recovery mode may preserve some data while initializing the electronic device 101 . The first recovery mode may be in a state in which a data restoration function (or mode) is inactivated, and the second recovery mode may be in a state in which a data restoration function is activated. The recovery mode described in the claims may mean a “second recovery mode”.

동작 403에서, 프로세서(120)는 상기 초기화 요청이 제2 리커버리 모드인지 판단할 수 있다. 프로세서(120)는 상기 설정 메뉴를 통해 상기 사용자로부터 상기 제2 리커버리 모드를 선택받은 경우, 상기 초기화 요청이 제2 리커버리 모드인 것으로 판단할 수 있다. 또는, 전자 장치(101)가 부팅되는 동안 설정된 사용자 입력(예: 볼륨 버튼 및 전원 버튼을 동시에 누름)이 검출되는 경우, 프로세서(120)는 상기 제2 리커버리 모드의 실행을 요청받은 것으로 판단할 수 있다. 또는, 전자 장치(101)에 유선으로 외부 전자 장치(예: 컴퓨터, 노트북)가 연결되고, 전자 장치(101)에서 제2 리커버리 모드가 선택된 경우, 프로세서(120)는 상기 제2 리커버리 모드의 실행을 요청받은 것으로 판단할 수 있다. 전자 장치(101)에 유선으로 상기 외부 전자 장치가 연결되고, 상기 외부 전자 장치에서 백업이 요청된 경우, 프로세서(120)는 향후에 전자 장치(101)에서 리커버리 모드로 진입하여 전자 장치(101)를 모두 초기화할 가능성이 있다고 판단하여 그에 필요한 준비 작업들을 수행할 수 있다.In operation 403, the processor 120 may determine whether the initialization request is the second recovery mode. When the second recovery mode is selected from the user through the setting menu, the processor 120 may determine that the initialization request is the second recovery mode. Alternatively, when a set user input (eg, pressing a volume button and a power button simultaneously) is detected while the electronic device 101 is booting, the processor 120 may determine that the execution of the second recovery mode has been requested. there is. Alternatively, when an external electronic device (eg, computer, notebook) is connected to the electronic device 101 by wire and the second recovery mode is selected in the electronic device 101, the processor 120 executes the second recovery mode. can be judged to have been requested. When the external electronic device is connected to the electronic device 101 by wire and a backup request is requested from the external electronic device, the processor 120 enters the recovery mode in the electronic device 101 in the future, and the electronic device 101 It is determined that there is a possibility of initializing all of them, and necessary preparations can be performed.

프로세서(120)는 상기 초기화 요청이 제2 리커버리 모드인 경우 동작 405를 수행하고, 상기 초기화 요청이 제1 리커버리 모드가 아닌 경우, 동작 407을 수행할 수 있다.The processor 120 may perform operation 405 when the initialization request is in the second recovery mode, and perform operation 407 when the initialization request is not in the first recovery mode.

상기 초기화 요청이 제2 리커버리 모드인 경우, 동작 405에서, 프로세서(120)는 도 2에 해당하는 동작을 수행할 수 있다. 예를 들어, 프로세서(120)는 제2 리커버리 모드 실행 전에 제1 메모리(예: 도 1의 비휘발성 메모리(134))의 데이터 영역(예: 도 3a 및 도 3b의 제4 영역(307))에 논리 저장 영역을 생성하고, 상기 논리 저장 영역에 지정된 데이터를 백업하고, 상기 제2 리커버리 모드로 진입하여 상기 백업된 데이터를 제2 메모리(예: 도 1의 휘발성 메모리(132))에 저장하고, 상기 제1 메모리를 포맷하고, 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동시키는 것일 수 있다. 프로세서(120)는 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동시킨 후, 전자 장치(101)를 재부팅하여 전자 장치(101)를 일반 동작 모드로 동작하도록 할 수 있다.When the initialization request is in the second recovery mode, in operation 405, the processor 120 may perform an operation corresponding to FIG. 2 . For example, the processor 120 may use the data area (eg, the fourth area 307 of FIGS. 3A and 3B) of the first memory (eg, the non-volatile memory 134 of FIG. 1 ) before executing the second recovery mode. Creates a logical storage area, backs up the data specified in the logical storage area, enters the second recovery mode and stores the backed up data in a second memory (eg, volatile memory 132 of FIG. 1), , formatting the first memory, and moving data stored in the second memory to a data area of the first memory. After moving the data stored in the second memory to the data area of the first memory, the processor 120 may reboot the electronic device 101 to operate the electronic device 101 in a normal operation mode.

상기 초기화 요청이 제1 리커버리 모드인 경우(예: 상기 초기화 요청이 제2 리커버리 모드가 아닌 경우), 동작 407에서, 프로세서(120)는 상기 제1 메모리를 포맷할 수 있다. 예를 들어, 프로세서(120)는 상기 제1 메모리에 포함된 제3 영역(예: 도 3a 및 도 3b의 제3 영역(305)) 및 제4 영역(예: 도 3a 및 도 3b의 제4 영역(307))에 저장된 데이터를 삭제할 수 있다.When the initialization request is in the first recovery mode (eg, when the initialization request is not in the second recovery mode), in operation 407, the processor 120 may format the first memory. For example, the processor 120 includes a third area (eg, the third area 305 of FIGS. 3A and 3B) and a fourth area (eg, the fourth area of FIGS. 3A and 3B) included in the first memory. Data stored in area 307) can be deleted.

도 5는 다양한 실시예들에 따른 전자 장치에서 보존하려는 데이터를 선택하는 사용자 인터페이스를 도시한 도면이다.5 is a diagram illustrating a user interface for selecting data to be preserved in an electronic device according to various embodiments.

도 5를 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))는 전자 장치(101)의 설정 메뉴를 통해 전자 장치(101)의 초기화와 관련된 제1 사용자 인터페이스(510)를 제공할 수 있다. 제1 사용자 인터페이스(510)는 제1 리커버리 모드 실행과 관련된 제1 리커버리 모드 실행(501) 또는 제2 리커버리 모드 실행(503)(또는 제2 리커버리 모드 실행 버튼, 제2 리커버리 모드 실행 메뉴)을 포함할 수 있다. 제1 사용자 인터페이스(510)는 제1 리커버리 모드 실행(501)과 관련된 설명 또는 제2 리커버리 모드 실행(503)과 관련된 설명을 포함할 수 있다. 상기 설명은 텍스트, 이미지 또는 비디오 중 적어도 하나로 구성될 수 있다. 전자 장치(101)는 제1 리커버리 모드 실행(501)이 선택되면, 전자 장치(101)에 저장된 데이터를 모두 삭제하여 전자 장치(101)를 공장 초기화할 수 있다. Referring to FIG. 5 , an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments provides a first user interface related to initialization of the electronic device 101 through a setting menu of the electronic device 101 . (510) can be provided. The first user interface 510 includes a first recovery mode execution 501 or a second recovery mode execution 503 (or a second recovery mode execution button or a second recovery mode execution menu) related to the first recovery mode execution. can do. The first user interface 510 may include a description related to executing the first recovery mode 501 or a description related to executing the second recovery mode 503 . The description may consist of at least one of text, image or video. When the first recovery mode execution 501 is selected, the electronic device 101 may factory reset the electronic device 101 by deleting all data stored in the electronic device 101 .

전자 장치(101)는 제2 리커버리 모드 실행(503)이 선택되면, 제2 사용자 인터페이스(530)를 제공할 수 있다. 다양한 실시예들에 따르면, 전자 장치(101)는 상기 제2 리커버리 모드가 요청되면, 보안을 위해 전자 장치(101)의 비밀번호(또는 비밀 패턴) 입력 또는 생체 인증(예: 지문 인식, 홍채 인식 등)을 요청할 수 있다.When the second recovery mode execution 503 is selected, the electronic device 101 may provide a second user interface 530 . According to various embodiments, when the second recovery mode is requested, the electronic device 101 inputs a password (or secret pattern) of the electronic device 101 or biometric authentication (eg, fingerprint recognition, iris recognition, etc.) for security. ) can be requested.

제2 사용자 인터페이스(530)는 보존하려는 데이터를 선택하기 위한 것일 수 있다. 제2 사용자 인터페이스(530)는 사용 이력에 따른 데이터 저장(531) 또는 보존하려는 데이터 선택(533)을 포함할 수 있다. 사용 이력에 따른 데이터 저장(531)은 전자 장치(101)의 사용 이력에 따라 전자 장치(101)가 직접 보존하려는 데이터를 결정하는 것일 수 있다. 상기 사용 이력은 얼마나 자주(예: 사용 시간, 사용 횟수) 데이터(예: 어플리케이션, 사진, 문서, 파일)를 사용했는지, 지정된 기간(예: 24시간 이내, 7일 이내, 한달 이내)에 데이터를 사용한 것인지, 데이터가 얼마나 오래된 것인지 또는 데이터의 중요도(예: 인증서 파일) 중 적어도 하나를 포함할 수 있다. 예를 들어, 전자 장치(101)는 자주 사용하는 데이터일수록 보존하려는 데이터로 결정하고, 최근 사용된 데이터일수록 보존하려는 데이터로 결정하고, 오래된 데이터일수록 보존하려는 데이터로 결정하고, 중요한 데이터일수록 보존하려는 데이터로 결정할 수 있다. 전자 장치(101)는 데이터를 상기 방식으로 각각 점수(또는 가중치)를 부여하고, 부여한 점수를 합산하여, 점수가 높은 순서대로 지정된 데이터로 결정할 수 있다. 전자 장치(101)는 사용 이력에 따른 데이터 저장(531)이 선택되면, 사용 이력에 따라 보존하려는 데이터를 결정하여 논리 저장 영역에 저장할 수 있다. The second user interface 530 may be for selecting data to be preserved. The second user interface 530 may include saving data 531 according to use history or selecting data to be preserved 533 . Data storage according to use history 531 may be to determine data to be directly preserved by the electronic device 101 according to the use history of the electronic device 101 . The above usage history includes how often (e.g., usage time, number of uses) data (e.g., applications, photos, documents, files) are used, and the data for a specified period (e.g., within 24 hours, within 7 days, within a month). It may include at least one of whether it has been used, how old the data is, or the importance of the data (eg, certificate file). For example, the electronic device 101 determines frequently used data as data to be preserved, recently used data as data to be preserved, older data as data to be preserved, and more important data as data to be preserved. can be determined by The electronic device 101 assigns scores (or weights) to each data in the above manner, sums the scores, and determines the designated data in ascending order of scores. When the data storage according to use history 531 is selected, the electronic device 101 may determine data to be preserved according to the use history and store it in the logical storage area.

다양한 실시예들에 따르면, 사용자가 데이터를 저장할 때마다, 전자 장치(101)는 사용자로부터 전자 장치(101)의 초기화 이후에도 보존하려는 데이터인지 선택받을 수 있다. 전자 장치(101)는 데이터 저장 시마다 사용자에 의해 보존하려는 데이터를 선택받은 경우, 사용 이력에 따른 데이터 저장(531)이 선택된 것과 같이, 선택된 데이터를 논리 저장 영역에 저장할 수 있다.According to various embodiments, whenever a user stores data, the electronic device 101 may receive a selection of data to be preserved even after initialization of the electronic device 101 from the user. The electronic device 101 may store the selected data in the logical storage area when data to be preserved is selected by the user whenever data is stored, as if the data storage 531 according to the use history was selected.

보존하려는 데이터 선택(533)은 사용자가 직접 보존하려는 데이터를 선택하는 것일 수 있다. 전자 장치(101)는 보존하려는 데이터 선택(533)이 선택되면, 제1 메모리에 저장된 데이터를 제공할 수 있다. 전자 장치(101)는 사용자로부터 보존하려는 데이터를 직접 선택받고, 선택된 데이터를 논리 저장 영역에 저장할 수 있다.The selection of data to be preserved 533 may be a user directly selecting data to be preserved. The electronic device 101 may provide data stored in the first memory when selecting data to be preserved 533 is selected. The electronic device 101 may directly receive data to be preserved from a user and store the selected data in a logical storage area.

전자 장치(101)는 보존하려는 데이터를 논리 저장 영역에 저장한 후, 전자 장치(101)를 재부팅하여 상기 제2 리커버리 모드로 진입할 수 있다. 전자 장치(101)는 전자 장치(101)를 초기화하면서 지정된 데이터를 보존하기 위해, 도 2에 포함된 동작들을 수행할 수 있다.The electronic device 101 may enter the second recovery mode by rebooting the electronic device 101 after storing data to be preserved in a logical storage area. The electronic device 101 may perform operations included in FIG. 2 to preserve designated data while initializing the electronic device 101 .

도 6은 다양한 실시예들에 따른 전자 장치의 논리 저장 영역을 마운트하는 방법을 도시한 흐름도(600)이다.6 is a flowchart 600 illustrating a method of mounting a logical storage area of an electronic device according to various embodiments.

도 6을 참조하면, 동작 601에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 논리 저장 영역(예: 도 3a 및 도 3b의 논리 저장 영역(300))과 연관된 메타데이터(예: 도 3a 및 도 3b의 메타데이터(351))를 저장할 수 있다. 논리 저장 영역(300)은 전자 장치(101)의 제1 메모리(예: 도 1의 비휘발성 메모리(134))의 포맷 시, 지정된 데이터를 삭제하지 않고 보존하기 위하여 생성된 것일 수 있다. 상기 제1 메모리 포맷 시 지정된 데이터를 삭제하지 않고, 보존하기 위해서는 제2 리커버리 모드로 진입해야 할 수 있다. 상기 제2 리커버리 모드로 진입하면, 상기 제1 메모리의 논리 저장 영역(300)에 접근할 수 없을 수 있다. 상기 제2 리커버리 모드에서는 보안성과 사용자 데이터 보호 차원에서 상기 제1 메모리의 데이터 영역(예: 도 3a 및 도 3b의 제4 영역(307))이 마운트가 불가능할 수 있다. 만약, 상기 데이터 영역에 마운트되더라도, 상기 데이터 영역에 저장된 데이터는 모두 암호화(encryption)되어 있기 때문에, 데이터에 접근할 수 없을 수 있다. Referring to FIG. 6 , in operation 601, a processor (eg, the processor 120 of FIG. 1 ) of an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments includes a logical storage area (eg, the electronic device 101 of FIG. 1 ). Metadata (eg, metadata 351 of FIGS. 3A and 3B) associated with the logical storage area 300 of FIGS. 3A and 3B may be stored. The logical storage area 300 may be created to preserve designated data without deleting it when formatting the first memory (eg, the non-volatile memory 134 of FIG. 1 ) of the electronic device 101 . When formatting the first memory, it may be necessary to enter the second recovery mode in order to preserve the designated data without deleting it. When entering the second recovery mode, the logical storage area 300 of the first memory may not be accessible. In the second recovery mode, the data area (eg, the fourth area 307 of FIGS. 3A and 3B ) of the first memory may not be mounted in terms of security and user data protection. Even if mounted in the data area, it may not be possible to access the data because all data stored in the data area is encrypted.

프로세서(120)는 논리 저장 영역(300)에 접근하기 위하여 논리 저장 영역(300)을 마운트하기 위한 메타데이터(351)를 저장할 수 있다. 메타데이터(351)는 파일 시스템의 형식을 포함하거나, 논리 저장 영역(300)이 상기 제1 메모리의 어느 block부터 어디 block까지 공간을 차지하고 있는지, root폴더의 시작은 어디서부터인지와 같은 정보가 포함될 수 있다. 프로세서(120)는 메타데이터(351)를 상기 제1 메모리의 지정된 영역에 저장할 수 있다. 프로세서(120)는 메타데이터(351)를 암호화하여 저장하거나, 메타데이터(351)를 암호화하지 않고, 암호화된 저장 공간(예: trust zone, 메타데이터 저장 공간)에 저장할 수 있다. 동작 601은 도 2의 동작 203 이후에 수행될 수 있다.The processor 120 may store metadata 351 for mounting the logical storage area 300 in order to access the logical storage area 300 . The metadata 351 includes the format of the file system, or includes information such as from which block to which block the logical storage area 300 occupies space in the first memory and from where the root folder starts. can The processor 120 may store the metadata 351 in a designated area of the first memory. The processor 120 may encrypt and store the metadata 351 or may store the metadata 351 in an encrypted storage space (eg, a trust zone, a metadata storage space) without encrypting the metadata 351 . Operation 601 may be performed after operation 203 of FIG. 2 .

동작 603에서, 프로세서(120)는 제2 리커버리 모드로 진입할 수 있다. 프로세서(120)는 논리 저장 영역(300)을 생성하고, 논리 저장 영역(300)에 지정된 데이터를 저장하고, 메타데이터(351)를 저장하는 동작은 전자 장치(101)의 일반 동작 모드인 경우에 수행될 수 있다. 프로세서(120)는 메타데이터(351) 저장이 완료되면, 전자 장치(101)를 재부팅하여 상기 제2 리커버리 모드로 진입할 수 있다. 상기 제2 리커버리 모드에서는 논리 저장 영역(300)이 마운트되지 않아, 논리 저장 영역(300)에 저장된 데이터를 접근할 수 없을 수 있다.In operation 603, the processor 120 may enter a second recovery mode. The processor 120 creates the logical storage area 300, stores specified data in the logical storage area 300, and stores the metadata 351 when the electronic device 101 is in a normal operation mode. can be performed When the storage of the metadata 351 is completed, the processor 120 may reboot the electronic device 101 to enter the second recovery mode. In the second recovery mode, since the logical storage area 300 is not mounted, data stored in the logical storage area 300 may not be accessible.

동작 605에서, 프로세서(120)는 메타데이터(351)에 기반하여 논리 저장 영역(300)을 마운트할 수 있다. 프로세서(120)는 논리 저장 영역(300)에 저장된 데이터를 접근하기 위하여, 메타데이터(351)에 기반하여 논리 저장 영역(300)을 마운트할 수 있다. 메타데이터(351)에 기반하여 논리 저장 영역(300)을 마운트하는 동작은 DM와 같은 기술을 사용하여 수행할 수 있다. In operation 605 , the processor 120 may mount the logical storage area 300 based on the metadata 351 . The processor 120 may mount the logical storage area 300 based on the metadata 351 in order to access data stored in the logical storage area 300 . The operation of mounting the logical storage area 300 based on the metadata 351 can be performed using a technology such as DM.

도 7은 다양한 실시예들에 따른 전자 장치에서 제2 리커버리 모드로 진입하여 논리 저장 영역을 마운트하는 일례를 도시한 도면이다.7 is a diagram illustrating an example of mounting a logical storage area by entering a second recovery mode in an electronic device according to various embodiments of the present disclosure;

도 7을 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))는 제2 리커버리 모드로 진입하면, 제1 메모리의 데이터 영역(예: 제4 영역(307))에 접근할 수 없을 수 있다. 상기 제1 메모리는 도 1의 비휘발성 메모리(134)에 대응될 수 있다. 상기 제1 메모리는 제1 영역(301), 제2 영역(303), 제3 영역(305) 및 제4 영역(307)으로 구분하여 사용될 수 있다. 상기 제2 리커버리 모드에서는 보안성과 사용자 데이터 보호 차원에서 상기 제1 메모리의 제4 영역(307)이 마운트가 불가능할 수 있다. 제4 영역(307)은 전자 장치(101)의 일반 동작 모드 동작 시, 처리된 데이터가 저장되는 곳일 수 있다. 제4 영역(307)은 마운트되더라도, 제4 영역(307)에 저장된 데이터는 모두 암호화되어 있어, 데이터에 접근할 수 없을 수 있다. Referring to FIG. 7 , when an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments enters the second recovery mode, a data area (eg, a fourth area 307 ) of the first memory is stored. ) may not be accessible. The first memory may correspond to the non-volatile memory 134 of FIG. 1 . The first memory may be divided into a first area 301 , a second area 303 , a third area 305 , and a fourth area 307 . In the second recovery mode, the fourth area 307 of the first memory may not be mounted in terms of security and user data protection. The fourth region 307 may be a place where processed data is stored when the electronic device 101 operates in a normal operation mode. Even if the fourth area 307 is mounted, all data stored in the fourth area 307 is encrypted, and thus the data may not be accessible.

제1 도면 부호(710)를 참조하면, 전자 장치(101)의 일반 동작 모드 동작 시, 저장되는 데이터는 원래 영역(365)에 저장되고, 데이터 보존 기능을 통해 지워지지 않게 지정된 데이터는 논리 저장 영역(300)에 저장될 수 있다. 상기 제2 리커버리 모드에서는 원래 영역(365) 및 논리 저장 영역(300)이 모두 접근 불가능할 수 있다. 전자 장치(101)는 상기 제2 리커버리 모드에 진입하여 논리 저장 영역(300)에 접근하기 위하여 제2 영역(303)에 메타데이터(351)를 저장할 수 있다. 메타데이터(351)는 논리 저장 영역(300)을 마운트하기 위한 정보들이 구성되어 있는 집합체일 수 있다.Referring to first reference numeral 710, when the electronic device 101 operates in a normal operation mode, stored data is stored in an original area 365, and data designated as not to be erased through a data preservation function is a logical storage area ( 300) can be stored. In the second recovery mode, both the original area 365 and the logical storage area 300 may be inaccessible. The electronic device 101 may store metadata 351 in the second area 303 in order to access the logical storage area 300 after entering the second recovery mode. The metadata 351 may be an aggregate of information for mounting the logical storage area 300 .

제2 도면 부호(730)를 참조하면, 전자 장치(101)는 제2 영역(303)에 저장된 메타데이터(351)에 기반하여 논리 저장 영역(300)을 마운트할 수 있다. 전자 장치(101)는 논리 저장 영역(300)이 마운트가 성공하면, 논리 저장 영역(300)에 저장된 데이터(예: photo, text, data)에 접근 가능할 수 있다. Referring to second reference numeral 730 , the electronic device 101 may mount the logical storage area 300 based on the metadata 351 stored in the second area 303 . When the logical storage area 300 is successfully mounted, the electronic device 101 may be able to access data (eg, photo, text, data) stored in the logical storage area 300 .

이후, 전자 장치(101)는 논리 저장 영역(300)에 저장된(또는 백업된) 데이터(예: photo, text, data)를 제2 메모리에 저장할 수 있다. 상기 제2 메모리는 도 1의 휘발성 메모리(132)에 대응될 수 있다.Thereafter, the electronic device 101 may store data (eg, photo, text, data) stored in the logical storage area 300 (or backed up) in the second memory. The second memory may correspond to the volatile memory 132 of FIG. 1 .

도 8은 다양한 실시예들에 따른 전자 장치의 제1 리커버리 모드 및 제2 리커버리 모드를 비교한 일례를 도시한 도면이다.8 is a diagram illustrating an example of comparing a first recovery mode and a second recovery mode of an electronic device according to various embodiments.

도 8을 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))는 제1 리커버리 모드 또는 제2 리커버리 모드를 실행할 수 있다. 전자 장치(101)는 일반 동작 모드로 동작 시, 사용자의 조작에 따라 데이터를 처리하고, 제1 메모리(810)(예: 도 1의 비휘발성 메모리(134))에 저장할 수 있다. 제1 메모리(810)는 제1 영역(301), 제2 영역(303), 제3 영역(305) 및 제4 영역(307)으로 구분하여 사용될 수 있다. 전자 장치(101)가 일반 동작 모드로 동작하는 동안, 처리되는 데이터는 제3 영역(305) 또는 제4 영역(307)에 저장할 수 있다. 사용자에 의해 저장이 요청된 데이터는 제4 영역(307)에 저장될 수 있다. 제4 영역(307)은 photo(801), text(803), audio(805), 또는 video(807) 중 적어도 하나를 포함할 수 있다.Referring to FIG. 8 , an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments may execute a first recovery mode or a second recovery mode. When operating in the normal operation mode, the electronic device 101 may process data according to a user's manipulation and store the data in the first memory 810 (eg, the non-volatile memory 134 of FIG. 1 ). The first memory 810 may be divided into a first area 301 , a second area 303 , a third area 305 , and a fourth area 307 . While the electronic device 101 operates in the normal operation mode, processed data may be stored in the third area 305 or the fourth area 307 . Data requested to be stored by the user may be stored in the fourth region 307 . The fourth region 307 may include at least one of photo 801 , text 803 , audio 805 , and video 807 .

전자 장치(101)는 사용자의 선택에 따라 상기 제1 리커버리 모드를 실행하거나, 상기 제2 리커버리 모드를 실행할 수 있다. 전자 장치(101)는 상기 제2 리커버리 모드의 실행이 요청되면, 지정된 데이터를 보관하는 논리 저장 영역(예: 도 3a 및 도 3b의 논리 저장 영역(300))과 연관된 메타데이터(809)를 제2 영역(303)에 저장할 수 있다. 전자 장치(101)는 상기 제1 리커버리 모드의 실행이 요청되면, 제2 영역(303)에 메타데이터(809)를 저장하지 않을 수 있다.The electronic device 101 may execute the first recovery mode or the second recovery mode according to a user's selection. When the execution of the second recovery mode is requested, the electronic device 101 removes metadata 809 associated with a logical storage area (eg, the logical storage area 300 of FIGS. 3A and 3B ) storing designated data. It can be stored in area 2 (303). When the execution of the first recovery mode is requested, the electronic device 101 may not store the metadata 809 in the second area 303 .

제1 리커버리 모드(830)가 실행되면, 전자 장치(101)는 제3 영역(305) 및 제4 영역(307)에 저장된 데이터를 삭제할 수 있다. 전자 장치(101)는 제3 영역(305) 및 제4 영역(307)을 포맷하여 제1 리커버리 모드(830) 실행을 완료할 수 있다.When the first recovery mode 830 is executed, the electronic device 101 can delete data stored in the third area 305 and the fourth area 307 . The electronic device 101 may complete execution of the first recovery mode 830 by formatting the third area 305 and the fourth area 307 .

제2 리커버리 모드(850)가 실행되면, 전자 장치(101)는 지정된 데이터(예: photo(801), text(803), audio(805))를 제외하고 제3 영역(305) 및 제4 영역(307)에 저장된 데이터를 삭제할 수 있다. 예를 들어, 제2 리커버리 모드(850)의 실행이 요청되기 전에, 전자 장치(101)는 보존하려는 데이터를 결정하거나, 사용자로부터 선택받을 수 있다. 제2 리커버리 모드(850)에서는 메타데이터(809)에 기반하여 논리 저장 영역(300)이 마운트되므로, 제2 영역(303)에 메타데이터(809)가 저장되어 있을 수 있다. 데이터 보존이 성공적으로 완료되면, 전자 장치(101)는 메타데이터(809)를 삭제할 수 있다.When the second recovery mode 850 is executed, the electronic device 101 removes designated data (eg, photo 801, text 803, and audio 805) in the third area 305 and the fourth area. Data stored in 307 can be deleted. For example, before execution of the second recovery mode 850 is requested, the electronic device 101 may determine data to be preserved or may receive selection from the user. In the second recovery mode 850 , since the logical storage area 300 is mounted based on the metadata 809 , the metadata 809 may be stored in the second area 303 . When data preservation is successfully completed, the electronic device 101 may delete the metadata 809 .

제1 리커버리 모드(830)와 제2 리커버리 모드(850)를 비교하면, 제1 리커버리 모드(830)에서는 제3 영역(305) 및 제4 영역(307)에 저장된 데이터가 모두 삭제되지만, 제2 리커버리 모드(850)에서는 지정된 데이터(예: photo(801), text(803), audio(805))가 보존되는 것을 알 수 있다.Comparing the first recovery mode 830 and the second recovery mode 850, data stored in the third area 305 and the fourth area 307 are all deleted in the first recovery mode 830, but the second In the recovery mode 850, it can be seen that designated data (eg, photo 801, text 803, audio 805) is preserved.

도 9는 다양한 실시예들에 따른 전자 장치에서 제2 메모리의 크기에 기반하여 보존하려는 데이터를 선택하는 방법을 도시한 흐름도(900)이다.9 is a flowchart 900 illustrating a method of selecting data to be preserved based on the size of a second memory in an electronic device according to various embodiments.

도 9를 참조하면, 동작 901에서, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 제2 메모리의 저장 크기를 식별할 수 있다. 전자 장치(101)의 메모리(예: 도 1의 메모리(130))는 휘발성 메모리(예: 도 1의 휘발성 메모리(132)) 또는 비휘발성 메모리(예: 도 1의 비휘발성 메모리(134))를 포함할 수 있다. 제1 메모리는 비휘발성 메모리(134)에 대응되고, 상기 제2 메모리는 휘발성 메모리(132)에 대응될 수 있다. 프로세서(120)는 제2 리커버리 모드 실행 시, 상기 제1 메모리에 저장된 데이터 중 일부 데이터(예 지정된 데이터)를 보존하기 위해서 상기 제2 메모리에 저장할 수 있다. 프로세서(120)는 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부에 기반하여 상기 지정된 데이터의 크기를 제어할 수 있다.Referring to FIG. 9 , in operation 901, a processor (eg, the processor 120 of FIG. 1 ) of an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments determines the storage size of the second memory. can identify. The memory (eg, memory 130 of FIG. 1 ) of the electronic device 101 may be a volatile memory (eg, volatile memory 132 of FIG. 1 ) or a non-volatile memory (eg, non-volatile memory 134 of FIG. 1 ). can include The first memory may correspond to the non-volatile memory 134 and the second memory may correspond to the volatile memory 132 . When the second recovery mode is executed, the processor 120 may store some of the data stored in the first memory in the second memory to preserve some data (eg, designated data). The processor 120 may control the size of the designated data based on whether the size of the designated data exceeds the storage size of the second memory.

다양한 실시예들에 따르면, 프로세서(120)는 상기 제2 리커버리 모드의 실행이 요청된 경우, 동작 901을 수행할 수 있다. 예를 들어, 프로세서(120)는 도 2의 동작 201을 수행하기 전에 동작 901을 수행하거나, 동작 201과 동시에 동작 901을 수행할 수도 있다.According to various embodiments, the processor 120 may perform operation 901 when execution of the second recovery mode is requested. For example, the processor 120 may perform operation 901 before performing operation 201 of FIG. 2 or may perform operation 901 concurrently with operation 201 .

동작 903에서, 프로세서(120)는 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부를 판단할 수 있다. 예를 들어, 상기 지정된 데이터의 크기가 8 Gbyte이고, 상기 제2 메모리의 저장 크기가 10 Gbyte인 경우, 프로세서(120)는 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기 보다 작다고 판단할 수 있다. 또는, 상기 지정된 데이터의 크기가 10 Gbyte이고, 상기 제2 메모리의 저장 크기가 10 Gbyte인 경우, 프로세서(120)는 상기 지정된 데이터를 압축하여 상기 지정된 데이터의 크기를 줄일 수 있다. 상기 지정된 데이터의 크기가 15 Gbyte이고, 상기 제2 메모리의 저장 크기가 10 Gbyte인 경우, 프로세서(120)는 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 것으로 판단할 수 있다. In operation 903, the processor 120 may determine whether the size of the designated data exceeds the storage size of the second memory. For example, when the size of the designated data is 8 Gbytes and the storage size of the second memory is 10 Gbytes, the processor 120 may determine that the size of the designated data is smaller than the storage size of the second memory. there is. Alternatively, when the size of the designated data is 10 Gbytes and the storage size of the second memory is 10 Gbytes, the processor 120 may reduce the size of the designated data by compressing the designated data. When the size of the designated data is 15 Gbytes and the storage size of the second memory is 10 Gbytes, the processor 120 may determine that the size of the designated data exceeds the storage size of the second memory.

프로세서(120)는 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 동작 907을 수행하고, 프로세서(120)는 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하지 않는 경우, 동작 905를 수행할 수 있다. 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기와 동일한 경우, 전자 장치(101)의 구현에 따라 동작 905를 수행하거나, 동작 907을 수행할 수도 있다.The processor 120 performs operation 907 when the size of the designated data exceeds the storage size of the second memory, and the processor 120 determines that the size of the designated data does not exceed the storage size of the second memory. If not, operation 905 may be performed. When the size of the designated data is equal to the storage size of the second memory, operation 905 or operation 907 may be performed according to the implementation of the electronic device 101 .

동작 905에서, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하지 않는 경우, 프로세서(120)는 논리 저장 영역(예: 도 3a 및 도 3b의 논리 저장 영역(300))에 지정된 데이터를 백업할 수 있다. 상기 지정된 데이터는 전자 장치(101) 또는 사용자에 의해 보존하기로 설정된(또는 결정) 데이터일 수 있다. 프로세서(120)는 전자 장치(101)의 사용 이력에 기반하여 지정된 데이터를 결정할 수 있다. 또는, 사용자가 데이터를 저장할 때마다, 프로세서(120)는 사용자로부터 전자 장치(101)의 초기화 이후에도 보존하려는 데이터인지 선택받을 수 있다. 또는, 전자 장치(101)의 초기화를 수행하기 전에 프로세서(120)는 사용자로부터 보존하려는 데이터를 선택받을 수 있다. 프로세서(120)는 도 2의 동작 201을 수행하여 논리 저장 영역을 생성하고, 생성된 논리 저장 영역에 상기 지정된 데이터를 백업할 수 있다. 동작 905는 도 2의 동작 203과 동일 또는 유사할 수 있다. 동작 905 수행 후, 프로세서(120)는 도 2의 동작 205 내지 동작 209를 수행할 수 있다.In operation 905, if the size of the designated data does not exceed the storage size of the second memory, the processor 120 determines the data designated in the logical storage area (eg, the logical storage area 300 of FIGS. 3A and 3B). can back up. The designated data may be data set (or determined) to be preserved by the electronic device 101 or the user. The processor 120 may determine designated data based on the use history of the electronic device 101 . Alternatively, whenever the user stores data, the processor 120 may receive a selection from the user whether the data is to be preserved even after initialization of the electronic device 101 . Alternatively, before initializing the electronic device 101, the processor 120 may receive a selection of data to be preserved from the user. The processor 120 may create a logical storage area by performing operation 201 of FIG. 2 and back up the designated data in the created logical storage area. Operation 905 may be the same as or similar to operation 203 of FIG. 2 . After performing operation 905 , the processor 120 may perform operations 205 to 209 of FIG. 2 .

동작 907에서, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 프로세서(120)는 사용 이력 또는 사용자 입력에 기반하여 일부 데이터를 선택할 수 있다. 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 보존하려는 데이터를 모두 상기 제2 메모리에 저장하지 못할 수 있다. 프로세서(120)는 상기 제2 메모리의 저장 크기가 작아 보존하려는 데이터를 모두 보존할 수 없으므로, 보존하려는 데이터 중 일부 데이터를 선택할 것을 요청하는 사용자 인터페이스를 제공할 수 있다. 사용자는 상기 사용자 인터페이스를 통해 상기 지정된 데이터 중 일부 데이터를 선택할 수 있다. 또는, 프로세서(120)는 전자 장치(101)의 사용 이력에 기반하여 상기 지정된 데이터 중 일부 데이터를 선택할 수 있다. 프로세서(120)는 상기 사용 입력에 기반하여 상기 지정된 데이터 중 사용자에게 중요한 일부 데이터를 선택할 수 있다.In operation 907, when the size of the designated data exceeds the storage size of the second memory, the processor 120 may select some data based on a usage history or a user input. When the size of the designated data exceeds the storage size of the second memory, all data to be preserved may not be stored in the second memory. Since the storage size of the second memory is small and cannot preserve all data to be preserved, the processor 120 may provide a user interface requesting selection of some data among the data to be preserved. A user may select some of the designated data through the user interface. Alternatively, the processor 120 may select some of the designated data based on the use history of the electronic device 101 . The processor 120 may select some data important to the user from among the designated data based on the use input.

동작 909에서, 프로세서(120)는 논리 저장 영역(예: 도 3a 및 도 3b의 논리 저장 영역(300))에 선택된 데이터를 백업할 수 있다. 프로세서(120)는 도 2의 동작 201을 수행하여 논리 저장 영역을 생성하고, 생성된 논리 저장 영역에 상기 지정된 데이터를 백업할 수 있다. 동작 909는 도 2의 동작 203과 동일 또는 유사할 수 있다. 프로세서(120)는 상기 제2 메모리의 저장 크기가 부족한 경우, 일부 데이터만 선별적으로 논리 저장 영역에 저장할 수 있다. 동작 909 수행 후, 프로세서(120)는 도 2의 동작 205 내지 동작 209를 수행할 수 있다.In operation 909, the processor 120 may back up the selected data in a logical storage area (eg, the logical storage area 300 of FIGS. 3A and 3B). The processor 120 may create a logical storage area by performing operation 201 of FIG. 2 and back up the designated data in the created logical storage area. Operation 909 may be the same as or similar to operation 203 of FIG. 2 . When the storage size of the second memory is insufficient, the processor 120 may selectively store only some data in the logical storage area. After performing operation 909 , the processor 120 may perform operations 205 to 209 of FIG. 2 .

도 10은 다양한 실시예들에 따른 전자 장치에서 제2 메모리의 크기에 기반하여 보존하려는 데이터를 선택하는 일례를 도시한 도면이다.10 is a diagram illustrating an example of selecting data to be preserved based on a size of a second memory in an electronic device according to various embodiments.

도 10을 참조하면, 다양한 실시예들에 따른 전자 장치(예: 도 1의 전자 장치(101))의 프로세서(예: 도 1의 프로세서(120))는 제2 메모리(1010)의 저장 크기가 지정된 데이터(1030)의 크기를 초과하는지 여부를 판단할 수 있다. 지정된 데이터(1030)는 제1 메모리의 제4 영역(307)에 저장될 수 있다. 상기 제1 메모리는 제1 영역(301), 제2 영역(303), 제3 영역(305) 및 제4 영역(307)으로 구분하여 데이터를 저장할 수 있다. 지정된 데이터(1030)는 photo(1031), text(1033), audio(1035), video(1037)를 포함할 수 있다.Referring to FIG. 10 , a processor (eg, the processor 120 of FIG. 1 ) of an electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments has a storage size of a second memory 1010 It may be determined whether or not the size of the designated data 1030 is exceeded. The designated data 1030 may be stored in the fourth area 307 of the first memory. The first memory is divided into a first area 301, a second area 303, a third area 305, and a fourth area 307 to store data. The designated data 1030 may include photo (1031), text (1033), audio (1035), and video (1037).

프로세서(120)는 지정된 데이터(1030)의 크기가 제2 메모리(1010)의 저장 크기를 초과하는 경우, 지정된 데이터(1030) 중에서 일부 데이터(예: photo(1031), text(1033), video(1037))를 선택하여 논리 저장 영역(예: 도 3a 및 도 3b의 논리 저장 영역(300))에 백업할 수 있다. 논리 저장 영역(300)에 저장된 데이터는 제2 리커버리 모드에서 제2 메모리(1010)에 저장될 수 있다.When the size of the designated data 1030 exceeds the storage size of the second memory 1010, the processor 120 may select some data (eg, photo(1031), text(1033), video( 1037) may be selected and backed up to a logical storage area (eg, the logical storage area 300 of FIGS. 3A and 3B). Data stored in the logical storage area 300 may be stored in the second memory 1010 in the second recovery mode.

본 발명의 다양한 실시예들에 따른 제1 메모리(예: 도 1의 비휘발성 메모리(134)), 상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리(예: 도 1의 휘발성 메모리(132))를 포함하는 전자 장치(예: 도 1의 전자 장치(101))의 동작 방법은 상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하는 동작, 상기 생성된 논리 저장 영역에 지정된 데이터를 저장하는 동작, 리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하는 동작, 상기 제1 메모리를 포맷하는 동작, 및 상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하는 동작을 포함할 수 있다.A first memory according to various embodiments of the present invention (eg, non-volatile memory 134 of FIG. 1 ) and a second memory having storage characteristics different from those of the first memory (eg, volatile memory 132 of FIG. 1 ) ) An operating method of an electronic device (e.g., the electronic device 101 of FIG. 1) includes generating a logical storage area in a data area of the first memory, and storing specified data in the created logical storage area. An operation of entering a recovery mode to store data stored in the logical storage area in the second memory, formatting the first memory, and transferring data stored in the second memory to the data area of the first memory. It may include movement.

상기 제1 메모리는, 비휘발성 메모리이고, 상기 제2 메모리는 휘발성 메모리인 것으로 설정될 수 있다.The first memory may be a non-volatile memory, and the second memory may be set to be a volatile memory.

상기 생성하는 동작은, 상기 리커버리 모드의 실행이 요청되면, 상기 논리 저장 영역을 생성하는 동작을 포함할 수 있다.The creating operation may include creating the logical storage area when execution of the recovery mode is requested.

상기 방법은 상기 전자 장치의 사용 이력에 기반하여 상기 지정된 데이터를 결정하는 동작, 사용자로부터 데이터를 저장할 때마다, 상기 지정된 데이터를 선택받는 동작, 또는 상기 리커버리 모드의 실행 시, 사용자로부터 상기 지정된 데이터를 선택받는 동작 중 적어도 하나를 수행하는 동작을 더 포함할 수 있다.The method may include an operation of determining the designated data based on a use history of the electronic device, an operation of receiving selection of the designated data whenever data is stored from a user, or an operation of selecting the designated data from a user when the recovery mode is executed. An operation of performing at least one of the selected operations may be further included.

상기 방법은, 상기 논리 저장 영역에 대응하는 메타데이터를 상기 제1 메모리의 지정된 영역에 저장하는 동작, 및 상기 리커버리 모드로 진입하면, 상기 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하는 동작을 더 포함할 수 있다.The method further includes storing metadata corresponding to the logical storage area in a designated area of the first memory, and mounting the logical storage area based on the metadata when entering the recovery mode. can include

상기 메타데이터를 저장하는 동작은, 상기 메타데이터를 암호화하여 상기 지정된 영역에 저장하는 동작, 또는 상기 메타데이터를 암호화하지 않고 상기 지정된 영역의 암호화된 공간에 저장하는 동작을 포함할 수 있다.The operation of storing the metadata may include an operation of encrypting the metadata and storing the metadata in the designated area, or an operation of storing the metadata in an encrypted space of the designated area without encryption.

상기 지정된 영역은, 상기 전자 장치가 일반 동작 모드일 때 RW 형식의 저장 특성을 가지고, 상기 데이터 영역은 상기 전자 장치가 일반 동작 모드인 경우, RW 형식의 저장 특성을 가지나, 상기 리커버리 모드인 경우, 파일 시스템으로 마운트하지 않는 저장 특성을 가지도록 설정될 수 있다.The designated area has a RW format storage characteristic when the electronic device is in a normal operation mode, and the data area has a RW format storage characteristic when the electronic device is in a normal operation mode, but in the recovery mode, It can be configured to have the storage property of not mounting as a file system.

상기 이동하는 동작은, 상기 제1 메모리의 포맷 이후에, 상기 제1 메모리를 마운트하는 동작, 및 상기 제2 메모리에 저장된 데이터를 복사하여 상기 제1 메모리의 데이터 영역에 이동시켜 저장하는 동작을 포함할 수 있다.The moving operation includes mounting the first memory after formatting the first memory, and copying data stored in the second memory, moving the data to a data area of the first memory, and storing the copied data. can do.

상기 지정된 데이터를 저장하는 동작은, 상기 제2 메모리의 저장 크기를 식별하는 동작, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부를 판단하는 동작, 상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 상기 전자 장치의 사용 이력 또는 사용자 입력에 기반하여 일부 데이터를 선택하는 동작, 및 상기 선택된 일부 데이터를 상기 지정된 데이터로서, 상기 논리 저장 영역에 백업하는 동작을 포함할 수 있다.The operation of storing the designated data may include an operation of identifying the storage size of the second memory, an operation of determining whether the size of the designated data exceeds the storage size of the second memory, and an operation of determining whether the size of the designated data is When the storage size of the second memory is exceeded, an operation of selecting some data based on a use history of the electronic device or a user input, and an operation of backing up the selected data to the logical storage area as the designated data. can include

본 명세서와 도면에 개시된 본 발명의 다양한 실시 예들은 본 발명의 기술 내용을 쉽게 설명하고 본 발명의 이해를 돕기 위해 특정 예를 제시한 것일 뿐이며, 본 발명의 범위를 한정하고자 하는 것은 아니다. 따라서 본 발명의 범위는 여기에 개시된 실시 예들 이외에도 본 발명의 기술적 사상을 바탕으로 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.Various embodiments of the present invention disclosed in the present specification and drawings are only presented as specific examples to easily explain the technical content of the present invention and help understanding of the present invention, and are not intended to limit the scope of the present invention. Therefore, the scope of the present invention should be construed as including all changes or modifications derived based on the technical idea of the present invention in addition to the embodiments disclosed herein.

101: 전자 장치
120: 프로세서
130: 메모리
132: 휘발성 메모리
134: 비휘발성 메모리
101: electronic device
120: processor
130: memory
132: volatile memory
134 non-volatile memory

Claims (20)

전자 장치에 있어서,
제1 메모리;
상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리; 및
상기 제1 메모리 및 상기 제2 메모리 중 적어도 하나와 작동적으로 연결된 프로세서를 포함하고, 상기 프로세서는,
상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하고,
상기 생성된 논리 저장 영역에 지정된 데이터를 저장하고,
리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하고,
상기 제1 메모리를 포맷하고,
상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하도록 설정된 전자 장치.
In electronic devices,
a first memory;
a second memory having storage characteristics different from those of the first memory; and
a processor operatively coupled to at least one of the first memory and the second memory, the processor comprising:
creating a logical storage area in the data area of the first memory;
storing specified data in the created logical storage area;
entering a recovery mode and storing data stored in the logical storage area in the second memory;
Format the first memory;
An electronic device configured to move data stored in the second memory to a data area of the first memory.
제1항에 있어서,
상기 제1 메모리는, 비휘발성 메모리이고,
상기 제2 메모리는 휘발성 메모리인 것으로 설정된 전자 장치.
According to claim 1,
The first memory is a non-volatile memory,
The second memory is set to be a volatile memory.
제1항에 있어서, 상기 프로세서는,
상기 리커버리 모드의 실행이 요청되면, 상기 논리 저장 영역을 생성하도록 설정된 전자 장치.
The method of claim 1, wherein the processor,
An electronic device configured to generate the logical storage area when execution of the recovery mode is requested.
제1항에 있어서, 상기 프로세서는,
상기 전자 장치의 사용 이력에 기반하여 상기 지정된 데이터를 결정하거나,
사용자로부터 데이터를 저장할 때마다, 상기 지정된 데이터를 선택받거나, 또는
상기 리커버리 모드의 실행 시, 사용자로부터 상기 지정된 데이터를 선택받는 동작 중 적어도 하나를 수행하도록 설정된 전자 장치.
The method of claim 1, wherein the processor,
Determine the designated data based on the use history of the electronic device;
Whenever data is stored from the user, the specified data is selected, or
When the recovery mode is executed, the electronic device configured to perform at least one of operations of receiving selection of the designated data from a user.
제1항에 있어서, 상기 프로세서는,
상기 논리 저장 영역에 대응하는 메타데이터를 상기 제1 메모리의 지정된 영역에 저장하고,
상기 리커버리 모드로 진입하면, 상기 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하도록 설정된 전자 장치.
The method of claim 1, wherein the processor,
storing metadata corresponding to the logical storage area in a designated area of the first memory;
The electronic device configured to mount the logical storage area based on the metadata when entering the recovery mode.
제5항에 있어서, 상기 프로세서는,
상기 메타데이터를 암호화하여 상기 지정된 영역에 저장하거나,
상기 메타데이터를 암호화하지 않고 상기 지정된 영역의 암호화된 공간에 저장하도록 설정된 전자 장치.
The method of claim 5, wherein the processor,
The metadata is encrypted and stored in the designated area, or
An electronic device configured to store the metadata in an encrypted space of the designated area without encrypting the metadata.
제5항에 있어서, 상기 프로세서는,
상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동한 후, 상기 메타데이터를 삭제하도록 설정된 전자 장치.
The method of claim 5, wherein the processor,
An electronic device set to delete the metadata after moving the data stored in the second memory to the data area of the first memory.
제5항에 있어서,
상기 지정된 영역은, 상기 전자 장치가 일반 동작 모드일 때 접근 가능하고, RW(read & write) 형식의 저장 특성을 가지고,
상기 데이터 영역은 상기 전자 장치가 일반 동작 모드인 경우, RW 형식의 저장 특성을 가지나, 상기 리커버리 모드인 경우, 파일 시스템으로 마운트하지 않는 저장 특성을 가지도록 설정된 전자 장치.
According to claim 5,
The designated area is accessible when the electronic device is in a normal operation mode, has read & write (RW) type storage characteristics,
The electronic device of claim 1 , wherein the data area has a storage characteristic of an RW format when the electronic device is in a normal operation mode, but has a storage characteristic of not being mounted as a file system when the electronic device is in the recovery mode.
제1항에 있어서, 상기 프로세서는,
상기 제1 메모리의 포맷 이후에, 상기 제1 메모리를 마운트하고,
상기 제2 메모리에 저장된 데이터를 복사하여 상기 제1 메모리의 데이터 영역에 이동시켜 저장하도록 설정된 전자 장치.
The method of claim 1, wherein the processor,
After formatting the first memory, mounting the first memory,
An electronic device configured to copy data stored in the second memory, move the data to a data area of the first memory, and store the copied data.
제1항에 있어서, 상기 프로세서는,
상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부에 기반하여 상기 지정된 데이터의 크기를 제어하도록 설정된 전자 장치.
The method of claim 1, wherein the processor,
The electronic device configured to control the size of the designated data based on whether the size of the designated data exceeds a storage size of the second memory.
제1항에 있어서, 상기 프로세서는,
상기 제2 메모리의 저장 크기를 식별하고,
상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부를 판단하고,
상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 상기 전자 장치의 사용 이력 또는 사용자 입력에 기반하여 일부 데이터를 선택하고,
상기 선택된 일부 데이터를 상기 지정된 데이터로서, 상기 논리 저장 영역에 백업하도록 설정된 전자 장치.
The method of claim 1, wherein the processor,
identify a storage size of the second memory;
determining whether the size of the specified data exceeds the storage size of the second memory;
When the size of the specified data exceeds the storage size of the second memory, select some data based on a usage history of the electronic device or a user input;
An electronic device configured to back up some of the selected data as the designated data in the logical storage area.
제1 메모리 및 상기 제1 메모리와 다른 저장 특성을 갖는 제2 메모리를 포함하는 전자 장치의 동작 방법에 있어서,
상기 제1 메모리의 데이터 영역에 논리 저장 영역을 생성하는 동작;
상기 생성된 논리 저장 영역에 지정된 데이터를 저장하는 동작;
리커버리 모드로 진입하여 상기 논리 저장 영역에 저장된 데이터를 상기 제2 메모리에 저장하는 동작;
상기 제1 메모리를 포맷하는 동작; 및
상기 제2 메모리에 저장된 데이터를 상기 제1 메모리의 데이터 영역으로 이동하는 동작을 포함하는 방법.
A method of operating an electronic device including a first memory and a second memory having storage characteristics different from those of the first memory,
creating a logical storage area in the data area of the first memory;
storing specified data in the created logical storage area;
entering a recovery mode and storing the data stored in the logical storage area in the second memory;
formatting the first memory; and
and moving data stored in the second memory to a data area of the first memory.
제12항에 있어서,
상기 제1 메모리는, 비휘발성 메모리이고,
상기 제2 메모리는 휘발성 메모리인 것으로 설정된 방법.
According to claim 12,
The first memory is a non-volatile memory,
wherein the second memory is configured to be a volatile memory.
제12항에 있어서, 상기 생성하는 동작은,
상기 리커버리 모드의 실행이 요청되면, 상기 논리 저장 영역을 생성하는 동작을 포함하는 방법.
The method of claim 12, wherein the generating operation,
and generating the logical storage area when execution of the recovery mode is requested.
제12항에 있어서,
상기 전자 장치의 사용 이력에 기반하여 상기 지정된 데이터를 결정하는 동작;
사용자로부터 데이터를 저장할 때마다, 상기 지정된 데이터를 선택받는 동작; 또는
상기 리커버리 모드의 실행 시, 사용자로부터 상기 지정된 데이터를 선택받는 동작
중 적어도 하나를 수행하는 동작을 더 포함하는 방법.
According to claim 12,
determining the specified data based on a use history of the electronic device;
receiving a selection of the designated data whenever data is stored by a user; or
When the recovery mode is executed, operation of receiving selection of the designated data from the user
The method further comprising an operation of performing at least one of.
제12항에 있어서,
상기 논리 저장 영역에 대응하는 메타데이터를 상기 제1 메모리의 지정된 영역에 저장하는 동작; 및
상기 리커버리 모드로 진입하면, 상기 메타데이터에 기반하여 상기 논리 저장 영역을 마운트하는 동작을 더 포함하는 방법.
According to claim 12,
storing metadata corresponding to the logical storage area in a designated area of the first memory; and
and mounting the logical storage area based on the metadata when entering the recovery mode.
제16항에 있어서, 상기 메타데이터를 저장하는 동작은,
상기 메타데이터를 암호화하여 상기 지정된 영역에 저장하는 동작; 또는
상기 메타데이터를 암호화하지 않고 상기 지정된 영역의 암호화된 공간에 저장하는 동작을 포함하는 방법.
The method of claim 16, wherein the operation of storing the metadata,
encrypting the metadata and storing it in the designated area; or
and storing the metadata in an encrypted space of the designated area without encrypting the metadata.
제16항에 있어서,
상기 지정된 영역은, 상기 전자 장치가 일반 동작 모드일 때 RW(read & write) 형식의 저장 특성을 가지고,
상기 데이터 영역은 상기 전자 장치가 일반 동작 모드인 경우, RW 형식의 저장 특성을 가지나, 상기 리커버리 모드인 경우, 파일 시스템으로 마운트하지 않는 저장 특성을 가지도록 설정된 방법.
According to claim 16,
The designated area has a storage characteristic of a read & write (RW) format when the electronic device is in a normal operation mode,
The data area is set to have a storage characteristic of an RW format when the electronic device is in a normal operation mode, but has a storage characteristic not to be mounted as a file system when in the recovery mode.
제12항에 있어서, 상기 이동하는 동작은,
상기 제1 메모리의 포맷 이후에, 상기 제1 메모리를 마운트하는 동작; 및
상기 제2 메모리에 저장된 데이터를 복사하여 상기 제1 메모리의 데이터 영역에 이동시켜 저장하는 동작을 포함하는 방법.
The method of claim 12, wherein the moving operation,
mounting the first memory after formatting the first memory; and
and copying data stored in the second memory, moving the data to a data area of the first memory, and storing the data.
제12항에 있어서, 상기 지정된 데이터를 저장하는 동작은,
상기 제2 메모리의 저장 크기를 식별하는 동작;
상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는지 여부를 판단하는 동작;
상기 지정된 데이터의 크기가 상기 제2 메모리의 저장 크기를 초과하는 경우, 상기 전자 장치의 사용 이력 또는 사용자 입력에 기반하여 일부 데이터를 선택하는 동작; 및
상기 선택된 일부 데이터를 상기 지정된 데이터로서, 상기 논리 저장 영역에 백업하는 동작을 포함하는 방법.
The method of claim 12, wherein the operation of storing the designated data,
identifying a storage size of the second memory;
determining whether the size of the specified data exceeds the storage size of the second memory;
selecting some data based on a usage history of the electronic device or a user input when the size of the designated data exceeds the storage size of the second memory; and
and backing up some of the selected data as the designated data in the logical storage area.
KR1020210188159A 2021-11-10 2021-12-27 Electronic device and method for preserving data in factory reset of the electronic device KR20230068230A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/KR2022/014048 WO2023085589A1 (en) 2021-11-10 2022-09-20 Method for preserving data in initialization situation of electronic device and electronic device thereof
US17/953,756 US20230145690A1 (en) 2021-11-10 2022-09-27 Method for preserving data in electronic device initialization situation and electronic device therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210153906 2021-11-10
KR20210153906 2021-11-10

Publications (1)

Publication Number Publication Date
KR20230068230A true KR20230068230A (en) 2023-05-17

Family

ID=86547310

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210188159A KR20230068230A (en) 2021-11-10 2021-12-27 Electronic device and method for preserving data in factory reset of the electronic device

Country Status (1)

Country Link
KR (1) KR20230068230A (en)

Similar Documents

Publication Publication Date Title
US11449644B2 (en) Electronic device operating encryption for user data
US11086538B2 (en) Method and electronic device for initializing storage
US20230342074A1 (en) Electronic device and method for operation of storage of electronic device
US20220138739A1 (en) Electronic device for generating transaction including internal data and operating method thereof
KR20230068230A (en) Electronic device and method for preserving data in factory reset of the electronic device
US20230145690A1 (en) Method for preserving data in electronic device initialization situation and electronic device therefor
US11341095B2 (en) Electronic device for searching for file information stored in external device and operation method thereof
KR20230049392A (en) Electronic device for processing multi-signed apk file and operation method thereof
US20230359530A1 (en) Electronic device for supporting data backup, and operation method thereof
WO2023085589A1 (en) Method for preserving data in initialization situation of electronic device and electronic device thereof
US20230252598A1 (en) Method and apparatus for editing video in electronic device
US20230168831A1 (en) Electronic device and operation method of electronic device for managing storage space
EP4318261A1 (en) Electronic device and method for operating file system of electronic device
US20230305855A1 (en) Electronic device including controller for system booting and operating method thereof
US20230289157A1 (en) Electronic device and method for changing binary
US20230070501A1 (en) Electronic device for managing storage space and method of operating the same
US20230052759A1 (en) Electronic device using division permission and operation method thereof
KR20230119549A (en) Method and apparatus for editing video in electronic device
KR20230139262A (en) Electronic device including the controller for system booting and method
KR20240074597A (en) Electronic device and method for operating file system
KR20220127504A (en) Electronic device for performing runtime checksum verification of block device image and operating method thereof
KR20240047263A (en) Electronic device for providing trusted execution environment
KR20230126480A (en) Electronic device and method for transfering data of wearable device
KR20230031508A (en) Electronic device and method for operating file system
KR20220102489A (en) Electronic device and method for updating database based on reserve space