KR20220086986A - Method and apparatus for managing data of storage device - Google Patents

Method and apparatus for managing data of storage device Download PDF

Info

Publication number
KR20220086986A
KR20220086986A KR1020200177273A KR20200177273A KR20220086986A KR 20220086986 A KR20220086986 A KR 20220086986A KR 1020200177273 A KR1020200177273 A KR 1020200177273A KR 20200177273 A KR20200177273 A KR 20200177273A KR 20220086986 A KR20220086986 A KR 20220086986A
Authority
KR
South Korea
Prior art keywords
data
area
log
cluster
storage device
Prior art date
Application number
KR1020200177273A
Other languages
Korean (ko)
Other versions
KR102521016B1 (en
Inventor
장준호
Original Assignee
주식회사 앤씨앤
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 앤씨앤 filed Critical 주식회사 앤씨앤
Priority to KR1020200177273A priority Critical patent/KR102521016B1/en
Publication of KR20220086986A publication Critical patent/KR20220086986A/en
Application granted granted Critical
Publication of KR102521016B1 publication Critical patent/KR102521016B1/en

Links

Images

Classifications

    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • 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/0604Improving or facilitating administration, e.g. storage management
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B13/00Burglar, theft or intruder alarms
    • G08B13/18Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength
    • G08B13/189Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems
    • G08B13/194Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems
    • G08B13/196Actuation by interference with heat, light, or radiation of shorter wavelength; Actuation by intruding sources of heat, light, or radiation of shorter wavelength using passive radiation detection systems using image scanning and comparing systems using television cameras
    • G08B13/19639Details of the system layout
    • G08B13/19647Systems specially adapted for intrusion detection in or around a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

저장 장치의 데이터를 관리하기 위해, 새로운 데이터 파일을 생성하는 동작을 나타내는 제1 로그를 생성하고, 제1 로그를 저장 장치의 미리 설정된 영역에 저장하고, 데이터 파일을 생성하고, 데이터 파일이 생성된 경우, 제1 로그를 삭제하고, 데이터 파일의 실제 데이터를 타겟 파티션 영역의 제1 클러스터에 저장하는 동작을 나타내는 제2 로그를 생성하고, 제2 로그를 저장 장치의 미리 설정된 영역에 저장하고, 데이터 파일의 실제 데이터를 제1 클러스터에 저장하고, 실제 데이터의 저장이 종료된 경우, 제1 클러스터에 대한 상태 정보를 FAT 시스템의 테이블에 할당하고, 제1 클러스터에 대한 상태 정보가 FAT 시스템의 테이블에 할당된 경우, 제2 로그를 삭제한다.In order to manage data in the storage device, a first log indicating the operation of creating a new data file is created, the first log is stored in a preset area of the storage device, a data file is created, and the data file is created. , delete the first log, create a second log representing the operation of storing the actual data of the data file in the first cluster of the target partition area, store the second log in a preset area of the storage device, and The actual data of the file is stored in the first cluster, and when the storage of the actual data is finished, the state information for the first cluster is allocated to the table of the FAT system, and the state information for the first cluster is stored in the table of the FAT system. If allocated, the second log is deleted.

Description

저장 장치의 데이터를 관리하는 방법 및 장치{METHOD AND APPARATUS FOR MANAGING DATA OF STORAGE DEVICE}METHOD AND APPARATUS FOR MANAGING DATA OF STORAGE DEVICE

아래의 실시예들은 저장 장치의 데이터를 관리하는 기술에 관한 것이고, 구체적으로 FAT 시스템에 기초하여 동작하는 저장 장치의 데이터를 관리하는 기술에 관한 것이다.The following embodiments relate to a technology for managing data in a storage device, and more specifically, to a technology for managing data in a storage device operating based on a FAT system.

한국특허공개번호 제2016-0122405호(2016.10.24 공개)에 비정상적인 이벤트를 대응하기 위한 구규 리네임 파일 로그(old rename file log)의 존재 여부에 기초하여 디렉토리 엔트리(directory entry)를 복원하는 파일 시스템 모듈, 구규 임시 파일 로그(old temp file log)의 존재 여부에 기초하여 구규 임시 파일 로그가 존재하는 메모리 카드에 대한 포맷 및 신규 임시 파일 로그(new temp file log)에 대한 생성 중 적어도 하나를 결정하기 위한 제1 인터페이스를 제공하는 파일 매니저 모듈 및 레코딩 데이터에 대한 파일 이름 요청 정보를 파일 매니저 모듈에게 제공하는 레코딩 매니저 모듈을 포함하는 데이터 저장 시스템 및 그 동작 방법이 개시된다.A file system that restores a directory entry based on the existence of an old rename file log to respond to an abnormal event in Korea Patent Publication No. 2016-0122405 (published on October 24, 2016) Determining at least one of formatting a memory card in which an old temporary file log exists and creating a new temp file log based on the module and the existence of an old temp file log Disclosed are a data storage system including a file manager module providing a first interface for recording data, and a recording manager module providing file name request information for recording data to the file manager module, and an operating method thereof.

일 실시예는 저장 장치의 데이터를 관리하는 방법을 제공할 수 있다.An embodiment may provide a method for managing data in a storage device.

일 실시예는 저장 장치의 데이터를 관리하는 전자 장치를 제공할 수 있다.An embodiment may provide an electronic device for managing data in a storage device.

다만, 기술적 과제는 상술한 기술적 과제들로 한정되는 것은 아니며, 또 다른 기술적 과제들이 존재할 수 있다.However, the technical tasks are not limited to the above-described technical tasks, and other technical tasks may exist.

일 측면에 따른, 전자 장치에 의해 수행되는, 데이터 관리 방법은, 생성될 데이터 파일의 이름의 타겟 형식에 기초하여 FAT(file allocation table) 시스템에 기초하여 동작하는 저장 장치의 타겟 파티션 영역을 결정하는 단계, 새로운 데이터 파일을 생성하는 동작을 나타내는 제1 로그를 생성하고, 상기 제1 로그를 상기 저장 장치의 미리 설정된 영역에 저장하는 단계, 데이터 파일을 생성하는 단계, 상기 데이터 파일이 생성된 경우, 제1 로그를 삭제하는 단계, 상기 데이터 파일의 실제 데이터를 상기 타겟 파티션 영역의 제1 클러스터에 저장하는 동작을 나타내는 제2 로그를 생성하고, 상기 제2 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계, 상기 데이터 파일의 실제 데이터를 상기 제1 클러스터에 저장하는 단계, 상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계, 및 상기 제1 클러스터에 대한 상태 정보가 상기 FAT 시스템의 테이블에 할당된 경우, 상기 제2 로그를 삭제하는 단계를 포함한다.According to an aspect, a data management method performed by an electronic device includes determining a target partition area of a storage device operating based on a file allocation table (FAT) system based on a target format of a name of a data file to be created step, generating a first log indicating the operation of creating a new data file, storing the first log in a preset area of the storage device, creating a data file, when the data file is created, Deleting the first log, generating a second log representing an operation of storing the actual data of the data file in the first cluster of the target partition area, and storing the second log in the preset area of the storage device storing, storing the actual data of the data file in the first cluster, allocating state information about the first cluster to a table of the FAT system when the storage of the actual data is finished; and and deleting the second log when the state information for the first cluster is allocated to the table of the FAT system.

상기 데이터 관리 방법은, 미리 설정된 타겟 이벤트가 발생하였는지 여부를 결정하는 단계, 및 상기 타겟 이벤트의 종류에 기초하여 상기 생성될 데이터 파일의 이름의 상기 타겟 형식을 결정하는 단계를 더 포함할 수 있다.The data management method may further include determining whether a preset target event has occurred, and determining the target format of the name of the to-be-generated data file based on the type of the target event.

상기 FAT 시스템으로 포맷팅된 상기 저장 장치는, 부트 레코드 영역(boot record area), 예약된 영역(reserved area), FAT 영역 및 데이터 영역을 포함하고, 상기 미리 설정된 영역은 상기 예약된 영역 내에 포함될 수 있다.The storage device formatted with the FAT system may include a boot record area, a reserved area, a FAT area and a data area, and the preset area may be included in the reserved area. .

상기 데이터 관리 방법은, 상기 실제 데이터의 크기가 상기 제1 클러스터에 비해 더 큰 경우, 상기 실제 데이터를 상기 타겟 파티션 영역의 제2 클러스터에 저장하는 동작을 나타내는 제3 로그를 생성하고, 상기 제3 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계, 및 상기 실제 데이터를 상기 제2 클러스터에 저장하는 단계를 더 포함하고, 상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계는, 상기 제1 클러스터에 대한 상태 정보 및 상기 제2 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계를 포함하고, 상기 제2 로그를 삭제하는 단계는, 상기 제2 로그 및 상기 제3 로그를 삭제하는 단계를 포함할 수 있다.In the data management method, when the size of the actual data is larger than that of the first cluster, a third log is generated indicating an operation of storing the actual data in a second cluster of the target partition area, and the third log is The method further comprising the steps of: storing a log in the preset area of the storage device; and storing the real data in the second cluster; Allocating the information to the table of the FAT system includes allocating the state information for the first cluster and the state information for the second cluster to the table of the FAT system, and deleting the second log The doing may include deleting the second log and the third log.

상기 데이터 관리 방법은, 상기 타겟 파티션 영역의 여유 공간의 크기를 결정하는 단계, 상기 결정된 여유 공간의 크기가 미리 설정된 임계 크기 미만인 경우, 상기 타겟 파티션 영역에 미리 저장된 데이터들 중 제3 클러스터에 저장된 데이터를 삭제하는 동작을 나타내는 제4 로그를 생성하고, 상기 제4 로그를 상기 미리 설정된 영역에 저장하는 단계, 상기 제3 클러스터에 저장된 데이터를 삭제하는 단계, 상기 제3 클러스터에 저장된 데이터가 삭제된 경우, 상기 제3 클러스터에 대한 상태 정보를 상기 FAT 시스템의 상기 테이블에 할당하는 단계, 및 상기 제3 클러스터에 대한 상태 정보가 상기 FAT 시스템의 상기 테이블에 할당된 경우, 상기 제4 로그를 삭제하는 단계를 더 포함할 수 있다.The data management method may include determining a size of the free space of the target partition area, and when the determined free space size is less than a preset threshold size, data stored in a third cluster among data previously stored in the target partition area Creating a fourth log indicating the operation of deleting , and storing the fourth log in the preset area; deleting data stored in the third cluster; , allocating status information for the third cluster to the table of the FAT system, and deleting the fourth log when the status information for the third cluster is assigned to the table of the FAT system may further include.

상기 데이터 관리 방법은, 상기 저장 장치를 초기화 하는 단계를 더 포함하고, 상기 저장 장치를 초기화 하는 단계는, 상기 저장 장치의 저장 영역을 부트 레코드 영역, 예약된 영역, FAT 영역 및 데이터 영역을 포함하도록 포맷팅하는 단계, 상기 데이터 영역을 저장되는 데이터의 형식들에 대응하도록 하나 이상의 파티션 영역들로 분할하는 단계 - 상기 하나 이상의 파티션 영역들의 각각은 복수의 클러스터들을 포함함 -, 및 상기 하나 이상의 파티션 영역들에 대한 논리 정보 및 복수의 클러스터들에 대한 논리 정보 중 적어도 하나를 상기 예약된 영역에 저장하는 단계를 포함할 수 있다.The data management method further includes the step of initializing the storage device, wherein the step of initializing the storage device includes a storage area of the storage device to include a boot record area, a reserved area, a FAT area, and a data area. formatting, dividing the data area into one or more partition areas to correspond to types of data being stored, each of the one or more partition areas including a plurality of clusters, and the one or more partition areas The method may include storing at least one of logical information about , and logical information about a plurality of clusters in the reserved area.

상기 FAT 영역은, 제1 FAT 영역 및 제2 FAT 영역을 포함하고, 상기 제1 FAT 영역에 저장되는 데이터가 상기 제2 FAT 영역에 복제되어 저장될 수 있다.The FAT area includes a first FAT area and a second FAT area, and data stored in the first FAT area may be copied and stored in the second FAT area.

상기 데이터 관리 방법은, 상기 전자 장치가 시작된 경우, 상기 미리 설정된 영역에 적어도 하나의 잔여 로그가 존재하는지 여부를 결정하는 단계, 및 상기 잔여 로그가 존재하는 경우, 상기 잔여 로그에 기초하여 상기 FAT 시스템을 복원하는 단계를 더 포함할 수 있다.The data management method includes, when the electronic device is started, determining whether at least one residual log exists in the preset area, and when the residual log exists, the FAT system based on the residual log It may further include the step of restoring.

상기 실제 데이터는 오디오 데이터 또는 동영상 데이터일 수 있다.The actual data may be audio data or video data.

상기 전자 장치는, 동영상을 생성하는 카메라, 및 상기 저장 장치를 포함하는 블랙박스일 수 있다.The electronic device may be a black box including a camera that generates a video and the storage device.

다른 일 측면에 따른, 전자 장치는, 데이터를 관리하는 프로그램이 기록된 메모리, 및 상기 프로그램을 수행하는 프로세서를 포함하고, 상기 프로그램은, 생성될 데이터 파일의 이름의 타겟 형식에 기초하여 FAT(file allocation table) 시스템에 기초하여 동작하는 저장 장치의 타겟 파티션 영역을 결정하는 단계, 새로운 데이터 파일을 생성하는 동작을 나타내는 제1 로그를 생성하고, 상기 저장 장치의 미리 설정된 영역에 저장하는 단계, 데이터 파일을 생성하는 단계, 상기 데이터 파일이 생성된 경우, 제1 로그를 삭제하는 단계, 상기 데이터 파일의 실제 데이터를 상기 타겟 파티션 영역의 제1 클러스터에 저장하는 동작을 나타내는 제2 로그를 생성하고, 상기 제2 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계, 상기 데이터 파일의 실제 데이터를 상기 제1 클러스터에 저장하는 단계, 상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계, 및 상기 제1 클러스터에 대한 상태 정보가 상기 FAT 시스템의 테이블에 할당된 경우, 상기 제2 로그를 삭제하는 단계를 수행한다.According to another aspect, an electronic device includes a memory in which a program for managing data is recorded, and a processor for executing the program, wherein the program is performed using a file format (FAT) based on a target format of a name of a data file to be created. allocation table) determining a target partition area of a storage device operating based on the system, generating a first log indicating an operation of creating a new data file, and storing the first log in a preset area of the storage device, the data file generating a second log representing an operation of creating a . Storing the second log in the preset area of the storage device, storing the actual data of the data file in the first cluster, and when the storage of the actual data ends, the state of the first cluster Allocating information to the table of the FAT system, and deleting the second log when the state information for the first cluster is allocated to the table of the FAT system.

상기 프로그램은, 미리 설정된 타겟 이벤트가 발생하였는지 여부를 결정하는 단계, 및 상기 타겟 이벤트의 종류에 기초하여 상기 생성될 데이터 파일의 이름의 상기 타겟 형식을 결정하는 단계를 더 수행할 수 있다.The program may further perform the steps of determining whether a preset target event has occurred, and determining the target format of the name of the to-be-generated data file based on the type of the target event.

상기 FAT 시스템으로 포맷팅된 상기 저장 장치는, 부트 레코드 영역(boot record area), 예약된 영역(reserved area), FAT 영역 및 데이터 영역을 포함하고, 상기 미리 설정된 영역은 상기 예약된 영역 내에 포함될 수 있다.The storage device formatted with the FAT system may include a boot record area, a reserved area, a FAT area and a data area, and the preset area may be included in the reserved area. .

상기 프로그램은, 상기 실제 데이터의 크기가 상기 제1 클러스터에 비해 더 큰 경우, 상기 실제 데이터를 상기 타겟 파티션 영역의 제2 클러스터에 저장하는 동작을 나타내는 제3 로그를 생성하고, 상기 제3 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계, 및 상기 실제 데이터를 상기 제2 클러스터에 저장하는 단계를 더 수행하고, 상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계는, 상기 제1 클러스터에 대한 상태 정보 및 상기 제2 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계를 포함하고, 상기 제2 로그를 삭제하는 단계는, 상기 제2 로그 및 상기 제3 로그를 삭제하는 단계를 포함할 수 있다.When the size of the actual data is larger than that of the first cluster, the program generates a third log indicating an operation of storing the actual data in a second cluster of the target partition area, and saves the third log. Further performing the steps of storing in the preset area of the storage device, and storing the real data in the second cluster, and when the storage of the real data is finished, the state information about the first cluster The step of allocating to the table of the FAT system includes allocating the state information for the first cluster and the state information for the second cluster to the table of the FAT system, and deleting the second log may include deleting the second log and the third log.

상기 프로그램은, 상기 타겟 파티션 영역의 여유 공간의 크기를 결정하는 단계, 상기 결정된 여유 공간의 크기가 미리 설정된 크기 미만인 경우, 상기 타겟 파티션 영역에 미리 저장된 데이터들 중 제3 클러스터에 저장된 데이터를 삭제하는 동작을 나타내는 제4 로그를 생성하고, 상기 제4 로그를 상기 미리 설정된 영역에 저장하는 단계, 상기 제3 클러스터에 저장된 데이터를 삭제하는 단계, 상기 제3 클러스터에 저장된 데이터가 삭제된 경우, 상기 제3 클러스터에 대한 상태 정보를 상기 FAT 시스템의 상기 테이블에 할당하는 단계, 및 상기 제3 클러스터에 대한 상태 정보가 상기 FAT 시스템의 상기 테이블에 할당된 경우, 상기 제4 로그를 삭제하는 단계를 더 수행할 수 있다.The program includes: determining the size of the free space of the target partition area; when the determined free space size is less than a preset size, deleting data stored in a third cluster among data previously stored in the target partition area generating a fourth log indicating an operation and storing the fourth log in the preset area; deleting data stored in the third cluster; allocating status information for the three clusters to the table of the FAT system, and deleting the fourth log when the status information for the third cluster is assigned to the table of the FAT system can do.

상기 프로그램은, 상기 저장 장치를 초기화 하는 단계를 더 수행하고, 상기 저장 장치를 초기화 하는 단계는, 상기 저장 장치의 저장 영역을 부트 레코드 영역, 예약된 영역, FAT 영역 및 데이터 영역을 포함하도록 포맷팅하는 단계, 상기 데이터 영역을 저장되는 데이터의 형식들에 대응하도록 하나 이상의 파티션 영역들로 분할하는 단계 - 상기 하나 이상의 파티션 영역들의 각각은 복수의 클러스터들을 포함함 -, 및 상기 하나 이상의 파티션 영역들에 대한 논리 정보 및 복수의 클러스터들에 대한 논리 정보 중 적어도 하나를 상기 예약된 영역에 저장하는 단계를 포함할 수 있다.The program further performs the step of initializing the storage device, and the step of initializing the storage device comprises: formatting a storage area of the storage device to include a boot record area, a reserved area, a FAT area, and a data area dividing the data area into one or more partition areas to correspond to the types of data being stored, each of the one or more partition areas including a plurality of clusters, and for the one or more partition areas The method may include storing at least one of logical information and logical information on a plurality of clusters in the reserved area.

상기 프로그램은, 상기 전자 장치가 시작된 경우, 상기 미리 설정된 영역에 적어도 하나의 잔여 로그가 존재하는지 여부를 결정하는 단계, 및 상기 잔여 로그가 존재하는 경우, 상기 잔여 로그에 기초하여 상기 FAT 시스템을 복원하는 단계를 더 수행할 수 있다.The program may include, when the electronic device is started, determining whether at least one residual log exists in the preset area, and if the residual log exists, restoring the FAT system based on the residual log more steps can be performed.

상기 전자 장치는, 동영상을 생성하는 카메라, 및 상기 저장 장치를 포함하는 블랙박스일 수 있다.The electronic device may be a black box including a camera that generates a video and the storage device.

데이터를 관리하는 방법이 제공될 수 있다.A method for managing data may be provided.

데이터 파일을 관리하는 전자 장치가 제공될 수 있다.An electronic device for managing data files may be provided.

도 1은 일 예에 따른 차량 내에 배치된 전자 장치를 도시한다.
도 2는 일 실시예에 따른 전자 장치의 구성도이다.
도 3은 일 예에 따른 FAT 시스템으로 저장 장치를 초기화하는 방법의 흐름도이다.
도 4는 일 예에 따른 FAT 시스템으로 포맷팅된 저장 장치의 저장 영역을 도시한다.
도 5는 일 실시예에 따른 데이터 파일을 관리하는 방법의 흐름도이다.
도 6은 일 예에 따른 데이터 파일의 실제 데이터가 저장되는 제1 클러스터를 도시한다.
도 7은 일 예에 따른 데이터 파일의 실제 데이터를 제2 클러스터에 저장하는 방법의 흐름도이다.
도 8은 일 예에 따른 타겟 파티션 영역에 저장된 데이터를 삭제하는 방법의 흐름도이다.
도 9는 일 예에 따른 FAT 시스템을 복원하는 방법의 흐름도이다.
1 illustrates an electronic device disposed in a vehicle according to an example.
2 is a block diagram of an electronic device according to an exemplary embodiment.
3 is a flowchart of a method of initializing a storage device with a FAT system according to an example.
4 illustrates a storage area of a storage device formatted with a FAT system according to an example.
5 is a flowchart of a method for managing a data file according to an embodiment.
6 illustrates a first cluster in which actual data of a data file is stored according to an example.
7 is a flowchart of a method of storing actual data of a data file in a second cluster according to an example.
8 is a flowchart of a method of deleting data stored in a target partition area according to an example.
9 is a flowchart of a method of restoring a FAT system according to an example.

실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 구현될 수 있다. 따라서, 실제 구현되는 형태는 개시된 특정 실시예로만 한정되는 것이 아니며, 본 명세서의 범위는 실시예들로 설명한 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of the embodiments are disclosed for purposes of illustration only, and may be changed and implemented in various forms. Accordingly, the actual implementation form is not limited to the specific embodiments disclosed, and the scope of the present specification includes changes, equivalents, or substitutes included in the technical spirit described in the embodiments.

제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Although terms such as first or second may be used to describe various elements, these terms should be interpreted only for the purpose of distinguishing one element from another. For example, a first component may be termed a second component, and similarly, a second component may also be termed a first component.

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

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설명된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression includes the plural expression unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" are intended to designate that the described feature, number, step, operation, component, part, or combination thereof exists, and includes one or more other features or numbers, It should be understood that the possibility of the presence or addition of steps, operations, components, parts or combinations thereof is not precluded in advance.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present specification. does not

이하, 실시예들을 첨부된 도면들을 참조하여 상세하게 설명한다. 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고, 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In the description with reference to the accompanying drawings, the same components are assigned the same reference numerals regardless of the reference numerals, and overlapping descriptions thereof will be omitted.

도 1은 일 예에 따른 차량 내에 배치된 전자 장치를 도시한다.1 illustrates an electronic device disposed in a vehicle according to an example.

일 측면에 따르면, 전자 장치(110)는 차량(100) 내에 장착될 수 있다. 예를 들어, 전자 장치(110)는 차량(100)의 주변을 촬영함으로써 동영상을 생성하고, 생성된 동영상의 데이터를 저장하는 블랙박스 시스템일 수 있다. 전자 장치(110)는 카메라 또는 카메라를 제어하는 카메라 모듈을 포함할 수 있다.According to one aspect, the electronic device 110 may be mounted in the vehicle 100 . For example, the electronic device 110 may be a black box system that generates a video by photographing the surroundings of the vehicle 100 and stores data of the generated video. The electronic device 110 may include a camera or a camera module for controlling the camera.

동영상의 데이터는 비교적 크기가 크고, 고화질 일수록 크기가 커지므로 전자 장치(110)에 포함된 또는 전자 장치(110)와 연결된 저장 영역의 관리가 요구될 수 있다.Since the size of video data is relatively large, and the higher the quality, the larger the size, so it may be required to manage a storage area included in the electronic device 110 or connected to the electronic device 110 .

아래에서 도 2 내지 도 9를 참조하여, 저장 장치의 데이터를 관리하는 방법에 대해 상세히 설명된다.A method of managing data in a storage device will be described in detail below with reference to FIGS. 2 to 9 .

도 2는 일 실시예에 따른 전자 장치의 구성도이다.2 is a block diagram of an electronic device according to an exemplary embodiment.

전자 장치(200)는 통신부(210), 프로세서(220), 메모리(230)를 포함할 수 있다. 추가적으로, 전자 장치(200)는 카메라(240) 및 저장 장치(250)를 더 포함할 수 있다. 예를 들어, 전자 장치(200)는 CCTV(closed circuit television) 내에 포함되거나, 블랙박스 내에 포함될 수 있고, 기재된 실시예로 한정되지 않는다.The electronic device 200 may include a communication unit 210 , a processor 220 , and a memory 230 . Additionally, the electronic device 200 may further include a camera 240 and a storage device 250 . For example, the electronic device 200 may be included in a closed circuit television (CCTV) or a black box, and is not limited to the described embodiment.

통신부(210)는 프로세서(220), 메모리(230), 카메라(240) 및 저장 장치(250)와 연결되어 데이터를 송수신한다. 통신부(210)는 외부의 다른 장치와 연결되어 데이터를 송수신할 수 있다. 이하에서 "A"를 송수신한다라는 표현은 "A를 나타내는 정보(information) 또는 데이터"를 송수신하는 것을 나타낼 수 있다.The communication unit 210 is connected to the processor 220 , the memory 230 , the camera 240 , and the storage device 250 to transmit and receive data. The communication unit 210 may be connected to another external device to transmit/receive data. Hereinafter, the expression "transmitting and receiving "A" may indicate transmitting and receiving "information or data representing A".

통신부(210)는 전자 장치(200) 내의 회로망(circuitry)으로 구현될 수 있다. 예를 들어, 통신부(210)는 내부 버스(internal bus) 및 외부 버스(external bus)를 포함할 수 있다. 다른 예로, 통신부(210)는 전자 장치(200)와 외부의 장치를 연결하는 요소일 수 있다. 통신부(210)는 인터페이스(interface)일 수 있다. 통신부(210)는 외부의 장치로부터 데이터를 수신하여, 프로세서(220) 및 메모리(230)에 데이터를 전송할 수 있다.The communication unit 210 may be implemented as circuitry in the electronic device 200 . For example, the communication unit 210 may include an internal bus and an external bus. As another example, the communication unit 210 may be an element that connects the electronic device 200 and an external device. The communication unit 210 may be an interface. The communication unit 210 may receive data from an external device and transmit the data to the processor 220 and the memory 230 .

프로세서(220)는 통신부(210)가 수신한 데이터 및 메모리(230)에 저장된 데이터를 처리한다.The processor 220 processes data received by the communication unit 210 and data stored in the memory 230 .

"프로세서"는 목적하는 동작들(desired operations)을 실행시키기 위한 물리적인 구조를 갖는 회로를 가지는 하드웨어로 구현된 데이터 처리 장치일 수 있다. 예를 들어, 목적하는 동작들은 프로그램에 포함된 코드(code) 또는 인스트럭션들(instructions)을 포함할 수 있다. 예를 들어, 하드웨어로 구현된 데이터 처리 장치는 마이크로프로세서(microprocessor), 중앙 처리 장치(central processing unit), 프로세서 코어(processor core), 멀티-코어 프로세서(multi-core processor), 멀티프로세서(multiprocessor), ASIC(Application-Specific Integrated Circuit), FPGA(Field Programmable Gate Array)를 포함할 수 있다. A “processor” may be a data processing device implemented in hardware having circuitry having a physical structure for performing desired operations. For example, desired operations may include code or instructions included in a program. For example, a data processing device implemented as hardware includes a microprocessor, a central processing unit, a processor core, a multi-core processor, and a multiprocessor. , an Application-Specific Integrated Circuit (ASIC), and a Field Programmable Gate Array (FPGA).

프로세서(220)는 메모리(예를 들어, 메모리(230))에 저장된 컴퓨터로 읽을 수 있는 코드(예를 들어, 소프트웨어) 및 프로세서(220)에 의해 유발된 인스트럭션들을 실행한다.Processor 220 executes computer readable code (eg, software) stored in memory (eg, memory 230 ) and instructions issued by processor 220 .

메모리(230)는 통신부(210)가 수신한 데이터, 프로세서(220)가 처리한 데이터를 저장한다. 예를 들어, 메모리(230)는 프로그램(또는 애플리케이션, 소프트웨어)을 저장할 수 있다. 저장되는 프로그램은 저장 장치(250)의 데이터를 관리할 수 있도록 코딩되어 프로세서(220)에 의해 실행 가능한 신텍스(syntax)들의 집합일 수 있다.The memory 230 stores data received by the communication unit 210 and data processed by the processor 220 . For example, the memory 230 may store a program (or an application, software). The stored program may be a set of syntaxes coded to manage data of the storage device 250 and executable by the processor 220 .

일 측면에 따르면, 메모리(230)는 하나 이상의 휘발성 메모리, 비휘발성 메모리 및 RAM(Random Access Memory), 플래시 메모리, 하드 디스크 드라이브 및 광학 디스크 드라이브를 포함할 수 있다.According to one aspect, memory 230 may include one or more of volatile memory, non-volatile memory and random access memory (RAM), flash memory, hard disk drive, and optical disk drive.

메모리(230)는 전자 장치(200)를 동작 시키는 명령어 세트(예를 들어, 소프트웨어)를 저장한다. 전자 장치(200)를 동작 시키는 명령어 세트는 프로세서(220)에 의해 실행된다. 예를 들어, 메모리(230)는 미리 설정된 동작들이 수행되도록 제작된 레지스터일 수 있고, 기재된 실시예로 한정되지 않는다.The memory 230 stores an instruction set (eg, software) for operating the electronic device 200 . The instruction set for operating the electronic device 200 is executed by the processor 220 . For example, the memory 230 may be a register manufactured to perform preset operations, and is not limited to the described embodiment.

카메라(240)는 장면을 촬영함으로써 동영상에 대한 데이터를 생성할 수 있다.The camera 240 may generate data for a moving picture by capturing a scene.

저장 장치(250)는 데이터를 저장할 수 있다. 저장 장치(250)에 저장되는 데이터는 프로세서(220)에 의해 관리될 수 있다. 예를 들어, 저장 장치(250)에 저장된 데이터가 삭제되거나, 새로운 데이터가 저장될 수 있다. 저장 장치(250)는 SD(Secure Digital) 메모리 카드와 같은 저장 장치일 수 있고, 기재된 실시예로 한정되지 않는다.The storage device 250 may store data. Data stored in the storage device 250 may be managed by the processor 220 . For example, data stored in the storage device 250 may be deleted or new data may be stored. The storage device 250 may be a storage device such as a Secure Digital (SD) memory card, and is not limited to the described embodiment.

메모리(230) 및 저장 장치(250)는 서로 하나의 장치로 통합되거나, 물리적으로 분리된 요소일 수 있고, 기재된 실시예로 한정되지 않는다.The memory 230 and the storage device 250 may be integrated into one device or may be physically separate elements, and are not limited to the described embodiment.

통신부(210), 프로세서(220), 메모리(230), 카메라(240) 및 저장 장치(250)에 대해, 아래에서 도 3 내지 도 9를 참조하여 상세히 설명된다.The communication unit 210 , the processor 220 , the memory 230 , the camera 240 , and the storage device 250 will be described in detail below with reference to FIGS. 3 to 9 .

도 3은 일 예에 따른 FAT 시스템으로 저장 장치를 초기화하는 방법의 흐름도이다.3 is a flowchart of a method of initializing a storage device with a FAT system according to an example.

일 측면에 따르면, 저장 장치(250)를 초기화하는 방법(300)은 아래의 단계들(310 내지 330)을 포함할 수 있다. 예를 들어, 방법(300)은 저장 장치(250)의 초기화가 필요한 경우에 수행될 수 있다. 전자 장치(200)는 저장 장치(250)의 파티션 정보를 읽고, 파티션 정보가 유효하지 않은 경우 초기화가 필요한 것으로 결정될 수 있다.According to one aspect, the method 300 of initializing the storage device 250 may include the following steps 310 to 330 . For example, the method 300 may be performed when initialization of the storage device 250 is required. The electronic device 200 may read the partition information of the storage device 250 , and when the partition information is invalid, it may be determined that initialization is required.

단계(310)에서, 전자 장치(200)는 저장 장치(250)의 저장 영역이 부트 레코드 영역(boot record area), 예약된 영역(reserved area), FAT(file allocation table) 영역 및 데이터 영역을 포함하도록 포맷팅한다. 예를 들어, 저장 장치(250)는 FAT 시스템에 기초하여 포맷팅될 수 있다. 포맷팅된 저장 장치(250)의 저장 영역에 대해, 아래에서 도 4를 참조하여 상세히 설명된다.In step 310 , in the electronic device 200 , the storage area of the storage device 250 includes a boot record area, a reserved area, a file allocation table (FAT) area, and a data area. format it to For example, the storage device 250 may be formatted based on a FAT system. The storage area of the formatted storage device 250 is described in detail below with reference to FIG. 4 .

단계(320)에서, 전자 장치(200)는 데이터 영역을 저장되는 데이터의 형식들에 대응하도록 하나 이상의 파티션 영역들로 분할한다. 예를 들어, 데이터의 형식들은 동영상이 상시 녹화 모드에 의해 촬영되었는지 또는 이벤트 녹화 모드에 의해 촬영되었는지 여부에 따라 달라질 수 있다. 데이터 영역이 상시 녹화 모드에 의해 생성된 데이터에 대한 제1 파티션 영역 및 이벤트 녹화 모드에 의해 생성된 데이터에 대한 제2 파티션 영역을 포함하도록 분할될 수 있다.In operation 320, the electronic device 200 divides the data area into one or more partition areas to correspond to the types of stored data. For example, the types of data may vary depending on whether the moving picture is recorded in the regular recording mode or the event recording mode. The data area may be divided to include a first partition area for data generated by the regular recording mode and a second partition area for data generated by the event recording mode.

단계(330)에서, 전자 장치(200)는 파티션 영역들에 대한 논리 정보를 예약된 영역에 저장될 수 있다. 논리 정보가 데이터 파일 형태로 생성되지 않지 않으므로 데이터 영역에 저장되는 것이 아니고, 예약된 영역에 저장될 수 있다.In operation 330 , the electronic device 200 may store logical information on partition areas in a reserved area. Since logical information is not generated in the form of a data file, it may not be stored in the data area but may be stored in a reserved area.

도 4는 일 예에 따른 FAT 시스템으로 포맷팅된 저장 장치의 저장 영역을 도시한다.4 illustrates a storage area of a storage device formatted with a FAT system according to an example.

일 측면에 따르면, 저장 장치(250)의 저장 영역(400)이 부트 레코드 영역(410), 예약된 영역(420), FAT 영역(430) 및 데이터 영역(440)을 포함하도록 포맷팅될 수 있다.According to one aspect, the storage area 400 of the storage device 250 may be formatted to include a boot record area 410 , a reserved area 420 , a FAT area 430 , and a data area 440 .

부트 레코드 영역(410)은 마스터 부트 레코드(master boot record: MBR) 영역을 포함할 수 있다.The boot record area 410 may include a master boot record (MBR) area.

예약된 영역(420)은 기존의 표준적인 FAT 시스템에서 이용이 보류된 영역일 수 있다.The reserved area 420 may be an area reserved for use in the existing standard FAT system.

FAT 영역(430)은 제1 FAT 영역(431) 및 제2 FAT 영역(432)을 포함할 수 있다. 제1 FAT 영역(431)에 저장되는 데이터가 제2 FAT 영역(432)에 복제되어 저장될 수 있다. 제1 FAT 영역(431)에는 실제 데이터 또는 디렉토리가 데이터 영역(440)의 어디에 저장 또는 위치하는지가 저장될 수 있다. 제1 FAT 영역(431)에는 데이터 영역(440)의 하나 이상의 클러스터들에 대한 상태 정보들이 기록될 수 있다. 예를 들어, 하나 이상의 클러스터들에 대한 상태 정보들이 테이블로 관리될 수 있다. 아래의 [표 1]은 클러스터의 상태 정보에 대응하는 테이블 값을 나타낸다.The FAT area 430 may include a first FAT area 431 and a second FAT area 432 . Data stored in the first FAT area 431 may be copied and stored in the second FAT area 432 . The first FAT area 431 may store where actual data or a directory is stored or located in the data area 440 . State information of one or more clusters of the data area 440 may be recorded in the first FAT area 431 . For example, state information about one or more clusters may be managed as a table. [Table 1] below shows table values corresponding to cluster status information.

FAT32FAT32 설명Explanation 0x?00000000x?0000000 비어있는 클러스터(free cluster)free cluster 0x?00000010x?0000001 예약된 클러스터(reserved cluster)이고, 아직 특별한 의미는 없으나 앞으로 사용될 것으로 예약됨.Reserved cluster, has no special meaning yet, but is reserved for future use. 0x?0000002 ~0x?FFFFFEF0x?0000002 ~0x?FFFFFFEF 할당된 클러스터(allocated cluster)이고, 의미있는 데이터가 저장된 클러스터, FAT 엔트리에 저장된 값은 연결된 다음 클러스터의 번호임.This is the allocated cluster, the cluster where meaningful data is stored, and the value stored in the FAT entry is the number of the next connected cluster. 0x? FFFFFF0 ~0x?FFFFFF60x? FFFFFF0 ~0x?FFFFFF6 예약된 클러스터(reserved cluster)이고, 아직 특별한 의미는 없으나 앞으로 사용될 것으로 예약됨.Reserved cluster, has no special meaning yet, but is reserved for future use. 0x?FFFFFF70x?FFFFFF7 불량 클러스터(bad cluster)임.Bad cluster. 0x?FFFFFF8 ~0x?FFFFFFF0x?FFFFFF8 ~0x?FFFFFFF 해당 클러스터는 해당 데이터 파일의 마지막 클러스터(end of cluster)이고, 더 이상 연결된 클러스터가 없음.That cluster is the end of cluster for that datafile, there are no more associated clusters.

데이터 영역(440)은 포맷팅을 통해 하나 이상의 파티션 영역들으로 분할될 수 있다. 파티션 영역은 복수의 클러스터들을 포함할 수 있다. 클러스터에는 실제 데이터가 저장될 수 있다. 예를 들어, 하나의 데이터 파일의 실제 데이터가 복수의 클러스터들에 걸쳐 저장될 수 있다. 데이터 파일은 동영상 파일, 이미지 파일, 및 텍스트 파일 등을 포함할 수 있다.The data area 440 may be divided into one or more partition areas through formatting. The partition area may include a plurality of clusters. Real data can be stored in the cluster. For example, actual data of one data file may be stored across a plurality of clusters. The data file may include a video file, an image file, a text file, and the like.

데이터 영역(440)은 루트 디렉토리 영역(445)을 포함할 수 있다. 루트 디렉토리 영역(445)은 데이터 영역(440)의 시작 부분에 위치할 수 있으나, 기재된 실시예로 한정되지 않고 예를 들어, 데이터 영역(440)의 중간에 위치할 수도 있다.The data area 440 may include a root directory area 445 . The root directory area 445 may be located at the beginning of the data area 440 , but is not limited to the described embodiment and may be located, for example, in the middle of the data area 440 .

도 5는 일 실시예에 따른 데이터 파일을 관리하는 방법의 흐름도이다.5 is a flowchart of a method for managing a data file according to an embodiment.

아래의 단계들(505 내지 550)은 도 2를 참조하여 전술된 전자 장치(200)에 의해 수행될 수 있다. 단계(505)는 도 3을 참조하여 전술된 단계(330)가 수행된 후 수행될 수 있다.The following steps 505 to 550 may be performed by the electronic device 200 described above with reference to FIG. 2 . Step 505 may be performed after step 330 described above with reference to FIG. 3 is performed.

단계(505)에서, 전자 장치(200)는 미리 설정된 타겟 이벤트가 발생하였는지 여부를 결정한다. 예를 들어, 타겟 이벤트는 상시 녹화 모드의 시작일 수 있다. 다른 예로, 타겟 이벤트는 이벤트 녹화 모드가 시작되는 트리거(trigger)일 수 있다. 예를 들어, 트리거는 전자 장치(200)가 설치된 차량의 충격 감지일 수 있다.In step 505 , the electronic device 200 determines whether a preset target event has occurred. For example, the target event may be the start of the continuous recording mode. As another example, the target event may be a trigger for starting an event recording mode. For example, the trigger may be an impact detection of a vehicle in which the electronic device 200 is installed.

타겟 이벤트가 발생된 경우, 해당 모드에 대한 동영상 촬영이 시작될 수 있다.When a target event occurs, video recording for the corresponding mode may start.

단계(510)에서, 전자 장치(200)는 타겟 이벤트의 종류에 기초하여 생성된 데이터 파일의 이름의 타겟 형식을 결정한다. 타겟 이벤트의 종류에 따라 데이터 파일의 이름의 형식이 달라질 수 있다. 예를 들어, 상시 녹화 모드로 데이터 파일이 생성되는 경우, 데이터 파일의 이름은 "상시 녹화 동영상 xx"의 형식일 수 있다. 다른 예로, 이벤트 녹화 모드로 데이터 파일이 생성되는 경우, 데이터 파일의 이름은 "이벤트 녹화 동영상 yy"의 형식일 수 있다. xx 및 yy는 생성되는 시각에 따라 달라지는 변수일 수 있다.In operation 510, the electronic device 200 determines the target format of the name of the generated data file based on the type of the target event. The format of the name of the data file may vary depending on the type of target event. For example, when a data file is generated in the normal recording mode, the name of the data file may be in the form of “normally recorded video xx”. As another example, when a data file is generated in the event recording mode, the name of the data file may be in the form of “event recording video yy”. xx and yy may be variables that vary depending on the time of creation.

단계(515)에서, 전자 장치(200)는 생성될 데이터 파일의 이름의 타겟 형식에 기초하여 FAT 시스템에 기초하여 동작하는 저장 장치(250)의 타겟 파티션 영역을 결정한다. 예를 들어, 복수의 파티션 영역들 중 타겟 형식에 대응하는 타겟 파티션 영역이 결정될 수 있다.In operation 515 , the electronic device 200 determines a target partition area of the storage device 250 operating based on the FAT system based on the target format of the name of the data file to be created. For example, a target partition area corresponding to a target type may be determined from among the plurality of partition areas.

단계(520)에서, 전자 장치(200)는 새로운 데이터 파일을 생성하는 나타내는 제1 로그를 생성하고, 제1 로그를 저장 장치(250)의 미리 설정된 영역에 저장한다. 예를 들어, 미리 설정된 영역은 저장 장치(250)의 예약된 영역(예를 들어, 도 4의 예약된 영역(420)) 내에 포함될 수 있다.In operation 520 , the electronic device 200 generates a first log indicating that a new data file is created, and stores the first log in a preset area of the storage device 250 . For example, the preset area may be included in a reserved area of the storage device 250 (eg, the reserved area 420 of FIG. 4 ).

단계(525)에서, 전자 장치(200)는 데이터 파일을 생성한다. 데이터 파일은 실제 데이터에 대한 정보일 수 있다. 예를 들어, 실제 데이터에 대한 정보는 데이터의 크기, 생성 시각, 저장 위치 등을 포함할 수 있다.In step 525 , the electronic device 200 creates a data file. The data file may be information about actual data. For example, the information about the actual data may include the size of the data, a creation time, a storage location, and the like.

단계(530)에서, 전자 장치(200)는 데이터 파일이 생성된 경우, 저장 장치(250)의 미리 설정된 영역에 저장된 제1 로그를 삭제한다. 제1 로그를 삭제하는 것은 해당 동작이 정상적으로 완료되었다는 것을 의미할 수 있다.In operation 530 , when the data file is generated, the electronic device 200 deletes the first log stored in a preset area of the storage device 250 . Deleting the first log may mean that the corresponding operation is normally completed.

단계(535)에서, 전자 장치(200)는 데이터 파일의 실제 데이터를 타겟 파티션 영역의 제1 클러스터에 저장하는 동작을 나타내는 제2 로그를 생성하고, 제2 로그를 저장 장치(250)의 미리 설정된 영역(예를 들어, 도 4의 예약된 영역(420))에 저장한다.In step 535 , the electronic device 200 generates a second log representing an operation of storing the actual data of the data file in the first cluster of the target partition area, and stores the second log in a preset of the storage device 250 . It is stored in an area (eg, the reserved area 420 of FIG. 4 ).

단계(540)에서, 전자 장치(200)는 데이터 파일의 실제 데이터를 제1 클러스터에 저장한다. 실제 데이터는 카메라에 의해 생성되는 동영상의 데이터일 수 있다.In operation 540, the electronic device 200 stores the actual data of the data file in the first cluster. The actual data may be data of a video generated by a camera.

단계(545)에서, 전자 장치(200)는 실제 데이터의 저장이 종료된 경우, 제1 클러스터에 대한 상태 정보를 FAT 시스템의 테이블에 할당한다. 예를 들어, 제1 클러스터에 유효한 데이터가 저장되어 있으므로, 제1 클러스터에 대한 상태 정보로서 테이블에 값 "0x?0000002" 내지 "0x?FFFFFEF" 또는 "0x?FFFFFF8 내지 "0x?FFFFFFF" 중 어느 하나가 할당될 수 있다.In operation 545 , when the storage of actual data is finished, the electronic device 200 allocates state information about the first cluster to a table of the FAT system. For example, since valid data is stored in the first cluster, any one of the values "0x?0000002" to "0x?FFFFFFEF" or "0x?FFFFFF8 to "0x?FFFFFFF" in the table as status information for the first cluster One can be assigned.

단계(550)에서, 전자 장치(200)는 제1 클러스터에 대한 상태 정보가 FAT 시스템의 테이블에 할당된 경우, 제2 로그를 삭제한다. 즉, 제2 로그는 실제 데이터가 저장 장치(250)에 모두 저장된 경우 삭제될 수 있다. 제2 로그를 삭제하는 것은 해당 동작이 정상적으로 완료되었다는 것을 의미할 수 있다.In operation 550 , when the state information on the first cluster is allocated to the table of the FAT system, the electronic device 200 deletes the second log. That is, the second log may be deleted when all actual data is stored in the storage device 250 . Deleting the second log may mean that the corresponding operation is normally completed.

도 6은 일 예에 따른 데이터 파일의 실제 데이터가 저장되는 제1 클러스터를 도시한다.6 illustrates a first cluster in which actual data of a data file is stored according to an example.

일 측면에 따르면, 데이터 영역(440)이 제1 파티션 영역(610) 및 제2 파티션 영역(62)으로 분할되어 포맷팅될 수 있다. 예를 들어, 제1 파티션 영역(610)은 상시 녹화 모드에 대해 할당되고, 제2 파티션 영역(620)은 이벤트 녹화 모드에 대해 할당될 수 있다.According to one aspect, the data area 440 may be divided into a first partition area 610 and a second partition area 62 and formatted. For example, the first partition area 610 may be allocated for the regular recording mode, and the second partition area 620 may be allocated for the event recording mode.

제1 파티션 영역(610)은 복수의 클러스터들을 포함할 수 있다. 예를 들어, 제1 파티션 영역(610)의 일부 클러스터들(612)에 제1 데이터 파일에 대한 실제 데이터가 저장되어 있고, 다른 일부 클러스터들(614)에 제2 데이터 파일에 대한 실제 데이터가 저장되어 있을 수 있다. 새로운 데이터 파일이 생성되는 경우, 제1 클러스터(616)에 새로운 데이터 파일의 실제 데이터가 저장될 수 있다. 실제 데이터의 크기가 제1 클러스터(616)에 비해 더 큰 경우, 제1 클러스터(616)에 이어서 제2 클러스터(616)에도 실제 데이터가 저장될 수 있다.The first partition area 610 may include a plurality of clusters. For example, actual data for the first data file is stored in some clusters 612 of the first partition area 610 , and actual data for the second data file is stored in some other clusters 614 . may have been When a new data file is created, actual data of the new data file may be stored in the first cluster 616 . When the size of the actual data is larger than that of the first cluster 616 , the actual data may be stored in the second cluster 616 following the first cluster 616 .

도 7은 일 예에 따른 데이터 파일의 실제 데이터를 제2 클러스터에 저장하는 방법의 흐름도이다.7 is a flowchart of a method of storing actual data of a data file in a second cluster according to an example.

일 측면에 따르면, 아래의 단계들(710 및 720)은 도 5를 참조하여 단계(540)가 수행된 후 수행될 수 있다.According to one aspect, the following steps 710 and 720 may be performed after step 540 is performed with reference to FIG. 5 .

단계(710)에서, 전자 장치(200)는 실제 데이터의 크기가 제1 클러스터에 비해 더 큰 경우, 실제 데이터를 제2 클러스터에 저장하는 동작을 나타내는 제3 로그를 생성하고, 제3 로그를 저장 장치(250)의 미리 설정된 영역(예를 들어, 도 4의 예약된 영역(420))에 저장한다.In operation 710 , when the size of the actual data is larger than that of the first cluster, the electronic device 200 generates a third log indicating an operation of storing the actual data in the second cluster, and stores the third log. It is stored in a preset area of the device 250 (eg, the reserved area 420 of FIG. 4 ).

단계(720)에서, 전자 장치(200)는 실제 데이터를 제2 클러스터에 저장한다.In operation 720 , the electronic device 200 stores actual data in the second cluster.

실제 데이터의 크기가 제1 클러스터 및 제2 클러스터의 합에 비해 더 큰 경우, 실제 데이터가 제3 클러스터에 저장될 수 있다. 실제 데이터를 제3 클러스터에 저장하기 위해, 단계들(710 및 720)이 유사하게 제3 클러스터에 대해 수행될 수 있다.When the size of the real data is larger than the sum of the first cluster and the second cluster, the real data may be stored in the third cluster. To store the actual data in the third cluster, steps 710 and 720 may similarly be performed for the third cluster.

단계들(710 및 720)이 수행된 경우, 단계(545)는 제1 클러스터에 대한 상태 정보 및 제2 클러스터에 대한 상태 정보를 FAT 시스템의 테이블에 할당하는 단계를 포함할 수 있다.When steps 710 and 720 have been performed, step 545 may include allocating the state information for the first cluster and the state information for the second cluster to a table in the FAT system.

단계들(710 및 720)이 수행된 경우, 단계(550)는 제2 로그 및 제3 로그를 삭제하는 단계를 포함할 수 있다.When steps 710 and 720 are performed, step 550 may include deleting the second log and the third log.

도 8은 일 예에 따른 타겟 파티션 영역에 저장된 데이터를 삭제하는 방법의 흐름도이다.8 is a flowchart of a method of deleting data stored in a target partition area according to an example.

새로운 데이터를 저장하기에 타겟 파티션의 여유 공간이 적은 경우 아래의 단계들(810 내지 850)이 수행될 수 있다. 단계(810)는 도 5의 단계(515)가 수행된 후 수행될 수 있다.When the free space of the target partition is small to store new data, the following steps 810 to 850 may be performed. Step 810 may be performed after step 515 of FIG. 5 is performed.

단계(810)에서, 전자 장치(200)는 타겟 파티션 영역의 여유 공간의 크기를 결정한다.In operation 810 , the electronic device 200 determines the size of the free space of the target partition area.

단계(820)에서, 전자 장치(200)는 결정된 여유 공간의 크기가 미리 설정된 임계 크기 미만인 경우, 타겟 파티션 영역에 미리 저장된 데이터들 중 제3 클러스터에 저장된 데이터를 삭제하는 동작을 나타내는 제4 로그를 생성하고, 제4 로그를 미리 설정된 영역에 저장한다.In step 820, when the determined size of the free space is less than a preset threshold size, the electronic device 200 generates a fourth log indicating an operation of deleting data stored in the third cluster among data previously stored in the target partition area. generated, and the fourth log is stored in a preset area.

단계(830)에서, 전자 장치(200)는 제3 클러스터에 저장된 데이터를 삭제한다.In operation 830 , the electronic device 200 deletes data stored in the third cluster.

단계(840)에서, 전자 장치(200)는 제3 클러스터에 저장된 데이터가 삭제된 경우, 제3 클러스터에 대한 상태 정보를 FAT 시스템의 테이블에 할당한다.In operation 840 , when data stored in the third cluster is deleted, the electronic device 200 allocates state information about the third cluster to a table of the FAT system.

단계(850)에서, 전자 장치(200)는 제3 클러스터에 대한 상태 정보가 테이블에 할당된 경우, 제4 로그를 삭제한다. 제4 로그를 삭제하는 것은 해당 동작이 정상적으로 완료되었다는 것을 의미할 수 있다.In operation 850, when the state information on the third cluster is allocated to the table, the electronic device 200 deletes the fourth log. Deleting the fourth log may mean that the corresponding operation is normally completed.

제3 클러스터의 데이터를 삭제하는 것으로 예시되었으나, 여유 공간이 임계 크기를 초과할 때까지 추가의 클러스터들이 삭제될 수 있다.Although exemplified as deleting the data of the third cluster, additional clusters may be deleted until the free space exceeds a threshold size.

타겟 파티션 영역의 여유 공간이 충분하게 확보된 경우, 도 5를 참조하여 전술된 단계(520)가 수행될 수 있다.When the free space of the target partition area is sufficiently secured, step 520 described above with reference to FIG. 5 may be performed.

도 9는 일 예에 따른 FAT 시스템을 복원하는 방법의 흐름도이다.9 is a flowchart of a method of restoring a FAT system according to an example.

일 측면에 따르면, 아래의 단계들(910 및 920)은 도 5를 참조하여 전술된 단계(505)가 수행되기 전에 수행될 수 있다.According to one aspect, the following steps 910 and 920 may be performed before the step 505 described above with reference to FIG. 5 is performed.

단계(910)에서, 전자 장치(200)는 전자 장치(200)(또는, 시스템)가 시작된 경우, 미리 설정된 영역(예를 들어, 예약된 영역(420))에 잔여 로그가 존재하는 여부를 결정한다. 잔여 로그가 존재함은 해당 로그의 동작이 정상적으로 마무리되지 않았음을 의미한다.In operation 910 , when the electronic device 200 (or the system) is started, the electronic device 200 determines whether a residual log exists in a preset area (eg, the reserved area 420 ). do. The existence of a residual log means that the operation of the log is not normally completed.

단계(920)에서, 전자 장치(200)는 잔여 로그가 존재하는 경우, 잔여 로그에 기초하여 FAT 시스템을 복원한다. 예를 들어, 데이터 영역의 클러스터에 저장되었던 데이터가 실제로는 삭제되었으나, 해당 클러스터에 대한 정확한 상태 정보가 테이블에 할당되지 않을 수 있다. 다른 예로, 데이터 영역의 클러스터에 데이터가 저장되었으나, 해당 클러스터에 대한 정확한 상태 정보가 테이블에 할당되지 않을 수 있다. 전자 장치(200)는 잔여 로그에 기초하여 FAT 시스템이 정상적으로 동작하도록 FAT 시스템을 복원할 수 있다.In operation 920 , if there is a residual log, the electronic device 200 restores the FAT system based on the residual log. For example, although data stored in a cluster in the data area is actually deleted, accurate state information about the cluster may not be allocated to the table. As another example, although data is stored in a cluster in the data area, accurate state information about the cluster may not be allocated to the table. The electronic device 200 may restore the FAT system so that the FAT system operates normally based on the remaining log.

이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 컨트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented by a hardware component, a software component, and/or a combination of a hardware component and a software component. For example, the apparatus, methods, and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate (FPGA) array), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions, may be implemented using a general purpose computer or special purpose computer. The processing device may execute an operating system (OS) and a software application running on the operating system. A processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that can include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or apparatus, to be interpreted by or to provide instructions or data to the processing device. , or may be permanently or temporarily embody in a transmitted signal wave. The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored in a computer-readable recording medium.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있으며 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination, and the program instructions recorded on the medium are specially designed and configured for the embodiment, or may be known and available to those skilled in the art of computer software. may be Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic such as floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

위에서 설명한 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 또는 복수의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The hardware devices described above may be configured to operate as one or a plurality of software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 이를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited drawings, those of ordinary skill in the art may apply various technical modifications and variations based thereon. For example, the described techniques are performed in an order different from the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

200: 전자 장치
210: 통신부
220: 프로세서
230: 메모리
240: 카메라
250: 저장 장치
200: electronic device
210: communication department
220: processor
230: memory
240: camera
250: storage device

Claims (19)

전자 장치에 의해 수행되는, 데이터 관리 방법은,
생성될 데이터 파일의 이름의 타겟 형식에 기초하여 FAT(file allocation table) 시스템에 기초하여 동작하는 저장 장치의 타겟 파티션 영역을 결정하는 단계;
새로운 데이터 파일을 생성하는 동작을 나타내는 제1 로그를 생성하고, 상기 제1 로그를 상기 저장 장치의 미리 설정된 영역에 저장하는 단계;
데이터 파일을 생성하는 단계;
상기 데이터 파일이 생성된 경우, 제1 로그를 삭제하는 단계;
상기 데이터 파일의 실제 데이터를 상기 타겟 파티션 영역의 제1 클러스터에 저장하는 동작을 나타내는 제2 로그를 생성하고, 상기 제2 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계;
상기 데이터 파일의 실제 데이터를 상기 제1 클러스터에 저장하는 단계;
상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계; 및
상기 제1 클러스터에 대한 상태 정보가 상기 FAT 시스템의 테이블에 할당된 경우, 상기 제2 로그를 삭제하는 단계
를 포함하는,
데이터 관리 방법.
A data management method, performed by an electronic device, comprises:
determining a target partition area of a storage device operating based on a file allocation table (FAT) system based on a target format of a name of a data file to be created;
generating a first log indicating an operation of creating a new data file, and storing the first log in a preset area of the storage device;
creating a data file;
deleting the first log when the data file is created;
generating a second log representing an operation of storing the actual data of the data file in a first cluster of the target partition area, and storing the second log in the preset area of the storage device;
storing the actual data of the data file in the first cluster;
allocating state information about the first cluster to a table of the FAT system when the storage of the actual data is finished; and
Deleting the second log when the state information for the first cluster is allocated to the table of the FAT system
containing,
How to manage your data.
제1항에 있어서,
미리 설정된 타겟 이벤트가 발생하였는지 여부를 결정하는 단계; 및
상기 타겟 이벤트의 종류에 기초하여 상기 생성될 데이터 파일의 이름의 상기 타겟 형식을 결정하는 단계
를 더 포함하는,
데이터 관리 방법.
According to claim 1,
determining whether a preset target event has occurred; and
determining the target format of the name of the to-be-generated data file based on the type of the target event;
further comprising,
How to manage your data.
제1항에 있어서,
상기 FAT 시스템으로 포맷팅된 상기 저장 장치는, 부트 레코드 영역(boot record area), 예약된 영역(reserved area), FAT 영역 및 데이터 영역을 포함하고,
상기 미리 설정된 영역은 상기 예약된 영역 내에 포함되는,
데이터 관리 방법.
According to claim 1,
The storage device formatted with the FAT system includes a boot record area, a reserved area, a FAT area and a data area,
The preset area is included in the reserved area,
How to manage your data.
제1항에 있어서,
상기 실제 데이터의 크기가 상기 제1 클러스터에 비해 더 큰 경우, 상기 실제 데이터를 상기 타겟 파티션 영역의 제2 클러스터에 저장하는 동작을 나타내는 제3 로그를 생성하고, 상기 제3 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계; 및
상기 실제 데이터를 상기 제2 클러스터에 저장하는 단계
를 더 포함하고,
상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계는,
상기 제1 클러스터에 대한 상태 정보 및 상기 제2 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계
를 포함하고,
상기 제2 로그를 삭제하는 단계는,
상기 제2 로그 및 상기 제3 로그를 삭제하는 단계
를 포함하는,
데이터 관리 방법.
According to claim 1,
When the size of the actual data is larger than that of the first cluster, a third log indicating an operation of storing the actual data in a second cluster of the target partition area is generated, and the third log is stored in the storage device. storing in the preset area; and
Storing the real data in the second cluster
further comprising,
When the storage of the actual data is finished, allocating the state information for the first cluster to the table of the FAT system comprises:
Allocating the state information for the first cluster and the state information for the second cluster to a table of the FAT system
including,
The step of deleting the second log is,
Deleting the second log and the third log
containing,
How to manage your data.
제1항에 있어서,
상기 타겟 파티션 영역의 여유 공간의 크기를 결정하는 단계;
상기 결정된 여유 공간의 크기가 미리 설정된 임계 크기 미만인 경우, 상기 타겟 파티션 영역에 미리 저장된 데이터들 중 제3 클러스터에 저장된 데이터를 삭제하는 동작을 나타내는 제4 로그를 생성하고, 상기 제4 로그를 상기 미리 설정된 영역에 저장하는 단계;
상기 제3 클러스터에 저장된 데이터를 삭제하는 단계;
상기 제3 클러스터에 저장된 데이터가 삭제된 경우, 상기 제3 클러스터에 대한 상태 정보를 상기 FAT 시스템의 상기 테이블에 할당하는 단계; 및
상기 제3 클러스터에 대한 상태 정보가 상기 FAT 시스템의 상기 테이블에 할당된 경우, 상기 제4 로그를 삭제하는 단계
를 더 포함하는,
데이터 관리 방법.
According to claim 1,
determining a size of a free space of the target partition area;
When the determined size of the free space is less than a preset threshold size, a fourth log indicating an operation of deleting data stored in a third cluster among data previously stored in the target partition area is generated, and the fourth log is previously stored in the target partition area. storing in a set area;
deleting data stored in the third cluster;
allocating state information about the third cluster to the table of the FAT system when data stored in the third cluster is deleted; and
deleting the fourth log when the state information for the third cluster is assigned to the table of the FAT system;
further comprising,
How to manage your data.
제1항에 있어서,
상기 저장 장치를 초기화 하는 단계
를 더 포함하고,
상기 저장 장치를 초기화 하는 단계는,
상기 저장 장치의 저장 영역을 부트 레코드 영역, 예약된 영역, FAT 영역 및 데이터 영역을 포함하도록 포맷팅하는 단계;
상기 데이터 영역을 저장되는 데이터의 형식들에 대응하도록 하나 이상의 파티션 영역들로 분할하는 단계 - 상기 하나 이상의 파티션 영역들의 각각은 복수의 클러스터들을 포함함 -; 및
상기 하나 이상의 파티션 영역들에 대한 논리 정보 및 복수의 클러스터들에 대한 논리 정보 중 적어도 하나를 상기 예약된 영역에 저장하는 단계
를 포함하는,
데이터 관리 방법.
According to claim 1,
Initializing the storage device
further comprising,
Initializing the storage device includes:
formatting a storage area of the storage device to include a boot record area, a reserved area, a FAT area, and a data area;
dividing the data area into one or more partition areas to correspond to types of stored data, each of the one or more partition areas including a plurality of clusters; and
storing at least one of logical information on the one or more partition areas and logical information on a plurality of clusters in the reserved area;
containing,
How to manage your data.
제6항에 있어서,
상기 FAT 영역은,
제1 FAT 영역 및 제2 FAT 영역을 포함하고,
상기 제1 FAT 영역에 저장되는 데이터가 상기 제2 FAT 영역에 복제되어 저장되는,
데이터 관리 방법.
7. The method of claim 6,
The FAT area is
a first FAT area and a second FAT area;
data stored in the first FAT area is copied and stored in the second FAT area;
How to manage your data.
제1항에 있어서,
상기 전자 장치가 시작된 경우, 상기 미리 설정된 영역에 적어도 하나의 잔여 로그가 존재하는지 여부를 결정하는 단계; 및
상기 잔여 로그가 존재하는 경우, 상기 잔여 로그에 기초하여 상기 FAT 시스템을 복원하는 단계
를 더 포함하는,
데이터 관리 방법.
According to claim 1,
determining whether at least one remaining log exists in the preset area when the electronic device is started; and
If the residual log exists, restoring the FAT system based on the residual log;
further comprising,
How to manage your data.
제1항에 있어서,
상기 실제 데이터는 오디오 데이터 또는 동영상 데이터인,
데이터 관리 방법.
According to claim 1,
The actual data is audio data or video data,
How to manage your data.
제1항에 있어서,
상기 전자 장치는,
동영상을 생성하는 카메라, 및 상기 저장 장치를 포함하는 블랙박스인,
데이터 관리 방법.
According to claim 1,
The electronic device is
A camera that generates a video, and a black box including the storage device,
How to manage your data.
하드웨어와 결합되어 제1항 내지 제10항 중 어느 하나의 항의 방법을 실행시키기 위하여 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램.
A computer program stored in a computer-readable recording medium in combination with hardware to execute the method of any one of claims 1 to 10.
전자 장치는,
데이터를 관리하는 프로그램이 기록된 메모리; 및
상기 프로그램을 수행하는 프로세서
를 포함하고,
상기 프로그램은,
생성될 데이터 파일의 이름의 타겟 형식에 기초하여 FAT(file allocation table) 시스템에 기초하여 동작하는 저장 장치의 타겟 파티션 영역을 결정하는 단계;
새로운 데이터 파일을 생성하는 동작을 나타내는 제1 로그를 생성하고, 상기 저장 장치의 미리 설정된 영역에 저장하는 단계;
데이터 파일을 생성하는 단계;
상기 데이터 파일이 생성된 경우, 제1 로그를 삭제하는 단계;
상기 데이터 파일의 실제 데이터를 상기 타겟 파티션 영역의 제1 클러스터에 저장하는 동작을 나타내는 제2 로그를 생성하고, 상기 제2 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계;
상기 데이터 파일의 실제 데이터를 상기 제1 클러스터에 저장하는 단계;
상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계; 및
상기 제1 클러스터에 대한 상태 정보가 상기 FAT 시스템의 테이블에 할당된 경우, 상기 제2 로그를 삭제하는 단계
를 수행하는,
전자 장치.
The electronic device is
a memory in which a program for managing data is recorded; and
a processor that executes the program
including,
The program is
determining a target partition area of a storage device operating based on a file allocation table (FAT) system based on a target format of a name of a data file to be created;
generating a first log indicating an operation of creating a new data file and storing the first log in a preset area of the storage device;
creating a data file;
deleting the first log when the data file is created;
generating a second log representing an operation of storing the actual data of the data file in a first cluster of the target partition area, and storing the second log in the preset area of the storage device;
storing the actual data of the data file in the first cluster;
allocating state information about the first cluster to a table of the FAT system when the storage of the actual data is finished; and
Deleting the second log when the state information for the first cluster is allocated to the table of the FAT system
to do,
electronic device.
제12항에 있어서,
상기 프로그램은,
미리 설정된 타겟 이벤트가 발생하였는지 여부를 결정하는 단계; 및
상기 타겟 이벤트의 종류에 기초하여 상기 생성될 데이터 파일의 이름의 상기 타겟 형식을 결정하는 단계
를 더 수행하는,
전자 장치.
13. The method of claim 12,
The program is
determining whether a preset target event has occurred; and
determining the target format of the name of the to-be-generated data file based on the type of the target event;
to do more,
electronic device.
제12항에 있어서,
상기 FAT 시스템으로 포맷팅된 상기 저장 장치는, 부트 레코드 영역(boot record area), 예약된 영역(reserved area), FAT 영역 및 데이터 영역을 포함하고,
상기 미리 설정된 영역은 상기 예약된 영역 내에 포함되는,
전자 장치.
13. The method of claim 12,
The storage device formatted with the FAT system includes a boot record area, a reserved area, a FAT area and a data area,
The preset area is included in the reserved area,
electronic device.
제12항에 있어서,
상기 프로그램은,
상기 실제 데이터의 크기가 상기 제1 클러스터에 비해 더 큰 경우, 상기 실제 데이터를 상기 타겟 파티션 영역의 제2 클러스터에 저장하는 동작을 나타내는 제3 로그를 생성하고, 상기 제3 로그를 상기 저장 장치의 상기 미리 설정된 영역에 저장하는 단계; 및
상기 실제 데이터를 상기 제2 클러스터에 저장하는 단계
를 더 수행하고,
상기 실제 데이터의 저장이 종료된 경우, 상기 제1 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계는,
상기 제1 클러스터에 대한 상태 정보 및 상기 제2 클러스터에 대한 상태 정보를 상기 FAT 시스템의 테이블에 할당하는 단계
를 포함하고,
상기 제2 로그를 삭제하는 단계는,
상기 제2 로그 및 상기 제3 로그를 삭제하는 단계
를 포함하는,
전자 장치.
13. The method of claim 12,
The program is
When the size of the actual data is larger than that of the first cluster, a third log indicating an operation of storing the actual data in a second cluster of the target partition area is generated, and the third log is stored in the storage device. storing in the preset area; and
Storing the real data in the second cluster
do more,
When the storage of the actual data is finished, allocating the state information for the first cluster to the table of the FAT system comprises:
Allocating the state information for the first cluster and the state information for the second cluster to a table of the FAT system
including,
The step of deleting the second log is,
Deleting the second log and the third log
containing,
electronic device.
제12항에 있어서,
상기 프로그램은,
상기 타겟 파티션 영역의 여유 공간의 크기를 결정하는 단계;
상기 결정된 여유 공간의 크기가 미리 설정된 크기 미만인 경우, 상기 타겟 파티션 영역에 미리 저장된 데이터들 중 제3 클러스터에 저장된 데이터를 삭제하는 동작을 나타내는 제4 로그를 생성하고, 상기 제4 로그를 상기 미리 설정된 영역에 저장하는 단계;
상기 제3 클러스터에 저장된 데이터를 삭제하는 단계;
상기 제3 클러스터에 저장된 데이터가 삭제된 경우, 상기 제3 클러스터에 대한 상태 정보를 상기 FAT 시스템의 상기 테이블에 할당하는 단계; 및
상기 제3 클러스터에 대한 상태 정보가 상기 FAT 시스템의 상기 테이블에 할당된 경우, 상기 제4 로그를 삭제하는 단계
를 더 수행하는,
전자 장치.
13. The method of claim 12,
The program is
determining a size of a free space of the target partition area;
When the determined size of the free space is less than a preset size, a fourth log indicating an operation of deleting data stored in a third cluster among data previously stored in the target partition area is generated, and the fourth log is stored in the preset size. storing in a region;
deleting data stored in the third cluster;
allocating state information about the third cluster to the table of the FAT system when data stored in the third cluster is deleted; and
deleting the fourth log when the state information for the third cluster is assigned to the table of the FAT system;
to do more,
electronic device.
제12항에 있어서,
상기 프로그램은,
상기 저장 장치를 초기화 하는 단계
를 더 수행하고,
상기 저장 장치를 초기화 하는 단계는,
상기 저장 장치의 저장 영역을 부트 레코드 영역, 예약된 영역, FAT 영역 및 데이터 영역을 포함하도록 포맷팅하는 단계;
상기 데이터 영역을 저장되는 데이터의 형식들에 대응하도록 하나 이상의 파티션 영역들로 분할하는 단계 - 상기 하나 이상의 파티션 영역들의 각각은 복수의 클러스터들을 포함함 -; 및
상기 하나 이상의 파티션 영역들에 대한 논리 정보 및 복수의 클러스터들에 대한 논리 정보 중 적어도 하나를 상기 예약된 영역에 저장하는 단계
를 포함하는,
전자 장치.
13. The method of claim 12,
The program is
Initializing the storage device
do more,
Initializing the storage device includes:
formatting a storage area of the storage device to include a boot record area, a reserved area, a FAT area, and a data area;
dividing the data area into one or more partition areas to correspond to types of stored data, each of the one or more partition areas including a plurality of clusters; and
storing at least one of logical information on the one or more partition areas and logical information on a plurality of clusters in the reserved area;
containing,
electronic device.
제12항에 있어서,
상기 프로그램은,
상기 전자 장치가 시작된 경우, 상기 미리 설정된 영역에 적어도 하나의 잔여 로그가 존재하는지 여부를 결정하는 단계; 및
상기 잔여 로그가 존재하는 경우, 상기 잔여 로그에 기초하여 상기 FAT 시스템을 복원하는 단계
를 더 수행하는,
전자 장치.
13. The method of claim 12,
The program is
determining whether at least one remaining log exists in the preset area when the electronic device is started; and
If the residual log exists, restoring the FAT system based on the residual log;
to do more,
electronic device.
제12항에 있어서,
상기 전자 장치는,
동영상을 생성하는 카메라, 및 상기 저장 장치를 포함하는 블랙박스인,
전자 장치.
13. The method of claim 12,
The electronic device is
A camera that generates a video, and a black box including the storage device,
electronic device.
KR1020200177273A 2020-12-17 2020-12-17 Method and apparatus for managing data of storage device KR102521016B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200177273A KR102521016B1 (en) 2020-12-17 2020-12-17 Method and apparatus for managing data of storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200177273A KR102521016B1 (en) 2020-12-17 2020-12-17 Method and apparatus for managing data of storage device

Publications (2)

Publication Number Publication Date
KR20220086986A true KR20220086986A (en) 2022-06-24
KR102521016B1 KR102521016B1 (en) 2023-04-14

Family

ID=82216022

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200177273A KR102521016B1 (en) 2020-12-17 2020-12-17 Method and apparatus for managing data of storage device

Country Status (1)

Country Link
KR (1) KR102521016B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09212400A (en) * 1996-01-31 1997-08-15 Toshiba Corp File system provided with fault resistance
KR20090022091A (en) * 2007-08-29 2009-03-04 엘지전자 주식회사 Flash memory device, its using method for recovering error and communication terminal thereof
KR101077500B1 (en) * 2009-07-02 2011-10-27 선문대학교 산학협력단 Log Data Storage Method for Journaling FAT File System
KR20190061549A (en) * 2017-11-28 2019-06-05 지인정보기술 주식회사 File system and method of storing files based on the file system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09212400A (en) * 1996-01-31 1997-08-15 Toshiba Corp File system provided with fault resistance
KR20090022091A (en) * 2007-08-29 2009-03-04 엘지전자 주식회사 Flash memory device, its using method for recovering error and communication terminal thereof
KR101077500B1 (en) * 2009-07-02 2011-10-27 선문대학교 산학협력단 Log Data Storage Method for Journaling FAT File System
KR20190061549A (en) * 2017-11-28 2019-06-05 지인정보기술 주식회사 File system and method of storing files based on the file system

Also Published As

Publication number Publication date
KR102521016B1 (en) 2023-04-14

Similar Documents

Publication Publication Date Title
US9563636B2 (en) Allowing writes to complete without obtaining a write lock to a file
US8751765B2 (en) Computer system, storage system and method for saving storage area by integrating same data
US7895394B2 (en) Storage system
US9864646B2 (en) Managing spaces in memory
US20200192744A1 (en) Fast recovery from failures in a chronologically ordered log-structured key-value storage system
US11099980B2 (en) Host aware update write
CN110147296B (en) Data processing method, device, equipment and readable storage medium
CN108459822B (en) Installation method and device of operating system
US11068181B2 (en) Generating and storing monotonically-increasing generation identifiers
US10089015B1 (en) Per-drive memory resident zeroing maps for drive zeroing in a data storage system
JP5492731B2 (en) Virtual machine volume allocation method and computer system using the method
KR102521016B1 (en) Method and apparatus for managing data of storage device
US11210024B2 (en) Optimizing read-modify-write operations to a storage device by writing a copy of the write data to a shadow block
US10235089B2 (en) Storage control device, method and storage system to backup data using allocation information
CN112433669A (en) Method, system, equipment and medium for online migration of distributed storage volume
US20190250994A1 (en) Backup control method and backup control system
US20220164259A1 (en) Creating a backup data set
US9672118B2 (en) Collision avoidance using dynamic target volume allocation
US9003155B2 (en) Method and system for managing storage units
US20150286541A1 (en) Collision avoidance using dynamic volume allocation with reuse
CN108897561B (en) Data storage method and storage system
US9632710B2 (en) Efficient use of Flashcopy resources and target volumes for dynamic target volume allocation
US11604593B2 (en) Control apparatus that improves recording of data in a recording medium by allocating directory clusters to recording units in a more effective manner, and control method and non-transitory computer readable storage medium storing instructions thereof
CN112306956B (en) Methods, apparatuses, and computer program products for metadata maintenance
KR101887663B1 (en) Method and apparatus for processing data using dummy page

Legal Events

Date Code Title Description
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)