Summary of the invention
The file directory tree management method that the purpose of the present invention is to provide a kind of based on Merkle DAG, device, system
And a kind of computer readable storage medium, it is intended to solve the problems, such as the structure for how easily restoring directory tree.
To achieve the above object, a kind of file directory tree management method based on Merkle DAG provided by the invention, packet
It includes:
When the subdirectory node of the first directory node in existing directory tree is modified, the subdirectory node is determined
First modification result;
Determine that all ancestor directories nodes of the subdirectory node modify to obtain according to the first modification result
Second modification result;
Added in the existing directory tree it is described first modification result and it is described second modify result formed it is modified
Directory tree.
Optionally, all ancestor directories nodes of the determination subdirectory node according to it is described first modification result into
The second modification result that row modification obtains, comprising:
The parent directory node for generating the first modification result, as the second directory node;
All ancestor directories nodes of second directory node are generated by second directory node;
It is described that the first modification result and the second modification result formation modification are added in the existing directory tree
Directory tree afterwards, comprising: by all ancestrals of the first modification result, second directory node and second directory node
First directory node, which is added in existing directory tree, forms modified directory tree.
Optionally, the existing directory tree and the modified directory tree are generated when being formed for recording version letter
The v ion of breath, the v ion are the parent directory node of root node;Wherein, the version is preserved in the v ion
The timestamp at this node generation time point.
Optionally, the v ion saves the cryptographic Hash of current version number, the cryptographic Hash of previous start context.
Optionally, each directory node saves the cryptographic Hash of current directory nodal information and current in the directory tree
The cryptographic Hash of the first layer subdirectory node information of directory node.
To achieve the above object, the present invention further provides a kind of, and the file directory tree based on Merkle DAG manages dress
It sets, described device includes memory and processor, and the file mesh that can be run on the processor is stored on the memory
Record tree management program, the file directory tree management program realize following method when being executed by the processor: when existing catalogue
When the subdirectory node of the first directory node in tree is modified, the first modification result of the subdirectory node is determined;It determines
All ancestor directories nodes of the subdirectory node are tied according to the second modification that the first modification result is modified
Fruit;The first modification result is added in the existing directory tree and the second modification result forms modified catalogue
Tree.
Optionally, it is also realized when the file directory tree management program is executed by the processor:
The parent directory node for generating the first modification result, as the second directory node;
All ancestor directories nodes of second directory node are generated by second directory node;
It is described that the first modification result and the second modification result formation modification are added in the existing directory tree
Directory tree afterwards, comprising: by all ancestrals of the first modification result, second directory node and second directory node
First directory node, which is added in existing directory tree, forms modified directory tree.
Optionally, it is also realized when the file directory tree management program is executed by the processor:
The existing directory tree and the modified directory tree generate the version for being used for recording version information when being formed
This node, the v ion are the parent directory node of root node;Wherein, the v ion is preserved in the v ion
Generate the timestamp at time point.
Optionally, the v ion saves the cryptographic Hash of current version number, the cryptographic Hash of previous start context.
Optionally, each directory node saves the cryptographic Hash of current directory nodal information and current in the directory tree
The cryptographic Hash of the first layer subdirectory node information of directory node.
To achieve the above object, invention further provides a kind of, and the file directory tree based on Merkle DAG manages system
System, comprising:
First determination unit, for when the subdirectory node of the first directory node in existing directory tree is modified, really
First modification result of the fixed subdirectory node;
Second determination unit, for determining all ancestor directories nodes of the subdirectory node according to first modification
As a result the second modification result modified;
Adding unit, for adding the first modification result and the second modification result in the existing directory tree
Form modified directory tree.
To achieve the above object, invention further provides a kind of computer readable storage mediums, and the computer can
It reads to be stored with file directory tree management program on storage medium, the file directory Guan Shuli program can be handled by one or more
Device executes, to realize the file directory tree management method as described in any one.
To achieve the above object, a kind of computer program product provided by the invention, which is characterized in that refer to including computer
It enables, when run on a computer, computer is allowed to execute the file directory tree pipe based on Merkle DAG
Reason method.
It can be seen that a kind of file directory management method based on Merkle DAG provided by the embodiments of the present application, when existing
When thering is the subdirectory node of the first directory node in directory tree to be modified, change directly is not made to existing directory tree, but
Determine this time modify first modification as a result, and determining all ancestor directories nodes of the subdirectory node with the specific item
The the second modification result recording the modification of section and changing.Then on the basis of existing directory tree addition first modification result with
Second modification is as a result, so as to so that directory tree records the result after changing each time, it may be convenient to trace back to each
Secondary history modifies content, to facilitate the recovery of directory tree.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein
Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit
In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce
The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot
It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment
Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution
Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims
Protection scope within.
The present invention provides a kind of catalog management method.
Referring to Fig.1, Fig. 1 is the flow diagram of one embodiment of the invention.
In one embodiment, this method comprises:
S101 determines the subdirectory when the subdirectory node of the first directory node in existing directory tree is modified
First modification result of node.
When in the present solution, to modify to the subdirectory node of the first directory node, not directly by existing directory tree
It modifies, but determines first that this is modified as a result, as the first modification result.
It should be noted that the first directory node is any node in directory tree, and corresponding modification operates, and specifically may be used
It also include adding to the first directory node to include being operated to the delete operation of the existing subdirectory node of the first directory node, modification
Add subdirectory node.
S102 determines that all ancestor directories nodes of the subdirectory node are modified according to the first modification result
The second obtained modification result.
Further, it is determined that all ancestor directories nodes of above-mentioned subdirectory node out, ancestor directories node is this
The parent directory node of subdirectory node, parent directory node of parent directory node etc., until root node.
In the present solution, each node of directory tree can record oneself information and its first layer subdirectory node
Information, therefore, after the information of above-mentioned subdirectory node is modified, his father's directory node information to be recorded can also change
Become, and so on, until root node requires primary change.It therefore, will also be according to after the first modification result has been determined
One modification result determines that all ancestor directories nodes of subdirectory node are modified accordingly as a result, as the second modification result.
In a specific embodiment, each directory node saves current directory nodal information in the directory tree
Cryptographic Hash and current directory node first layer subdirectory node information cryptographic Hash.
S103, adds the first modification result in the existing directory tree and the second modification result is formed and modified
Directory tree afterwards.
In the present solution, for the ease of tracing modification content each time, above-mentioned modification operation is only merely that record is corresponding
The first modification result and the second modification as a result, and there is no directly make change to existing directory tree.It in this step, will be upper
It states the first modification result to be added in existing directory tree with the second modification result in the form added, forms modified catalogue
Tree.
It can be seen that a kind of file for being based on Merkle DAG (Merkel's directed acyclic graph) provided by the embodiments of the present application
Catalog management method, when the subdirectory node of the first directory node in existing directory tree is modified, not directly to existing mesh
Record tree makes change, but determines that this time modify first modifies as a result, and determining all ancestors of the subdirectory node
The second modification result that directory node is changed with the modification of the subdirectory section.Then on the basis of existing directory tree
Addition first modification result with second modification as a result, so as to so that directory tree record change each time after as a result, can
Easily to trace back to the content of history modification each time, to facilitate the recovery of directory tree.
It is the flow diagram of another embodiment of the present invention referring to Fig. 2, Fig. 2.
S201 determines the subdirectory when the subdirectory node of the first directory node in existing directory tree is modified
First modification result of node.
S202 generates the parent directory node of the first modification result, as the second directory node.
It is to generate first to repair first in the present solution, determine the concrete operations of the second modification result of ancestor directories node
The parent directory node for changing result, using the parent directory as the second directory node.
It should be noted that can determine whether the first modification as a result, and the first modification knot after above-mentioned subdirectory node is modified
Fruit is exactly a new subdirectory node in fact, and is directed to this new subdirectory node, in the present solution, also needing corresponding
Generate his father's directory node.It should be noted that if the subdirectory node there are also other brotghers of node before a modification, also
It is the first directory node other than above-mentioned need subdirectory node to be modified, there are also other subdirectory nodes, then this is a little
The brotgher of node of directory node is also required to the subdirectory node as the second directory node.In other words, the second directory node is
The parent directory node of first modification result and the brotgher of node of the subdirectory node.
S203 is generated all ancestor directories nodes of second directory node by second directory node.
Further, according to above-mentioned second directory node, all ancestor directories nodes are sequentially generated.It needs to illustrate
It is that these ancestor directories nodes are corresponding with the ancestor node of the first directory node in existing directory tree, is only directed to
The information of one modification result, being modified in layer, and other information and the corresponding ancestor node in existing directory tree
It is identical.
S204, by all ancestors of the first modification result, second directory node and second directory node
Directory node, which is added in existing directory tree, forms modified directory tree.
It should be noted that existing directory tree and modified directory tree can be generated for recording version when being formed
The v ion of information, it is to be understood that existing directory tree can be used as a version, and it is current modified, it is modified
Directory tree then can be used as a new version, therefore for the ease of finding the directory tree of different editions, can be in this programme
For the directory tree build version node of each version, the directory tree of each version just generates a record version letter when being formed
The v ion of breath, the root node of v ion corresponding catalogue tree, so that corresponding directory tree can be found according to v ion
Root node, so as to find whole directory tree under the version.
In a specific embodiment, v ion saves the cryptographic Hash of current version number, previous start context
Cryptographic Hash.
It should be noted that the timestamp that v ion generates time point can also be recorded in above-mentioned v ion, thus
The time that directory tree is formed, that is, the time that subdirectory node is modified can be determined according to timestamp.
Specific embodiment provided by the embodiments of the present application is introduced below, specific embodiments described below is pair
The specific example explanation of above-described embodiment, can be cross-referenced with any of the above-described embodiment.
Referring to Fig. 3, Fig. 3 is a kind of specific existing directory tree structure schematic diagram provided by the embodiments of the present application.It is existing at this
Having in directory tree, "/" is root, and first layer has " a ", " b ", " c " three subdirectory nodes respectively under root, " a ", " b ",
" c " corresponding node is the subdirectory node of root node, and corresponding under " a ", " b ", " c " three catalogues is had
Three subdirectory nodes " aa ", " bb ", " cc ", " aa ".
Wherein, each directory node saves the cryptographic Hash and current directory section of current directory nodal information in directory tree
The cryptographic Hash of the first layer subdirectory node information of point.In the directory tree, the key-value pair information of each node may refer to table
1.Wherein, the cryptographic Hash of hash-a, that is, a, the keys of other nodes, value and so on, the key of root node is the Hash of root node information
Value, is indicated with root_hash_1, and number 1 is version corresponding to this directory tree structure, and root is the meaning of " root ".It needs
Illustrate, when directory node is the leaf directory node of the bottom, there is no subdirectory nodes, therefore its value is sky, i.e.,
[]。
Table 1
Node |
Key (cryptographic Hash of nodal information) |
Value |
/ |
Root_hash_1 (root node information cryptographic Hash) |
[hash-a,hash-b,hash-c] |
a |
hash-a |
[hash-aa] |
b |
hash-b |
[hash-bb] |
c |
hash-c |
[hash-cc] |
aa |
hash-aa |
[] |
bb |
hash-bb |
[] |
cc |
hash-cc |
[] |
In the present solution, the directory tree of each version has a v ion, v ion is as root in directory tree
The parent directory node of catalogue is directed toward root.Wherein, the v ion saves the cryptographic Hash of current version number, previous version
The cryptographic Hash of this number.
In the present solution, existing directory tree version be version 1, in v ion, record v ion oneself letter
The information (the namely root nodal information of directory tree) of breath, its subdirectory node, can also record previous the release directory tree
V ion information.
Referring to table 2, information that table 2 is recorded by the v ion of existing directory tree.
Table 2
When the subdirectory node of the first directory node in existing directory tree is modified, the subdirectory node is determined
First modification result.
Specifically, modification operation includes the delete operation of the existing subdirectory node of the first directory node, modification operation, also wrap
It includes and subdirectory node is added to the first directory node.Therefore, corresponding to three kinds of modification operations with three specific examples below
File directory tree management method based on Merkle DAG is introduced.
Referring to fig. 4, Fig. 4 is a kind of specific modified directory tree structure schematic diagram provided by the present application.
When adding subdirectory node to the first directory node in existing directory tree, for example, the first directory node is c,
One subdirectory node cc1 is added to this directory node of c, therefore, the first modification result is cc1 subdirectory node.
Further, parent directory node is generated for the first modification result, as the second directory node.Due to being in existing mesh
A subdirectory cc1 node is added under c node in record tree, and its original subdirectory node cc is still remained, so cc1 is saved
There are also brotgher of node cc for point, therefore the second directory node is exactly to generate parent directory node c' to cc and cc1.The information of c' i.e. include
The cryptographic Hash hash-c' of c', the cryptographic Hash with its subdirectory node, the i.e. cryptographic Hash of cc and cc1 cryptographic Hash [hash-cc,
hash-cc1]。
All ancestor directories nodes of the second directory node are generated by the second directory node, that is, generate the parent directory section of c'
Point, that is, new root node "/".
Since the information of c directory node changes, the value of his father's directory node i.e. root node also becomes therewith
Change, therefore, all new ancestor node is generated according to the second directory node c', since the second directory node only has in this programme
One ancestor node, i.e. root node, therefore this programme namely generates new root node, new root node
Information includes the second mesh not modified in the cryptographic Hash of oneself and the cryptographic Hash of the second directory node and existing directory tree
The cryptographic Hash of the brotgher of node of node is recorded, i.e., [hash-a, hash-b, hash-c'].
All ancestor directories nodes of above-mentioned first modification result, the second directory node, the second directory node are being determined
Afterwards, these contents are added in existing directory tree.Referring to table 3, table 3 is the information of the node of modified directory tree.
Table 3
It should be noted that after directory tree after the modification generates, it is also necessary to generate a v ion for it, record version
This information.
Referring to table 4, information that table 4 is recorded by the v ion of modified directory tree.
Table 4
Referring to Fig. 5, Fig. 5 is a kind of specific modified directory tree structure schematic diagram provided by the present application.
When the existing subdirectory node of the first directory node in existing directory tree is modified operate when, determine first
Modify result.
For example, the first directory node is c, existing subdirectory node is cc, and in the embodiment of the present application, cc is revised as
Cc1, therefore the first modification result is cc1.
Further, new parent directory node is generated for the first modification result, as the second directory node, cc1 is generated
New parent directory node c', at this point, the information of c' includes the cryptographic Hash hash-cc1 of the cryptographic Hash hash-c' and cc1 of c'.
All ancestor directories nodes of the second directory node are generated by the second directory node, that is, generate new root
Node "/".The information of new root node includes the cryptographic Hash of oneself and the cryptographic Hash of the second directory node and existing mesh
The cryptographic Hash of the brotgher of node for the second directory node not modified in record tree, i.e., [hash-a, hash-b, hash-c'].
All ancestor directories nodes of above-mentioned first modification result, the second directory node, the second directory node are being determined
Afterwards, these contents are added in existing directory tree.Referring to table 5, table 5 is the information of the node of modified directory tree.
Table 5
Node |
Key (cryptographic Hash of nodal information) |
Value |
/ |
Root_hash_1 (root node information cryptographic Hash) |
[hash-a,hash-b,hash-c] |
a |
hash-a |
[hash-aa] |
b |
hash-b |
[hash-bb] |
c |
hash-c |
[hash-cc] |
aa |
hash-aa |
[] |
bb |
hash-bb |
[] |
cc |
hash-cc |
[] |
/ |
root_hash_2 |
[hash-a,hash-b,hash-c'] |
c' |
hash-c' |
[hash-cc1] |
cc1 |
Hash-cc1 |
[] |
Similarly, be also required in this programme for modified directory tree generate a v ion, content with it is above-mentioned
The v ion of modified directory tree is identical in embodiment, is no longer repeated herein.
Referring to Fig. 6, a kind of Fig. 6 specific modified directory tree schematic diagram provided by the embodiments of the present application.
When being deleted the existing subdirectory node of the first directory node in existing directory tree, the first modification is determined
As a result, first modifying result, that is, null value at this time, that is, there is no the subdirectory nodes.
For example, the first directory node is c, existing subdirectory node is cc, and in the embodiment of the present application, cc is deleted, because
This first modification result, that is, null value.
Further, new parent directory node is generated for the first modification result, as the second directory node, repaired due to first
Changing result is null value, a corresponding parent directory node c' namely subdirectory node in fact, under no subdirectory node.
At this point, the information of c' is cryptographic Hash hash-c' and [] for including c'.
All ancestor directories nodes of the second directory node are generated by the second directory node, that is, generate new root
Node "/".The information of new root node includes the cryptographic Hash of oneself and the cryptographic Hash of the second directory node and existing mesh
The cryptographic Hash of the brotgher of node for the second directory node not modified in record tree, i.e., [hash-a, hash-b, hash-c'].
All ancestor directories nodes of above-mentioned first modification result, the second directory node, the second directory node are being determined
Afterwards, these contents are added in existing directory tree.Referring to table 6, table 6 is the information of the node of modified directory tree.
Table 6
Node |
Key (cryptographic Hash of nodal information) |
Value |
/ |
Root_hash_1 (root node information cryptographic Hash) |
[hash-a,hash-b,hash-c] |
a |
hash-a |
[hash-aa] |
b |
hash-b |
[hash-bb] |
c |
hash-c |
[hash-cc] |
aa |
hash-aa |
[] |
bb |
hash-bb |
[] |
cc |
hash-cc |
[] |
/ |
root_hash_2 |
[hash-a,hash-b,hash-c'] |
c' |
hash-c' |
[] |
|
|
|
Similarly, be also required in this programme for modified directory tree generate a v ion, content with it is above-mentioned
The v ion of modified directory tree is identical in embodiment, is no longer repeated herein.
It is the file directory tree managing device based on Merkle DAG that one embodiment of the invention discloses referring to Fig. 7, Fig. 7
Schematic diagram of internal structure.
It is situated between below to a kind of file directory tree managing device based on Merkle DAG provided by the embodiments of the present application
It continues, it is described below a kind of mutually to be joined based on the file directory tree managing device of Merkle DAG and any of the above-described embodiment
According to.
In the present embodiment, the file directory tree managing device 1 based on Merkle DAG can be PC (Personal
Computer, PC), be also possible to smart phone, tablet computer, palm PC, portable computer, intelligent router,
Mine machine, network storage equipment terminal device.
The directory tree managing device 1 can be the node of composition CDN network or block chain network.
The directory tree managing device 1 may include memory 11, processor 12 and bus 13.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,
Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11
It can be the internal storage unit of directory tree managing device 1, such as the hard disk of the directory management device 1 in some embodiments.
Memory 11 is also possible to the External memory equipment of directory management device 1, such as directory management device 1 in further embodiments
The plug-in type hard disk of upper outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital,
SD) block, flash card (Flash Card) etc..Further, memory 11 can also have been deposited both the inside including directory management device 1
Storage unit also includes External memory equipment.Memory 11 can be not only used for storage be installed on directory management device 1 using soft
Part and Various types of data, such as the code of directory tree management program 01 etc., can be also used for temporarily storing exported or will
The data to be exported.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11
Code or processing data, such as execute directory tree management program 01 etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 7 only with one slightly
Line indicates, it is not intended that an only bus or a type of bus.
When 01 times of processor 12 of the directory tree management program executes, following method is realized:
When the subdirectory node of the first directory node in existing directory tree is modified, the subdirectory node is determined
First modification result;Determine that all ancestor directories nodes of the subdirectory node are modified according to the first modification result
The second obtained modification result;The first modification result and the second modification result shape are added in the existing directory tree
At modified directory tree.
It can be seen that a kind of file directory managing device based on Merkle DAG provided by the embodiments of the present application, when existing
When thering is the subdirectory node of the first directory node in directory tree to be modified, change directly is not made to existing directory tree, but
Determine this time modify first modification as a result, and determining all ancestor directories nodes of the subdirectory node with the specific item
The the second modification result recording the modification of section and changing.Then on the basis of existing directory tree addition first modification result with
Second modification is as a result, so as to so that directory tree records the result after changing each time, it may be convenient to trace back to each
Secondary history modifies content, to facilitate the recovery of directory tree.
When the directory tree management program 01 is executed by the processor 12, it can also realize:
The parent directory node for generating the first modification result, as the second directory node;By second directory node
Generate all ancestor directories nodes of second directory node;It is described that first modification is added in the existing directory tree
As a result modified directory tree is formed with the second modification result, comprising: by the first modification result, second catalogue
Node and all ancestor directories nodes of second directory node are added in existing directory tree and form modified catalogue
Tree.
Wherein, the existing directory tree and the modified directory tree are generated when being formed is used for recording version information
V ion, the v ion be root node parent directory node;Wherein, the version is preserved in the v ion
The timestamp at node generation time point.
Wherein, the v ion saves the cryptographic Hash of current version number, the cryptographic Hash of previous start context.
Wherein, in the directory tree each directory node save current directory nodal information cryptographic Hash and current mesh
Record the cryptographic Hash of the first layer subdirectory node information of node.
Further, directory tree managing device 1 can also include network interface 14, and network interface 14 optionally may include
Wireline interface and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the device 1 and other electronic equipments
Between establish communication connection.
Optionally, which can also include user interface, and user interface may include display
(Display), input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface,
Wireless interface.Optionally, in some embodiments, it is aobvious to can be light-emitting diode display, liquid crystal display, touch control type LCD for display
Show that device and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touch device etc..Wherein, display
Appropriate it can also be known as display screen or display unit, for being shown in the information and use that handle in directory tree managing device 1
In the visual user interface of display.
Fig. 7 illustrates only the directory tree managing device 1 with component 11-14 and directory tree management program 01, this field
Technical staff may include ratio it is understood that structure shown in fig. 1 does not constitute the restriction to directory tree managing device 1
It illustrates less perhaps more components and perhaps combines certain components or different component layouts.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
It is situated between below to a kind of file directory tree management system based on Merkle DAG provided by the embodiments of the present application
Continue, it is described below it is a kind of can be cross-referenced with above-described embodiment based on the file directory tree management system of Merkle DAG.
In one embodiment, the file directory tree management system based on Merkle DAG includes:
First determination unit, for when the subdirectory node of the first directory node in existing directory tree is modified, really
First modification result of the fixed subdirectory node;
Second determination unit, for determining all ancestor directories nodes of the subdirectory node according to first modification
As a result the second modification result modified;
Adding unit, for adding the first modification result and the second modification result in the existing directory tree
Form modified directory tree.
The present embodiment is based on Merkle based on the file directory tree management system of Merkle DAG for realizing above-mentioned
The file directory tree management method of DAG, therefore the specific embodiment party in the file directory tree management system based on Merkle DAG
The embodiment part of the visible file directory tree pipe method based on Merkle DAG hereinbefore of formula, for example, the first determination unit,
Second determination unit, adding unit are respectively used to realize step S101, S102, S103 in above-mentioned catalog management method, so,
Its specific embodiment is referred to the description of corresponding various pieces embodiment, and details are not described herein.
Present invention also provides another computer readable storage mediums, are stored thereon with computer program, the calculating
Step provided by above-described embodiment may be implemented in machine program when being executed by processor.The storage medium may include: USB flash disk, move
Dynamic hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory,
RAM), the various media that can store program code such as magnetic or disk.
Present invention also provides a kind of computer program products, which includes computer instruction, when it
When running on computers, computer is allowed to execute the file mesh described in any of the above-described embodiment based on Merkle DAG
Record tree management method.
The computer program product includes one or more computer instructions.Load and execute on computers the meter
When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can
To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited
Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium
Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center
Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website
Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit
Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set
It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead
Body medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed
Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more
In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element
Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.