Patent ID: 9514209
Filing Date: 2016-12-06
CPC Classification: G06F,H03M,H04L

Claim Text:
1. A data processing method, comprising: according to a fingerprint algorithm, calculating a first fingerprint of a first fragment in to-be-compressed data, wherein a starting position of the first fragment and a starting position of the to-be-compressed data are the same, and a length of the first fragment and a length of a first sliding window are the same; searching a first local duplicate database for the first fingerprint, wherein the first local duplicate database is used to store duplicate data, a fingerprint of the duplicate data, and a digest of the duplicate data; in response to determining that the first fingerprint exists in the first local duplicate database, according to the first fingerprint, obtaining a first variable block and a digest of the first variable block which are in the first local duplicate database, wherein the first fingerprint and a fingerprint, obtained by calculating according to the fingerprint algorithm, of a first initial block in the first variable block are the same, a starting position of the first initial block and a starting position of the first variable block are the same, a length of the first initial block and the length of the first sliding window are the same, and the digest of the first variable block is obtained by calculating the digest of the first variable block according to a digest algorithm; according to the digest algorithm, calculating a digest of a second fragment in the to-be-compressed data, wherein a starting position of the second fragment and the starting position of the to-be-compressed data are the same, and a length of the second fragment and a length of the first variable block are the same; comparing the digest of the second fragment with the digest of the first variable block; in response to determining that the digest of the second fragment and the digest of the first variable block are different, obtaining a first sub-fragment in the second fragment, wherein the first sub-fragment and a first sub-variable block in the first variable block are the same, a starting position of the first sub-fragment and the starting position of the second fragment are the same, a starting position of the first sub-variable block and the starting position of the first variable block are the same, a second bit in the second fragment and a first bit in the first variable block are different, the second bit is a bit following the first sub-fragment in the second fragment, and the first bit is a bit following the first sub-variable block in the first variable block; and adding the first sub-fragment, a fingerprint of the first sub-fragment, and a digest of the first sub-fragment to the first local duplicate database to generate a second local duplicate database, wherein the fingerprint of the first sub-fragment and the first fingerprint are the same, and the digest of the first sub-fragment is obtained by calculating the digest of the first sub-fragment according to the digest algorithm.