TWI707235B - Storage apparatus managing system and storage apparatus managing method - Google Patents

Storage apparatus managing system and storage apparatus managing method Download PDF

Info

Publication number
TWI707235B
TWI707235B TW107115913A TW107115913A TWI707235B TW I707235 B TWI707235 B TW I707235B TW 107115913 A TW107115913 A TW 107115913A TW 107115913 A TW107115913 A TW 107115913A TW I707235 B TWI707235 B TW I707235B
Authority
TW
Taiwan
Prior art keywords
data unit
storage device
temporary storage
area
global
Prior art date
Application number
TW107115913A
Other languages
Chinese (zh)
Other versions
TW201907309A (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 CN201810678506.6A priority Critical patent/CN109213692B/en
Priority to US16/027,388 priority patent/US10776261B2/en
Publication of TW201907309A publication Critical patent/TW201907309A/en
Priority to US16/921,956 priority patent/US11256618B2/en
Application granted granted Critical
Publication of TWI707235B publication Critical patent/TWI707235B/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A storage apparatus managing method, applied to a first storage apparatus and a second storage apparatus coupled to an electronic apparatus, wherein the first storage apparatus comprises a local registering region and a global registering region, comprising: (a) receiving a read request indicating reading a target data unit from the second storage apparatus; (b) confirming if the global registering region has the target data unit; (c) if yes, reading the target data unit from the global registering region, if not, confirming if the local registering region has the target data unit; and (d) reading the target data unit from the local registering region if the local registering region has the target data unit, reading the target data unit from the second storage apparatus if the local registering region does not have the target data unit.

Description

儲存裝置管理系統以及儲存裝置管理方法 Storage device management system and storage device management method

本發明有關於儲存裝置管理系統以及儲存裝置管理方法,特別有關於藉由在電子裝置內提供暫存區的機制來增加讀取速度的儲存裝置管理系統以及儲存裝置管理方法。 The present invention relates to a storage device management system and a storage device management method, and particularly relates to a storage device management system and a storage device management method that increase the reading speed by providing a mechanism of a temporary storage area in an electronic device.

近年來,可攜式電子裝置例如手機、平板電腦、穿戴式電子裝置越來越普及。然而,可攜式電子裝置通常會有容量較小的問題,若要增加可攜式電子裝置的容量,通常是增加可攜式電子裝置本身的內部記憶體的容量,或者是在可攜式電子裝置裝設外部記憶卡。然而,內部記憶體容量較大的可攜式電子裝置其價格通常相當昂貴。而外部記憶卡因體積相當小,自可攜式電子裝置移除後容易遺失,且有些可攜式電子裝置並不支援外部記憶卡。 In recent years, portable electronic devices such as mobile phones, tablet computers, and wearable electronic devices have become more popular. However, portable electronic devices usually have the problem of small capacity. To increase the capacity of the portable electronic device, it is usually to increase the internal memory capacity of the portable electronic device itself, or to increase the capacity of the portable electronic device itself. The device is equipped with an external memory card. However, portable electronic devices with large internal memory capacity are usually quite expensive. Since the external memory card is relatively small in size, it is easy to lose it after being removed from the portable electronic device, and some portable electronic devices do not support the external memory card.

因此,可攜式電子裝置專用的隨身碟(flash disk)越來越普及。此類隨身碟不僅可提供較大的記憶體容量給可攜式電子裝置,也方便使用者攜帶。然而,受限於可攜式電子裝置的資料傳輸介面的傳輸速度,隨身碟的資料存取速度通常頗為受限。 Therefore, flash disks dedicated to portable electronic devices are becoming more and more popular. This type of flash drive not only provides a larger memory capacity for portable electronic devices, but is also convenient for users to carry. However, limited by the transmission speed of the data transmission interface of the portable electronic device, the data access speed of the pen drive is usually quite limited.

因此,需要能增進隨身碟存取速度的方法或系統。 Therefore, there is a need for a method or system that can increase the access speed of a pen drive.

因此,本發明之一目的為提供一種可增加資料讀取速度的儲存裝置管理系統。 Therefore, an object of the present invention is to provide a storage device management system that can increase the data reading speed.

本發明另一目的為提供一種可增加資料讀取速度的儲存裝置管理方法。 Another object of the present invention is to provide a storage device management method that can increase the data reading speed.

本發明一實施例揭露一種儲存裝置管理系統,用以管理連接一電子裝置的一第一儲存裝置以及一第二儲存裝置,該第一儲存裝置包含一區域暫存區以及一全域暫存區,該全域暫存區用以暫存曾經從第二儲存裝置讀取過的資料,而該區域暫存區用以暫存曾經從第二儲存裝置讀取過的資料以及其他候選資料,該儲存裝置管理系統包含:一儲存裝置管理程式;一控制模組,用以控制該第二儲存裝置。其中若該儲存裝置管理程式接收到自該第二儲存裝置讀取一目標資料單元的一讀取請求,會先確認該全域暫存區是否有該目標資料單元,若該全域暫存區有該目標資料單元,則該儲存裝置管理程式使該電子裝置從該全域暫存區讀取該目標資料單元,若該全域暫存區沒有該目標資料單元,則該儲存裝置管理程式確認該區域暫存區是否有該目標資料單元,若該區域暫存區有該目標資料單元,則該儲存裝置管理程式使該電子裝置從該區域暫存區讀取該目標資料單元,若該區域暫存區沒有該目標資料單元,則該儲存裝置管理程式使該電子裝置透過該控制模組來從該第二儲存裝置讀取該目標資料單元。 An embodiment of the present invention discloses a storage device management system for managing a first storage device and a second storage device connected to an electronic device. The first storage device includes a regional temporary storage area and a global temporary storage area. The global temporary storage area is used to temporarily store data that has been read from the second storage device, and the regional temporary storage area is used to temporarily store data that has been read from the second storage device and other candidate data. The storage device The management system includes: a storage device management program; and a control module for controlling the second storage device. If the storage device management program receives a read request for reading a target data unit from the second storage device, it will first confirm whether the global temporary storage area has the target data unit, and if the global temporary storage area has the target data unit Target data unit, the storage device management program makes the electronic device read the target data unit from the global temporary storage area. If the global temporary storage area does not have the target data unit, the storage device management program confirms that the area is temporarily stored Whether there is the target data unit in the area, if there is the target data unit in the regional temporary storage area, the storage device management program makes the electronic device read the target data unit from the regional temporary storage area, if the regional temporary storage area does not For the target data unit, the storage device management program enables the electronic device to read the target data unit from the second storage device through the control module.

本發明另一實施例揭露一種儲存裝置管理系統,用以管理一手機內的一緩存記憶體以及連接於該手機的一隨身碟,包含:一控制模組,用以控制該隨身碟;以及一儲存裝置管理程式,該手機要從該隨身碟讀取一目標資料單元時,該儲存裝置管理程式會使該控制模組將該目標資料單元複製到該緩存記憶體,並使該手機自該隨身碟或該緩存記憶體讀取該目標資料單元。 Another embodiment of the present invention discloses a storage device management system for managing a cache memory in a mobile phone and a flash drive connected to the mobile phone, comprising: a control module for controlling the flash drive; and a Storage device management program. When the mobile phone wants to read a target data unit from the flash drive, the storage device management program will make the control module copy the target data unit to the cache memory, and make the mobile phone from the portable The disk or the cache memory reads the target data unit.

本發明其他實施例亦揭露了與前述實施例相對應的儲存裝置管理方法,其步驟可由其述實施例推得,故在此不再贅述。 Other embodiments of the present invention also disclose storage device management methods corresponding to the foregoing embodiments, and the steps can be deduced from the above-described embodiments, so the details are not repeated here.

根據前述實施例,藉由在電子裝置內提供暫存區,可以使電子裝置讀取資料的速度大幅提升,以改善習知技術中資料讀取速度緩慢的問題。 According to the foregoing embodiment, by providing a temporary storage area in the electronic device, the data reading speed of the electronic device can be greatly increased, so as to improve the problem of slow data reading speed in the prior art.

100:電子裝置 100: electronic device

101:儲存裝置管理程式 101: Storage Device Management Program

103:第一儲存裝置 103: The first storage device

105:第二儲存裝置 105: second storage device

107:控制模組 107: Control Module

109:全域暫存區 109: Global Temporary Storage Area

109_1:全域暫存緩衝區 109_1: Global temporary storage buffer

109_2:全域暫存檔案區 109_2: Global Temporary File Area

111:區域暫存區 111: Regional temporary storage area

700:電子裝置 700: electronic device

DU1-DU_100:資料單元 DU1-DU_100: data unit

DU_1a:修改後資料單元 DU_1a: Modified data unit

第1圖繪示了根據本發明一實施例的儲存裝置管理系統的方塊圖。 Fig. 1 shows a block diagram of a storage device management system according to an embodiment of the invention.

第2圖繪示了根據本發明一實施例的儲存裝置管理方法的流程圖。 Figure 2 shows a flowchart of a storage device management method according to an embodiment of the invention.

第3-4圖繪示了根據本發明一實施例的儲存裝置管理系統的動作示意圖。 Figures 3-4 are schematic diagrams illustrating the operation of the storage device management system according to an embodiment of the present invention.

第5圖繪示了根據本發明一實施例的將資料寫入全域暫存區的流程圖。 FIG. 5 shows a flowchart of writing data into the global temporary storage area according to an embodiment of the present invention.

第6圖繪示了根據本發明一實施例的修改第二儲存裝置之資料時的動作示意圖。 FIG. 6 is a schematic diagram of the action when modifying the data of the second storage device according to an embodiment of the present invention.

第7圖繪示了本發明一實施例的,實際運用本發明所提供的儲存裝置管理系統或儲存裝置管理方法的呈現方式。 Fig. 7 shows an embodiment of the present invention, and the actual application of the storage device management system or storage device management method provided by the present invention is presented.

於以下描述中,提供了多個實施例來說明本發明的概念。然請留意,在以下實施例中,各元件可以硬體方式來實現(例如電路)或是以硬體加軟體的方式來實現(例如在處理器中寫入程式)。此外,以下實施例僅用以說明,其元件的數量、位置以及動作順序均非用以限定本發明。 In the following description, a number of embodiments are provided to illustrate the concept of the present invention. However, please note that in the following embodiments, each component can be implemented by hardware (for example, a circuit) or by hardware and software (for example, a program is written in a processor). In addition, the following embodiments are only for illustration, and the number, position, and action sequence of the components are not intended to limit the present invention.

第1圖繪示了根據本發明一實施例的儲存裝置管理系統的方塊圖。如第1圖所示,電子裝置100包含一儲存裝置管理程式101以及一第一儲存裝置103(例如電子裝置100中的緩存記憶體,Cached RAM)。第二儲存裝置105(例如一 隨身碟)連接到電子裝置100,且包含一控制模組107。第二儲存裝置105可自該電子裝置100移除。儲存裝置管理程式101可利用相對應於第一儲存裝置103和第二儲存裝置105之檔案系統的檔案系統模組(例如FATFS檔案系統模組)來控制第一儲存裝置103和第二儲存裝置105的資料存取或區域劃分動作。此檔案系統模組可安裝在第二儲存裝置105內,但亦可安裝於電子裝置100中。此外,儲存裝置管理程式101可用以在第一儲存裝置103中定義出全域暫存區109以及區域暫存區111,並管理全域暫存區109以及區域暫存區111的存取動作。於一實施例中,全域暫存區109用以暫存曾經從第二儲存裝置105讀取過的資料,而區域暫存區111用以暫存曾經從第二儲存裝置105讀取過的資料以及其他候選資料。 Fig. 1 shows a block diagram of a storage device management system according to an embodiment of the invention. As shown in FIG. 1, the electronic device 100 includes a storage device management program 101 and a first storage device 103 (such as a cached RAM in the electronic device 100). The second storage device 105 (e.g. a The flash drive is connected to the electronic device 100 and includes a control module 107. The second storage device 105 can be removed from the electronic device 100. The storage device management program 101 can use file system modules (such as FATFS file system modules) corresponding to the file systems of the first storage device 103 and the second storage device 105 to control the first storage device 103 and the second storage device 105 Data access or zoning actions. The file system module can be installed in the second storage device 105, but can also be installed in the electronic device 100. In addition, the storage device management program 101 can be used to define the global temporary storage area 109 and the regional temporary storage area 111 in the first storage device 103 and manage the access actions of the global temporary storage area 109 and the regional temporary storage area 111. In one embodiment, the global temporary storage area 109 is used to temporarily store data that has been read from the second storage device 105, and the regional temporary storage area 111 is used to temporarily store data that has been read from the second storage device 105 And other candidate materials.

而且,儲存裝置管理程式101亦用以產生讀取或寫入命令給控制模組107,讓控制模組107據此將第二儲存裝置107的資料傳送給第一儲存裝置103,或寫入資料到第二儲存裝置107。儲存裝置管理程式101可藉由一主處理器來執行,此主處理器可為電子裝置100本身的主處理器,亦即此主處理器除了執行儲存裝置管理程式101外,亦用以控制電子裝置100的其他功能,但儲存裝置管理程式101亦可藉由獨立於主處理器的處理器來執行。儲存裝置管理程式101以及控制模組107可視為一儲存裝置管理系統。然請留意,在以下實施例中,均是以控制模組設置在第二儲存裝置裝來說明,然而控制模組亦可設置在電子裝置中。 Moreover, the storage device management program 101 is also used to generate read or write commands to the control module 107, so that the control module 107 transmits data from the second storage device 107 to the first storage device 103 or writes data accordingly To the second storage device 107. The storage device management program 101 can be executed by a main processor, which can be the main processor of the electronic device 100 itself, that is, in addition to executing the storage device management program 101, the main processor is also used to control the electronic Other functions of the device 100, but the storage device management program 101 can also be executed by a processor independent of the main processor. The storage device management program 101 and the control module 107 can be regarded as a storage device management system. However, please note that in the following embodiments, the control module is installed in the second storage device. However, the control module can also be installed in the electronic device.

電子裝置100可為一可攜式電子裝置,例如手機、平板電腦。第一儲存裝置103可為電子裝置100的內部儲存裝置,例如RAM(Random Access Memory,隨機存取記憶體)。此內部儲存裝置可為電子裝置100出廠時即設置好的儲存裝置,較難變動其容量。此外,第二儲存裝置105可為獨立於電子裝置100的外部儲存裝置,例如隨身碟、記憶卡等。此類外部儲存裝置可自由的裝設到電子裝置上或拆卸下來。而且,當第一儲存裝置103為內部儲存裝置而第二儲存裝置105為外部儲存裝置時,第一儲存裝置103的資料存取速度會高於第二 儲存裝置105的資料存取速度。 The electronic device 100 may be a portable electronic device, such as a mobile phone or a tablet computer. The first storage device 103 may be an internal storage device of the electronic device 100, such as RAM (Random Access Memory). The internal storage device can be a storage device that is set when the electronic device 100 leaves the factory, and it is difficult to change its capacity. In addition, the second storage device 105 may be an external storage device independent of the electronic device 100, such as a flash drive, a memory card, etc. This type of external storage device can be freely installed on or removed from the electronic device. Moreover, when the first storage device 103 is an internal storage device and the second storage device 105 is an external storage device, the data access speed of the first storage device 103 will be higher than that of the second storage device. Data access speed of the storage device 105.

習知技術中,若欲讀取第二儲存裝置105中的資料,會直接從第二儲存裝置105讀取資料。如前所述,資料讀取速度會受限於第二儲存裝置105和電子裝置100間的資料傳輸介面的速度。因此,本發明概念之一為將第二儲存裝置105中的至少一部份資料複製到第一儲存裝置103中的全域暫存區109或是區域暫存區111。而在讀取資料時,會先檢查第一儲存裝置103是否有欲讀取的資料,若有則優先從第一儲存裝置103讀取,若無才從第二儲存裝置105中讀取,如此可大幅的減少資料讀取的時間。詳細的步驟將於底下說明。 In the conventional technology, if the data in the second storage device 105 is to be read, the data is directly read from the second storage device 105. As mentioned above, the data reading speed is limited by the speed of the data transmission interface between the second storage device 105 and the electronic device 100. Therefore, one of the concepts of the present invention is to copy at least part of the data in the second storage device 105 to the global temporary storage area 109 or the regional temporary storage area 111 in the first storage device 103. When reading data, it will first check whether the first storage device 103 has the data to be read. If so, it will be read from the first storage device 103 first, and if not, it will be read from the second storage device 105. Can greatly reduce the time of data reading. The detailed steps will be explained below.

第2圖繪示了根據本發明一實施例的儲存裝置管理方法的流程圖,其包含下列步驟: Figure 2 shows a flowchart of a storage device management method according to an embodiment of the present invention, which includes the following steps:

步驟201 Step 201

電子裝置100接收到讀取請求。 The electronic device 100 receives the read request.

舉例來說,使用者欲透過電子裝置100讀取第二儲存裝置105中的目標資料單元。此目標資料單元可為任何形式的資料,舉例來說,檔案(file)或是LBA(Logical Block Address,邏輯區塊位址)。在以下實施例中,是以目標資料單元為LBA來說明。 For example, the user wants to read the target data unit in the second storage device 105 through the electronic device 100. The target data unit can be any form of data, for example, a file or LBA (Logical Block Address). In the following embodiments, the target data unit is LBA.

步驟203 Step 203

確認全域暫存區109是否存有目標資料單元,若是則到步驟205,若否則到步驟207。 It is confirmed whether there is a target data unit in the global temporary storage area 109, if yes, go to step 205, if not, go to step 207.

於一實施例中,全域暫存區109會包含尚未編寫為檔案的資料(例如LBA)以及已編寫為檔案的資料。在此實施例中,步驟203會先確認全域暫存區中非檔案的資料中是否包含目標資料單元,若無,再確認全域暫存區中的檔案是 否包含目標資料單元。這樣的步驟可以使讀取速度更快,其原因在於,若要確認檔案是否包含目標資料單元,則須經過將檔案打開,確認其中包含的資料,然後再將檔案關閉的動作,會增加確認所需的時間。因此,會優先檢查非檔案的資料中是否包含目標資料單元。 In one embodiment, the global temporary storage area 109 will contain data that has not been compiled as a file (such as LBA) and data that has been compiled as a file. In this embodiment, step 203 will first confirm whether the non-file data in the global temporary storage area contains the target data unit, if not, then confirm that the file in the global temporary storage area is Whether to include the target data unit. This step can make the reading speed faster. The reason is that if you want to confirm whether the file contains the target data unit, you need to open the file, confirm the data contained in it, and then close the file, which will increase the confirmation. The time required. Therefore, priority is given to checking whether the target data unit is included in the non-file data.

步驟205 Step 205

自全域暫存區109讀取目標資料單元。 The target data unit is read from the global temporary storage area 109.

步驟207 Step 207

確認區域暫存區111是否存有目標資料單元,若是則到步驟209,若否則到步驟211。 It is confirmed whether there is a target data unit in the regional temporary storage area 111, if yes, go to step 209, if not, go to step 211.

步驟209 Step 209

自區域暫存區111讀取目標資料單元。 Read the target data unit from the regional temporary storage area 111.

步驟211 Step 211

自第二儲存裝置105讀取目標資料單元。 The target data unit is read from the second storage device 105.

根據第2圖中的步驟,本案所提供的儲存裝置管理方法會優先從第一儲存裝置103讀取資料,若第一儲存裝置103沒有時才會從第二儲存裝置105讀取資料。因此,可減少第二儲存裝置105和電子裝置100間的資料傳輸介面所傳輸的資料量,可提升資料讀取的速度。詳細言之,當電子裝置100接收到自第二儲存裝置105讀取目標資料單元的讀取請求時,會先確認全域暫存區109是否有目標資料單元,若有則從全域暫存區109先讀取目標資料單元,若沒有才從區域暫存 區111讀取目標資料單元。若全域暫存區109和區域暫存區111均沒有目標資料單元,才從第二儲存裝置105讀取資料單元。如此可不須每次要讀取資料時,都從第二儲存裝置105讀取資料,可增進資料的讀取速度。 According to the steps in Figure 2, the storage device management method provided in this case will first read data from the first storage device 103, and only read data from the second storage device 105 if the first storage device 103 is not available. Therefore, the amount of data transmitted by the data transmission interface between the second storage device 105 and the electronic device 100 can be reduced, and the data reading speed can be improved. In detail, when the electronic device 100 receives a read request to read a target data unit from the second storage device 105, it will first confirm whether there is a target data unit in the global temporary storage area 109, and if so, then from the global temporary storage area 109 First read the target data unit, if not, then temporarily store it from the area The area 111 reads the target data unit. If there is no target data unit in the global temporary storage area 109 and the regional temporary storage area 111, the data unit is read from the second storage device 105. In this way, it is not necessary to read data from the second storage device 105 every time data is to be read, and the data reading speed can be improved.

在以下實施例中,將詳細描述如何決定要暫存那些資料到全域暫存區109和區域暫存區111,可共同參照第2圖和第3-4圖來更為了解本發明的內容。 藉由下述的暫存方法,可讓全域暫存區109和區域暫存區111存有可能被讀取的資料,來增進從全域暫存區109和區域暫存區111讀取資料而非從第二儲存裝置105讀取資料的效率。 In the following embodiments, it will be described in detail how to decide which data to be temporarily stored in the global temporary storage area 109 and the regional temporary storage area 111. The content of the present invention can be better understood by referring to FIGS. 2 and 3-4 together. With the following temporary storage method, the global temporary storage area 109 and the regional temporary storage area 111 can store data that may be read, so as to improve the reading of data from the global temporary storage area 109 and the regional temporary storage area 111 instead of The efficiency of reading data from the second storage device 105.

在第3圖的實施例中,是假設欲讀取的目標資料單元為資料單元DU_3,且在第3圖的實施例中,全域暫存區109和區域暫存區111均不包含資料單元DU_3。在此情況下,除了從第二儲存裝置讀取資料單元DU_3外,亦會將資料單元DU_3複製到全域暫存區109和區域暫存區111,而除了資料單元DU_3外,更會將非目標資料單元外的至少一候選資料單元複製到區域暫存區111,例如第3圖中的資料單元DU_1-DU_2,以及資料單元DU_4-DU_100,也就是資料單元DU_3一位址範圍內的資料單元。採取此機制的好處是,由於資料單元可能不是單獨的被讀取,而可能是連續的被讀取。例如在讀取一檔案時,儲存位址相鄰的資料單元會被連續的讀取。因此會將資料單元DU_3一位址範圍內的資料單元先複製到區域暫存區111,以減少須直接從第二儲存裝置105讀取資料的可能性。經過這樣的複製動作後,全域暫存區109和區域暫存區111均包含資料單元DU_3,因此若要再次讀取資料單元DU_3,則依據第2圖的步驟,便會直接從全域暫存區109讀取資料單元DU_3,而不須再從第二儲存裝置105讀取。 In the embodiment in Figure 3, it is assumed that the target data unit to be read is the data unit DU_3, and in the embodiment in Figure 3, neither the global temporary storage area 109 nor the regional temporary storage area 111 contains the data unit DU_3. . In this case, in addition to reading the data unit DU_3 from the second storage device, the data unit DU_3 will also be copied to the global temporary storage area 109 and the regional temporary storage area 111. In addition to the data unit DU_3, the non-target At least one candidate data unit outside the data unit is copied to the regional temporary storage area 111, such as the data units DU_1-DU_2 in Figure 3 and the data units DU_4-DU_100, which are data units within one address range of the data unit DU_3. The advantage of adopting this mechanism is that the data unit may not be read individually, but may be read continuously. For example, when reading a file, data units adjacent to the storage address will be read continuously. Therefore, the data unit within the one-bit address range of the data unit DU_3 is first copied to the regional temporary storage area 111 to reduce the possibility of directly reading data from the second storage device 105. After such a copy operation, both the global temporary storage area 109 and the regional temporary storage area 111 contain the data unit DU_3. Therefore, if the data unit DU_3 is to be read again, the data unit DU_3 will be read directly from the global temporary storage area according to the steps in Figure 2. 109 reads the data unit DU_3 without reading from the second storage device 105.

第4圖的實施例是接續在第3圖的實施例後,也就是,在第4圖的實施例中,全域暫存區109包含資料單元DU_3,而區域暫存區111包含資料單元DU_1-DU_100。而在第4圖的實施例中,欲讀取的目標資料單元是資料單元 DU_4。依照第2圖所述的步驟,會先確認全域暫存區109是否有資料單元DU_4,但因全域暫存區109未包含資料單元DU_4,因此會再去確認區域暫存區111是否有資料單元DU_4。而區域暫存區111包含資料單元DU_4,因此會自區域暫存區111讀取資料單元DU_4,並自區域暫存區111將資料單元DU_4複製到全域暫存區109。 The embodiment in FIG. 4 is a continuation of the embodiment in FIG. 3, that is, in the embodiment in FIG. 4, the global temporary storage area 109 includes the data unit DU_3, and the regional temporary storage area 111 includes the data unit DU_1- DU_100. In the embodiment in Figure 4, the target data unit to be read is a data unit DU_4. According to the steps described in Figure 2, it will first confirm whether there is a data unit DU_4 in the global temporary storage area 109, but because the global temporary storage area 109 does not contain the data unit DU_4, it will check whether there is a data unit in the regional temporary storage area 111 DU_4. The regional temporary storage area 111 contains the data unit DU_4, so the data unit DU_4 is read from the regional temporary storage area 111, and the data unit DU_4 is copied from the regional temporary storage area 111 to the global temporary storage area 109.

如前所述,若目標資料單元是從區域暫存區111或是第二儲存裝置105讀取,則會將目標資料單元複製到全域暫存區109。因此,本發明更提供了將資料寫入全域暫存區109的實施例,可更進一步的加快讀取資料的速度。第5圖繪示了根據本發明一實施例的將資料寫入全域暫存區的流程圖,可同時參考第3圖以及第5圖來更為了解本發明。於一實施例中,第3圖中的全域暫存區109會更包含一全域暫存緩衝區109_1以及一全域暫存檔案區109_2,全域暫存緩衝區109_1用以儲存非檔案的資料,而全域暫存檔案區109_2儲存檔案。第5圖的流程圖包含下列步驟: As mentioned above, if the target data unit is read from the regional temporary storage area 111 or the second storage device 105, the target data unit will be copied to the global temporary storage area 109. Therefore, the present invention further provides an embodiment in which data is written into the global temporary storage area 109, which can further accelerate the speed of reading data. FIG. 5 shows a flowchart of writing data into the global temporary storage area according to an embodiment of the present invention. Please refer to FIG. 3 and FIG. 5 for a better understanding of the present invention. In one embodiment, the global temporary storage area 109 in Figure 3 further includes a global temporary storage buffer 109_1 and a global temporary file area 109_2. The global temporary storage buffer 109_1 is used to store non-file data, and The global temporary file area 109_2 stores files. The flowchart in Figure 5 contains the following steps:

步驟501 Step 501

接收寫入資料到全域暫存區109的寫入指令。舉例來說,如前所述般將目標資料單元複製到全域暫存區109,第1圖的控制模組107會接收到儲存裝置管理程式101所產生的寫入指令。 A write command for writing data to the global temporary storage area 109 is received. For example, if the target data unit is copied to the global temporary storage area 109 as described above, the control module 107 in FIG. 1 will receive the write command generated by the storage device management program 101.

步驟503 Step 503

確認全域暫存緩衝區109_1是否還有足夠空間。若是則到步驟505,若否則到步驟507。 Check whether there is enough space in the global temporary storage buffer 109_1. If yes, go to step 505, if not, go to step 507.

步驟505 Step 505

將資料以非檔案的形式寫入全域暫存緩衝區109_1。 Write the data into the global temporary storage buffer 109_1 in a non-file form.

步驟507 Step 507

確認全域暫存檔案區109_2是否還有足夠空間。若是則到步驟509,若否則到步驟511。 Confirm whether there is enough space in the global temporary file area 109_2. If yes, go to step 509, if not, go to step 511.

步驟509 Step 509

將資料以檔案形式寫入全域暫存檔案區109_2。 Write the data in the form of files into the global temporary file area 109_2.

步驟511 Step 511

若全域暫存緩衝區109_1和全域暫存檔案區109_2均不具有足夠的儲存空間,則表示全域暫存區109的儲存空間存量相當低。於此情況下,可將全域暫存區109的資料刪除。此刪除動作可刪除全域暫存區109所存的全部資料,亦可只刪除全域暫存區109所存的部份資料。舉例來說,可僅刪除全域暫存區109較舊的資料。 If neither the global temporary storage buffer area 109_1 nor the global temporary storage file area 109_2 has enough storage space, it means that the storage space stock of the global temporary storage area 109 is quite low. In this case, the data in the global temporary storage area 109 can be deleted. This delete action can delete all the data stored in the global temporary storage area 109, or only part of the data stored in the global temporary storage area 109. For example, only the older data in the global temporary storage area 109 can be deleted.

於一實施例中,步驟507-511可被取代為,將全域暫存緩衝區109_1所儲存資料的至少一部份寫成檔案並儲存到全域暫存檔案區109_2以釋放出部份全域暫存緩衝區109_1的空間,並將新的資料寫入全域暫存緩衝區109_1。 In one embodiment, steps 507-511 can be replaced by writing at least part of the data stored in the global temporary buffer 109_1 as a file and save it in the global temporary file area 109_2 to release part of the global temporary buffer Area 109_1, and write new data into the global temporary storage buffer 109_1.

如前所述,若將資料存成檔案,則在尋找資料時須將檔案打開,進行讀取動作,然後再關閉,如此會降低存取資料的速度。因此,在第5圖的全域暫存區寫入流程中,會優先將資料儲存成非檔案的形式,如此可增進在全域暫存區讀取資料的速度。 As mentioned earlier, if you save the data as a file, you must open the file, read it, and then close it when searching for the data. This will reduce the speed of accessing the data. Therefore, in the global temporary storage area writing process in Figure 5, the data will be stored in a non-file form first, which can increase the speed of reading data in the global temporary storage area.

於一實施例中,由於全域暫存區109和區域暫存區111包含了固定的空間,因此本發明另提供了在特定情況下刪除全域暫存區109或區域暫存區111 所存的資料的實施例,以避免全域暫存區109和區域暫存區111的空間不足。如第5圖實施例所述,若全域暫存緩衝區109_1和全域暫存檔案區109_2均不具有足夠的儲存空間,則會刪除全域暫存區109中的資料。除此之外,在一實施例中,若第二儲存裝置105自電子裝置100移除,則全域暫存區105中所儲存的資料無法對應另一個儲存裝置,因此會刪除全域暫存區109中的資料。 In one embodiment, since the global temporary storage area 109 and the regional temporary storage area 111 contain a fixed space, the present invention further provides for deleting the global temporary storage area 109 or the regional temporary storage area 111 under certain circumstances. The embodiment of the stored data avoids insufficient space in the global temporary storage area 109 and the regional temporary storage area 111. As described in the embodiment in FIG. 5, if the global temporary storage buffer area 109_1 and the global temporary storage file area 109_2 do not have enough storage space, the data in the global temporary storage area 109 will be deleted. In addition, in one embodiment, if the second storage device 105 is removed from the electronic device 100, the data stored in the global temporary storage area 105 cannot correspond to another storage device, so the global temporary storage area 109 will be deleted Data in.

而在另一實施例中,若從區域暫存區111、全域暫存區109或第二儲存裝置105讀取完包含所需資料單元的一檔案後,則刪除區域暫存區111中所儲存的候選資料單元。以第3圖的實施例為例,若有一檔案A包含資料單元DU_3-DU_50,則在讀取完資料單元DU_3後,會再繼續依第2圖中的流程讀取完剩餘的DU_4-DU_50。而在讀取完檔案A後,由於區域暫存區111中所儲存的候選資料單元是與檔案A較有關的資料單元,因此會將區域暫存區111中所儲存的候選資料單元刪除。 In another embodiment, after reading a file containing the required data unit from the regional temporary storage area 111, the global temporary storage area 109 or the second storage device 105, delete the file stored in the regional temporary storage area 111 Candidate data unit for. Taking the embodiment in Figure 3 as an example, if a file A contains data units DU_3-DU_50, after the data unit DU_3 is read, the process in Figure 2 will continue to read the remaining DU_4-DU_50. After the file A has been read, since the candidate data units stored in the regional temporary storage area 111 are more related to the file A, the candidate data units stored in the regional temporary storage area 111 are deleted.

使用者可能會對第二儲存裝置105中原本儲存的資料進行修改,然後將修改後的資料存回第二儲存裝置105中。在一實施例中,在此情況下,會同時對全域暫存區109和區域暫存區111進行更新,以求資料的同步。請參閱第6圖,其繪示了根據本發明一實施例的修改第二儲存裝置之資料時的動作示意圖。如第6圖所示,所需資料單元DU_1被讀出後,根據前述實施例,無論所需資料單元DU_1是從第二儲存裝置105、全域暫存區109或是區域暫存區111被讀取,全域暫存區109和區域暫存區111都會存有所需資料單元DU_1。若所需資料單元DU_1內容被更動,而被修改為修改後所需資料單元DU_1a,並回存到第二儲存裝置105以替代原有的所需資料單元DU_1,則修改後所需資料單元DU_1a須同時被存到全域暫存區109和區域暫存區111以替代原有的所需資料單元DU_1。否則下一次讀取修改後所需資料單元DU_1a時,從全域暫存區109或區域暫存區111讀取到的會是原本的所需資料單元DU_1而不是修改後所需資料單元DU_1a。 The user may modify the data originally stored in the second storage device 105 and then store the modified data back into the second storage device 105. In one embodiment, in this case, the global temporary storage area 109 and the regional temporary storage area 111 are updated at the same time, so as to synchronize data. Please refer to FIG. 6, which illustrates a schematic diagram of the action when modifying the data of the second storage device according to an embodiment of the present invention. As shown in Figure 6, after the required data unit DU_1 is read, according to the foregoing embodiment, whether the required data unit DU_1 is read from the second storage device 105, the global temporary storage area 109 or the regional temporary storage area 111 Taken, both the global temporary storage area 109 and the regional temporary storage area 111 will store the required data unit DU_1. If the content of the required data unit DU_1 is changed and it is modified to the required data unit DU_1a after the modification, and stored in the second storage device 105 to replace the original required data unit DU_1, the modified required data unit DU_1a It must be stored in the global temporary storage area 109 and the regional temporary storage area 111 at the same time to replace the original required data unit DU_1. Otherwise, when reading the modified required data unit DU_1a next time, the original required data unit DU_1 will be read from the global temporary storage area 109 or the regional temporary storage area 111 instead of the modified required data unit DU_1a.

於一實施例中,所需資料單元DU_1被讀出並被修改成修改後所需資料單元DU_1a後,會判斷所需資料單元DU_1是否存在於區域暫存區111中,若結果為是,則將修改後所需資料單元DU_1a取代區域暫存區111中的所需資料單元DU_1。同樣的,也會判斷所需資料單元DU_1是否存在於全域暫存區109中,若結果為是,則將修改後所需資料單元DU_1a取代全域暫存區109中的所需資料單元DU_1。 In one embodiment, after the required data unit DU_1 is read and modified to the modified required data unit DU_1a, it is determined whether the required data unit DU_1 exists in the regional temporary storage area 111, and if the result is yes, then Replace the required data unit DU_1 in the regional temporary storage area 111 with the required data unit DU_1a after the modification. Similarly, it is determined whether the required data unit DU_1 exists in the global temporary storage area 109, and if the result is yes, the required data unit DU_1 in the global temporary storage area 109 is replaced by the modified required data unit DU_1a.

而在一實施例中,全域暫存區109會包含前述的全域暫存緩衝區109_1(非檔案資料區)以及全域暫存檔案區109_2(檔案資料區),要將修改後所需資料單元DU_1a更新到全域暫存區109時,會先確認全域暫存緩衝區109_1是否存在所需資料單元DU_1,若是,則將修改後所需資料單元DU_1a取代全域暫存緩衝區109_1中的所需資料單元DU_1。若全域暫存緩衝區109_1不存在所需資料單元DU_1但全域暫存檔案區109_2存在所需資料單元DU_1,則將修改後所需資料單元DU_1a取代全域暫存檔案區109_2中的所需資料單元DU_1。如本案第5圖的步驟所述,由於先前在寫入所需資料單元到全域暫存緩衝區109時可能會有全域暫存緩衝區109_1空間不足但全域暫存檔案區109_2仍有空間的情況。因此所需資料單元DU_1可能存在於全域暫存檔案區109_2而不存在於全域暫存緩衝區109_1。 In one embodiment, the global temporary storage area 109 includes the aforementioned global temporary storage buffer 109_1 (non-file data area) and the global temporary file area 109_2 (file data area). The data unit DU_1a required after modification is required. When updating to the global temporary storage area 109, it will first confirm whether the required data unit DU_1 exists in the global temporary storage buffer 109_1. If so, replace the required data unit DU_1a in the global temporary storage buffer 109_1 with the modified required data unit DU_1 DU_1. If the required data unit DU_1 does not exist in the global temporary storage buffer 109_1 but the required data unit DU_1 exists in the global temporary file area 109_2, the modified required data unit DU_1a will replace the required data unit in the global temporary file area 109_2 DU_1. As described in the steps in Figure 5 of this case, there may be insufficient space in the global temporary buffer 109_1 but there is still space in the global temporary file area 109_2 when writing the required data unit to the global temporary buffer 109. . Therefore, the required data unit DU_1 may exist in the global temporary storage file area 109_2 but not in the global temporary storage buffer 109_1.

如前所述,習知技術在讀取第二儲存裝置的資料時,是直接從第二儲存裝置讀取資料,因此不會更動到電子裝置內的第一儲存裝置。因此,若一電子裝置運用了本發明所提供的儲存裝置管理方法,則在讀取第二儲存裝置時,電子裝置內的第一儲存裝置的資料會相對應的增加。第7圖繪示了本發明一實施例的,實際運用本發明所提供的儲存裝置管理系統或儲存裝置管理方法的呈現方式。 As mentioned above, when reading data from the second storage device in the prior art, the data is directly read from the second storage device, so the first storage device in the electronic device is not changed. Therefore, if an electronic device uses the storage device management method provided by the present invention, when the second storage device is read, the data of the first storage device in the electronic device will increase correspondingly. Fig. 7 shows an embodiment of the present invention, and the actual application of the storage device management system or storage device management method provided by the present invention is presented.

第7圖繪示了本發明一實施例的,實際運用本發明所提供的儲存裝置管理系統或儲存裝置管理方法的呈現方式。在第7圖的例子中,前述第一儲存裝 置為一內部儲存裝置,而前述第二儲存裝置為一外部儲存裝置。如第7圖所示,可使電子裝置700顯示出一儲存空間的配置畫面,其顯示了內部儲存空間和外部儲存空間。在讀取外部儲存裝置的資料時,因為資料會暫存到第一儲存裝置,因此內部儲存空間可能會相對應的增加。且如前所述,在一實施例中,若將第二儲存裝置自電子裝置移除,則會刪除全域暫存區109和區域暫存區111所存的資料。因此,若將第二儲存裝置自電子裝置移除,則可能會有內部儲存空間相對應減少的狀況發生。前述實施例所造成的內部儲存空間變化當可根據第7圖的描述而推得,故再此不再贅述。 Fig. 7 shows an embodiment of the present invention, and the actual application of the storage device management system or storage device management method provided by the present invention is presented. In the example of Figure 7, the aforementioned first storage device Set as an internal storage device, and the aforementioned second storage device is an external storage device. As shown in FIG. 7, the electronic device 700 can be made to display a storage space configuration screen, which displays the internal storage space and the external storage space. When reading data from an external storage device, because the data is temporarily stored in the first storage device, the internal storage space may increase correspondingly. And as mentioned above, in one embodiment, if the second storage device is removed from the electronic device, the data stored in the global temporary storage area 109 and the regional temporary storage area 111 will be deleted. Therefore, if the second storage device is removed from the electronic device, a corresponding decrease in internal storage space may occur. The change in internal storage space caused by the foregoing embodiment can be derived from the description in FIG. 7, so it will not be repeated here.

根據前述實施例,藉由在電子裝置內提供暫存區,可以使電子裝置讀取資料的速度大幅提升,以改善習知技術中資料讀取速度緩慢的問題。以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 According to the foregoing embodiment, by providing a temporary storage area in the electronic device, the data reading speed of the electronic device can be greatly increased, so as to improve the problem of slow data reading speed in the prior art. The foregoing descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.

100:電子裝置 100: electronic device

101:儲存裝置管理程式 101: Storage Device Management Program

103:第一儲存裝置 103: The first storage device

105:第二儲存裝置 105: second storage device

107:控制模組 107: Control Module

109:全域暫存區 109: Global Temporary Storage Area

111:區域暫存區 111: Regional temporary storage area

Claims (20)

一種儲存裝置管理方法,運用在連接一電子裝置的一第一儲存裝置以及一第二儲存裝置,該第一儲存裝置包含一區域暫存區以及一全域暫存區,該全域暫存區用以暫存曾經從第二儲存裝置讀取過的資料,而該區域暫存區用以暫存曾經從第二儲存裝置讀取過的資料以及其他候選資料,該儲存裝置管理方法包含:(a)接收自該第二儲存裝置讀取一目標資料單元的一讀取請求;(b)確認該全域暫存區是否有該目標資料單元;(c)若該全域暫存區有該目標資料單元,則從該全域暫存區讀取該目標資料單元,若該全域暫存區沒有該目標資料單元,則確認該區域暫存區是否有該目標資料單元;以及(d)若該區域暫存區有該目標資料單元,則從該區域暫存區讀取該目標資料單元,若該區域暫存區沒有該目標資料單元,則從該第二儲存裝置讀取該目標資料單元。 A storage device management method is applied to a first storage device and a second storage device connected to an electronic device. The first storage device includes a regional temporary storage area and a global temporary storage area. The global temporary storage area is used for Temporarily store the data once read from the second storage device, and the regional temporary storage area is used to temporarily store the data once read from the second storage device and other candidate data. The storage device management method includes: (a) Receive a read request from the second storage device to read a target data unit; (b) confirm whether the global temporary storage area has the target data unit; (c) if the global temporary storage area has the target data unit, Then read the target data unit from the global temporary storage area, and if there is no target data unit in the global temporary storage area, confirm whether the target data unit exists in the regional temporary storage area; and (d) if the regional temporary storage area If there is the target data unit, the target data unit is read from the regional temporary storage area, and if there is no target data unit in the regional temporary storage area, the target data unit is read from the second storage device. 如請求項1所述的儲存裝置管理方法,其中該第一儲存裝置為該電子裝置內部的一內部儲存裝置,該第二儲存裝置為獨立於該電子裝置的一外部儲存裝置。 The storage device management method according to claim 1, wherein the first storage device is an internal storage device inside the electronic device, and the second storage device is an external storage device independent of the electronic device. 如請求項1所述的儲存裝置管理方法,其中該步驟(b)更包含:先確認該全域暫存區中非檔案的資料中是否包含該目標資料單元,若無,再確認該全域暫存區中的檔案是否包含該目標資料單元。 The storage device management method according to claim 1, wherein the step (b) further includes: first confirming whether the non-file data in the global temporary storage area contains the target data unit, and if not, confirming the global temporary storage Whether the file in the area contains the target data unit. 如請求項1所述的儲存裝置管理方法,更包含:若該目標資料單元是 從該區域暫存區或該第二儲存裝置讀取,則將該目標資料單元複製到該全域暫存區。 The storage device management method according to claim 1, further comprising: if the target data unit is After reading from the regional temporary storage area or the second storage device, the target data unit is copied to the global temporary storage area. 如請求項4所述的儲存裝置管理方法,其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案;其中在將該目標資料單元複製到該全域暫存區時,會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則確認該全域暫存檔案區是否有足夠空間,若該全域暫存檔案區有足夠空間則將該目標資料單元複製到該全域暫存檔案區。 The storage device management method according to claim 4, wherein the global temporary storage area includes a global temporary storage buffer area and a global temporary storage file area, the global temporary storage buffer stores non-file data, and the global temporary storage File area stores files; when copying the target data unit to the global temporary storage area, it will first confirm whether the global temporary buffer has enough space, and if so, copy the target data unit to the global temporary buffer If there is no area, confirm whether the global temporary file area has enough space. If the global temporary file area has enough space, copy the target data unit to the global temporary file area. 如請求項4所述的儲存裝置管理方法,其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案;其中在將該目標資料單元複製到該全域暫存緩衝區時,會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則先將該全域暫存緩衝區中至少一部份資料轉換成至少一檔案並儲存到該全域暫存檔案區,然後將該目標資料單元儲存到該全域暫存緩衝區。 The storage device management method according to claim 4, wherein the global temporary storage area includes a global temporary storage buffer area and a global temporary storage file area, the global temporary storage buffer stores non-file data, and the global temporary storage File area stores files; among them, when copying the target data unit to the global temporary buffer, it will first confirm whether the global temporary buffer has enough space, and if so, copy the target data unit to the global temporary buffer If there is no buffer, at least part of the data in the global temporary buffer is converted into at least one file and stored in the global temporary file area, and then the target data unit is stored in the global temporary buffer. 如請求項4所述的儲存裝置管理方法,更包含:若偵測到該第二儲存裝置自該電子裝置移除,則刪除該全域暫存區中所儲存的資料。 The storage device management method according to claim 4, further comprising: if it is detected that the second storage device is removed from the electronic device, deleting the data stored in the global temporary storage area. 如請求項1所述的儲存裝置管理方法,更包含:自該第二儲存裝置讀取到該目標資料單元後,將包含該目標資料單元的至少一候選資料單元複製 到該區域暫存區。 The storage device management method according to claim 1, further comprising: after reading the target data unit from the second storage device, copying at least one candidate data unit including the target data unit Go to the temporary storage area of this area. 如請求項8所述的儲存裝置管理方法,更包含:從該區域暫存區、該全域暫存區或該第二儲存裝置讀取完包含該所需資料單元的一檔案後,刪除該區域暫存區中所儲存的該些候選資料單元。 The storage device management method according to claim 8, further comprising: after reading a file containing the required data unit from the regional temporary storage area, the global temporary storage area or the second storage device, delete the area The candidate data units stored in the temporary storage area. 如請求項1所述的儲存裝置管理方法,更包含:將讀取的該所需資料單元修改為一修改後所需資料單元,並將該修改後所需資料單元寫入該第二儲存裝置來取代該所需資料單元時,若該區域暫存區或該全域暫存區具有該修改後所需資料單元,則亦將該修改後所需資料單元寫入該區域暫存區或該全域暫存區來取代該所需資料單元。 The storage device management method according to claim 1, further comprising: modifying the read required data unit into a modified required data unit, and writing the modified required data unit into the second storage device When replacing the required data unit, if the regional temporary storage area or the global temporary storage area has the modified required data unit, the modified required data unit is also written into the regional temporary storage area or the global temporary storage area The temporary storage area replaces the required data unit. 一種儲存裝置管理系統,用以管理連接一電子裝置的一第一儲存裝置以及一第二儲存裝置,該第一儲存裝置包含一區域暫存區以及一全域暫存區,該全域暫存區用以暫存曾經從第二儲存裝置讀取過的資料,而該區域暫存區用以暫存曾經從第二儲存裝置讀取過的資料以及其他候選資料,該儲存裝置管理系統包含:一儲存裝置管理程式;一控制模組,用以控制該第二儲存裝置;其中若該儲存裝置管理程式接收到自該第二儲存裝置讀取一目標資料單元的一讀取請求,會先確認該全域暫存區是否有該目標資料單元,若該全域暫存區有該目標資料單元,則該儲存裝置管理程式使該電子裝置從該全域暫存區讀取該目標資料單元,若該全域暫存區沒有該目標資料單元,則該儲存裝置管 理程式確認該區域暫存區是否有該目標資料單元,若該區域暫存區有該目標資料單元,則該儲存裝置管理程式使該電子裝置從該區域暫存區讀取該目標資料單元,若該區域暫存區沒有該目標資料單元,則該儲存裝置管理程式使該電子裝置透過該控制模組來從該第二儲存裝置讀取該目標資料單元。 A storage device management system for managing a first storage device and a second storage device connected to an electronic device. The first storage device includes a regional temporary storage area and a global temporary storage area. The global temporary storage area is used for To temporarily store the data once read from the second storage device, and the regional temporary storage area is used to temporarily store the data once read from the second storage device and other candidate data. The storage device management system includes: a storage Device management program; a control module for controlling the second storage device; wherein if the storage device management program receives a read request for reading a target data unit from the second storage device, it will first confirm the global Whether there is the target data unit in the temporary storage area, if the target data unit is in the global temporary storage area, the storage device management program causes the electronic device to read the target data unit from the global temporary storage area, if the global temporary storage area If the target data unit does not exist in the area, the storage device manages The management program confirms whether there is the target data unit in the regional temporary storage area. If the regional temporary storage area has the target data unit, the storage device management program causes the electronic device to read the target data unit from the regional temporary storage area, If there is no target data unit in the regional temporary storage area, the storage device management program enables the electronic device to read the target data unit from the second storage device through the control module. 如請求項11所述的儲存裝置管理系統,其中該第一儲存裝置為該電子裝置內部的一內部儲存裝置,該第二儲存裝置為獨立於該電子裝置的一外部儲存裝置。 The storage device management system according to claim 11, wherein the first storage device is an internal storage device inside the electronic device, and the second storage device is an external storage device independent of the electronic device. 如請求項11所述的儲存裝置管理系統,其中該儲存裝置管理程式會先確認該全域暫存區中非檔案的資料中是否包含該目標資料單元,若無,再確認該全域暫存區中的檔案是否包含該目標資料單元。 For example, the storage device management system of claim 11, wherein the storage device management program first confirms whether the target data unit is included in the non-file data in the global temporary storage area, and if not, then confirms the global temporary storage area Whether the file of contains the target data unit. 如請求項11所述的儲存裝置管理系統,其中若該目標資料單元是從該區域暫存區或該第二儲存裝置讀取,則該儲存裝置管理程式將該目標資料單元複製到該全域暫存區。 The storage device management system according to claim 11, wherein if the target data unit is read from the regional temporary storage area or the second storage device, the storage device management program copies the target data unit to the global temporary Deposit area. 如請求項14所述的儲存裝置管理系統,其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案;其中在將該目標資料單元複製到該全域暫存區時,該儲存裝置管理程式會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則確認該全域暫存檔案區是否有足夠空間,若該全域暫存檔案區有足夠空間則將該目標資料單元複製到該全域暫存檔案區。 The storage device management system according to claim 14, wherein the global temporary storage area includes a global temporary storage buffer area and a global temporary storage file area, the global temporary storage buffer stores non-file data, and the global temporary storage The file area stores files; when copying the target data unit to the global temporary storage area, the storage device management program will first confirm whether the global temporary buffer has enough space, and if so, copy the target data unit to If the global temporary storage buffer area is not available, confirm whether the global temporary storage file area has enough space, and if the global temporary storage file area has enough space, copy the target data unit to the global temporary storage file area. 如請求項14所述的儲存裝置管理系統,其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案;其中在將該目標資料單元複製到該全域暫存緩衝區時,該儲存裝置管理程式會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則先將該全域暫存緩衝區中至少一部份資料轉換成至少一檔案並儲存到該全域暫存檔案區,然後將該目標資料單元儲存到該全域暫存緩衝區。 The storage device management system according to claim 14, wherein the global temporary storage area includes a global temporary storage buffer area and a global temporary storage file area, the global temporary storage buffer stores non-file data, and the global temporary storage The file area stores files; when the target data unit is copied to the global temporary buffer, the storage device management program will first confirm whether the global temporary buffer has enough space, and if so, copy the target data unit To the global temporary buffer, if not, first convert at least part of the data in the global temporary buffer into at least one file and save it to the global temporary file area, and then save the target data unit to the global Temporary buffer. 如請求項14所述的儲存裝置管理系統,更包含:該儲存裝置管理程式若偵測到該第二儲存裝置自該電子裝置移除,則刪除該全域暫存區中所儲存的資料。 The storage device management system according to claim 14, further comprising: if the storage device management program detects that the second storage device is removed from the electronic device, delete the data stored in the global temporary storage area. 如請求項11所述的儲存裝置管理系統,該電子裝置自該第二儲存裝置讀取到該目標資料單元後,該儲存裝置管理程式會將包含該目標資料單元的至少一候選資料單元複製到該區域暫存區。 According to the storage device management system of claim 11, after the electronic device reads the target data unit from the second storage device, the storage device management program copies at least one candidate data unit containing the target data unit to Temporary storage area in this area. 如請求項18所述的儲存裝置管理系統,其中該電子裝置從該區域暫存區、該全域暫存區或該第二儲存裝置讀取完包含該所需資料單元的一檔案後,該儲存裝置管理程式刪除該區域暫存區中所儲存的該些候選資料單元。 The storage device management system according to claim 18, wherein after the electronic device reads a file containing the required data unit from the regional temporary storage area, the global temporary storage area or the second storage device, the storage The device management program deletes the candidate data units stored in the regional temporary storage area. 如請求項11所述的儲存裝置管理系統,其中若將該所需資料單元被修改為一修改後所需資料單元,且該修改後所需資料單元被寫入該第二儲存 裝置來取代該所需資料單元時,若該區域暫存區或該全域暫存區具有該修改後所需資料單元,則該儲存裝置管理程式亦將該修改後所需資料單元寫入該區域暫存區或該全域暫存區來取代該所需資料單元。 The storage device management system according to claim 11, wherein if the required data unit is modified into a required data unit after modification, and the required data unit after modification is written into the second storage When the device replaces the required data unit, if the area temporary storage area or the global temporary storage area has the modified required data unit, the storage device management program will also write the modified required data unit into the area The temporary storage area or the global temporary storage area replaces the required data unit.
TW107115913A 2017-07-06 2018-05-10 Storage apparatus managing system and storage apparatus managing method TWI707235B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201810678506.6A CN109213692B (en) 2017-07-06 2018-06-27 Storage device management system and storage device management method
US16/027,388 US10776261B2 (en) 2017-07-06 2018-07-05 Storage apparatus managing system and storage apparatus managing method for increasing data reading speed
US16/921,956 US11256618B2 (en) 2017-07-06 2020-07-07 Storage apparatus managing system comprising local and global registering regions for registering data and associated method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201762528978P 2017-07-06 2017-07-06
US62/528,978 2017-07-06

Publications (2)

Publication Number Publication Date
TW201907309A TW201907309A (en) 2019-02-16
TWI707235B true TWI707235B (en) 2020-10-11

Family

ID=66213110

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107115913A TWI707235B (en) 2017-07-06 2018-05-10 Storage apparatus managing system and storage apparatus managing method

Country Status (1)

Country Link
TW (1) TWI707235B (en)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Examining Storage Performance on Mobile Devices
Hybrid Cache Architecture Replacing SRAM Cache with Future Memory Technology
Hybrid Cache Architecture Replacing SRAM Cache with Future Memory Technology Examining Storage Performance on Mobile Devices *

Also Published As

Publication number Publication date
TW201907309A (en) 2019-02-16

Similar Documents

Publication Publication Date Title
US9880770B2 (en) Supporting invalidation commands for non-volatile memory
US9927985B2 (en) Method of dynamic table journaling
TWI607306B (en) Readdressing memory for non-volatile storage devices
CN100585595C (en) Method for managing file system data using dbms
US8402202B2 (en) Input/output control method and apparatus optimized for flash memory
US20150032690A1 (en) Virtual synchronization with on-demand data delivery
US20160055097A1 (en) Heterogeneous unified memory
US20100174864A1 (en) Performance in a data storage system
JP2010027026A (en) Memory storage device and control method thereof
CN109902034A (en) Snapshot creation method, device, electronic equipment and machine readable storage medium
US10108342B2 (en) Method for reducing use of DRAM in SSD and the SSD using the same
JPWO2009096180A1 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM
US8751756B2 (en) Method and apparatus for writing data in memory system
US9778927B2 (en) Storage control device to control storage devices of a first type and a second type
CN114579055B (en) Disk storage method, device, equipment and medium
CN110312986B (en) Opportunistic use of streams for storing data on solid state devices
CN113127438B (en) Method, apparatus, server and medium for storing data
CN108140043B (en) Read-write protocol for attaching only distributed database
JP2016515258A (en) File aggregation for optimized file operation
CN109213692B (en) Storage device management system and storage device management method
TWI707235B (en) Storage apparatus managing system and storage apparatus managing method
JP2012058863A (en) Disk device and method and program for data duplication to disk device
US11256618B2 (en) Storage apparatus managing system comprising local and global registering regions for registering data and associated method
CN110287064B (en) Method and device for restoring disk data and electronic equipment
US8977814B1 (en) Information lifecycle management for binding content