TWI387874B - Storage device - Google Patents

Storage device Download PDF

Info

Publication number
TWI387874B
TWI387874B TW98100695A TW98100695A TWI387874B TW I387874 B TWI387874 B TW I387874B TW 98100695 A TW98100695 A TW 98100695A TW 98100695 A TW98100695 A TW 98100695A TW I387874 B TWI387874 B TW I387874B
Authority
TW
Taiwan
Prior art keywords
storage
sub
partition
area
module
Prior art date
Application number
TW98100695A
Other languages
Chinese (zh)
Other versions
TW201027341A (en
Inventor
Lin Yi Ta Chiang
Original Assignee
Hon Hai Prec Ind Co Ltd
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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW98100695A priority Critical patent/TWI387874B/en
Publication of TW201027341A publication Critical patent/TW201027341A/en
Application granted granted Critical
Publication of TWI387874B publication Critical patent/TWI387874B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

存儲裝置 Storage device

本發明涉及一種存儲裝置。 The present invention relates to a storage device.

先前之數碼相機或攝像機一般都會採用SD卡等一些存儲裝置對錄製之影像進行存儲。所述存儲裝置一般包括一存儲區,所述存儲區內包括複數個子存儲區域,複數個子存儲區域之物理位元址連續分佈,錄製之影像檔檔分別存儲於所述子存儲區域。於寫入之過程中,如果發生斷電,或於沒有及時保存之情況下拔卡,由於先前之存儲裝置於斷電前無法記憶錄製有新影像檔之各子存儲區域所對應之物理位元址,因此,寫入之影像資料將因斷電丟失而無法救回。 Previously, digital cameras or camcorders generally used a storage device such as an SD card to store recorded images. The storage device generally includes a storage area, and the storage area includes a plurality of sub-storage areas. The physical bit addresses of the plurality of sub-storage areas are continuously distributed, and the recorded image files are respectively stored in the sub-storage area. During the writing process, if a power failure occurs, or the card is unplugged without being saved in time, the physical location corresponding to each sub-storage area in which the new image file is recorded cannot be memorized before the previous storage device is powered off. Therefore, the written image data will not be saved due to the loss of power.

有鑒於此,有必要提供一種於斷電沒有保存之狀況下,寫入之資料能夠及時救回之存儲裝置。 In view of this, it is necessary to provide a storage device in which the written data can be rescued in time without power saving.

一種存儲裝置,其包括:一分割區、一用於記錄所述分割區分配情況之存儲空間分配模組及一保留區。所述分割區包括一用於存儲資料之存儲區域,所述存儲區域包括複數個子存儲區域,所述複數個子存儲區域之物理位址連續分佈。所述保留區包括一標識模組、一串接模組及一還原模組。新輸入之資料每寫進一子存儲區域,所述標識模組用於對該對應之子存儲區域之物理位址之向量表進行依序標識。所述串接模組對所述向量表內做有標識之子存儲區域之物理位址所對應之子存儲區域進行 依序串接。所述還原模組對所述串接模組依序串接好之各子存儲區域內之資料依序進行還原。 A storage device includes: a partition, a storage space allocation module for recording the partition allocation, and a reserved area. The partitioning area includes a storage area for storing data, and the storage area includes a plurality of sub-memory areas, and physical addresses of the plurality of sub-storage areas are continuously distributed. The reserved area includes an identification module, a serial connection module and a restoration module. The newly input data is written into a sub-storage area, and the identification module is used to sequentially identify the vector table of physical addresses of the corresponding sub-storage areas. The serial connection module performs a sub-storage area corresponding to a physical address of the identified sub-storage area in the vector table. Sequentially connected. The restoring module sequentially restores the data in each sub-storage area that the serial concatenation module serially connects in sequence.

相較於先前技術,所述保留區包括一標識模組、一串接模組及一還原模組。新輸入之資料每寫進一子存儲區域,所述標識模組用於對該對應之子存儲區域之物理位址之向量表進行依序標識。所述串接模組對所述向量表內做有標識之子存儲區域之物理位址所對應之子存儲區域進行依序串接。所述還原模組對所述串接模組依序串接好之各子存儲區域內之資料依序進行還原。因此於寫入資料沒有保存之狀況下,即使斷電或拔卡,也可保證使所述資料還原。 Compared with the prior art, the reserved area includes an identification module, a serial connection module and a restoration module. The newly input data is written into a sub-storage area, and the identification module is used to sequentially identify the vector table of physical addresses of the corresponding sub-storage areas. The serial connection module serially connects the sub-storage areas corresponding to the physical addresses of the identified sub-storage areas in the vector table. The restoring module sequentially restores the data in each sub-storage area that the serial concatenation module serially connects in sequence. Therefore, even if the written data is not saved, even if the power is cut off or the card is pulled out, the data can be restored.

下面將結合附圖,舉以下較佳實施方式並配合圖式詳細描述如下。 The following preferred embodiments will be described in detail below with reference to the accompanying drawings.

請參閱圖1,本發明實施方式提供之存儲裝置100可以為各種可以存儲資料之硬體,如硬碟、記憶體、快閃記憶體等。該存儲裝置100包括存儲空間分配模組10、一保留區15、一分割區40。 Referring to FIG. 1 , the storage device 100 provided by the embodiment of the present invention may be any hardware that can store data, such as a hard disk, a memory, a flash memory, or the like. The storage device 100 includes a storage space allocation module 10, a reserved area 15, and a divided area 40.

所述存儲空間分配模組10用於記錄所述分割區40之分配情況,如:記錄分割區40之大小、所述分割區40之起始物理位址。 The storage space allocation module 10 is configured to record the allocation of the partition 40, such as recording the size of the partition 40 and the starting physical address of the partition 40.

所述分割區40包括用於記錄所述存儲裝置100之存儲情況之分區資訊表30和用於存儲資料之存儲區域35。所述分區資訊表30和存儲區域35之物理位址連續分佈且分區資 訊表30之物理位址位於所述存儲區域35之前面。所述存儲區域35分割成複數個子存儲區域352,該複數個子存儲區域352之物理位址連續分佈。本實施方式中,每個子存儲區域352之存儲容量均為4096 byte。 The partition 40 includes a partition information table 30 for recording the storage condition of the storage device 100 and a storage area 35 for storing data. The physical addresses of the partition information table 30 and the storage area 35 are continuously distributed and partitioned The physical address of the meter 30 is located in front of the storage area 35. The storage area 35 is divided into a plurality of sub-memory areas 352, and the physical addresses of the plurality of sub-storage areas 352 are continuously distributed. In this embodiment, the storage capacity of each sub-memory area 352 is 4096 bytes.

所述分區資訊表30包括基本輸入輸出系統參數模組20(BPB,BIOS Parameter Block)、分割區檔位址表22(FAT,File Allocation Table Of Partition)和分割區根目錄24。 The partition information table 30 includes a basic input/output system parameter module (BPB), a file partition table 22 (FAT, File Allocation Table Of Partition), and a partition root directory 24.

其中,基本輸入輸出系統參數模組20內記錄有啟動程式之起始物理位址、所處作業系統之版本資訊及分割區40之容量大小等資訊。所述分割區檔位址表22內記錄有所述分割區40內所存儲之最近一次新錄入資料之物理位址之向量表。該分割區檔位址表22之物理位址之向量表只有於存儲裝置100正常結束後才會更新。分割區根目錄24內記錄有所述分割區40內之存儲資料之第一層目錄。 The basic input/output system parameter module 20 records information such as the starting physical address of the startup program, the version information of the operating system, and the capacity of the partition 40. A vector table of physical addresses of the last newly entered data stored in the partition 40 is recorded in the partition file address table 22. The vector table of physical addresses of the partition file address table 22 is updated only after the storage device 100 is normally terminated. The first layer directory of the stored data in the partition 40 is recorded in the partition root directory 24.

所述保留區15設置於存儲空間分配模組10與所述分割區40之間。請參閱圖2,本實施方式中,所述保留區15內設有一標識模組151、一串接模組152及一還原模組153。當用戶向所述存儲裝置100輸入資料,如文字、圖像、錄影等資訊。所述新輸入之資料均存儲於存儲區域35之複數個子存儲區域352內。於最近新寫入資料之過程中,每寫進一子存儲區域352,所述標識模組151用於對該對應之子存儲區域352之物理位址之向量表進行依序標識。由於該分割區檔位址表22之物理位址之向量表只有於存儲裝置100正常結束後才會更新,所以存儲裝置100於寫入 之過程中斷電等非正常操作之過程中,所述分割區檔位址表22之物理位址之向量表仍保存有上一次做有標識之寫入有上一次最新資料之子存儲區域352之物理位址。 The reserved area 15 is disposed between the storage space allocation module 10 and the divided area 40. Referring to FIG. 2 , in the embodiment, the identification area 151 , a serial connection module 152 and a reduction module 153 are disposed in the reserved area 15 . When the user inputs data to the storage device 100, such as text, images, video, and the like. The newly input data is stored in a plurality of sub-storage areas 352 of the storage area 35. In the process of newly writing data, the identification module 151 is used to sequentially identify the vector table of the physical addresses of the corresponding sub-storage area 352 for each sub-storage area 352. Since the vector table of the physical address of the partition file address table 22 is updated only after the storage device 100 is normally terminated, the storage device 100 is written. During the abnormal operation such as interrupting the power, the vector table of the physical address of the partition file address table 22 still stores the sub-memory area 352 which was last marked with the last updated data. Physical address.

用戶於對新輸入之沒有保存而斷電或拔卡之情況下,於下次啟動該存儲裝置100時,所述串接模組152對所述向量表內做有標識之子存儲區域352之物理位址所對應之子存儲區域352進行依序串接。 When the user powers off or unplugs the new input, the serial module 152 performs the physical of the identified sub-storage area 352 in the vector table when the storage device 100 is started next time. The sub-storage area 352 corresponding to the address is serially connected in sequence.

所述還原模組153對所述串接模組152依序串接好之各子存儲區域352內之資料依序進行還原。 The restoration module 153 sequentially restores the data in each of the sub-storage areas 352 serially connected to the serial connection module 152.

所述保留區包括一標識模組、一串接模組及一還原模組。新輸入之資料每寫進一子存儲區域,所述標識模組用於對該對應之子存儲區域之物理位址之向量表進行依序標識。所述串接模組對所述向量表內做有標識之子存儲區域之物理位址所對應之子存儲區域進行依序串接。所述還原模組對所述串接模組依序串接好之各子存儲區域內之資料依序進行還原。因此於寫入資料沒有保存之狀況下,即使斷電或拔卡,也可保證使所述資料還原。 The reserved area includes an identification module, a serial connection module and a restoration module. The newly input data is written into a sub-storage area, and the identification module is used to sequentially identify the vector table of physical addresses of the corresponding sub-storage areas. The serial connection module serially connects the sub-storage areas corresponding to the physical addresses of the identified sub-storage areas in the vector table. The restoring module sequentially restores the data in each sub-storage area that the serial concatenation module serially connects in sequence. Therefore, even if the written data is not saved, even if the power is cut off or the card is pulled out, the data can be restored.

綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅為本發明之較佳實施方式,本發明之範圍並不以上述實施方式為限,舉凡熟悉本案技藝之人士援依本發明之精神所作之等效修飾或變化,皆應涵蓋於以下申請專利範圍內。 In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. However, the above description is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application.

100‧‧‧存儲裝置 100‧‧‧Storage device

10‧‧‧存儲空間分配模組 10‧‧‧Storage Space Allocation Module

15‧‧‧保留區 15‧‧‧ Reserved area

20‧‧‧基本輸入輸出系統參數模組 20‧‧‧Basic input and output system parameter module

22‧‧‧分割區檔地址表 22‧‧‧Divisional area address table

24‧‧‧分割區根目錄 24‧‧‧ partition root directory

30‧‧‧分區信息表 30‧‧‧District Information Sheet

35‧‧‧存儲區域 35‧‧‧Storage area

40‧‧‧分割區 40‧‧‧ Division

352‧‧‧子存儲區域 352‧‧‧sub-storage area

151‧‧‧標識模組 151‧‧‧identification module

152‧‧‧串接模組 152‧‧‧Serial module

153‧‧‧還原模組 153‧‧‧Reduction module

圖1係本發明實施方式提供之存儲裝置之硬體架構圖; 圖2係圖1中之存儲裝置之保留區之硬體架構圖。 1 is a hardware structural diagram of a storage device according to an embodiment of the present invention; 2 is a hardware architecture diagram of a reserved area of the storage device of FIG. 1.

100‧‧‧存儲裝置 100‧‧‧Storage device

10‧‧‧存儲空間分配模組 10‧‧‧Storage Space Allocation Module

15‧‧‧保留區 15‧‧‧ Reserved area

20‧‧‧基本輸入輸出系統參數模組 20‧‧‧Basic input and output system parameter module

22‧‧‧分割區檔地址表 22‧‧‧Divisional area address table

24‧‧‧分割區根目錄 24‧‧‧ partition root directory

30‧‧‧分區信息表 30‧‧‧District Information Sheet

35‧‧‧存儲區域 35‧‧‧Storage area

40‧‧‧分割區 40‧‧‧ Division

352‧‧‧子存儲區域 352‧‧‧sub-storage area

Claims (4)

一種存儲裝置,其包括:一分割區、一用於記錄所述分割區分配情況的存儲空間分配模組及一保留區,所述分割區包括一用於存儲資料的存儲區域,所述存儲區域包括複數個子存儲區域,所述複數個子存儲區域的物理位址連續分佈,所述分割區進一步包括一用於記錄所述存儲裝置的存儲情況的分區資訊表,其改進在於:所述分區資訊表包括一分割區檔位址表,所述分割區檔位址表內記錄有所述分割區內所存儲的最近一次新錄入資料的物理位元址的向量表,所述保留區包括一標識模組、一串接模組及一還原模組,新輸入的資料每寫進一子存儲區域,所述標識模組用於對該寫進有新輸入的資料的子存儲區域的物理位址的向量表進行依序標識,所述存儲裝置於寫入的過程中斷電時,所述分割區檔位址表的物理位址的向量表仍保存有上一次做有標識的寫入有上一次最新資料的子存儲區域的物理位址,所述串接模組對所述向量表內做有標識的子存儲區域的物理位址所對應的子存儲區域進行依序串接,所述還原模組對所述串接模組依序串接好的各子存儲區域內的資料依序進行還原。 A storage device includes: a partition, a storage space allocation module for recording the partition allocation, and a reserved area, the partition including a storage area for storing data, the storage area A plurality of sub-storage areas are included, the physical addresses of the plurality of sub-storage areas are continuously distributed, and the partitioning area further includes a partition information table for recording the storage condition of the storage device, and the improvement is: the partition information table Included in the partition file address table, a vector table of physical bit addresses of the last newly entered data stored in the partition area is recorded in the partition file address table, and the reserved area includes an identification mode a group, a serial module and a restoration module, each of the newly input data is written into a sub-storage area, and the identification module is used to write the physical address of the sub-storage area of the newly entered data. The vector table is sequentially identified. When the storage device is interrupted, the vector table of the physical address of the partition file address table still stores the last written write. a physical address of the sub-storage area of the last updated data, the serial connection module serially concatenates the sub-storage areas corresponding to the physical addresses of the identified sub-storage areas in the vector table, The restoration module sequentially restores the data in each sub-storage area serially connected by the serial connection module. 如申請專利範圍第1項所述之存儲裝置,其中,所述子存儲區域的存儲容量為4096byte。 The storage device of claim 1, wherein the sub-storage area has a storage capacity of 4096 bytes. 如申請專利範圍第1項所述之存儲裝置,其中,所述存儲裝置可以為硬碟、記憶體或快閃記憶體。 The storage device of claim 1, wherein the storage device is a hard disk, a memory or a flash memory. 如申請專利範圍第1項所述之存儲裝置,其中,所述保留區設置在所述存儲空間分配模組與分割區之間。 The storage device of claim 1, wherein the reserved area is disposed between the storage space allocation module and the partition.
TW98100695A 2009-01-09 2009-01-09 Storage device TWI387874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98100695A TWI387874B (en) 2009-01-09 2009-01-09 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98100695A TWI387874B (en) 2009-01-09 2009-01-09 Storage device

Publications (2)

Publication Number Publication Date
TW201027341A TW201027341A (en) 2010-07-16
TWI387874B true TWI387874B (en) 2013-03-01

Family

ID=44853161

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98100695A TWI387874B (en) 2009-01-09 2009-01-09 Storage device

Country Status (1)

Country Link
TW (1) TWI387874B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI674545B (en) * 2018-11-15 2019-10-11 華南商業銀行股份有限公司 Data management method and system thereof

Also Published As

Publication number Publication date
TW201027341A (en) 2010-07-16

Similar Documents

Publication Publication Date Title
US20050036372A1 (en) Data storing apparatus
US8977802B2 (en) Access device, information recording device, controller, real time information recording system, access method, and program
US7523280B2 (en) Storage managing system, storage managing apparatus, and storage managing method
US20080162797A1 (en) Apparatus and method for archiving digital content
WO2006014748A1 (en) Method and device to improve usb flash write performance
CN102224489A (en) Flash based memory comprising a flash translation layer and method for storing a file therein
JP4487954B2 (en) Data recording apparatus, data recording method, and program
US20070043968A1 (en) Disk array rebuild disruption resumption handling method and system
US8055858B2 (en) Method for protecting exposed data during read/modify/write operations on a SATA disk drive
TWI387874B (en) Storage device
US20210055877A1 (en) Control apparatus, control method of recording apparatus, and non-transitory computer readable storage medium
JP2004362221A (en) Hard disk backup recovery system, hard disk backup recovery method and information processing device
JP2006133923A (en) Data recording/reproducing device, recording/reproducing method, program and data recording medium
JP2010020845A (en) Method and device for initializing recording medium
JP2006260158A (en) Information processing apparatus, information processing method and program
JP4218406B2 (en) Information recording and playback method
CN101763320B (en) Storage method
JP4972909B2 (en) Data recording device
JP4504956B2 (en) Image storage system and image storage method
TW200917026A (en) A method for eliminating the initialization synchronous course of the RAID1 equipment
WO2016131259A1 (en) Storage unit formatting method and system
JPH0689371A (en) Method and system for ic memory card control
JPH06139131A (en) Memory card device
JP5504904B2 (en) Information recording / reproducing device
KR20060069118A (en) Repairing method of a memory card

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees