CN102902487B - Hard disc data access system - Google Patents
Hard disc data access system Download PDFInfo
- Publication number
- CN102902487B CN102902487B CN201110208709.7A CN201110208709A CN102902487B CN 102902487 B CN102902487 B CN 102902487B CN 201110208709 A CN201110208709 A CN 201110208709A CN 102902487 B CN102902487 B CN 102902487B
- Authority
- CN
- China
- Prior art keywords
- data
- hard disk
- root directory
- storage area
- module
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 6
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种硬盘数据存取方法,包括以下步骤:建立步骤:在计算机的扇区存储容量为预设值的第一硬盘中建立一个第二硬盘根目录,并在扇区存储容量不为该预设值的第二硬盘中建立一个记录表,该记录表用于记录各个数据在该第二硬盘中的存储区域;第二硬盘数据存取步骤:当用户向该第二硬盘根目录中存储数据、访问数据或删除数据时,以该第一硬盘为数据中转站将该数据存储至该第二硬盘中、或从该第二硬盘中访问该数据或删除该数据。本发明还提供一种硬盘数据存取系统。利用本发明可以实现对扇区存储容量不为512Byte的硬盘的数据存取。
A hard disk data access method, comprising the following steps: Establishing step: establishing a second hard disk root directory in the first hard disk whose sector storage capacity of the computer is a preset value, and setting up a second hard disk root directory when the sector storage capacity is not the preset value Set up a recording table in the second hard disk of value, and this recording table is used for recording the storage area of each data in this second hard disk; The second hard disk data access step: when the user stores data in this second hard disk root directory, When accessing data or deleting data, use the first hard disk as a data transfer station to store the data in the second hard disk, or access the data or delete the data from the second hard disk. The invention also provides a hard disk data access system. The invention can realize the data access to the hard disk whose sector storage capacity is not 512Byte.
Description
技术领域technical field
本发明涉及一种数据存取系统,特别涉及一种硬盘数据存取系统。The invention relates to a data access system, in particular to a hard disk data access system.
背景技术Background technique
传统硬盘一般以512Byte为单元等分磁道得到扇区,因此每个扇区的存储容量为512Byte。目前许多种扇区存储容量不为512Byte的硬盘已逐渐问世,如扇区的存储容量为520Byte的硬盘、扇区存储容量为4096Byte的硬盘,等等。由于兼容性的问题,一些操作系统如WindowsXP、Linux等操作系统中没有扇区存储容量不为512Byte的硬盘对应的驱动程序,因而这些操作系统不支持对扇区存储容量不为512Byte的硬盘的数据存取。虽然修改操作系统中硬盘对应的驱动程序可以实现对扇区存储容量不为512Byte的硬盘的数据存取,但随着硬盘因扇区存储容量的不同而种类越来越多,修改硬盘对应的驱动程序也很难使操作系统支持对所有种类的硬盘的数据存取。Traditional hard disks generally use 512Byte as the unit to divide the track into sectors equally, so the storage capacity of each sector is 512Byte. At present, many kinds of hard disks with a sector storage capacity of not 512 Byte have gradually come out, such as hard disks with a sector storage capacity of 520 Byte, hard disks with a sector storage capacity of 4096 Byte, and so on. Due to compatibility issues, some operating systems such as WindowsXP, Linux and other operating systems do not have drivers corresponding to hard disks with a sector storage capacity other than 512Byte. access. Although modifying the driver corresponding to the hard disk in the operating system can realize data access to the hard disk with a sector storage capacity of not 512Byte, but as the types of hard disks increase due to different sector storage capacities, modifying the corresponding driver of the hard disk It is also difficult for the program to make the operating system support data access to all kinds of hard disks.
发明内容Contents of the invention
鉴于以上内容,有必要提供一种硬盘存取系统,可以以扇区存储容量为预设值的第一硬盘作为数据中转站,实现操作系统对扇区存储容量不为该预设值的第二硬盘的数据存取。In view of the above, it is necessary to provide a hard disk access system, which can use the first hard disk with the sector storage capacity as the preset value as a data transfer station to realize the operating system's second hard disk whose sector storage capacity is not the preset value. Hard disk data access.
一种硬盘数据存取系统,包括:建立模块,用于在计算机的扇区存储容量为预设值的第一硬盘中建立一个第二硬盘根目录,并在扇区存储容量不为该预设值的第二硬盘中建立一个记录表,该记录表用于记录各个数据在该第二硬盘中的存储区域;及第二硬盘数据存取模块,用于当用户向该第二硬盘根目录中存储数据、访问数据或删除数据时,以该第一硬盘为数据中转站将该数据存储至该第二硬盘中、或从该第二硬盘中访问该数据或删除该数据。A hard disk data access system, comprising: a building module, which is used to create a second hard disk root directory in the first hard disk whose sector storage capacity of the computer is a preset value, and when the sector storage capacity is not the preset value Set up a recording table in the second hard disk of value, and this recording table is used for recording the storage area of each data in this second hard disk; When storing data, accessing data or deleting data, use the first hard disk as a data transfer station to store the data in the second hard disk, or access the data or delete the data from the second hard disk.
相较于现有技术,本发明硬盘存取系统,可以以扇区存储容量为预设值(如512Byte)的第一硬盘作为数据中转站,实现操作系统对扇区存储容量不为该预设值的第二硬盘的数据存取。Compared with the prior art, the hard disk access system of the present invention can use the first hard disk with a sector storage capacity as a preset value (such as 512 Byte) as a data transfer station, so that the operating system does not set the sector storage capacity as the preset value. value for data access on the second hard drive.
附图说明Description of drawings
图1是本发明硬盘数据存取系统较佳实施例的运行环境图。FIG. 1 is an operating environment diagram of a preferred embodiment of the hard disk data access system of the present invention.
图2是本发明硬盘数据存取系统较佳实施例的功能模块图。Fig. 2 is a functional block diagram of a preferred embodiment of the hard disk data access system of the present invention.
图3是图1中记录表的一个示例图。FIG. 3 is an example diagram of the record table in FIG. 1 .
图4是本发明硬盘数据存取方法存储数据较佳实施例的流程图。Fig. 4 is a flow chart of a preferred embodiment of the hard disk data access method for storing data in the present invention.
图5是本发明硬盘数据存取方法访问数据较佳实施例的流程图。FIG. 5 is a flow chart of a preferred embodiment of the hard disk data access method of the present invention for accessing data.
图6是本发明硬盘数据存取方法删除数据较佳实施例的流程图。FIG. 6 is a flow chart of a preferred embodiment of the hard disk data access method of the present invention for deleting data.
主要元件符号说明Description of main component symbols
如下具体实施方式将结合上述附图进一步说明本发明。The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings.
具体实施方式detailed description
参阅图1所示,是本发明硬盘数据存取系统较佳实施例的运行环境图。在本实施例中,该硬盘数据存取系统10应用于计算机100中,该计算机100包括一个扇区存储容量为512字节(Byte)的第一硬盘(以下简称“512硬盘”)1,以及一个扇区存储容量不为512Byte的第二硬盘(以下简称“非512硬盘”)2。该512硬盘1与该非512硬盘2通信连接。Referring to FIG. 1 , it is an operating environment diagram of a preferred embodiment of the hard disk data access system of the present invention. In the present embodiment, the hard disk data access system 10 is applied in a computer 100, and the computer 100 includes a first hard disk (hereinafter referred to as "512 hard disk") 1 with a sector storage capacity of 512 bytes (Byte), and A second hard disk with a sector storage capacity of not 512 Bytes (hereinafter referred to as "non-512 hard disk") 2 . The 512 hard disk 1 is communicatively connected with the non-512 hard disk 2 .
所述硬盘数据存取系统10存储于该512硬盘1中,该512硬盘1中还安装有操作系统11。该操作系统11中有512硬盘1对应的驱动程序,该驱动程序使操作系统11可以对512硬盘1中的数据进行存取。同时,由于操作系统11中没有非512硬盘2对应的驱动程序,操作系统11无法直接对非512硬盘2中的数据进行存取。所述数据为目录或文件。该目录为树形结构,即父目录可包含子目录,子目录中可包含文件。该文件可以是音频、文本文档、视频等。The hard disk data access system 10 is stored in the 512 hard disk 1 , and an operating system 11 is also installed in the 512 hard disk 1 . The operating system 11 has a driver corresponding to the 512 hard disk 1 , and the driver enables the operating system 11 to access data in the 512 hard disk 1 . At the same time, since the operating system 11 does not have a driver corresponding to the non-512 hard disk 2, the operating system 11 cannot directly access the data in the non-512 hard disk 2. The data is a directory or a file. The directory is a tree structure, that is, the parent directory can contain subdirectories, and the subdirectories can contain files. The file can be audio, text document, video, etc.
在512硬盘1中建立有一个非512硬盘根目录12(或称为第二硬盘根目录12),该非512硬盘根目录12为非512硬盘2的对应视窗,即在用户看来,非512硬盘2为512硬盘1中的一个文件夹,即非512硬盘根目录12。若用户向该非512硬盘根目录12中存储数据,则表示用户希望向该非512硬盘2中存储数据。In the 512 hard disk 1, a non-512 hard disk root directory 12 (or called the second hard disk root directory 12) is set up. The hard disk 2 is a folder in the 512 hard disk 1, that is, it is not the root directory 12 of the 512 hard disk. If the user stores data in the root directory 12 of the non-512 hard disk, it means that the user wishes to store data in the non-512 hard disk 2 .
硬盘数据存取系统10用于建立所述非512硬盘根目录12,以及当用户向该非512硬盘根目录12中存取数据时,以512硬盘1为数据中转站将该数据存入非512硬盘2中,或从非512硬盘2中读取该数据。The hard disk data access system 10 is used to set up the non-512 hard disk root directory 12, and when the user accesses data in the non-512 hard disk root directory 12, the data is stored in the non-512 hard disk 1 with the 512 hard disk 1 as a data transfer station. Hard disk 2, or read the data from non-512 hard disk 2.
参阅图2所示,是本发明硬盘数据存取系统较佳实施例的功能模块图。该硬盘数据存取系统10包括建立模块101、获取模块102、第一判断模块103、查找模块104、第一转移模块105、记录模块106、查询模块107、第二转移模块108、第二判断模块109和删除模块110。本实施例中所称的模块是完成一特定功能的程序段,比程序更适合于描述软件在计算机100中的执行过程。在其他实施例中,也可以将模块102-110合在一起命名为一个模块,如第二硬盘数据存取模块。Referring to FIG. 2 , it is a functional block diagram of a preferred embodiment of the hard disk data access system of the present invention. The hard disk data access system 10 includes a building module 101, an acquisition module 102, a first judgment module 103, a search module 104, a first transfer module 105, a record module 106, a query module 107, a second transfer module 108, and a second judgment module 109 and delete module 110. The module referred to in this embodiment is a program segment that completes a specific function, and is more suitable for describing the execution process of software in the computer 100 than a program. In other embodiments, the modules 102-110 can also be collectively named as one module, such as the second hard disk data access module.
建立模块101用于在512硬盘1中建立所述非512硬盘根目录12,并在非512硬盘2中建立一个记录表20。记录表20的初始内容为空。由于非512硬盘2以链式存储的方式存储数据,因此一个数据可能存储在非512硬盘2的若干个存储区域中,记录表20用于记录各个数据在非512硬盘2的各存储区域的起始地址和终止地址。The establishment module 101 is used to establish the non-512 hard disk root directory 12 in the 512 hard disk 1, and establish a record table 20 in the non-512 hard disk 2. The initial content of the record table 20 is empty. Since the non-512 hard disk 2 stores data in a chained storage mode, a data may be stored in several storage areas of the non-512 hard disk 2, and the recording table 20 is used to record each data from the beginning of each storage area of the non-512 hard disk 2. start address and end address.
如图3所示,是记录表20的一个示例图。该记录表20中记录着目录A在非512硬盘2中的存储区域。该目录A中包含文件a,该文件a存储在非512硬盘2中的两个存储区域中,第一个存储区域的起始地址为**00,终止地址为**01,而第二个存储区域的起始地址为**05,终止地址为**07。As shown in FIG. 3 , it is an example diagram of the recording table 20 . The recording table 20 records the storage area of the directory A in the non-512 hard disk 2 . This directory A contains file a, which is stored in two storage areas in non-512 hard disk 2, the start address of the first storage area is **00, the end address is **01, and the second storage area The start address of the storage area is **05, and the end address is **07.
获取模块102用于当用户向非512硬盘根目录12中存储第一数据时,获取该第一数据的名称和大小,并为该第一数据分配相应的ID号。该第一数据可以为目录或文件。若该第一数据为文件,则获取模块102为该文件分配相应的ID号,若该第一数据为目录,则获取模块102为该目录以及该目录下的所有子目录和文件都分别分配相应的ID号。The obtaining module 102 is used for obtaining the name and size of the first data when the user stores the first data in the root directory 12 of the non-512 hard disk, and assigning a corresponding ID number to the first data. The first data may be a directory or a file. If the first data is a file, the obtaining module 102 assigns a corresponding ID number to the file; ID number.
第一判断模块103用于读取记录表20中的内容,并根据该内容和该第一数据的大小判断非512硬盘2是否有足够的可用存储空间存储该第一数据。具体而言,由于记录表20中记录了存储在非512硬盘2中的所有数据在非512硬盘2中的存储区域,即记录表20记录了非512硬盘2已使用的存储空间,将非512硬盘2的总存储空间减去该已使用的存储空间,即可得到非512硬盘2的可用存储空间。若非512硬盘2的可用存储空间大于该第一数据的大小,则判断非512硬盘2有足够的可用存储空间存储该第一数据。The first judging module 103 is used to read the content in the recording table 20, and judge whether the non-512 hard disk 2 has enough available storage space to store the first data according to the content and the size of the first data. Specifically, since the recording table 20 records the storage area of all data stored in the non-512 hard disk 2 in the non-512 hard disk 2, that is, the recording table 20 records the used storage space of the non-512 hard disk 2, the non-512 The available storage space of the non-512 hard disk 2 can be obtained by subtracting the used storage space from the total storage space of the hard disk 2 . If the available storage space of the non-512 hard disk 2 is greater than the size of the first data, it is determined that the non-512 hard disk 2 has enough available storage space to store the first data.
查找模块104用于当非512硬盘2有足够的可用存储空间存储该第一数据时,根据记录表20的内容从非512硬盘2中找出用于存储该第一数据的存储区域。The search module 104 is used to find the storage area for storing the first data from the non-512 hard disk 2 according to the content of the record table 20 when the non-512 hard disk 2 has enough available storage space to store the first data.
根据记录表20中非512硬盘2已使用的存储空间的记录,可计算出非512硬盘2的可用存储空间。由于非512硬盘2中的数据可能以不连续的方式存储,因此所述可用存储空间可能由不连续的一系列存储区块组成。例如图3所示,文件a在非512硬盘2中的第一个存储区域的起始地址为**00,终止地址为**01,第二个存储区域的起始地址为**05,终止地址为**07,在该第一个存储区域和第二个存储区域之间因没有存储数据而形成一个存储区块,该存储区块的起始地址即为该第一个存储区域的终止地址,而该存储区块的终止地址即为该第二个存储区域的起始地址。According to the record of the storage space used by the non-512 hard disk 2 in the recording table 20, the available storage space of the non-512 hard disk 2 can be calculated. Since the data in the non-512 hard disk 2 may be stored discontinuously, the available storage space may be composed of a series of discontinuous storage blocks. For example, as shown in Figure 3, the start address of the first storage area of file a in the non-512 hard disk 2 is **00, the end address is **01, the start address of the second storage area is **05, The end address is **07, a storage block is formed between the first storage area and the second storage area because there is no data stored, and the starting address of the storage block is the address of the first storage area end address, and the end address of the storage block is the start address of the second storage area.
查找模块104根据记录表20的记录可分别得出该一系列存储区块的起始地址和终止地址,从而遍历该一系列存储区块。当有存储区块足够存储该第一数据时,查找模块104根据该第一数据的大小从该存储区块中找出一块区域作为该数据的存储区域,例如该存储区域的起始地址为该存储区块的起始地址,该存储区域的终止地址为该存储区域的起始地址加上该第一数据的大小。若该一系列存储区块中没有任何一个存储区块足够存储该第一数据,则查找模块104从该一系列存储区块找出若干个存储区块,该若干个存储区块组成的存储空间足够存储该第一数据,查找模块104根据该第一数据的大小从该若干个存储区块中找出用于存储该数据的存储区域。The search module 104 can respectively obtain the start address and the end address of the series of storage blocks according to the records of the recording table 20, thereby traversing the series of storage blocks. When there is a storage block enough to store the first data, the search module 104 finds an area from the storage block as the storage area of the data according to the size of the first data, for example, the starting address of the storage area is the The start address of the storage block, the end address of the storage area is the start address of the storage area plus the size of the first data. If none of the series of storage blocks is sufficient to store the first data, the search module 104 finds several storage blocks from the series of storage blocks, and the storage space formed by the several storage blocks Enough to store the first data, the search module 104 finds a storage area for storing the data from the several storage blocks according to the size of the first data.
第一转移模块105用于从非512硬盘根目录12中读取该第一数据,通过SCSI(SmallComputerSystemInterface,小型计算机系统接口)命令将该第一数据转移到查找模块104找到的用于存储该第一数据的存储区域中,并在非512硬盘根目录12中保存该第一数据的标记,该标记包括第一数据的ID号和名称等属性。当用户访问第一数据的标记时,即可访问该第一数据。例如,该第一数据是一段视频,第一数据的标记是该视频的图标,当用户点击该图标时,可以启动播放该视频。The first transfer module 105 is used for reading the first data from the non-512 hard disk root directory 12, and transfers the first data to the search module 104 for storing the first data by a SCSI (SmallComputerSystemInterface, small computer system interface) command. In the storage area of a data, the mark of the first data is stored in the non-512 hard disk root directory 12, and the mark includes attributes such as ID number and name of the first data. When the user accesses the mark of the first data, the first data can be accessed. For example, the first data is a piece of video, and the mark of the first data is an icon of the video. When the user clicks on the icon, the video can be started to be played.
记录模块106用于将该第一数据的名称和ID号,以及该第一数据在非512硬盘2中的所有存储区域的起始地址和终止地址记录在记录表20中。The recording module 106 is used to record the name and ID number of the first data, and the start addresses and end addresses of all storage areas of the first data in the non-512 hard disk 2 in the record table 20 .
获取模块102还用于当用户访问非512硬盘根目录12中的第二数据的标记时,获取该第二数据的ID号。该访问包括查看或修改该第二数据。The obtaining module 102 is also used to obtain the ID number of the second data when the user accesses the mark of the second data in the root directory 12 of the non-512 hard disk. The access includes viewing or modifying the second data.
查询模块107用于根据该第二数据的ID号在记录表20中查询该第二数据在非512硬盘2中所有存储区域的起始地址和终止地址。The query module 107 is used to query the start addresses and end addresses of all storage areas of the second data in the non-512 hard disk 2 in the record table 20 according to the ID number of the second data.
第二转移模块108用于根据该第二数据在非512硬盘2中所有存储区域的起始地址和终止地址从非512硬盘2中读取该第二数据,并将该第二数据转移到非512硬盘根目录12中,供用户对该第二数据进行访问。The second transfer module 108 is used to read the second data from the non-512 hard disk 2 according to the start address and the end address of all storage areas of the second data in the non-512 hard disk 2, and transfer the second data to the non-512 hard disk 2. 512 In the root directory 12 of the hard disk, for the user to access the second data.
第二判断模块109用于当用户停止访问该第二数据时,例如用户关闭作为第二数据的视频或应用程序等,判断该第二数据在非512硬盘根目录12中是否已被修改。The second judging module 109 is used for judging whether the second data has been modified in the non-512 hard disk root directory 12 when the user stops accessing the second data, for example, the user closes the video or application as the second data.
第一转移模块105还用于当第二判断模块109判断该第二数据在非512硬盘根目录12中已被修改时,将修改后的该第二数据转移到非512硬盘2中,并由记录模块106修改该第二数据在记录表20中的记录,包括该第二数据在非512硬盘2中的存储区域的起始地址和终止地址。The first transfer module 105 is also used to transfer the modified second data to the non-512 hard disk 2 when the second judging module 109 judges that the second data has been modified in the root directory 12 of the non-512 hard disk, and by The record module 106 modifies the record of the second data in the record table 20 , including the start address and end address of the storage area of the second data in the non-512 hard disk 2 .
第一转移模块105还用于当第二判断模块109判断该第二数据在非512硬盘根目录12中未被修改时,直接将该第二数据转移到非512硬盘2中。The first transfer module 105 is further configured to directly transfer the second data to the non-512 hard disk 2 when the second judging module 109 judges that the second data has not been modified in the root directory 12 of the non-512 hard disk.
获取模块102还用于当用户删除非512硬盘根目录12中的第三数据的标记时,获取该第三数据的ID号。The obtaining module 102 is also used to obtain the ID number of the third data when the user deletes the mark of the third data in the root directory 12 of the non-512 hard disk.
查询模块107还用于根据该第三数据的ID号在记录表20中查询该第三数据在非512硬盘2中所有存储区域的起始地址和终止地址。The query module 107 is also used to query the start address and end address of all storage areas of the third data in the non-512 hard disk 2 in the recording table 20 according to the ID number of the third data.
删除模块110用于根据该第三数据在非512硬盘2中所有存储区域的起始地址和终止地址,在非512硬盘2中找到并删除该第三数据,同时删除该第三数据在记录表20中的所有记录,包括该第三数据的名称和ID号,以及该第三数据在非512硬盘2中所有存储区域的起始地址和终止地址。The deletion module 110 is used to find and delete the third data in the non-512 hard disk 2 according to the start address and the end address of all storage areas of the third data in the non-512 hard disk 2, and delete the third data in the recording table simultaneously. All records in 20 include the name and ID number of the third data, and the start address and end address of all storage areas of the third data in the non-512 hard disk 2 .
参阅图4所示,是本发明硬盘数据存取方法存储数据较佳实施例的流程图。Referring to FIG. 4 , it is a flowchart of a preferred embodiment of the hard disk data access method for storing data according to the present invention.
在进入步骤S11前,建立模块101先在512硬盘1中建立所述非512硬盘根目录12,并在非512硬盘2中建立记录表20。该记录表20的初始内容为空。该记录表20用于记录各个数据在非512硬盘2的各存储区域的起始地址和终止地址。Before entering step S11, the establishment module 101 first establishes the non-512 hard disk root directory 12 in the 512 hard disk 1, and establishes the record table 20 in the non-512 hard disk 2. The initial content of the record table 20 is empty. The record table 20 is used to record the start address and end address of each data in each storage area of the non-512 hard disk 2 .
步骤S11,当用户向非512硬盘根目录12中存储第一数据时,获取模块102获取该第一数据的名称和大小,并为该第一数据分配相应的ID号。Step S11, when the user stores the first data in the root directory 12 of the non-512 hard disk, the obtaining module 102 obtains the name and size of the first data, and assigns a corresponding ID number to the first data.
步骤S12,第一判断模块103读取记录表20中的内容,并根据该内容和该第一数据的大小判断非512硬盘2是否有足够的可用存储空间存储该第一数据。若非512硬盘2有足够的可用存储空间存储该第一数据,则进入步骤S13,若非512硬盘2没有足够的可用存储空间存储该第一数据,则结束流程。Step S12, the first judging module 103 reads the content in the recording table 20, and judges whether the non-512 hard disk 2 has enough available storage space to store the first data according to the content and the size of the first data. If it is not 512 that the hard disk 2 has enough available storage space to store the first data, then go to step S13, and if it is not 512 that the hard disk 2 does not have enough available storage space to store the first data, then end the process.
步骤S13,查找模块104根据记录表20的内容从非512硬盘2中找出用于存储该第一数据的存储区域。Step S13 , the search module 104 finds the storage area for storing the first data from the non-512 hard disk 2 according to the content of the recording table 20 .
步骤S14,第一转移模块105从非512硬盘根目录12中读取该第一数据,通过SCSI命令将该第一数据转移到所述用于存储该第一数据的存储区域,并在非512硬盘根目录12中保存该第一数据标记。Step S14, the first transfer module 105 reads the first data from the non-512 hard disk root directory 12, transfers the first data to the storage area for storing the first data by SCSI commands, and in the non-512 The first data mark is stored in the root directory 12 of the hard disk.
步骤S15,记录模块106将该第一数据的名称和ID号,以及该第一数据在非512硬盘2中的所有存储区域的起始地址和终止地址记录在记录表20中。Step S15 , the recording module 106 records the name and ID number of the first data, and the start addresses and end addresses of all storage areas of the first data in the non-512 hard disk 2 in the record table 20 .
参阅图5所示,是本发明硬盘数据存取方法访问数据较佳实施例的流程图。Referring to FIG. 5 , it is a flow chart of a preferred embodiment of the hard disk data access method of the present invention for accessing data.
步骤S21,当访问非512硬盘根目录12中的第二数据的标记时,获取模块102获取该第二数据的ID号。Step S21, when accessing the tag of the second data in the root directory 12 of the non-512 hard disk, the obtaining module 102 obtains the ID number of the second data.
步骤S22,查询模块107根据该第二数据的ID号在记录表20中查询该第二数据在非512硬盘2中所有存储区域的起始地址和终止地址。In step S22 , the query module 107 searches the recording table 20 for the start addresses and end addresses of all storage areas of the second data in the non-512 hard disk 2 according to the ID number of the second data.
步骤S23,第二转移模块108根据该第二数据在非512硬盘2中所有存储区域的起始地址和终止地址从非512硬盘2中读取该第二数据,并将该第二数据转移到非512硬盘根目录12中,供用户对该第二数据进行访问。Step S23, the second transfer module 108 reads the second data from the non-512 hard disk 2 according to the start address and the end address of all storage areas of the second data in the non-512 hard disk 2, and transfers the second data to The non-512 hard disk root directory 12 is for users to access the second data.
步骤S24,当用户停止访问该第二数据时,第二判断模块109判断该第二数据在非512硬盘根目录12中是否已被修改。若该第二数据在非512硬盘根目录12中已被修改,则进入步骤S25。若该第二数据在非512硬盘根目录12中未被修改,则进入步骤S26。Step S24, when the user stops accessing the second data, the second judging module 109 judges whether the second data has been modified in the root directory 12 of the non-512 hard disk. If the second data has been modified in the non-512 hard disk root directory 12, go to step S25. If the second data has not been modified in the non-512 hard disk root directory 12, go to step S26.
步骤S25,第一转移模块105将修改后的该第二数据转移到非512硬盘2,并由记录模块106修改该第二数据在记录表20中的记录,包括该第二数据在非512硬盘2中的存储区域的起始地址和终止地址。Step S25, the first transfer module 105 transfers the modified second data to the non-512 hard disk 2, and the recording module 106 modifies the record of the second data in the recording table 20, including the second data in the non-512 hard disk. The start address and end address of the storage area in 2.
步骤S26,第一转移模块105直接将该第二数据转移到非512硬盘2中。Step S26, the first transfer module 105 directly transfers the second data to the non-512 hard disk 2 .
参阅图6所示,是本发明硬盘数据存取方法删除数据较佳实施例的流程图。Referring to FIG. 6 , it is a flow chart of a preferred embodiment of the hard disk data access method of the present invention for deleting data.
步骤S31,当用户删除非512硬盘根目录12中的第三数据的标记时,获取模块102获取该第三数据的ID号。Step S31 , when the user deletes the mark of the third data in the non-512 root directory 12 of the hard disk, the obtaining module 102 obtains the ID number of the third data.
步骤S32,查询模块107根据该第三数据的ID号在记录表20中查询该第三数据在非512硬盘2中所有存储区域的起始地址和终止地址。In step S32, the query module 107 searches the recording table 20 for the start addresses and end addresses of all storage areas of the third data in the non-512 hard disk 2 according to the ID number of the third data.
步骤S33,删除模块110根据该第三数据在非512硬盘2中所有存储区域的起始地址和终止地址在非512硬盘2中找到并删除该第三数据,同时删除该第三数据在记录表20中的所有记录,包括该第三数据的名称和ID号,以及该第三数据在非512硬盘2中所有存储区域的起始地址和终止地址。Step S33, the deletion module 110 finds and deletes the third data in the non-512 hard disk 2 according to the start address and the end address of all storage areas of the third data in the non-512 hard disk 2, and deletes the third data in the recording table simultaneously. All records in 20 include the name and ID number of the third data, and the start address and end address of all storage areas of the third data in the non-512 hard disk 2 .
在本实施例中,是以第一硬盘1的扇区存储容量为512Byte,第二硬盘2的扇区存储容量为非512Byte为例进行举例说明的。本领域技术人员应当可以了解,该第一硬盘1的扇区存储容量也可以为其他预设值,如4096Byte,则第二硬盘2的扇区存储容量为非4096Byte。In this embodiment, the sector storage capacity of the first hard disk 1 is 512 Byte, and the sector storage capacity of the second hard disk 2 is not 512 Byte as an example for illustration. Those skilled in the art should understand that the sector storage capacity of the first hard disk 1 can also be other preset values, such as 4096 Byte, and the sector storage capacity of the second hard disk 2 is not 4096 Byte.
以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced. Without departing from the spirit and scope of the technical solution of the present invention.
Claims (2)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110208709.7A CN102902487B (en) | 2011-07-25 | 2011-07-25 | Hard disc data access system |
| TW100126920A TWI483108B (en) | 2011-07-25 | 2011-07-29 | Method and system for storing and accessing data of hard disk |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110208709.7A CN102902487B (en) | 2011-07-25 | 2011-07-25 | Hard disc data access system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102902487A CN102902487A (en) | 2013-01-30 |
| CN102902487B true CN102902487B (en) | 2016-06-08 |
Family
ID=47574738
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201110208709.7A Expired - Fee Related CN102902487B (en) | 2011-07-25 | 2011-07-25 | Hard disc data access system |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102902487B (en) |
| TW (1) | TWI483108B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110909354A (en) * | 2019-11-29 | 2020-03-24 | 四川效率源信息安全技术股份有限公司 | Method for cleaning malicious codes in firmware area of Western digital hard disk |
| CN111338576A (en) * | 2020-02-20 | 2020-06-26 | 深圳供电局有限公司 | A big data storage system and method |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7085480B1 (en) * | 1998-03-14 | 2006-08-01 | Sony Corporation | AV/C commands for accessing a hard disk device |
| US6185580B1 (en) * | 1998-06-24 | 2001-02-06 | International Business Machines Corporation | Physical information and extensions file and file system translator |
| JP2001022527A (en) * | 1999-07-12 | 2001-01-26 | Nec Niigata Ltd | Method for externally accessing hdd included in computer |
| TWI249101B (en) * | 2002-04-11 | 2006-02-11 | Via Tech Inc | Method and related apparatus for using a dynamic random access memory to substitute for a hard disk drive |
| CN100471112C (en) * | 2004-03-26 | 2009-03-18 | 清华大学 | Memory-Network Memory-Disk High Speed Reliable Storage System LND Read and Write Method |
| TW200725296A (en) * | 2005-12-27 | 2007-07-01 | Inventec Corp | Data automatic classification and access method for expanding a virtual hard disk |
| CN101055512A (en) * | 2007-06-01 | 2007-10-17 | 威盛电子股份有限公司 | Data access method |
| TW200905489A (en) * | 2007-07-27 | 2009-02-01 | Jade Quantum Technologies Inc | Diskless computer system using single identification code to provide access service for Internet and disks, and its data transmitting and receiving method thereof |
| US20110022793A1 (en) * | 2008-03-31 | 2011-01-27 | Gaspard Walter A | Systems And Methods For Accessing Hard Disk Drives |
| CN101446924B (en) * | 2008-12-16 | 2013-04-17 | 成都市华为赛门铁克科技有限公司 | Method and system for storing and obtaining data |
| TW201039130A (en) * | 2009-04-30 | 2010-11-01 | Inventec Corp | Hard drive access method |
-
2011
- 2011-07-25 CN CN201110208709.7A patent/CN102902487B/en not_active Expired - Fee Related
- 2011-07-29 TW TW100126920A patent/TWI483108B/en not_active IP Right Cessation
Also Published As
| Publication number | Publication date |
|---|---|
| TW201305816A (en) | 2013-02-01 |
| CN102902487A (en) | 2013-01-30 |
| TWI483108B (en) | 2015-05-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8924664B2 (en) | Logical object deletion | |
| US9189494B2 (en) | Object file system | |
| EP2631916A1 (en) | Data deletion method and device | |
| US7849282B2 (en) | Filesystem building method | |
| US10037161B2 (en) | Tiered storage system, storage controller, and method for deduplication and storage tiering | |
| CN109189772B (en) | File management method and system for storage medium without file system | |
| CN102289451A (en) | Method and device for searching files or folders | |
| CN106970765B (en) | Data storage method and device | |
| CN104850358A (en) | Magnetic-optical-electric hybrid storage system and data acquisition and storage method thereof | |
| US8478933B2 (en) | Systems and methods for performing deduplicated data processing on tape | |
| CN102355495B (en) | Data processing method, device and system | |
| CN102902709A (en) | Space allocation fixing file memory system and implementation method | |
| US8046391B2 (en) | Storage apparatus and its file control method and storage system | |
| US20120158804A1 (en) | Method for converting data in optical disc drive | |
| CN104461384B (en) | A kind of method for writing data and storage device | |
| CN104133640B (en) | From the fast quick-recovery of dormancy | |
| CN104238952A (en) | Magnetic disk partition format switching method and system | |
| CN102841894A (en) | Data storage method of file allocation table | |
| CN102902487B (en) | Hard disc data access system | |
| JP2005339262A (en) | File system and control method thereof | |
| US20120260022A1 (en) | Handling commands within a write-once read-many storage device configuration | |
| CN110764694B (en) | A method and system for storage space control | |
| CN113867622B (en) | Method, device, equipment and readable medium for improving read and write speed of snapshots | |
| CN102981782B (en) | Data processing method and device | |
| TWI616755B (en) | Storage device and associated data mapping method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C41 | Transfer of patent application or patent right or utility model | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20150928 Address after: 518109 Guangdong province Shenzhen city Longhua District Dragon Road No. 83 wing group building 11 floor Applicant after: SCIENBIZIP CONSULTING (SHEN ZHEN) CO., LTD. Address before: 518109 Guangdong city of Shenzhen province Baoan District Longhua Town Industrial Zone tabulaeformis tenth East Ring Road No. 2 two Applicant before: Hongfujin Precise Industry (Shenzhen) Co., Ltd. Applicant before: Hon Hai Precision Industry Co., Ltd. |
|
| C41 | Transfer of patent application or patent right or utility model | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20151120 Address after: 201424 Shanghai city Fengxian District Tuo Village barracks Lin Zhen No. 598 building ninth room 111 Applicant after: Shanghai Lirui Network Technology Co., Ltd. Address before: 518109 Guangdong province Shenzhen city Longhua District Dragon Road No. 83 wing group building 11 floor Applicant before: SCIENBIZIP CONSULTING (SHEN ZHEN) CO., LTD. |
|
| C41 | Transfer of patent application or patent right or utility model | ||
| CB03 | Change of inventor or designer information |
Inventor after: An Ni Inventor after: Wang Beilei Inventor before: Lin Junjia Inventor before: Li Jia |
|
| COR | Change of bibliographic data | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20160425 Address after: 110000 No. 155-2, Chuangxin Road, Dongling District, Liaoning, Shenyang 302 Applicant after: Liaoning Xingyun Nebula Technology Co., Ltd. Address before: 201424 Shanghai city Fengxian District Tuo Village barracks Lin Zhen No. 598 building ninth room 111 Applicant before: Shanghai Lirui Network Technology Co., Ltd. |
|
| C14 | Grant of patent or utility model | ||
| CB02 | Change of applicant information |
Address after: 110000 No. 155-2, Chuangxin Road, Dongling District, Liaoning, Shenyang 302 Applicant after: Liaoning Xingyun Internet Technology Co., Ltd. Address before: 110000 No. 155-2, Chuangxin Road, Dongling District, Liaoning, Shenyang 302 Applicant before: Liaoning Xingyun Nebula Technology Co., Ltd. |
|
| COR | Change of bibliographic data | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160608 Termination date: 20170725 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |