IP Library › Granted Patent US 10,802,923
Granted Patent B2
US 10,802,923 · App. 15/268,789 · Granted Oct 13, 2020

Method and apparatus for incremental backup based on file paths and a prefix tree

Inventors: Wei Qi (Beijing, CN); Xin Zhong (Beijing, CN); Friar Yangfeng Chen (Beijing, CN); Wenxuan Yin (Beijing, CN)
Assignee: EMC IP Holding Company, LLC
G06F11/1451G06F16/113G06F16/9027G06F2201/80G06F2201/805G06F2201/81G06F2201/82G06F2201/84
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,802,923
App. No.
15/268,789
Filed
Sep 19, 2016
Granted
Oct 13, 2020
Kind
B2
Examiner
JAMI, HARES
Art Unit
2162
USPC
707/646
Abstract

Embodiments of the present disclosure relate to a method and apparatus for incremental backup. The method comprises receiving a set of file paths to be backed up and parsing each file path in the set of file paths to construct a prefix tree. The method further comprises traversing the prefix tree to read an ordered set of file paths in the prefix tree and performing an incremental backup sequentially according to the ordered set of file paths. Embodiments of the present disclosure sort a set of file paths to be backed up using a prefix tree that shares common path prefixes. Thus, embodiments of the present disclosure can achieve fast sort of the set of file paths, and can effectively save storage space needed for sorting a considerable number of file paths in the memory, thereby reducing the times of comparing file names when sorting file paths.

Claims (54)

1. A method for incremental backup, comprising:

receiving a set of file paths to be backed up;

setting a threshold according to a size associated with a prefix tree;

in response to reaching the threshold, parsing, by segment, each file path in the set of file paths to construct the prefix tree, wherein the parsing of each file path in the set of file paths to construct a prefix tree comprises:

inserting each file path in the set of file paths into the prefix tree sequentially; and

in response to each file path being inserted, comparing each file path with the prefix tree, wherein a comparison time respective to the inserting of each file path is dependent upon a length of a character string;

traversing the prefix tree to read an ordered set of file paths in the prefix tree, wherein traversing the prefix tree to read the ordered set of file paths in the prefix tree comprises:

traversing the prefix tree using a depth first search to sequentially read all nodes that have values as the ordered set of file paths, wherein if after using the depth first search a traversed node is found to be an end of a file path, then a plurality of characters strings included in all the nodes along the file path from a root node to a given node merge to form a single file path; and

performing an incremental backup sequentially according to the ordered set of file paths.

2. The method according to claim 1 , wherein the file paths to be backed up at least include an alphabet and a special character.

3. The method according to claim 1 , wherein all sub-nodes of any node in the prefix tree have a common prefix that includes one or more characters.

4. The method according to claim 1 , wherein the prefix tree is initially an empty tree.

5. The method according to claim 1 , wherein the parsing each file path in the set of file paths to construct a prefix tree comprises:

allocating a common prefix of a plurality of file paths having the common prefix to a node, the common prefix including a plurality of characters.

6. The method according to claim 1 , wherein the comparing each file path with the prefix:

for each file path, performing prefix matching between the file path and nodes of a N-th layer in the prefix tree, wherein N≥1 and an initial value of N is 1:

in response to failing to find a common prefix between the file path and all nodes of the N-th layer, inserting the file path as a new node of the N-th layer; and

in response to finding a common prefix between the file path and a given node in the N-th layer, inserting the file path as a new sub-node of the given node so that initial characters of all nodes of N+1-th layer are sorted according to ASCII code sizes.

7. The method according to claim 6 , wherein the inserting the file path as a new sub-node of the given node comprises:

in response to the common prefix being a part of characters in given node, replacing characters in the given node with the common prefix.

8. The method according to claim 1 , further comprising:

in response to constructing the prefix tree, sorting all nodes in the same layer based on ASCII code sizes of initial characters in the nodes.

9. The method according to claim 1 , further comprising:

in response to constructing the prefix tree, assigning a value to a node corresponding to a file path.

10. The method according to claim 9 , wherein all nodes on the file path from a root node to a given node of the prefix tree comprises a sum of the value of a plurality of character strings.

11. A computing system including a processor and memory configured to perform operations comprising:

receiving a set of file paths to be backed up;

setting a threshold according to a size associated with a prefix tree;

in response to reaching the threshold, parsing, by segment, each file path in the set of file paths to construct the prefix tree, wherein the parsing of each file path in the set of file paths to construct a prefix tree comprises:

inserting each file path in the set of file paths into the prefix tree sequentially; and

in response to each file path being inserted, comparing each file path with the prefix tree, wherein a comparison time respective to the inserting of each file path is dependent upon a length of a character string;

traversing the prefix tree to read an ordered set of file paths in the prefix tree, wherein traversing the prefix tree to read the ordered set of file paths in the prefix tree comprises:

traversing the prefix tree using a depth first search to sequentially read all nodes that have values as the ordered set of file paths, wherein if after using the depth first search a traversed node is found to be an end of a file path, then a plurality of characters strings included in all the nodes along the file path from a root node to a given node merge to form a single file path; and

performing an incremental backup sequentially according to the ordered set of file paths.

12. The computing system according to claim 11 , wherein the file paths to be backed up at least include an alphabet and a special character.

13. The computing system according to claim 11 , wherein all sub-nodes of any node in the prefix tree have a common prefix that includes one or more characters.

14. The computing system according to claim 11 , wherein the prefix tree is initially an empty tree.

15. The computing system according to claim 11 , further configured to perform operations comprising:

allocate a common prefix of a plurality of file paths having the common prefix to a node, the common prefix including a plurality of characters.

16. The computing system according to claim 15 , further configured to perform operations comprising:

for each file path, perform prefix matching between the file path and nodes of a N-th layer in the prefix tree, wherein N≥1 and an initial value of N is 1:

in response to failing to find a common prefix between the file path and all nodes in the N-th layer, insert the file path as a new node of the N-th layer; and

in response to finding a common prefix between the file path and a given node in the N-th layer, insert the file path as a new sub-node of the given node so that initial characters of all nodes of N+1-th layer are sorted according to ASCII code sizes.

17. The computing system according to claim 16 , further configured to perform operations comprising:

in response to the common prefix being a part of characters in given node, replace characters in the given node with the common prefix.

18. A computer program product residing on a non-transitory computer readable program instructions embodied therein, the computer readable program instructions, when being executed by a processor, cause the processor to execute:

receiving a set of file paths to be backed up;

setting a threshold according to a size associated with a prefix tree;

in response to reaching the threshold, parsing, by segment, each file path in the set of file paths to construct the prefix tree, wherein the parsing of each file path in the set of file paths to construct a prefix tree comprises:

inserting each file path in the set of file paths into the prefix tree sequentially; and

in response to each file path being inserted, comparing each file path with the prefix tree, wherein a comparison time respective to the inserting of each file path is dependent upon a length of a character string;

traversing the prefix tree to read an ordered set of file paths in the prefix tree, wherein traversing the prefix tree to read the ordered set of file paths in the prefix tree comprises:

traversing the prefix tree using a depth first search to sequentially read all nodes that have values as the ordered set of file paths, wherein if after using the depth first search a traversed node is found to be an end of a file path, then a plurality of characters strings included in all the nodes along the file path from a root node to a given node merge to form a single file path; and

performing an incremental backup sequentially according to the ordered set of file paths.

Assignments (7)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053546/0001) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC IP HOLDING COMPANY LLC
Reel/Frame 071642/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (043775/0082) Recorded May 20, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
Reel/Frame 060958/0468 →
SECURITY AGREEMENT Recorded Apr 22, 2020
From: CREDANT TECHNOLOGIES INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 053546/0001 →
SECURITY AGREEMENT Recorded Mar 21, 2019
From: CREDANT TECHNOLOGIES, INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 049452/0223 →
PATENT SECURITY AGREEMENT (NOTES) Recorded Sep 6, 2017
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 043775/0082 →
PATENT SECURITY AGREEMENT (CREDIT) Recorded Sep 6, 2017
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 043772/0750 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2016
From: QI, WEI; ZHONG, XIN; CHEN, FRIAR YANGFENG; YIN, WENXAUN
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 040730/0333 →
Priority Claims (1)
CN 2015 1 0604922 · Sep 21, 2015 · national
Continuity (1)
Related Publication 20170083406A1 · Mar 23, 2017