TW201907309A - 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
TW201907309A
TW201907309A TW107115913A TW107115913A TW201907309A TW 201907309 A TW201907309 A TW 201907309A TW 107115913 A TW107115913 A TW 107115913A TW 107115913 A TW107115913 A TW 107115913A TW 201907309 A TW201907309 A TW 201907309A
Authority
TW
Taiwan
Prior art keywords
data unit
storage device
temporary storage
area
target data
Prior art date
Application number
TW107115913A
Other languages
Chinese (zh)
Other versions
TWI707235B (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

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 more particularly to a storage device management system and a storage device management method for increasing a reading speed by providing 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 and more popular. However, portable electronic devices generally have a problem of small capacity. To increase the capacity of the portable electronic device, the capacity of the internal memory of the portable electronic device itself is usually increased, or the portable electronic device is used. The device is equipped with an external memory card. However, portable electronic devices with large internal memory capacities are generally quite expensive. The external memory card is relatively small in size, and is easily lost after being removed from the portable electronic device, and some portable electronic devices do not support an external memory card.

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

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

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

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

本發明一實施例揭露一種儲存裝置管理系統,用以管理連接一電子裝置的一第一儲存裝置以及一第二儲存裝置,該第一儲存裝置包含一區域暫存區以及一全域暫存區,該全域暫存區用以暫存曾經從第二儲存裝置讀取過的資料,而該區域暫存區用以暫存曾經從第二儲存裝置讀取過的資料以及其他候選資料,該儲存裝置管理系統包含:一儲存裝置管理程式;一控制模組,用以控制該第二儲存裝置。其中若該儲存裝置管理程式接收到自該第二儲存裝置讀取一目標資料單元的一讀取請求,會先確認該全域暫存區是否有該目標資料單元,若該全域暫存區有該目標資料單元,則該儲存裝置管理程式使該電子裝置從該全域暫存區讀取該目標資料單元,若該全域暫存區沒有該目標資料單元,則該儲存裝置管理程式確認該區域暫存區是否有該目標資料單元,若該區域暫存區有該目標資料單元,則該儲存裝置管理程式使該電子裝置從該區域暫存區讀取該目標資料單元,若該區域暫存區沒有該目標資料單元,則該儲存裝置管理程式使該電子裝置透過該控制模組來從該第二儲存裝置讀取該目標資料單元。An embodiment of the present invention provides 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 temporarily storing data that has been read from the second storage device, and the regional temporary storage area is used for temporarily storing data and other candidate data that have been read from the second storage device. The management system comprises: 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 from the second storage device to read a target data unit, it first confirms whether the global temporary storage area has the target data unit, and if the global temporary storage area has the The target data unit, the storage device management program causes the electronic device to read the target data unit from the global temporary storage area, and 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 the target data unit is present in the area, and if the target data unit is in the temporary storage area, the storage device management program causes the electronic device to read the target data unit from the temporary storage area of the area, if the temporary storage area of the area is not The target data unit, the storage device management program causes the electronic device to read the target data unit from the second storage device through the control module.

本發明另一實施例揭露一種儲存裝置管理系統,用以管理一手機內的一緩存記憶體以及連接於該手機的一隨身碟,包含:一控制模組,用以控制該隨身碟;以及一儲存裝置管理程式,該手機要從該隨身碟讀取一目標資料單元時,該儲存裝置管理程式會使該控制模組將該目標資料單元複製到該緩存記憶體,並使該手機自該隨身碟或該緩存記憶體讀取該目標資料單元。Another embodiment of the present invention provides 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 a storage device management program, when the mobile phone reads a target data unit from the portable disk, the storage device management program causes the control module to copy the target data unit to the cache memory, and the mobile phone is self-contained The disc or the cache memory reads the target data unit.

本發明其他實施例亦揭露了與前述實施例相對應的儲存裝置管理方法,其步驟可由其述實施例推得,故在此不再贅述。Other embodiments of the present invention also disclose a storage device management method corresponding to the foregoing embodiment, and the steps thereof may be derived from the embodiments thereof, and thus are not described herein again.

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

於以下描述中,提供了多個實施例來說明本發明的概念。然請留意,在以下實施例中,各元件可以硬體方式來實現 (例如電路)或是以硬體加軟體的方式來實現 (例如在處理器中寫入程式)。此外,以下實施例僅用以說明,其元件的數量、位置以及動作順序均非用以限定本發明。In the following description, numerous embodiments are provided to illustrate the concepts of the invention. It should be noted, however, that in the following embodiments, the components may be implemented in a hardware manner (e.g., in a circuit) or in a hardware-software manner (e.g., writing a program in a processor). In addition, the following examples are merely illustrative, and the number, position, and order of operations of the elements are not intended to limit the 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 is a block diagram of a storage device management system in accordance with an embodiment of the present invention. As shown in FIG. 1, the electronic device 100 includes a storage device management program 101 and a first storage device 103 (for example, a cache memory in the electronic device 100, a cached RAM). The second storage device 105 (eg, a flash drive) is coupled 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 control the first storage device 103 and the second storage device 105 by using a file system module (for example, a FATFS file system module) corresponding to the file systems of the first storage device 103 and the second storage device 105. Data access or zoning action. 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 operations 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 a read or write command to the control module 107, so that the control module 107 can transfer the data of the second storage device 107 to the first storage device 103 or write data. Go 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, the main processor is used to control the electronic device in addition to the storage device management program 101. 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. Please note that in the following embodiments, the control module is disposed in the second storage device, but the control module may also be disposed in the electronic device.

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

習知技術中,若欲讀取第二儲存裝置105中的資料,會直接從第二儲存裝置105讀取資料。如前所述,資料讀取速度會受限於第二儲存裝置105和電子裝置100間的資料傳輸介面的速度。因此,本發明概念之一為將第二儲存裝置105中的至少一部份資料複製到第一儲存裝置103中的全域暫存區109或是區域暫存區111。而在讀取資料時,會先檢查第一儲存裝置103是否有欲讀取的資料,若有則優先從第一儲存裝置103讀取,若無才從第二儲存裝置105中讀取,如此可大幅的減少資料讀取的時間。詳細的步驟將於底下說明。In the prior art, 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 previously mentioned, the data reading speed is limited by the speed of the data transfer 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 a portion 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 the data is read, the first storage device 103 is first checked whether there is data to be read, and if so, the first storage device 103 is preferentially read, and if not, the second storage device 105 is read. Can greatly reduce the time of data reading. The detailed steps will be explained below.

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

步驟201Step 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 an LBA (Logical Block Address). In the following embodiments, the target data unit is described as an LBA.

步驟203Step 203

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

於一實施例中,全域暫存區109會包含尚未編寫為檔案的資料(例如LBA)以及已編寫為檔案的資料。在此實施例中,步驟203會先確認全域暫存區中非檔案的資料中是否包含目標資料單元,若無,再確認全域暫存區中的檔案是否包含目標資料單元。這樣的步驟可以使讀取速度更快,其原因在於,若要確認檔案是否包含目標資料單元,則須經過將檔案打開,確認其中包含的資料,然後再將檔案關閉的動作,會增加確認所需的時間。因此,會優先檢查非檔案的資料中是否包含目標資料單元。In one embodiment, the global staging area 109 will contain data that has not yet been written as an archive (eg, an LBA) and data that has been written as an archive. In this embodiment, step 203 first confirms whether the target data unit is included in the non-archive data in the global temporary storage area, and if not, whether the file in the global temporary storage area contains the target data unit. Such a step can make the reading speed faster, because the confirmation of whether the file contains the target data unit, the action of opening the file, confirming the information contained therein, and then closing the file will increase the confirmation. Time required. Therefore, it is a priority to check whether the target data unit is included in the non-archive data.

步驟205Step 205

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

步驟207Step 207

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

步驟209Step 209

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

步驟211Step 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 FIG. 2, the storage device management method provided in the present case preferentially reads data from the first storage device 103, and reads data from the second storage device 105 if the first storage device 103 does not. 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 speed of data reading can be improved. In detail, when the electronic device 100 receives the read request for reading the target data unit from the second storage device 105, it first confirms whether the global temporary storage area 109 has the target data unit, and if so, from the global temporary storage area 109. The target data unit is read first, and if not, the target data unit is read from the area temporary storage area 111. If neither the global temporary storage area 109 nor the regional temporary storage area 111 has a target data unit, the data unit is read from the second storage device 105. In this way, it is not necessary to read the data from the second storage device 105 every time the data is to be read, and the reading speed of the data can be improved.

在以下實施例中,將詳細描述如何決定要暫存那些資料到全域暫存區109和區域暫存區111,可共同參照第2圖和第3-4圖來更為了解本發明的內容。藉由下述的暫存方法,可讓全域暫存區109和區域暫存區111存有可能被讀取的資料,來增進從全域暫存區109和區域暫存區111讀取資料而非從第二儲存裝置105讀取資料的效率。In the following embodiments, how to decide to temporarily store those data to the global temporary storage area 109 and the regional temporary storage area 111 will be described in detail, and the contents of the present invention will be better understood by referring to Figs. 2 and 3-4 together. By means of the temporary storage method described below, the global temporary storage area 109 and the regional temporary storage area 111 can store data that may be read, thereby enhancing 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 of FIG. 3, it is assumed that the target data unit to be read is the data unit DU_3, and in the embodiment of FIG. 3, the global temporary storage area 109 and the regional temporary storage area 111 do not include 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 is also copied to the global temporary storage area 109 and the regional temporary storage area 111, and in addition to the data unit DU_3, the non-target is At least one candidate data unit outside the data unit is copied to the regional temporary storage area 111, for example, the data unit DU_1-DU_2 in FIG. 3, and the data unit DU_4-DU_100, that is, the data unit in the address range of the data unit DU_3. The advantage of taking this mechanism is that since the data unit may not be read separately, it may be read continuously. For example, when reading a file, the data units adjacent to the storage address are continuously read. Therefore, the data unit within the address range of the data unit DU_3 is first copied to the area temporary storage area 111 to reduce the possibility of reading data directly from the second storage device 105. After such a copy operation, the global temporary storage area 109 and the regional temporary storage area 111 each include the data unit DU_3. Therefore, if the data unit DU_3 is to be read again, according to the steps of FIG. 2, the global temporary storage area will be directly The data unit DU_3 is read 109 without having to read 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 of Fig. 4 is continued after the embodiment of Fig. 3, that is, in the embodiment of Fig. 4, the global temporary storage area 109 contains the data unit DU_3, and the regional temporary storage area 111 contains the data unit DU_1- DU_100. In the embodiment of Fig. 4, the target data unit to be read is the data unit DU_4. According to the steps in FIG. 2, it is first confirmed whether the global temporary storage area 109 has the data unit DU_4, but since the global temporary storage area 109 does not contain the data unit DU_4, it is confirmed whether the regional temporary storage area 111 has a data unit. DU_4. The area temporary storage area 111 includes the data unit DU_4, so the data unit DU_4 is read from the area temporary storage area 111, and the data unit DU_4 is copied from the area 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 described above, if the target data unit is read from the area temporary storage area 111 or the second storage device 105, the target data unit is copied to the global temporary storage area 109. Therefore, the present invention further provides an embodiment of writing data to the global temporary storage area 109, which can further speed up the reading of data. FIG. 5 is a flow chart showing the writing of data to the global temporary storage area according to an embodiment of the present invention. The present invention can be better understood by referring to FIG. 3 and FIG. In an embodiment, the global temporary storage area 109 in FIG. 3 further includes a global temporary buffer 109_1 and a global temporary storage area 109_2, and the global temporary buffer 109_1 is used to store non-archive data. The global temporary file area 109_2 stores files. The flowchart of Figure 5 contains the following steps:

步驟501Step 501

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

步驟503Step 503

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

步驟505Step 505

將資料以非檔案的形式寫入全域暫存緩衝區109_1。The data is written to the global temporary buffer 109_1 as a non-file.

步驟507Step 507

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

步驟509Step 509

將資料以檔案形式寫入全域暫存檔案區109_2。The data is written to the global temporary file area 109_2 in the form of a file.

步驟511Step 511

若全域暫存緩衝區109_1和全域暫存檔案區109_2均不具有足夠的儲存空間,則表示全域暫存區109的儲存空間存量相當低。於此情況下,可將全域暫存區109的資料刪除。此刪除動作可刪除全域暫存區109所存的全部資料,亦可只刪除全域暫存區109所存的部份資料。舉例來說,可僅刪除全域暫存區109較舊的資料。If the global temporary buffer 109_1 and the global temporary storage area 109_2 do not have sufficient storage space, it means that the storage space of the global temporary storage area 109 is relatively low. In this case, the data of the global temporary storage area 109 can be deleted. This deletion action may delete all the data stored in the global temporary storage area 109, or may delete 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 an embodiment, steps 507-511 may be replaced by writing at least a portion of the data stored in the global temporary buffer 109_1 as a file and storing it in the global temporary storage area 109_2 to release a partial global temporary buffer. The space of the area 109_1 and the new data is written to the global temporary buffer 109_1.

如前所述,若將資料存成檔案,則在尋找資料時須將檔案打開,進行讀取動作,然後再關閉,如此會降低存取資料的速度。因此,在第5圖的全域暫存區寫入流程中,會優先將資料儲存成非檔案的形式,如此可增進在全域暫存區讀取資料的速度。As mentioned above, if the data is saved as a file, the file must be opened, read, and then closed when searching for information, which will reduce the speed of accessing the data. Therefore, in the global temporary storage area writing process in FIG. 5, the data is preferentially stored in a non-archive format, which can improve 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 an 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 data stored in the global temporary storage area 109 or the regional temporary storage area 111 in a specific case. The embodiment avoids insufficient space of the global temporary storage area 109 and the regional temporary storage area 111. As shown in the embodiment of FIG. 5, if the global temporary buffer 109_1 and the global temporary storage area 109_2 do not have sufficient storage space, the data in the global temporary storage area 109 is deleted. In addition, in an 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, and thus the global temporary storage area 109 is deleted. Information in the middle.

而在另一實施例中,若從區域暫存區111、全域暫存區109或第二儲存裝置105讀取完包含所需資料單元的一檔案後,則刪除區域暫存區111中所儲存的候選資料單元。以第3圖的實施例為例,若有一檔案A包含資料單元DU_3-DU_50,則在讀取完資料單元DU_3後,會再繼續依第2圖中的流程讀取完剩餘的DU_4-DU_50。而在讀取完檔案A後,由於區域暫存區111中所儲存的候選資料單元是與檔案A較有關的資料單元,因此會將區域暫存區111中所儲存的候選資料單元刪除。In another embodiment, if a file containing the required data unit is read from the area temporary storage area 111, the global temporary storage area 109, or the second storage device 105, the deleted area temporary storage area 111 is stored. Candidate data unit. Taking the embodiment of FIG. 3 as an example, if a file A includes the data unit DU_3-DU_50, after reading the data unit DU_3, the remaining DU_4-DU_50 is read again according to the flow in FIG. After the file A is read, since the candidate data unit stored in the area temporary storage area 111 is a data unit related to the file A, the candidate data unit stored in the area temporary storage area 111 is 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 originally stored data in the second storage device 105, and then save the modified data back to the second storage device 105. In an embodiment, in this case, the global temporary storage area 109 and the regional temporary storage area 111 are simultaneously updated to synchronize the data. Please refer to FIG. 6 , which is a schematic diagram of operations when modifying data of a second storage device according to an embodiment of the invention. As shown in FIG. 6, after the required data unit DU_1 is read, according to the foregoing embodiment, 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. The global temporary storage area 109 and the regional temporary storage area 111 all have the required data unit DU_1. If the content of the required data unit DU_1 is changed, and is modified into the modified data unit DU_1a, and returned to the second storage device 105 to replace the original required data unit DU_1, the modified data unit DU_1a is modified. 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 the modified data unit DU_1a is read next time, the original required data unit DU_1 is 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 an embodiment, after the required data unit DU_1 is read out and modified into the modified data unit DU_1a, it is determined whether the required data unit DU_1 exists in the regional temporary storage area 111. If the result is yes, then The modified data unit DU_1a is replaced with the required data unit DU_1 in the area temporary storage area 111. Similarly, it is also determined whether the required data unit DU_1 exists in the global temporary storage area 109. If the result is YES, the modified required data unit DU_1a replaces the required data unit DU_1 in the global temporary storage area 109.

而在一實施例中,全域暫存區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 an embodiment, the global temporary storage area 109 includes the foregoing global temporary buffer 109_1 (non-archive data area) and the global temporary storage area 109_2 (archive data area), and the modified data unit DU_1a is to be modified. When updating to the global temporary storage area 109, it is first confirmed whether the global temporary buffer 109_1 has the required data unit DU_1, and if so, the modified required data unit DU_1a replaces the required data unit in the global temporary buffer 109_1. DU_1. If the global temporary buffer 109_1 does not have the required data unit DU_1 but the global temporary storage area 109_2 has the required data unit DU_1, the modified required data unit DU_1a replaces the required data unit in the global temporary storage area 109_2. DU_1. As described in the step of Figure 5 of the present case, since the global temporary buffer 109_1 is insufficient in space before the required data unit is written to the global temporary buffer 109, the global temporary storage area 109_2 still has space. . Therefore, the required data unit DU_1 may exist in the global temporary storage area 109_2 and not in the global temporary buffer 109_1.

如前所述,習知技術在讀取第二儲存裝置的資料時,是直接從第二儲存裝置讀取資料,因此不會更動到電子裝置內的第一儲存裝置。因此,若一電子裝置運用了本發明所提供的儲存裝置管理方法,則在讀取第二儲存裝置時,電子裝置內的第一儲存裝置的資料會相對應的增加。第7圖繪示了本發明一實施例的,實際運用本發明所提供的儲存裝置管理系統或儲存裝置管理方法的呈現方式。As described above, when reading the data of the second storage device, the prior art reads the data directly from the second storage device, and thus does not change to the first storage device in the electronic device. Therefore, if an electronic device utilizes 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 increases correspondingly. FIG. 7 is a diagram showing the manner in which the storage device management system or the storage device management method provided by the present invention is actually used according to an embodiment of the present invention.

第7圖繪示了本發明一實施例的,實際運用本發明所提供的儲存裝置管理系統或儲存裝置管理方法的呈現方式。在第7圖的例子中,前述第一儲存裝置為一內部儲存裝置,而前述第二儲存裝置為一外部儲存裝置。如第7圖所示,可使電子裝置700顯示出一儲存空間的配置畫面,其顯示了內部儲存空間和外部儲存空間。在讀取外部儲存裝置的資料時,因為資料會暫存到第一儲存裝置,因此內部儲存空間可能會相對應的增加。且如前所述,在一實施例中,若將第二儲存裝置自電子裝置移除,則會刪除全域暫存區109和區域暫存區111所存的資料。因此,若將第二儲存裝置自電子裝置移除,則可能會有內部儲存空間相對應減少的狀況發生。前述實施例所造成的內部儲存空間變化當可根據第7圖的描述而推得,故再此不再贅述。FIG. 7 is a diagram showing the manner in which the storage device management system or the storage device management method provided by the present invention is actually used according to an embodiment of the present invention. In the example of FIG. 7, the first storage device is an internal storage device, and the second storage device is an external storage device. As shown in FIG. 7, the electronic device 700 can be configured to display a configuration screen of a storage space, which displays an internal storage space and an external storage space. When reading the data of the external storage device, since the data is temporarily stored in the first storage device, the internal storage space may increase correspondingly. As described above, in an 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 is deleted. Therefore, if the second storage device is removed from the electronic device, there may be a situation in which the internal storage space is correspondingly reduced. The internal storage space variation caused by the foregoing embodiment can be derived from the description of FIG. 7, and will not be described again.

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

100‧‧‧電子裝置100‧‧‧Electronic devices

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

103‧‧‧第一儲存裝置103‧‧‧First storage device

105‧‧‧第二儲存裝置105‧‧‧Second storage device

107‧‧‧控制模組107‧‧‧Control Module

109‧‧‧全域暫存區109‧‧‧Global temporary storage area

109_1‧‧‧全域暫存緩衝區109_1‧‧‧Global buffer buffer

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

111‧‧‧區域暫存區111‧‧‧Regional storage area

700‧‧‧電子裝置700‧‧‧Electronic devices

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

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

第1圖繪示了根據本發明一實施例的儲存裝置管理系統的方塊圖。 第2圖繪示了根據本發明一實施例的儲存裝置管理方法的流程圖。 第3-4圖繪示了根據本發明一實施例的儲存裝置管理系統的動作示意圖。 第5圖繪示了根據本發明一實施例的將資料寫入全域暫存區的流程圖。 第6圖繪示了根據本發明一實施例的修改第二儲存裝置之資料時的動作示意圖。 第7圖繪示了本發明一實施例的,實際運用本發明所提供的儲存裝置管理系統或儲存裝置管理方法的呈現方式。FIG. 1 is a block diagram of a storage device management system in accordance with an embodiment of the present invention. FIG. 2 is a flow chart of a storage device management method according to an embodiment of the invention. Figure 3-4 is a schematic diagram showing the operation of the storage device management system according to an embodiment of the present invention. FIG. 5 is a flow chart showing writing data to a global temporary storage area according to an embodiment of the invention. FIG. 6 is a schematic diagram showing the operation of modifying the data of the second storage device according to an embodiment of the invention. FIG. 7 is a diagram showing the manner in which the storage device management system or the storage device management method provided by the present invention is actually used according to an embodiment of the present invention.

Claims (30)

一種儲存裝置管理方法,運用在連接一電子裝置的一第一儲存裝置以及一第二儲存裝置,該第一儲存裝置包含一區域暫存區以及一全域暫存區,該全域暫存區用以暫存曾經從第二儲存裝置讀取過的資料,而該區域暫存區用以暫存曾經從第二儲存裝置讀取過的資料以及其他候選資料,該儲存裝置管理方法包含: (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, wherein the global temporary storage area is used for The data stored in the second storage device is temporarily stored, and the temporary storage area is used to temporarily store the data and other candidate materials that have been read from the second storage device. The storage device management method includes: (a) Receiving a read request for reading a target data unit from the second storage device; (b) confirming whether the global temporary storage area has the target data unit; (c) if the global temporary storage area has the target data unit, And reading the target data unit from the global temporary storage area, if the global temporary storage area does not have the target data unit, confirming whether the target temporary storage area has the target data unit; and (d) if the regional temporary storage area If the target data unit is present, the target data unit is read from the temporary storage area of the area, and if the target data unit is not in the temporary storage area of the area, the target data unit is read from the second storage device. 如請求項1所述的儲存裝置管理方法,其中該第一儲存裝置為該電子裝置內部的一內部儲存裝置,該第二儲存裝置為獨立於該電子裝置的一外部儲存裝置。The storage device management method of 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 of claim 1, wherein the step (b) further comprises: first confirming whether the target data unit is included in the non-archive data in the global temporary storage area, and if not, reconfirming the global temporary storage. Whether the file in the zone contains the target data unit. 如請求項1所述的儲存裝置管理方法,更包含:若該目標資料單元是從該區域暫存區或該第二儲存裝置讀取,則將該目標資料單元複製到該全域暫存區。The storage device management method of claim 1, further comprising: if the target data unit is read from the regional temporary storage area or the second storage device, copying the target data unit to the global temporary storage area. 如請求項4所述的儲存裝置管理方法, 其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案; 其中在將該目標資料單元複製到該全域暫存區時,會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則確認該全域暫存檔案區是否有足夠空間,若該全域暫存檔案區有足夠空間則將該目標資料單元複製到該全域暫存檔案區。The storage device management method according to claim 4, wherein the global temporary storage area comprises a global temporary storage buffer and a global temporary storage file area, wherein the global temporary storage buffer stores non-archive data, and the global temporary storage The file area stores the file; wherein when the target data unit is copied to the global temporary storage area, it is first confirmed whether the global temporary storage buffer has sufficient space, and if so, the target data unit is copied to the global temporary storage buffer. If there is no, confirm whether there is enough space in the global temporary file area. If there is enough space in the global temporary file area, 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 comprises a global temporary storage buffer and a global temporary storage file area, wherein the global temporary storage buffer stores non-archive data, and the global temporary storage The file area stores the file; wherein when the target data unit is copied to the global temporary buffer, it is first confirmed whether the global temporary buffer has sufficient space, and if so, the target data unit is copied to the global temporary storage. The buffer, if not, first converts at least a portion of the data in the global temporary buffer into at least one file and stores the data in the global temporary storage area, and then stores the target data unit in the global temporary storage buffer. 如請求項4所述的儲存裝置管理方法,更包含:若偵測到該第二儲存裝置自該電子裝置移除,則刪除該全域暫存區中所儲存的資料。The storage device management method of claim 4, further comprising: deleting the data stored in the global temporary storage area if the second storage device is detected to be removed from the electronic device. 如請求項1所述的儲存裝置管理方法,更包含:自該第二儲存裝置讀取到該目標資料單元後,將包含該目標資料單元的至少一候選資料單元複製到該區域暫存區。The storage device management method of 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 to the regional temporary storage area. 如請求項8所述的儲存裝置管理方法,更包含: 從該區域暫存區、該全域暫存區或該第二儲存裝置讀取完包含該所需資料單元的一檔案後,刪除該區域暫存區中所儲存的該些候選資料單元。The storage device management method of claim 8, further comprising: deleting the area from the temporary storage area of the area, the global temporary storage area, or the second storage device after reading a file including the required data unit The candidate data units stored in the temporary storage area. 如請求項1所述的儲存裝置管理方法,更包含: 將讀取的該所需資料單元修改為一修改後所需資料單元,並將該修改後所需資料單元寫入該第二儲存裝置來取代該所需資料單元時,若該區域暫存區或該全域暫存區具有該修改後所需資料單元,則亦將該修改後所需資料單元寫入該區域暫存區或該全域暫存區來取代該所需資料單元。The storage device management method of claim 1, further comprising: modifying the read required data unit into a modified required data unit, and writing the modified required data unit to the second storage device When the required data unit is replaced, if the area temporary storage area or the global temporary storage area has the modified data unit, the modified data unit is also written into the regional temporary storage area or the global area. The temporary storage area replaces the required data unit. 一種儲存裝置管理方法,運用在一手機內的一緩存記憶體以及連接於該手機的一隨身碟,包含: 要從該隨身碟讀取一目標資料單元時,將該目標資料單元複製到該緩存記憶體; 並自該隨身碟或該緩存記憶體讀取該目標資料單元。A storage device management method, using a cache memory in a mobile phone and a flash drive connected to the mobile phone, comprising: copying the target data unit to the cache when reading a target data unit from the portable disk Memory; and reading the target data unit from the flash drive or the cache memory. 如請求項11所述的儲存裝置管理方法,更包含:若偵測到該隨身碟自該手機移除,則刪除該緩存記憶體中所儲存的至少一部份內部儲存資料。The storage device management method of claim 11, further comprising deleting at least a portion of the internal storage data stored in the cache memory if the removable disk is detected to be removed from the mobile phone. 如請求項11所述的儲存裝置管理方法,其中將該目標資料單元複製到該緩存記憶體的動作包含:將包含該目標資料單元的複數個候選資料單元複製到該緩存記憶體。The storage device management method of claim 11, wherein the copying the target data unit to the cache memory comprises: copying a plurality of candidate data units including the target data unit to the cache memory. 如請求項13所述的儲存裝置管理方法,更包含: 從該緩存記憶體或該隨身碟讀取完包含該所需資料單元的資料後,刪除該緩存記憶體中所儲存的該些候選資料單元。The storage device management method of claim 13, further comprising: deleting the candidate data stored in the cache memory after reading the data including the required data unit from the cache memory or the flash drive unit. 如請求項11所述的儲存裝置管理方法,更包含: 將讀取的該所需資料單元修改為一修改後所需資料單元,並將該修改後所需資料單元寫入該隨身碟來取代該所需資料單元時,亦將該修改後所需資料單元寫入該緩存記憶體來取代該所需資料單元。The storage device management method of claim 11, further comprising: modifying the read required data unit into a modified required data unit, and replacing the modified required data unit into the flash drive In the case of the required data unit, the modified data unit is also written into the cache memory to replace 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 comprising a regional temporary storage area and a global temporary storage area, wherein the global temporary storage area is used To temporarily store the data that has been read from the second storage device, and to temporarily store the data and other candidate data that has been read from the second storage device, the storage device management system includes: a device management program; a control module for controlling the second storage device; wherein the storage device management program first confirms the global domain if it receives a read request from the second storage device to read a target data unit Whether the target data unit is present in the temporary storage area, and if the global 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 global temporary storage area, if the global temporary storage If the target data unit is not in the area, the storage device management program confirms whether the target data unit is in the temporary storage area of the area, and if the target temporary storage area has the target data And the storage device management program causes the electronic device to read the target data unit from the temporary storage area of the area, and if the target temporary storage area does not have the target data unit, the storage device management program causes the electronic device to pass the control The module reads the target data unit from the second storage device. 如請求項16所述的儲存裝置管理系統,其中該第一儲存裝置為該電子裝置內部的一內部儲存裝置,該第二儲存裝置為獨立於該電子裝置的一外部儲存裝置。The storage device management system of claim 16, 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. 如請求項16所述的儲存裝置管理系統,其中該儲存裝置管理程式會先確認該全域暫存區中非檔案的資料中是否包含該目標資料單元,若無,再確認該全域暫存區中的檔案是否包含該目標資料單元。The storage device management system of claim 16, wherein the storage device management program first confirms whether the target data unit is included in the non-archive data in the global temporary storage area, and if not, confirms the global temporary storage area. Whether the file contains the target data unit. 如請求項16所述的儲存裝置管理系統,其中若該目標資料單元是從該區域暫存區或該第二儲存裝置讀取,則該儲存裝置管理程式將該目標資料單元複製到該全域暫存區。The storage device management system of claim 16, 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 Storage area. 如請求項19所述的儲存裝置管理系統, 其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案; 其中在將該目標資料單元複製到該全域暫存區時,該儲存裝置管理程式會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則確認該全域暫存檔案區是否有足夠空間,若該全域暫存檔案區有足夠空間則將該目標資料單元複製到該全域暫存檔案區。The storage device management system of claim 19, wherein the global temporary storage area comprises a global temporary storage buffer and a global temporary storage file area, wherein the global temporary storage buffer stores non-archive data, and the global temporary storage The file area stores the file; wherein when the target data unit is copied to the global temporary storage area, the storage device management program first confirms whether the global temporary buffer has sufficient space, and if so, copies the target data unit to The global temporary buffer, if not, confirms whether the global temporary storage area has sufficient space, and if the global temporary storage area has sufficient space, the target data unit is copied to the global temporary storage area. 如請求項19所述的儲存裝置管理系統, 其中該全域暫存區包含一全域暫存緩衝區以及一全域暫存檔案區,該全域暫存緩衝區儲存非檔案的資料,而該全域暫存檔案區儲存檔案; 其中在將該目標資料單元複製到該全域暫存緩衝區時,該儲存裝置管理程式會先確認該全域暫存緩衝區是否有足夠空間,若有則將該目標資料單元複製到該全域暫存緩衝區,若無則先將該全域暫存緩衝區中至少一部份資料轉換成至少一檔案並儲存到該全域暫存檔案區,然後將該目標資料單元儲存到該全域暫存緩衝區。The storage device management system of claim 19, wherein the global temporary storage area comprises a global temporary storage buffer and a global temporary storage file area, wherein the global temporary storage buffer stores non-archive data, and the global temporary storage The file area stores the file; wherein when the target data unit is copied to the global temporary buffer, the storage management program first confirms whether the global temporary buffer has sufficient space, and if so, copies the target data unit Go to the global temporary buffer, if not, convert at least a part of the data in the global temporary buffer into at least one file and store it in the global temporary storage area, and then store the target data unit in the global area. The scratch buffer. 如請求項19所述的儲存裝置管理系統,更包含:該儲存裝置管理程式若偵測到該第二儲存裝置自該電子裝置移除,則刪除該全域暫存區中所儲存的資料。The storage device management system of claim 19, further comprising: if the storage device management program detects that the second storage device is removed from the electronic device, deleting the data stored in the global temporary storage area. 如請求項16所述的儲存裝置管理系統,該電子裝置自該第二儲存裝置讀取到該目標資料單元後,該儲存裝置管理程式會將包含該目標資料單元的至少一候選資料單元複製到該區域暫存區。The storage device management system of claim 16, 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 including the target data unit to The temporary storage area of the area. 如請求項23所述的儲存裝置管理系統,其中該電子裝置從該區域暫存區、該全域暫存區或該第二儲存裝置讀取完包含該所需資料單元的一檔案後,該儲存裝置管理程式刪除該區域暫存區中所儲存的該些候選資料單元。The storage device management system of claim 23, wherein the electronic device stores the file from the area temporary storage area, the global temporary storage area, or the second storage device after reading a file containing the required data unit The device manager deletes the candidate data units stored in the temporary storage area of the area. 如請求項16所述的儲存裝置管理系統,其中若將該所需資料單元被修改為一修改後所需資料單元,且該修改後所需資料單元被寫入該第二儲存裝置來取代該所需資料單元時,若該區域暫存區或該全域暫存區具有該修改後所需資料單元,則該儲存裝置管理程式亦將該修改後所需資料單元寫入該區域暫存區或該全域暫存區來取代該所需資料單元。The storage device management system of claim 16, wherein the required data unit is modified to be a modified required data unit, and the modified required data unit is written to the second storage device to replace the In the case of the required data unit, if the area temporary storage area or the global temporary storage area has the modified data unit, the storage device management program also writes the modified required data unit to the regional temporary storage area or The global temporary storage area replaces the required data unit. 一種儲存裝置管理系統,用以管理一手機內的一緩存記憶體以及連接於該手機的一隨身碟,包含: 一控制模組,用以控制該隨身碟;以及 一儲存裝置管理程式,該手機要從該隨身碟讀取一目標資料單元時,該儲存裝置管理程式會使該控制模組將該目標資料單元複製到該緩存記憶體,並使該手機自該隨身碟或該緩存記憶體讀取該目標資料單元。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, the mobile phone To read a target data unit from the flash drive, the storage device management program causes the control module to copy the target data unit to the cache memory and read the mobile phone from the flash drive or the cache memory. Take the target data unit. 如請求項26所述的儲存裝置管理系統,該儲存裝置管理程式若偵測到該隨身碟自該手機移除,則刪除該緩存記憶體中所儲存的至少一部份內部儲存資料。The storage device management system of claim 26, wherein the storage device management program deletes at least a portion of the internal stored data stored in the cache memory if the removable device is detected to be removed from the mobile phone. 如請求項26所述的儲存裝置管理系統,其中將該目標資料單元複製到該隨機存取記憶體的動作包含:將包含該目標資料單元的複數個候選資料單元複製到該緩存記憶體。The storage device management system of claim 26, wherein the copying the target data unit to the random access memory comprises: copying a plurality of candidate data units including the target data unit to the cache memory. 如請求項28所述的儲存裝置管理系統,其中該電子裝置從該緩存記憶體或該隨身碟讀取完包含該所需資料單元的資料後,該儲存裝置管理程式刪除該緩存記憶體中所儲存的該些候選資料單元。The storage device management system of claim 28, wherein after the electronic device reads the data including the required data unit from the cache memory or the flash drive, the storage device management program deletes the cache memory The candidate data units are stored. (如請求項26所述的儲存裝置管理系統,若該所需資料單元修改為一修改後所需資料單元,且被寫入該隨身碟來取代該所需資料單元時,該儲存裝置管理程式亦將該修改後所需資料單元寫入該緩存記憶體來取代該所需資料單元。(1) The storage device management system of claim 26, wherein the storage device management program is modified if the required data unit is modified into a modified data unit and is written to the flash drive to replace the required data unit The modified data unit is also written to the cache memory to replace 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 true TW201907309A (en) 2019-02-16
TWI707235B 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)

Also Published As

Publication number Publication date
TWI707235B (en) 2020-10-11

Similar Documents

Publication Publication Date Title
US9880770B2 (en) Supporting invalidation commands for non-volatile memory
US9927985B2 (en) Method of dynamic table journaling
US10083085B2 (en) Indirection data structures to manage file system metadata
CN100585595C (en) Method for managing file system data using dbms
US20090157756A1 (en) File System For Storing Files In Multiple Different Data Storage Media
CN109902034B (en) Snapshot creating method and device, electronic equipment and machine-readable storage medium
CN100530190C (en) Apparatus and method for processing information
JPWO2009096180A1 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM
CN109804359A (en) For the system and method by write back data to storage equipment
US9778927B2 (en) Storage control device to control storage devices of a first type and a second type
CN107562367B (en) Method and device for reading and writing data based on software storage system
US11176089B2 (en) Systems and methods for implementing dynamic file systems
CN109213692B (en) Storage device management system and storage device management method
JP2008090378A (en) Hybrid file system, operating system, cache control method, and recording medium
TWI601141B (en) Access method of flash memory and associated memory controller and electronic device
KR20150128714A (en) Grouping files for optimized file operations
TWI707235B (en) Storage apparatus managing system and storage apparatus managing method
US11256618B2 (en) Storage apparatus managing system comprising local and global registering regions for registering data and associated method
JP5027805B2 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE DEVICE SYSTEM
GB2548818A (en) Indirection data strucures to manage file system metadata
US8977814B1 (en) Information lifecycle management for binding content
CN112783420A (en) Data deleting and garbage recycling method, device, system and storage medium
JP2008181381A (en) Semiconductor memory card, data management method for semiconductor memory card, database engine, and semiconductor memory system
US20110106861A1 (en) Interface Techniques Providing Contiguous Storage For Files
KR20150087990A (en) System and Method for Caching Disk Image File of Full-Cloned Virtual Machine