201035769201035769
* · l W4«2LPA 六、發明說明: 【發明所屬之技術領域】 本發明是有關於一種記憶體整合裝置及方法,且特別 是有關於一種高效率之記憶體整合裝置及方法。 【先前技術】 行動儲存裝置,例如為USB隨身碟等,基於其可攜 性及便利性等優點,係於現代被大量的應用。然而,行動 〇 儲存裝置於儲存大量資料之後常會剩下些許剩餘儲存空 間,此些剩餘儲存空間可能因為容量不夠大而難以被利 用。如此一來,將會導致行動儲存裝置之剩餘儲存空間被 閒置未利用而浪費掉。傳統上係採用軟體處理的方法整合 多個行動儲存裝置。然而,上述採用軟體處理的方法會將 被整合的多個行動儲存裝置内的原有資料全部格式化,然 後模疑出一虛擬行動儲存裝置,此虛擬行動儲存裝置會佔 2多個订動儲存裝置之全部儲存空間。如此—來,原有的 胃料無法保留’且多個行動儲存裝置無法被單獨使用,導 致使用上的便利性大減。 【發明内容】 夕本發明係有關於一種記憶體整合裝置及方法,分別於 夕個周邊儲存褒置建立多個區塊槽案,故可在不破壞周邊 儲存裝置内原有資料的情況下,對多個周邊儲存裝置之至 少部份剩餘儲存空間進行合併再利用。 根據本發明之第一方面,提出一種記憶體整合裝置, 3 201035769* · l W4 «2LPA VI. Description of the Invention: [Technical Field] The present invention relates to a memory integration device and method, and more particularly to a high efficiency memory integration device and method. [Prior Art] Mobile storage devices, such as USB flash drives, are widely used in modern applications based on their portability and convenience. However, the action 〇 storage device often leaves some remaining storage space after storing a large amount of data. These remaining storage space may be difficult to use due to insufficient capacity. As a result, the remaining storage space of the mobile storage device will be wasted and left unused. Traditionally, software handling methods have been used to integrate multiple mobile storage devices. However, the above method of software processing will completely format the original data in the integrated mobile storage device, and then model a virtual mobile storage device, which will occupy more than 2 mobile storage devices. The entire storage space of the device. As a result, the original stomach material cannot be retained' and multiple mobile storage devices cannot be used alone, resulting in greatly reduced convenience in use. SUMMARY OF THE INVENTION The present invention relates to a memory integration device and method, which respectively establish a plurality of block slots in a peripheral storage device, so that the original data in the peripheral storage device can be destroyed without destroying the original data in the peripheral storage device. At least a portion of the remaining storage space of the plurality of peripheral storage devices is combined for reuse. According to a first aspect of the present invention, a memory integration device is provided, 3 201035769
TW4821PA 係連接一主機及多個周邊儲存裝置。記憶體整合裝置包括 一執行單元、一儲存管理單元以及一儲存模擬單元。執行 單元用以分別從此些周邊儲存裝置獲得多個區塊檔案,此 些區塊檔案各自佔據相對應的周邊儲存裝置之至少部份 剩餘儲存空間。儲存管理單元用以收集此些區塊檔案的標 頭之資訊。儲存模擬單元用以依據儲存管理單元所收集的 此些區塊檔案之標頭資訊,模擬一虛擬儲存裝置,使得主 機經由列舉而得以識別虛擬儲存裝置,虛擬儲存裝置之儲 存空間為此些至少部份剩餘儲存空間之總合。 根據本發明之第二方面,提出一種記憶體整合方法, 包括下列步驟。於多個周邊儲存裝置之至少部份剩餘儲存 空間分別建立相對應的區塊檔案。收集此些區塊檔案的標 頭之資訊。依據此些區塊檔案的標頭之資訊以模擬一虛擬 儲存裝置,使得一主機經由列舉而得以識別虛擬儲存裝 置,虛擬儲存裝置之儲存空間為該些至少部份剩餘儲存空 間之總合。 根據本發明之第三方面,提出一種記憶體整合方法, 包括下列步驟。從多個周邊儲存裝置分別獲得多個區塊擋 案的標頭,此些區塊檔案各自佔據相對應的周邊儲存裝置 之至少部份剩餘儲存空間。收集此些區塊檔案的標頭之資 訊以判斷是否所有區塊檔案均到齊。當此些區塊檔案均到 齊,模擬相對應的一虛擬儲存裝置,使得一主機經由列舉 而得以識別虛擬儲存裝置,虛擬儲存裝置之儲存空間為此 些至少部份剩餘儲存空間之總合。 根據本發明之第四方面,提出一種記憶體整合方法, 201035769 _ * 1 wHo^ir/v 包括下列步驟。從多個周邊儲存裝置分 餘儲存㈣。將此些剩餘儲存空間模擬 的剩 使得一主機經由列舉而識別虛擬儲存裝置置’ 之儲存空間為此些剩餘儲存空間之總合。儲存裝置 為讓本發明之上述内容能更明顯易懂, 佳實施例,並配合所附圖式,作詳細說明如^特舉一較 【實施方式】 本發明係提出-種記憶體整合裝置及 Ο 個周邊儲存裝置建立多個區塊檔案,故可在不破 存裝置内原有資料的情況下,對多個周邊儲存裝 部份剩餘儲存”進行合併再利用,大幅提升 = 用效率。 -脰的优 請參照第1圖,其緣示依照本發明較佳實施例之記憶 體整合裝置、周邊儲存裝置及主機之示意圖。記憶體整合 裝置no係連接多個周邊儲存裝置122〜128及機σ 130。記憶體整合裝置110係將多個周邊儲存裝置ΐ22〜ΐ28 ❹之至少部份剩餘儲存空間模擬為一虛擬儲存裝置,以供主 機130利用。記憶體整合裝置11 〇例如為一類集線器 (Hub-like)裝置’或是一讀卡機等。周邊儲存裝置122〜128 例如為通用串列匯流排(Universal Serial Bus,USB)磁碟, 或是記憶卡等。記憶體整合裝置n〇與主機13〇之間例如 經由一 USB傳輸介面溝通,然並不限於此。 凊參照第2圖’其繪示依照本發明較佳實施例之記憶 體整合裝置之方塊圖。記憶體整合裝置11()包括一執行 (executor)單元 200、一儲存管理(manager)單元 202、一儲 5 201035769The TW4821PA is connected to a host and multiple peripheral storage devices. The memory integration device includes an execution unit, a storage management unit, and a storage simulation unit. The execution unit is configured to obtain a plurality of block files from the peripheral storage devices, each of the block files occupying at least a portion of the remaining storage space of the corresponding peripheral storage device. The storage management unit collects information about the headers of the block files. The storage simulation unit is configured to simulate a virtual storage device according to the header information of the block files collected by the storage management unit, so that the host can identify the virtual storage device by enumeration, and the storage space of the virtual storage device is at least The sum of the remaining storage space. According to a second aspect of the present invention, a memory integration method is provided, comprising the following steps. Corresponding block files are respectively created in at least part of the remaining storage space of the plurality of peripheral storage devices. Collect information about the headers of these block files. Based on the information of the headers of the block files to simulate a virtual storage device, a host can identify the virtual storage device by enumeration, and the storage space of the virtual storage device is the sum of the at least some remaining storage spaces. According to a third aspect of the present invention, a memory integration method is provided, comprising the following steps. A plurality of block-block headers are obtained from a plurality of peripheral storage devices, each of which occupies at least a portion of the remaining storage space of the corresponding peripheral storage device. Collect the information on the headers of these block files to determine if all block files are available. When the block files are all aligned, a corresponding virtual storage device is simulated, so that a host can identify the virtual storage device by enumeration, and the storage space of the virtual storage device is a total of at least part of the remaining storage space. According to a fourth aspect of the present invention, a memory integration method is proposed, 201035769 _ * 1 wHo^ir/v comprising the following steps. Separate storage from multiple peripheral storage devices (4). The remaining of the remaining storage space simulations allows a host to identify the storage space of the virtual storage device by enumeration as the sum of the remaining storage spaces. The storage device is intended to make the above-mentioned contents of the present invention more comprehensible, better embodiments, and in conjunction with the drawings, and the detailed description is as follows. [Embodiment] The present invention proposes a memory integration device and Ο A peripheral storage device establishes multiple block files, so that the remaining storage of multiple peripheral storage devices can be combined and reused without damaging the original data in the device, which greatly improves the efficiency. Please refer to FIG. 1 for a schematic diagram of a memory integration device, a peripheral storage device and a host according to a preferred embodiment of the present invention. The memory integration device no connects a plurality of peripheral storage devices 122 to 128 and a machine σ 130. The memory integration device 110 simulates at least part of the remaining storage space of the plurality of peripheral storage devices 22 to 28 as a virtual storage device for use by the host 130. The memory integration device 11 is, for example, a type of hub (Hub- Like the device 'or a card reader, etc. The peripheral storage devices 122 to 128 are, for example, a Universal Serial Bus (USB) disk, or a memory card. The memory integration device n〇 communicates with the host computer 13B via a USB transmission interface, for example, but is not limited thereto. Referring to FIG. 2, a block diagram of a memory integration device according to a preferred embodiment of the present invention is shown. The memory integration device 11() includes an executor unit 200, a storage manager unit 202, and a storage 5 201035769.
TW4821PA 存模擬(emulator)單元204、一資料讀取/寫入單元2〇6、__ 加密/解密單元208以及一匯流排驅動單元210。於記情體 整合裝置110中,執行單元200用以分別從多個周邊儲存 裝置,例如為周邊儲存裝置126,獲得多個區塊槽案,此 些區塊檔案各自佔據相對應的周邊儲存裝置之至少部份 剩餘儲存空間。 儲存管理單元202用以收集此些區塊檔案的標頭 (header)之資訊。儲存模擬單元204用以依據儲存管理單一 202所收集的此些區塊檔案之標頭資訊,模擬一虛擬儲= 裝置,使得主機130經由列舉而得以識別該虛擬儲存裴 置,虛擬儲存裝置之儲存空間為此些至少部份剩餘儲存空 間之總合。 1 匯流排驅動單元210係用以與主機130溝通而使得主 機130得以列舉此虛擬儲存裝置。匯流排驅動單元2ι〇例 如為一通用串列匯流排驅動單元,然並不限於此,端視記 憶體整合裝置110與主機130間之傳輸介面而定。 請同時配合參照第3A圖,其繪示依照本發明較佳實 施例之記憶體整合方法之一例之流程圖。於步驟S31〇中, 記憶體整合裝置110持續地偵測是否有新接入的周邊儲存 裝置。若於一預定時間後未偵測到新接入的周邊儲存裝 置,則如第1圖所示,記憶體整合裝置11〇所連接之周邊 儲存裝置仍為周邊儲存裝置122〜128。 當未偵測到新接入的周邊儲存裝置,則於步驟S32〇 申,執行單元200於多個周邊儲存裝置122〜128之至少部 份剩餘儲存空間分別建立相對應的區塊(chunk)檔案。其 201035769The TW4821PA memory emulator unit 204, a data read/write unit 2〇6, an encryption/decryption unit 208, and a bus drive unit 210. In the case-integration device 110, the execution unit 200 is configured to obtain a plurality of block slots from a plurality of peripheral storage devices, for example, the peripheral storage device 126, and each of the block files respectively occupy a corresponding peripheral storage device. At least part of the remaining storage space. The storage management unit 202 is configured to collect information about the headers of the block files. The storage simulation unit 204 is configured to simulate a virtual storage device according to the header information of the block files collected by the storage management unit 202, so that the host 130 can identify the virtual storage device by enumeration, and store the virtual storage device. The space is the sum of at least some of the remaining storage space. The bus drive unit 210 is adapted to communicate with the host 130 such that the host 130 can enumerate the virtual storage device. The bus driver unit 2 is, for example, a general-purpose serial bus driver unit, but is not limited thereto, and depends on the transmission interface between the memory unit 110 and the host 130. Please also refer to FIG. 3A, which illustrates a flow chart of an example of a memory integration method in accordance with a preferred embodiment of the present invention. In step S31, the memory integration device 110 continuously detects whether there is a newly accessed peripheral storage device. If the newly accessed peripheral storage device is not detected after a predetermined time, as shown in Fig. 1, the peripheral storage device to which the memory integration device 11 is connected is still the peripheral storage devices 122 to 128. If the newly accessed peripheral storage device is not detected, then in step S32, the execution unit 200 creates a corresponding chunk file for each of the remaining storage spaces of the plurality of peripheral storage devices 122-128. . Its 201035769
* -TW4821PA 令,此些區塊檔案的標頭之資訊包括相對應的周邊儲存裝 置之識別碼(identification)以及至少部份剩餘儲存空間之 大小’且該些識別碼可用以判斷是否所有區 齊二此外,由於執行軍元·係於各周邊儲存裝置之剩餘 儲存空間建立區塊檔案,故並未影響到周邊儲存裝置 122〜128内原有的資料。若欲讀取周邊儲存裝置⑵〜⑶ =資料,則可以單獨使用周邊儲存裝置一 Ο Ο 接著,於步驟S330中,儲存管理單元2〇 之資訊以構成一裝置描述符(―): 健存模擬單元綱依據儲存管理單元⑽ ::集訊所構成的裝置描述符,模擬一虛擬儲存 擬單存裝置。其中,儲存模 周據相對應的—讀取/寫人演算法將 ^儲存^置,=〜128之至少部份剩餘儲存空間模擬為虛 剩餘儲存空間之=儲存裝置之儲存空間為多個至少部份 資訊。二0 、⑽合。該區塊檔案的標頭可含有演算法的 擬儲ί二 =::對:具有較大儲存空間之虛 效率。 仏買取/寫入的動作,大幅提升記憶體的使用 憶體整’其繪示依照本發明較佳實施例之記 存裝置進行讀取^圖。當主機130欲對虛擬儲 胃取/寫入的動作時,於步驟S41〇中,執行單 7 201035769* - TW4821PA, the header information of the block files includes the identification of the corresponding peripheral storage device and the size of at least part of the remaining storage space 'and the identification codes can be used to determine whether all the zones are aligned In addition, since the execution military unit establishes the block file in the remaining storage space of each peripheral storage device, the original data in the peripheral storage devices 122 to 128 are not affected. If the peripheral storage device (2)~(3)=data is to be read, the peripheral storage device can be used separately. Next, in step S330, the information of the management unit 2 is stored to form a device descriptor (-): The unit outlines a virtual storage plan storage device according to the device descriptor formed by the storage management unit (10)::. Wherein, the storage module is correspondingly--the read/write algorithm is used to store the memory, and at least part of the remaining storage space is simulated as the virtual remaining storage space = the storage space of the storage device is at least Some information. 20, (10) combined. The header of the block file can contain the algorithm's proposed storage ί 2 =:: pair: virtual efficiency with large storage space. The operation of buying/writing greatly enhances the use of memory. The memory device is shown in the memory device in accordance with a preferred embodiment of the present invention. When the host 130 wants to take a virtual memory capture/write action, in step S41, the execution order is 7 201035769
TW4821PA 元200從周邊儲存驻 標頭,此些區心;: = 多個區塊楷案的 少部份剩餘健存空間。於步驟s42q:的周邊儲存裝置之至 收集此些區塊檔案的標頭之#訊=存管理單元202 案均到齊。於步驟S420中,儲存乾斷疋否所有區塊檔 判斷相對應於虛擬儲存裝置之目理單實質上係 案是否均到齊。 兩返付之所有區塊檔 122〜128至少’料示周邊儲存裝置 故回到步驟S4i〇,執行;連:到"己憶體整合裝置削, 122〜128分別獲得夕摘 重新從周邊儲存裝置 案到齊。若相對應二°置描有區塊權 =儲存裝置—^ 符以模擬相對應的虛擬_置擬=〇=”描述 而得以識別此虛擬儲存裝置。如此一來,== 據包含於區塊檔案的標頭之資訊: 虛擬儲存Μ進行讀取/寫人的動作。冑^异法’對 憶體照本發_佳實施例之記 隱體整口方法之再-例之流程圖。當主機 ::工:二步驟S51❻中,資料讀取/寫入單元2。: 自機30之一讀取/寫入指令。於步驟S520中, 資料讀取/寫入單元施依據相對應於的 ^判斷讀取/寫入指令所要傳送之周邊儲存褒置寫並將异讀 取寫入指令傳送至執行單元200。之後,於步驟S53〇中, 201035769 * 41 W482im 執灯單7G 20()對所要傳送之周邊儲存裝置執行相對應的讀 取/寫入動作。 舉例來說’主機130識別虛擬儲存裝置後,可對虛擬 裝置發出讀取/寫人指令,此讀取/寫人指令包括目標 >料的位址儲存模擬單元204將周邊儲存袭置122〜128 之至少部份剩餘料空間模擬為虛擬儲存裝置的同時,會 依據相對應的讀取/寫人演算法將周邊儲錢置122〜128 ο Ο 之至^箱剩餘儲存空間分別設定不同的位址。例如設定 位址0〜49對映至周邊儲存裝置122、設定位址50〜99對映 至周邊儲存裝置124、設定位址謂〜199對映至周邊儲存 ,置m、及設定位址2〇〇〜249對映至周邊儲存裝置⑶ ,然並不限於此m假設資料讀取/寫入單元 廉解析出目標資料位址為60’則可判斷出讀取/寫入指令 存f置存裝置124。然:後’執行單元2GG對周邊儲 裝置124執行相對應的讀取/寫入動作。 ^於執行單元可同時對多個周邊儲存裝置進行 t it的提高周邊料裝置輸人/輸出的 ^使付資料存取的速度增加。當執行單元· 邊错存裝置m〜m所讀取之資料傳送至資料讀 用 後,資料讀取/寫入單元206依據資料讀取/寫入 =异法組合從各周邊儲存裝置所得料#料 =裝置爾據來自主機⑽之―資料要求(datare: 扣7,將組合後之資料輸出至主機13〇。 此外,加密/解密單元208絲接於資料讀取/寫 π寫及執行單元200之間,用以對讀取/寫入指令所存取 9 201035769The TW4821PA element 200 stores the resident headers from the periphery, such areas;; = a small portion of the remaining storage space of multiple block files. In the case of the peripheral storage device of step s42q:, the headers of the headers of the collection of the block files are all aligned. In step S420, whether or not all the block files are stored is determined to determine whether the system corresponding to the virtual storage device is substantially in line. All the block files 122~128 of the two paybacks at least 'represent the peripheral storage device, so go back to step S4i〇, execute; connect: to "remembered body integrated device, 122~128 respectively get the eve picking again from the peripheral storage device The case is on. If the corresponding two-degree description has a block weight=storage device-^ character to simulate the corresponding virtual_imposition=〇=” description, the virtual storage device is identified. Thus, the== data is included in the block. The information of the header of the file: virtual storage Μ read / write the action of the person. 胄 ^ different method 'to remember the body according to the hair _ good example of the hidden method of the whole mouth - the flow chart of the example. Host:: worker: two steps S51, data read/write unit 2.: one read/write instruction of one of the machines 30. In step S520, the data read/write unit is applied according to ^ Judging the peripheral storage write to be transmitted by the read/write command and transmitting the exclusive read write command to the execution unit 200. Thereafter, in step S53, 201035769 * 41 W482im license lamp 7G 20() pair The peripheral storage device to be transmitted performs a corresponding read/write operation. For example, after the host 130 identifies the virtual storage device, a read/write command can be issued to the virtual device, and the read/write command includes the target. > address storage simulation unit 204 will store the surrounding storage 122~128 A small part of the remaining material space is simulated as a virtual storage device, and the corresponding storage address is set to 122~128 ο 依据 to the remaining storage space of the box according to the corresponding read/write person algorithm. For example, the set addresses 0 to 49 are mapped to the peripheral storage device 122, the set addresses 50 to 99 are mapped to the peripheral storage device 124, and the set address is 199 to the surrounding storage, and the m and the set address are set. 〇~249 is mapped to the peripheral storage device (3), but it is not limited to this m. If the data read/write unit is parsed, the target data address is 60', then the read/write command can be judged to be stored. 124. After: the 'execution unit 2GG performs a corresponding read/write operation on the peripheral storage device 124. ^ The execution unit can simultaneously perform a plurality of peripheral storage devices to improve the input/output of the peripheral device. The speed of the data access is increased. When the data read by the execution unit and the side misregistering device m~m is transferred to the data reading, the data reading/writing unit 206 reads/writes according to the data. Method combination of materials from each peripheral storage device #料=装置According to the data request from the host (10) (datare: deduction 7, the combined data is output to the host 13A. In addition, the encryption/decryption unit 208 is wired between the data read/write π write and execution unit 200, Accessed by read/write instructions 9 201035769
TW4821PA 之資料進行加密/解密的動作。如此一來,可是提升資料保 密的安全性。 本發明上述實施例所揭露之記憶體整合裝置及方 法,係分別於多個周邊儲存裝置之至少部份剩餘儲存空間 建立多個相對應的區塊檔案,故可在不破壞周邊儲存裝置 内原有資料的情況下,模擬出一虛擬儲存裝置以供主機識 別及使用。亦即,上述之記憶體整合裝置及方法對多個周 邊儲存裝置之至少部份剩餘儲存空間進行合併再利用,大 幅提升記憶體的使用效率。而由於可對讀取/寫入指令所存 取之資料進行加密/解密的動作,提升了資料保密性。更進 一步地,每一個周邊儲存裝置内的區塊檔案可以被複製到 主機内保存,使得資料的備份變得更容易。 綜上所述,雖然本發明已以一較佳實施例揭露如上, 然其並非用以限定本發明。本發明所屬技術領域中具有通 常知識者,在不脫離本發明之精神和範圍内,當可作各種 之更動與潤飾。因此,本發明之保護範圍當視後附之申請 專利範圍所界定者為準。 【圖式簡單說明】 第1圖繪示依照本發明較佳實施V列之記憶體整合裝 置、周邊儲存裝置及主機之示意圖。 第2圖繪示依照本發明較佳實施例之記憶體整合裝 置之方塊圖。 第3A圖繪示依照本發明較佳實施例之記憶體整合方 法之一例之流程圖。 第3B圖繪示依照本發明較佳實施例之記憶體整合方 201035769The TW4821PA data is encrypted/decrypted. As a result, the security of data confidentiality is enhanced. The memory integration device and method disclosed in the above embodiments of the present invention respectively establish a plurality of corresponding block files in at least part of the remaining storage space of the plurality of peripheral storage devices, so that the original storage device can be destroyed without destroying the original storage device. In the case of data, a virtual storage device is simulated for identification and use by the host. That is, the memory integration device and method described above combine and reuse at least a portion of the remaining storage space of the plurality of peripheral storage devices to greatly improve the use efficiency of the memory. The confidentiality of the data is enhanced by the ability to encrypt/decrypt the data stored in the read/write command. Further, the block files in each of the peripheral storage devices can be copied to the host for storage, making backup of the data easier. In view of the above, the present invention has been disclosed in a preferred embodiment, and is not intended to limit the present invention. It will be apparent to those skilled in the art that various changes and modifications can be made without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic view showing a memory integration device, a peripheral storage device, and a host in accordance with a preferred embodiment of the present invention. Figure 2 is a block diagram of a memory integrating device in accordance with a preferred embodiment of the present invention. 3A is a flow chart showing an example of a memory integration method in accordance with a preferred embodiment of the present invention. FIG. 3B illustrates a memory integration party in accordance with a preferred embodiment of the present invention 201035769
* U W4521FA 法之另一例之流程圖。 第3C圖繪示依照本發明較佳實施例之記憶體整合方 法之再一例之流程圖。 【主要元件符號說明】 110 :記憶體整合裝置 122〜128 :周邊儲存裝置 130 :主機 200 :執行單元 ❹ 202 :儲存管理單元 204 :儲存模擬單元 206 :資料讀取/寫入單元 208 :加密/解密單元 210 :匯流排驅動單元 S310〜S340、S410~S430、S510〜S530 :步驟* Flowchart for another example of the U W4521FA method. Figure 3C is a flow chart showing still another example of a memory integration method in accordance with a preferred embodiment of the present invention. [Main component symbol description] 110: Memory integration device 122 to 128: Peripheral storage device 130: Host 200: Execution unit 202: Storage management unit 204: Storage simulation unit 206: Data reading/writing unit 208: Encryption/ Decryption unit 210: bus drive units S310~S340, S410~S430, S510~S530: steps
1111