CN1786944A - System and method for resetting-up tree type file catalogue structure - Google Patents

System and method for resetting-up tree type file catalogue structure Download PDF

Info

Publication number
CN1786944A
CN1786944A CN 200410077477 CN200410077477A CN1786944A CN 1786944 A CN1786944 A CN 1786944A CN 200410077477 CN200410077477 CN 200410077477 CN 200410077477 A CN200410077477 A CN 200410077477A CN 1786944 A CN1786944 A CN 1786944A
Authority
CN
China
Prior art keywords
file
directory
catalogue
document
tree
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.)
Pending
Application number
CN 200410077477
Other languages
Chinese (zh)
Inventor
陈廷贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CN 200410077477 priority Critical patent/CN1786944A/en
Publication of CN1786944A publication Critical patent/CN1786944A/en
Pending legal-status Critical Current

Links

Abstract

The invention is a system and method for reconstructing a tree file directory structure, comprising the steps of: constructing a file directory list; reading a file directory number, and determining its initial location in the file directory list; according to the initial location, reading a previous directory of the file directory; judging if the previous directory is a root directory: if not, continuing reading another previous directory until the root directory; otherwise reconstructing a directory structure of all files at the paths of the file directory; judging if there are other files in the same file directory: if yes, reconstructing a directory structure of the other files;otherwise ending the flow. The invention can simplify the directory and file recording structure in a disk so as to speed up the selection of partial directories or files to store data.

Description

The system and method for resetting-up tree type file catalogue structure
[technical field]
The present invention relates to a kind of system and method for management document catalogue, particularly relate to a kind of system and method for resetting-up tree type file catalogue structure.
[background technology]
Computing machine generally includes a storage unit, and it has and can write and reading of data.These storage unit generally have tape, disk and not erasable data or erasable data type CD.When backuping the data of disk,, carry out time depositing of whole data so only if each catalogue and each file that do not have recording disc to back up in the future will return when depositing data.Both lost time like this, also wasted disk storage space.If each catalogue and each file name that can recording disc backed up, so just can know the particular content of this backup disk, in the time will depositing data back and forth according to this record, just can do optionally to return and deposit, also can select catalogue partly or file to return and deposit.As for this record, if each catalogue or file are all put down in writing with its whole paths, then this recorded content is quite huge, and has many data to repeat, and therefore wishes the record of this record catalogue of reduction or file.
The Announcement Number that the technology of handling about document bibliography once was exposed on 01 21st, 2003 bulletins is 518510 middle Country Taiwan patent, and its patent name is " method of high-effect expansion document bibliography ".This patent has disclosed a kind of method of high-effect expansion document bibliography, the operation that it is checked by computer program, to there be the item time of subdirectory directly to indicate "+" number and stop action, make present bibliographic data deposit with the space of minimum or launch, to improve the speed that catalogue is launched, and can increase frequency range when entering subdirectory and reading data relatively, to improve the flow of bibliographic data, become the method that a high-level efficiency is launched data.
Above-mentioned technology has only disclosed a kind of method of launching document bibliography, and does not have to disclose the catalogue and the file logging structure of simplifying backup that disk writes down.For overcoming the deficiency of above-mentioned prior art, a kind of system and method for resetting-up tree type file catalogue structure need be provided, it can simplify the catalogue and the file logging structure of backup that disk writes down, but so that accelerated selection part catalogue or file are deposited data back and forth.
[summary of the invention]
Fundamental purpose of the present invention is to provide a kind of system of resetting-up tree type file catalogue structure, operation one file directory reconstruction algorithm in computing machine, tabulate and rebuild tree-shaped document directory structure by searching a file directory, reach and to select part catalogue or file to deposit the purpose of data back and forth.
Another object of the present invention is to provide a kind of method of resetting-up tree type file catalogue structure, operation one file directory reconstruction algorithm in computing machine, tabulate and rebuild tree-shaped document directory structure by searching a file directory, reach and to select part catalogue or file to deposit the purpose of data back and forth.
For reaching the foregoing invention purpose, the invention provides a kind of system that realizes resetting-up tree type file catalogue structure.This system comprises: a disk stores the tabulation of a file and a file directory; One computing machine is mounted with described file directory reconstruction algorithm, is used to construct described file directory tabulation, locating file bibliographic structure information, and the tree-shaped document directory structure of Fast Reconstruction.Described file directory reconstruction algorithm comprises: a directory listing constructing module is used for constructing a described file directory tabulation according to tree-shaped document directory structure; One directory information read module is used for reading file directory information according to the file directory numbering from the file directory tabulation, and judges the last layer directory name of each file directory; One file directory rebuilding module is used for the file directory information that reads is rebuild a tree-shaped document directory structure.
The invention provides a kind of method of resetting-up tree type file catalogue structure, this method comprises the steps: that (a) determines to need to rebuild the file directory numbering of catalogue; (b) according to this document catalog number, this tree-shaped document directory structure information of record in described file directory tabulation; (c) read file directory numbering, determine its reference position in the file directory tabulation; According to the reference position of this document catalogue, read the last layer catalogue of this document catalogue; (d) judge whether this last layer catalogue is root directory; (e), then rebuild the All Files bibliographic structure under whole paths of this document catalogue if the last layer catalogue is a root directory; (f) if this last layer catalogue is not a root directory, then continue to read the last layer catalogue till this last layer catalogue is root directory; (g) judge whether also have other file under same one deck catalogue of this document; (h) if also have other file under same one deck catalogue of this document, then continue to rebuild the bibliographic structure of other file; If do not have other file under same one deck catalogue of this document, then process ends.
By implementing the system and method for resetting-up tree type file catalogue structure of the present invention, can simplify the catalogue and the file logging structure of backup that disk writes down, come the tree-shaped document directory structure of Fast Reconstruction by moving a file directory reconstruction algorithm, so that can select part catalogue or file to deposit data back and forth.
[description of drawings]
Fig. 1 is the system architecture diagram of resetting-up tree type file catalogue structure of the present invention.
Fig. 2 is the method flow diagram of resetting-up tree type file catalogue structure of the present invention.
Fig. 3 is that known tree-shaped document directory structure launches synoptic diagram.
Fig. 4 is the related file directory tabulation synoptic diagram of the method for resetting-up tree type file catalogue structure of the present invention.
[embodiment]
As shown in Figure 1, be the system architecture diagram of resetting-up tree type file catalogue structure of the present invention.This system comprises a disk A1 and a computer A 2.Disk A1 stores file and file directory tabulation A10.Wherein, this document directory listing A10 comprises field (its detailed situations such as the length of record start position, father node numbering (ID), child node position, file name of file directory and file name, see also shown in Figure 4), it is respectively applied for the catalogue record reference position of the tree-shaped document directory structure of storage, length and the file name information that father node is numbered (ID), child node position, file name.Be mounted with a file directory reconstruction algorithm A20 in the computer A 2, be used to construct described file directory tabulation A10, locating file bibliographic structure information, and the tree-shaped document directory structure of Fast Reconstruction.This document catalogue reconstruction algorithm A20 comprises: a directory listing constructing module A201 is used for constructing a described file directory tabulation A10 according to tree-shaped document directory structure; Directory information read module A202 is used for reading file directory information according to the file directory numbering from file directory tabulation A10, and judges the last layer directory name of each file directory; One file directory rebuilding module A203 is used for the file directory information that reads is rebuild a tree-shaped document directory structure.
As shown in Figure 2, be the method flow diagram of resetting-up tree type file catalogue structure of the present invention.This method is utilized operation one file directory reconstruction algorithm A20 in computer A 2, rebuilds tree-shaped document directory structure by searching file directory tabulation A10 fast.Implementation step is as follows: at first, directory listing constructing module A201 determines to need to rebuild the file directory numbering (ID) of catalogue, and this ID is (the step S10) that defines according to the order of each catalogue in the file directory tabulation.According to this document catalogue ID, directory listing constructing module A201 is this tree-shaped document directory structure information (step S11) of record in the file directory tabulation.Directory information read module A202 reads the file directory ID of a file logging, and determines its reference position (step S12) in file directory tabulation A10.According to the reference position of this document catalogue, directory information read module A202 reads the last layer catalogue (step S13) of this document catalogue.Directory information read module A202 judges whether this last layer catalogue is root directory, and promptly whether the numbering of this last layer catalogue is " 0 " (step S14).If this last layer catalogue is not a root directory, then execution in step S13 continues to read the last layer catalogue till this last layer catalogue is root directory; As if the last layer catalogue is root directory, then the All Files bibliographic structure (step S15) under whole paths of file directory rebuilding module A203 reconstruction this document catalogue.Last directory information read module A202 judges under same one deck catalogue of this document whether also have other file, promptly searches whether the file directory (step S16) that has identical father node ID with this catalogue is arranged in file directory is tabulated.If also have other file under same one deck catalogue of this document, then flow process turns to step S12 to continue to rebuild the bibliographic structure of other file; If do not have other file under same one deck catalogue of this document, then finish.
How below lift an instantiation illustrates by searching a file directory fast and tabulates and rebuild a tree-shaped document directory structure.
As shown in Figure 3, be that known tree-shaped document directory structure launches synoptic diagram.This tree-shaped document directory structure is recorded in the disk, and its format description is as follows:
Catalogue 1:/Dir0/Dir1/Dir2/Dir3
Catalogue 2:/Dir0/Dir1/Dir2/File3-1
Catalogue 3:/Dir0/Dir1/Dir2/File3-2
Catalogue 4:/Dir0/Dir1/Dir2/File3-3
Catalogue 5:/Dir0/Dir1/Dir2/Dir3/Dir4
Catalogue 6:/Dir0/Dir1/Dir2/Dir3/Dir4-1
Catalogue 7:/Dir0/Dir1/Dir2/Dir3/Dir4/File5-1
Catalogue 8:/Dir0/Dir1/Dir2/Dir3/Dir4/File5-2
Catalogue 9:/Dir0/Dir1/Dir2/Dir3/Dir4/File5-3
Wherein, the essential record of the data Dir0 of log file catalogue, Dir1 and Dir2 9 times, the essential record of Dir3 6 times, the also essential record of Dir4 4 times.If when a large amount of catalogues or file being arranged with one deck, same directory path will repeat to be recorded always, this file directory record will become quite huge so, therefore the present invention has designed a kind of form and has write down all catalogues and file thereof, and it is tediously long that its data that writes down succinctly and is not repeated.
As shown in Figure 4, be the related file directory tabulation synoptic diagram of method of resetting-up tree type file catalogue structure of the present invention.All write down the numbering (ID) of each catalogue among the file directory tabulation A10, this ID defines according to the order of each catalogue in file directory tabulation A10.The ID of its root directory is 0, and the ID of first catalogue is that the ID of 1, the second catalogue is 2, and the rest may be inferred.The numbering of the own last layer catalogue of the essential record of each catalogue and file, be called father node ID, it has 4 bytes (Byte), and the length of the necessary file name of record own, it has 1 sub-byte, each catalogue must write down the reference position of the own following file of this layer at this record, and it has 8 bytes.If reference position is 0, representing under this catalogue does not have file, and this record is recorded in the reference position of file directory tabulation A10 at the very start.
File directory record from above-mentioned file directory tabulation A10 as can be known, if need reset file be numbered 120 bibliographic structure, then the file reference position from file directory tabulation A10 is 120 to go to read the data of each catalogue.If needing to rebuild catalogue is whole paths of Dir4-1, the father node ID that then reads Dir4-1 from file directory tabulation A10 is 3, and its expression Dir4-1 last layer catalogue is Dir3; And the father node ID of Dir3 is 2, and its expression Dir3 last layer catalogue is Dir2; The father node ID of Dir2 is 1, and its expression Dir2 last layer catalogue is Dir1; The father node ID of last Dir1 is 0, and its expression Dir1 last layer catalogue is Dir0, and promptly the root directory of Dir4-1 is Dir0.From the above-mentioned method that successively reads file directory as can be known, whole paths of this catalogue Dir4-1 are/Dir0/Dir1/Dir2/Dir3/Dir4-1.If also need rebuild other bibliographic structure of same one deck of Dir4-1, then belong to the file directory of one deck together by searching those and Dir4-1.By locating file directory listing A10 one file directory Dir4 is arranged as can be known, and Dir4 has the record start position is 60 catalogue, be illustrated in some files are arranged under the catalogue Dir4, so from reference position is that can to find some father nodes be 4 file logging in 60 these positions, comprise file File5-1, on behalf of the last layer catalogue of these files, File5-2 and File5-3 be Dir4-1.By that analogy, just can be that 120 the complete reconstruction of All Files bibliographic structure is come out with reference number of a document.

Claims (8)

1. the system of a resetting-up tree type file catalogue structure, it rebuilds tree-shaped document directory structure by a computer run one file directory reconstruction algorithm, it is characterized in that this system comprises:
One disk stores the tabulation of a file and a file directory;
Described computing machine is mounted with described file directory reconstruction algorithm, is used to construct the file directory tabulation, locating file bibliographic structure information, and the document directory structure of the achievement shape of laying equal stress on, this document catalogue reconstruction algorithm comprises:
One directory listing constructing module is used for constructing file directory tabulation according to tree-shaped document directory structure;
One directory information read module is used for reading file directory information according to the file directory numbering from the file directory tabulation, and judges the last layer directory name of each file directory;
One file directory rebuilding module is used for the file directory information that reads is rebuild a tree-shaped document directory structure.
2. the system of resetting-up tree type file catalogue structure as claimed in claim 1, it is characterized in that described file directory list storage has catalogue record reference position, father node numbering, child node position, file name length and the file name information of tree-shaped document directory structure.
3. the method for a resetting-up tree type file catalogue structure, it is by operation one file directory reconstruction algorithm, searches a file directory and tabulates and rebuild tree-shaped document directory structure, it is characterized in that this method comprises the steps:
Construct file directory tabulation;
Read file directory numbering, determine its reference position in the file directory tabulation;
According to the reference position of this document catalogue, read the last layer catalogue of this document catalogue;
Judge whether this last layer catalogue is root directory;
If the last layer catalogue is root directory, then rebuild the All Files bibliographic structure under whole paths of this document catalogue;
Judge and whether also have other file under same one deck catalogue of this document;
If also have other file under same one deck catalogue of this document, then continue to rebuild the bibliographic structure of other file;
If do not have other file under same one deck catalogue of this document, then process ends.
4. the method for resetting-up tree type file catalogue structure as claimed in claim 3, it is characterized in that described file directory list storage has catalogue record reference position, father node numbering, the child node position of tree-shaped document directory structure, the length and the file name information of file name.
5. the method for resetting-up tree type file catalogue structure as claimed in claim 3 is characterized in that, the step of described structure one file directory tabulation also comprises the steps:
Determine to need to rebuild the file directory numbering of catalogue;
According to this document catalog number, this tree-shaped document directory structure information of record in described file directory tabulation.
6. the method for resetting-up tree type file catalogue structure as claimed in claim 3, it is characterized in that, describedly judge that whether this last layer catalogue is that the step of root directory also comprises step:, then continue to read the last layer catalogue till this last layer catalogue is root directory if this last layer catalogue is not a root directory.
7. the method for resetting-up tree type file catalogue structure as claimed in claim 3 is characterized in that, describedly judges that whether this last layer catalogue is that the method for root directory is: whether the file directory numbering of judging this last layer catalogue is " 0 ".
8. the method for resetting-up tree type file catalogue structure as claimed in claim 3, it is characterized in that whether also having the method for other file to be under described same one deck catalogue of judging file: from described file directory tabulation, search whether the file directory that has identical father node numbering with this document catalogue is arranged.
CN 200410077477 2004-12-11 2004-12-11 System and method for resetting-up tree type file catalogue structure Pending CN1786944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200410077477 CN1786944A (en) 2004-12-11 2004-12-11 System and method for resetting-up tree type file catalogue structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200410077477 CN1786944A (en) 2004-12-11 2004-12-11 System and method for resetting-up tree type file catalogue structure

Publications (1)

Publication Number Publication Date
CN1786944A true CN1786944A (en) 2006-06-14

Family

ID=36784411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200410077477 Pending CN1786944A (en) 2004-12-11 2004-12-11 System and method for resetting-up tree type file catalogue structure

Country Status (1)

Country Link
CN (1) CN1786944A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013097115A1 (en) * 2011-12-28 2013-07-04 华为技术有限公司 File directory storage method, retrieval method and device
CN103282899A (en) * 2011-12-23 2013-09-04 华为技术有限公司 File system data storage method and access method and device therefor
WO2015070431A1 (en) * 2013-11-15 2015-05-21 北京世纪高蓝科技有限公司 Isolation file generation method and device
CN105446965A (en) * 2014-05-30 2016-03-30 北大方正集团有限公司 Data storage method and server
CN105607960A (en) * 2015-10-26 2016-05-25 成都华为技术有限公司 Repairing method and device of file system directory tree
CN105677514A (en) * 2016-01-08 2016-06-15 四川秘无痕信息安全技术有限责任公司 Method for reconstructing disaster data file directory structure
CN106095871A (en) * 2016-06-06 2016-11-09 无锡天脉聚源传媒科技有限公司 A kind of method and device setting up data base directory structure
CN109190680A (en) * 2018-08-11 2019-01-11 复旦大学 The detection and classification method of Medicines image based on deep learning
CN110174999A (en) * 2019-05-20 2019-08-27 中国刑事警察学院 A kind of Office file directory area fragmentation and reassembly method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103282899B (en) * 2011-12-23 2016-06-15 华为技术有限公司 The storage method of data, access method and device in file system
CN103282899A (en) * 2011-12-23 2013-09-04 华为技术有限公司 File system data storage method and access method and device therefor
WO2013097115A1 (en) * 2011-12-28 2013-07-04 华为技术有限公司 File directory storage method, retrieval method and device
WO2015070431A1 (en) * 2013-11-15 2015-05-21 北京世纪高蓝科技有限公司 Isolation file generation method and device
CN105446965A (en) * 2014-05-30 2016-03-30 北大方正集团有限公司 Data storage method and server
CN105607960B (en) * 2015-10-26 2018-12-07 成都华为技术有限公司 File system directory tree restorative procedure and device
WO2017071509A1 (en) * 2015-10-26 2017-05-04 华为技术有限公司 File system directory tree repair method and device
CN105607960A (en) * 2015-10-26 2016-05-25 成都华为技术有限公司 Repairing method and device of file system directory tree
US10817469B2 (en) 2015-10-26 2020-10-27 Huawei Technologies Co., Ltd. Method and apparatus for repairing file system directory tree
CN105677514A (en) * 2016-01-08 2016-06-15 四川秘无痕信息安全技术有限责任公司 Method for reconstructing disaster data file directory structure
CN105677514B (en) * 2016-01-08 2019-03-08 四川秘无痕信息安全技术有限责任公司 A method of rebuilding Disaster Data document directory structure
CN106095871A (en) * 2016-06-06 2016-11-09 无锡天脉聚源传媒科技有限公司 A kind of method and device setting up data base directory structure
CN109190680A (en) * 2018-08-11 2019-01-11 复旦大学 The detection and classification method of Medicines image based on deep learning
CN110174999A (en) * 2019-05-20 2019-08-27 中国刑事警察学院 A kind of Office file directory area fragmentation and reassembly method
CN110174999B (en) * 2019-05-20 2022-06-17 中国刑事警察学院 Office file directory partition reorganization method

Similar Documents

Publication Publication Date Title
US8010493B2 (en) Systems and methods for a snapshot of data
US7882071B2 (en) Systems and methods for a snapshot of data
US5832526A (en) Method and apparatus using slack area of file storage structures for file reconstruction
US7953704B2 (en) Systems and methods for a snapshot of data
US8015156B2 (en) Systems and methods for a snapshot of data
US8275970B2 (en) Optimizing write traffic to a disk
US8959301B2 (en) Accessing data in a storage system
US7533330B2 (en) Redundancy for storage data structures
US7634627B1 (en) System and method for performing extent level backups that support single file restores
US9880759B2 (en) Metadata for data storage array
US8667029B2 (en) Optimized startup verification of file system integrity
US8271504B2 (en) Systems for performing an external (disk-based) sort of a large data file which take advantage of “presorted” data already present in the input
CN1462449A (en) Method and device for recording or reading files on/from sequential medium and sequential medium
CN1760875A (en) Transparent migration of files among various types of storage volumes based on file access properties
KR20060132542A (en) Emulated storage system
JP2010532538A (en) Emulated storage system
US8825653B1 (en) Characterizing and modeling virtual synthetic backup workloads
CN1359071A (en) Method for completely deleting files on hard disk
CN1786944A (en) System and method for resetting-up tree type file catalogue structure
US7689626B2 (en) System and method for locating log records in multiplexed transactional logs
JP4480479B2 (en) Storage system
US8359439B2 (en) Backup apparatus, backup method, and file reading apparatus
WO2008021528A2 (en) Systems and methods for a snapshot of data
CN111221478B (en) Data writing and reading methods, devices, equipment and machine-readable storage medium
Anderson You Don’t Know Jack about Disks: Whatever happened to cylinders and tracks?

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication