CN105872017A - Method and apparatus for carrying out file differential encoding synchronization at web page side - Google Patents
Method and apparatus for carrying out file differential encoding synchronization at web page side Download PDFInfo
- Publication number
- CN105872017A CN105872017A CN201610158075.1A CN201610158075A CN105872017A CN 105872017 A CN105872017 A CN 105872017A CN 201610158075 A CN201610158075 A CN 201610158075A CN 105872017 A CN105872017 A CN 105872017A
- Authority
- CN
- China
- Prior art keywords
- file
- files
- blocks
- fileinfo
- check code
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1061—Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
- H04L67/1065—Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9014—Indexing; Data structures therefor; Storage structures hash tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
- H04L67/5651—Reducing the amount or size of exchanged application data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and apparatus for carrying out file differential encoding synchronization at a web page side, and relates to the technical field of the internet. According to the method and apparatus disclosed by the invention, the web page side blocks files to be synchronized; a check code of each file block is respectively calculated; file information of the files to be synchronized and the check code of each file block are sent to a server side; the server side determines file information failed in matching; the web page side sends the file blocks corresponding to the file information failed in matching to the server side so as to enable the server side to carry out file splicing on the received file blocks and a local file to implement file synchronization, thereby implementing file differential encoding synchronization at the web page side and reducing traffic consumption of file differential encoding synchronization. In addition, according to the embodiment, matching of the file blocks is carried out at the server side, so that the computation overhead of the web page side is greatly reduced and the method and the apparatus are suitable for the web page side with relatively weak computing power.
Description
Technical field
The present invention relates to Internet technical field, carry out file difference particularly to a kind of page end
Code synchronism method and device.
Background technology
Cloud storage service is developed to today, has become as an infrastructure service of the Internet.One side
Face directly provides storage service convenient, jumbo to Internet user, on the other hand also becomes
Data for various internet, applications, Mobile solution store backstage.
Because cloud storage and the Internet are all according to charge on traffic, so the user couple of cloud storage
The network traffics that cloud storage is consumed are the most very sensitive.By the method for network measure, to domestic
The synchronization mechanism of the outer such as various clients of the cloud disk such as Dropbox, Baidu's cloud and flow consumption
Measure.It was found that in order to reduce the flow consumption during file synchronization, these
The pc client of main flow Dropbox all takes blocks of files and disappears weight, file differential coding synchronization etc. just
The network transmission that method is unnecessary during reducing file synchronization.In these methods, file difference
Code synchronism algorithm has preferably performance, can farthest reduce flow consumption, but by
Need to carry out file block in client in it, check value calculates, roll the complicated calculations such as verification
Method, the performance requirement for client is higher.
But, find that the page end of these Dropbox does not the most take file difference in the measurements
The method of code synchronism reduces the consumption of file synchronization.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide one to overcome the problems referred to above or extremely
Partially solve a kind of page end of the problems referred to above carry out file differential coding synchronous method and
Device.
According to one aspect of the present invention, it is provided that it is same that a kind of page end carries out file differential coding
One step process, described method includes:
Page end reads file to be synchronized, and described file to be synchronized is carried out piecemeal, each to obtain
Blocks of files;
Described page end calculates check code respectively to each blocks of files, and by the file of file to be synchronized
The check code of information and each blocks of files sends to service end, so that described service end is according to be synchronized
Local file is mated by the fileinfo of file and the check code of each blocks of files, and will not
Join successful fileinfo and feed back to described page end;
The fileinfo that described in the reception of described page end, the match is successful, and will not mate with described
The blocks of files that successfully fileinfo is corresponding sends to described service end, so that described service end will
The blocks of files received and local file carry out file splicing, to realize file synchronization.
Alternatively, the check code of the described fileinfo by file to be synchronized and each blocks of files sends
To service end, farther include:
The check code of each blocks of files is stored to check code Hash table, by the literary composition of file to be synchronized
Part information and described check code Hash table send to service end.
Alternatively, described fileinfo includes: file size, blocks of files size and blocks of files sequence
Number;
The check code of the described fileinfo by file to be synchronized and each blocks of files sends to service
End, so that described service end is according to the fileinfo of file to be synchronized and the check code of each blocks of files
Local file is mated, and the fileinfo that the match is successful is fed back to described webpage
End, farther includes:
The check code of the fileinfo of file to be synchronized and each blocks of files is sent to service end, with
Described service end is made to use according to the fileinfo of file to be synchronized and the check code of each blocks of files
Roll verification algorithm local file is mated, and the fileinfo that the match is successful is fed back
To described page end.
Alternatively, the check code of the described fileinfo by file to be synchronized and each blocks of files sends
To service end, so that described service end is according to the fileinfo of file to be synchronized and each blocks of files
Check code uses and rolls verification algorithm and mate local file, and by the literary composition that the match is successful
Part information feeds back to described page end, farther includes:
The check code of the fileinfo of file to be synchronized and each blocks of files is sent to service end, with
Make described service end to local file according to described blocks of files size, from first blocks of files pair
Should partly start, successively the current check part of Backwards selection, and calculate the school of current check part
Test value, the check value of calculating made a look up in described check code Hash table, search less than
Time, the fileinfo of current check part respective file block is added to the file that the match is successful
Information, until after described local file is all made a look up, by the fileinfo that the match is successful
Feed back to described page end.
Alternatively, described the check value of calculating is made a look up it in described check code Hash table
After, when finding, by blocks of files sequence number and the position letter of current check part respective file block
Breath adds to matching files information;
Described by the most described for the blocks of files transmission corresponding with the described not fileinfo that the match is successful
Service end, so that the blocks of files received and local file are carried out file spelling by described service end
Connect, to realize file synchronization, farther include:
The blocks of files corresponding with the described not fileinfo that the match is successful is sent to described service
End so that described service end according to matching files information by the blocks of files received and local file
Carry out file splicing, to realize file synchronization.
According to another aspect of the present invention, it is provided that a kind of page end carries out file differential coding
Synchronizer, described device includes:
Read blocking unit, be used for reading file to be synchronized, described file to be synchronized is carried out point
Block, to obtain each blocks of files;
Verification computing unit, for calculating check code respectively, and by literary composition to be synchronized to each blocks of files
The fileinfo of part and the check code of each blocks of files send to service end, so that described service end root
According to the fileinfo of file to be synchronized and the check code of each blocks of files, local file is mated,
And the fileinfo that the match is successful is fed back to described page end;
Piece file mergence unit, is used for the fileinfo that described in receiving, the match is successful, and will be with institute
State blocks of files corresponding to the fileinfo that the match is successful to send to described service end, so that described
The blocks of files received and local file are carried out file splicing by service end, same to realize file
Step.
Alternatively, described verification computing unit, it is further used for depositing the check code of each blocks of files
Store up to check code Hash table, by fileinfo and the described check code Hash table of file to be synchronized
Send to service end.
Alternatively, described fileinfo includes: file size, blocks of files size and blocks of files sequence
Number;
Described verification computing unit, is further used for the fileinfo of file to be synchronized and each literary composition
The check code of part block sends to service end, so that described service end is according to the file of file to be synchronized
The check code of information and each blocks of files uses rolling verification algorithm to mate local file, and
The fileinfo that the match is successful is fed back to described page end.
Alternatively, described verification computing unit, it is further used for believing the file of file to be synchronized
The check code of breath and each blocks of files sends to service end, so that local file is pressed by described service end
According to described blocks of files size, from first blocks of files corresponding part from the beginning of, Backwards selection successively
Current check part, and calculate the check value of current check part, by the check value of calculating in institute
State in check code Hash table and make a look up, searching the most then, by current check part correspondence literary composition
The fileinfo of part block adds to the fileinfo that the match is successful, until to described local file
After all making a look up, the fileinfo that the match is successful is fed back to described page end.
Alternatively, described verification computing unit, it is additionally operable to the check value of calculating in described verification
After code Hash table makes a look up, when finding, by current check part respective file block
Blocks of files sequence number and positional information add in matching files information;
Described verification computing unit, be further used for by with the described not fileinfo that the match is successful
Corresponding blocks of files sends to described service end, so that described service end is according to matching files information
The blocks of files received and local file are carried out file splicing, to realize file synchronization.
In the present invention, file to be synchronized is carried out piecemeal by page end, and each blocks of files is calculated school respectively
Test code, the fileinfo of file to be synchronized and the check code of each blocks of files sent to service end,
Being determined, by service end, the fileinfo that the match is successful, page end is by with described not the match is successful
The blocks of files that fileinfo is corresponding sends to described service end, so that described service end will receive
Blocks of files and local file carry out file splicing, to realize file synchronization, it is achieved that page end
Carry out file differential coding synchronization, decrease the flow consumption that file differential coding synchronizes.It addition,
The coupling of blocks of files has been placed on service end by present embodiment, greatly reduces the calculating of page end
Expense, the page end that applicable computing capability is more weak.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit
Those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only used for illustrating and is preferable to carry out
The purpose of mode, and it is not considered as limitation of the present invention.And in whole accompanying drawing, use
Identical reference marks represents identical parts.In the accompanying drawings:
Fig. 1 is that the page end of one embodiment of the present invention carries out file differential coding synchronous method
Flow chart;
Fig. 2 is that the page end of one embodiment of the present invention carries out file differential coding synchronous method
Flow chart;
Fig. 3 is the signaling diagram of the method shown in Fig. 2;
Fig. 4 a is fileinfo and the data structure of described check code Hash table of file to be synchronized
Figure;
Fig. 4 b is the data structure diagram of the fileinfo that the match is successful;
Fig. 4 c is the data structure diagram of matching files information;
Fig. 5 is the schematic diagram that the blocks of files received and local file carry out file splicing;
Fig. 6 is that the page end of one embodiment of the present invention carries out file differential coding synchronizer
Structured flowchart.
Detailed description of the invention
Below in conjunction with the accompanying drawings and embodiment, the detailed description of the invention of the present invention is made the most in detail
Describe.Following example are used for illustrating the present invention, but are not limited to the scope of the present invention.
Fig. 1 is that the page end of one embodiment of the present invention carries out file differential coding synchronous method
Flow chart;With reference to Fig. 1, described method includes:
S101: page end reads file to be synchronized, and described file to be synchronized is carried out piecemeal, with
Obtain each blocks of files;
It should be noted that described page end has file to be synchronized (i.e. New File), clothes
Business end has the ancient deed (" local file " the most hereinafter, Old File) before synchronization.
It will be appreciated that described page end uses the html documentation function (example that browser is supported
As: documentation function reads interface FileAPI etc.), by described file to be synchronized with binary data
The form of stream reads in browser rs cache.
It should be understood that and described file to be synchronized is carried out piecemeal, be calling due to browser
Stack has capacity limit, and (the major browsers call stack capacity limit of page end is from 5M to 10M
), each manageable file size, at about 1M, is less than the big of major part file
Little, so needing to treat synchronous documents piecemeal.
S102: described page end calculates check code (checksum) respectively to each blocks of files, and will
The fileinfo of file to be synchronized and the check code of each blocks of files send to service end, so that described
Service end according to the fileinfo of file to be synchronized and the check code of each blocks of files to local file
Mate, and by the fileinfo (mismatched document list) that the match is successful
Feed back to described page end;
In implementing, can be by web socket agreement by the fileinfo of file to be synchronized
And the check code of each blocks of files sends to service end, certainly, other agreements, this reality also can be used
This is not any limitation as by mode of executing.
The fileinfo that described in the reception of S103: described page end, the match is successful, and will be with described
The blocks of files that the fileinfo that the match is successful is corresponding sends to described service end, so that described clothes
The blocks of files received and local file are carried out file splicing, to realize file synchronization by business end.
In present embodiment, file to be synchronized is carried out piecemeal by page end, counts each blocks of files respectively
Calculate check code, the fileinfo of file to be synchronized and the check code of each blocks of files are sent to service
End, is determined, by service end, the fileinfo that the match is successful, and page end will not mate into described
The blocks of files that the fileinfo of merit is corresponding sends to described service end, so that described service end will connect
The blocks of files received and local file carry out file splicing, to realize file synchronization, it is achieved that net
Page end carries out file differential coding synchronization, decreases the flow consumption that file differential coding synchronizes.
It addition, the coupling of blocks of files has been placed on service end by present embodiment, greatly reduce page end
Computing cost, the page end that applicable computing capability is more weak.
Fig. 2 is that the page end of one embodiment of the present invention carries out file differential coding synchronous method
Flow chart;Fig. 3 is the signaling diagram of the method shown in Fig. 2;With reference to Fig. 2~3, described method bag
Include:
S201: page end reads file to be synchronized, and described file to be synchronized is carried out piecemeal, with
Obtain each blocks of files;
Step S201 is identical with step S101 of the embodiment shown in Fig. 1, the most superfluous at this
State.
S202: described page end calculates check code respectively to each blocks of files, and by file to be synchronized
Fileinfo and each blocks of files check code send to service end so that described service end according to
The fileinfo of file to be synchronized and the check code of each blocks of files use and roll verification algorithm to this
Ground file mates, and the fileinfo that the match is successful feeds back to described page end, institute
State fileinfo to include: file size, blocks of files size and blocks of files sequence number;
It should be noted that roll the matching efficiency of checking algorithm, this reality to improve service end
Executing in mode, the check code of the described fileinfo by file to be synchronized and each blocks of files sends extremely
Service end, farther includes:
The check code of each blocks of files is stored to check code Hash table (checksum hash map)
In, fileinfo and the described check code Hash table of file to be synchronized are sent to service end, sends out
The data structure sending data can refer to checksum list in Fig. 4 a, Fig. 4 a and illustrates packet
Data structure, in packet before the BlockSize of 4Bytes represent file size, 5-8
The FileSize of Bytes is 32 integers, represents the size of blocks of files.Below by 4Bytes
The Adler32 of length represents the weak check value of a blocks of files, the md5 of 8Bytes represent
The strong check value of blocks of files.
It will be appreciated that in present embodiment, use Javascript language to calculate weak verification
Value (Alder32 algorithm) and strong check value (MD5 algorithm)
In implementing, in this step, by fileinfo and each blocks of files of file to be synchronized
Check code send to service end so that described service end is according to the fileinfo of file to be synchronized
And the check code of each blocks of files uses and rolls verification algorithm and mate local file, and will not
The fileinfo that the match is successful feeds back to described page end, farther includes:
The check code of the fileinfo of file to be synchronized and each blocks of files is sent to service end, with
Make described service end to local file according to described blocks of files size, from first blocks of files pair
Should partly start, successively the current check part of Backwards selection, and calculate the school of current check part
Test value, the check value of calculating made a look up in described check code Hash table, search less than
Time, the fileinfo of current check part respective file block is added to the file that the match is successful
Information, until after described local file is all made a look up, by the fileinfo that the match is successful
Feeding back to described page end, the data structure of the fileinfo that the match is successful can refer to Fig. 4 b.
For ease of follow-up Piece file mergence, in present embodiment, by the check value of calculating described
After check code Hash table makes a look up, when finding, by current check part correspondence literary composition
The blocks of files sequence number of part block and positional information add to matching files information (matched
Document list) in, the data structure of matching files information can refer to Fig. 4 c.
The fileinfo that described in the reception of S203: described page end, the match is successful, and will be with described
The blocks of files that the fileinfo that the match is successful is corresponding sends to described service end, so that described clothes
The blocks of files received and local file are carried out file splicing, to realize file synchronization by business end.
Correspondingly, in this step, by the file corresponding with the described not fileinfo that the match is successful
Block sends to described service end, so that described service end is by the blocks of files received and local file
Carry out file splicing, to realize file synchronization, farther include:
The blocks of files corresponding with the described not fileinfo that the match is successful is sent to described service
End so that described service end according to matching files information by the blocks of files received and local file
Carry out file splicing, to realize file synchronization.
In implementing, described page end is by corresponding with the described not fileinfo that the match is successful
Blocks of files (patch document) put into patch file block queue (patch document
Queue) send to service end in.
The blocks of files received and local file are carried out literary composition according to matching files information by service end
The flow process of part splicing, as it is shown in figure 5, newly-built " in the synchronization " file (Syncing of service end
File), add blocks of files according to document number order to Syncing File, if this sequence number occurs
In matched document list, just according to the position of this blocks of files blocks of files from old literary composition
Part takes out and puts in Syncing File, if not, just from patch document queue
The end of file is added in middle taking-up first piece to, and by first piece of deletion of patch document.
Constantly repeat this process until All Files block is become according to sequential concatenation original for New File
The file the same with described file to be synchronized, it is achieved the differential coding of file synchronizes.
For method embodiment, in order to be briefly described, therefore it is all expressed as a series of dynamic
Combining, but those skilled in the art should know, embodiment of the present invention is by being retouched
The restriction of the sequence of movement stated, because according to embodiment of the present invention, some step can use
Other sequentially or are carried out simultaneously.Secondly, those skilled in the art also should know, description
Described in embodiment belong to preferred implementation, involved action is not necessarily
Necessary to embodiment of the present invention.
Fig. 6 is that the page end of one embodiment of the present invention carries out file differential coding synchronizer
Structured flowchart;With reference to Fig. 6, described device includes:
Read blocking unit 601, be used for reading file to be synchronized, described file to be synchronized is entered
Row piecemeal, to obtain each blocks of files;
Verification computing unit 602, for each blocks of files calculates check code respectively, and will treat same
The fileinfo of step file and the check code of each blocks of files send to service end, so that described service
Local file is carried out by end according to the fileinfo of file to be synchronized and the check code of each blocks of files
Coupling, and the fileinfo that the match is successful is fed back to described page end;
Piece file mergence unit 603, is used for the fileinfo that described in receiving, the match is successful, and will
The blocks of files corresponding with the described not fileinfo that the match is successful sends to described service end, so that
The blocks of files received and local file are carried out file splicing, to realize file by described service end
Synchronize.
In the optional embodiment of one of the present invention, described verification computing unit, use further
In the check code of each blocks of files is stored to check code Hash table, by the file of file to be synchronized
Information and described check code Hash table send to service end.
In the optional embodiment of one of the present invention, described fileinfo includes: file size,
Blocks of files size and blocks of files sequence number;
Described verification computing unit, is further used for the fileinfo of file to be synchronized and each literary composition
The check code of part block sends to service end, so that described service end is according to the file of file to be synchronized
The check code of information and each blocks of files uses rolling verification algorithm to mate local file, and
The fileinfo that the match is successful is fed back to described page end.
In the optional embodiment of one of the present invention, described verification computing unit, use further
In the fileinfo of file to be synchronized and the check code of each blocks of files are sent to service end, so that
Described service end to local file according to described blocks of files size, from corresponding with first blocks of files
Part starts, the current check part of Backwards selection successively, and calculates the verification of current check part
Value, makes a look up the check value of calculating in described check code Hash table, is searching the most then,
The fileinfo of current check part respective file block is added to the file letter that the match is successful
Breath, until after described local file is all made a look up, by anti-for the fileinfo that the match is successful
Feed described page end.
In the optional embodiment of one of the present invention, described verification computing unit, be additionally operable to by
After the check value calculated makes a look up in described check code Hash table, when finding, will
Blocks of files sequence number and the positional information of current check part respective file block add to matching files
In information;
Described verification computing unit, be further used for by with the described not fileinfo that the match is successful
Corresponding blocks of files sends to described service end, so that described service end is according to matching files information
The blocks of files received and local file are carried out file splicing, to realize file synchronization.
For device embodiments, due to itself and method embodiment basic simlarity, so
Describe is fairly simple, and relevant part sees the part of method embodiment and illustrates.
It should be noted that, in all parts of assembly of the invention, to be realized according to it
Function and parts therein have been carried out logical partitioning, but, the present invention is not only restricted to this, can
As required all parts repartitioned or to combine.
The all parts embodiment of the present invention can realize with hardware, or with at one or
The software module run on multiple processors realizes, or realizes with combinations thereof.This device
In, equipment or device are remotely controlled by PC by realizing the Internet, control equipment accurately
Or the step of each operation of device.The present invention is also implemented as performing described here
Part or all equipment of method or device program (such as, computer program and
Computer program).It is achieved in that the program of the present invention can be stored in computer-readable and be situated between
In matter, and the file or document that program produces has and statistically can produce data report and cpk
Reports etc., can carry out batch testing to power amplifier and add up.It should be noted above-mentioned embodiment
The present invention will be described rather than limits the invention, and those skilled in the art exist
Replacement embodiment can be designed without departing from the scope of the appended claims.In right
In requirement, any reference marks that should not will be located between bracket is configured to the limit to claim
System.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.It is positioned at
Word "a" or "an" before element does not excludes the presence of multiple such element.This
Bright can be by means of including the hardware of some different elements and by means of properly programmed meter
Calculation machine realizes.If in the unit claim listing equipment for drying, if in these devices
Dry can be specifically to be embodied by same hardware branch.Word first, second, Yi Ji
Third use does not indicates that any order.Can be title by these word explanations.
Embodiment of above is merely to illustrate the present invention, and not limitation of the present invention, relevant
The those of ordinary skill of technical field, without departing from the spirit and scope of the present invention,
Can also make a variety of changes and modification, the technical scheme of the most all equivalents falls within the present invention
Category, the scope of patent protection of the present invention should be defined by the claims.
Claims (10)
1. a page end carries out file differential coding synchronous method, it is characterised in that described
Method includes:
Page end reads file to be synchronized, and described file to be synchronized is carried out piecemeal, each to obtain
Blocks of files;
Described page end calculates check code respectively to each blocks of files, and by the file of file to be synchronized
The check code of information and each blocks of files sends to service end, so that described service end is according to be synchronized
Local file is mated by the fileinfo of file and the check code of each blocks of files, and will not
Join successful fileinfo and feed back to described page end;
The fileinfo that described in the reception of described page end, the match is successful, and will not mate with described
The blocks of files that successfully fileinfo is corresponding sends to described service end, so that described service end will
The blocks of files received and local file carry out file splicing, to realize file synchronization.
2. the method for claim 1, it is characterised in that described by file to be synchronized
Fileinfo and each blocks of files check code send to service end, farther include:
The check code of each blocks of files is stored to check code Hash table, by the literary composition of file to be synchronized
Part information and described check code Hash table send to service end.
3. the method as according to any one of claim 1~2, it is characterised in that described literary composition
Part information includes: file size, blocks of files size and blocks of files sequence number;
The check code of the described fileinfo by file to be synchronized and each blocks of files sends to service
End, so that described service end is according to the fileinfo of file to be synchronized and the check code of each blocks of files
Local file is mated, and the fileinfo that the match is successful is fed back to described webpage
End, farther includes:
The check code of the fileinfo of file to be synchronized and each blocks of files is sent to service end, with
Described service end is made to use according to the fileinfo of file to be synchronized and the check code of each blocks of files
Roll verification algorithm local file is mated, and the fileinfo that the match is successful is fed back
To described page end.
4. method as claimed in claim 3, it is characterised in that described by file to be synchronized
Fileinfo and each blocks of files check code send to service end so that described service end according to
The fileinfo of file to be synchronized and the check code of each blocks of files use and roll verification algorithm to this
Ground file mates, and the fileinfo that the match is successful is fed back to described page end, enters
One step includes:
The check code of the fileinfo of file to be synchronized and each blocks of files is sent to service end, with
Make described service end to local file according to described blocks of files size, from first blocks of files pair
Should partly start, successively the current check part of Backwards selection, and calculate the school of current check part
Test value, the check value of calculating made a look up in described check code Hash table, search less than
Time, the fileinfo of current check part respective file block is added to the file that the match is successful
Information, until after described local file is all made a look up, by the fileinfo that the match is successful
Feed back to described page end.
5. method as claimed in claim 4, it is characterised in that the described verification that will calculate
After value makes a look up in described check code Hash table, when finding, by current check portion
The blocks of files sequence number and the positional information that divide respective file block add to matching files information;
Described by the most described for the blocks of files transmission corresponding with the described not fileinfo that the match is successful
Service end, so that the blocks of files received and local file are carried out file spelling by described service end
Connect, to realize file synchronization, farther include:
The blocks of files corresponding with the described not fileinfo that the match is successful is sent to described service
End so that described service end according to matching files information by the blocks of files received and local file
Carry out file splicing, to realize file synchronization.
6. a page end carries out file differential coding synchronizer, it is characterised in that described
Device includes:
Read blocking unit, be used for reading file to be synchronized, described file to be synchronized is carried out point
Block, to obtain each blocks of files;
Verification computing unit, for calculating check code respectively, and by literary composition to be synchronized to each blocks of files
The fileinfo of part and the check code of each blocks of files send to service end, so that described service end root
According to the fileinfo of file to be synchronized and the check code of each blocks of files, local file is mated,
And the fileinfo that the match is successful is fed back to described page end;
Piece file mergence unit, is used for the fileinfo that described in receiving, the match is successful, and will be with institute
State blocks of files corresponding to the fileinfo that the match is successful to send to described service end, so that described
The blocks of files received and local file are carried out file splicing by service end, same to realize file
Step.
7. device as claimed in claim 6, it is characterised in that described verification computing unit,
It is further used for storing to check code Hash table, by literary composition to be synchronized the check code of each blocks of files
The fileinfo of part and described check code Hash table send to service end.
8. the device as according to any one of claim 6~7, it is characterised in that described literary composition
Part information includes: file size, blocks of files size and blocks of files sequence number;
Described verification computing unit, is further used for the fileinfo of file to be synchronized and each literary composition
The check code of part block sends to service end, so that described service end is according to the file of file to be synchronized
The check code of information and each blocks of files uses rolling verification algorithm to mate local file, and
The fileinfo that the match is successful is fed back to described page end.
9. device as claimed in claim 8, it is characterised in that described verification computing unit,
It is further used for sending to clothes the fileinfo of file to be synchronized and the check code of each blocks of files
Business end so that described service end to local file according to described blocks of files size, from first
Blocks of files corresponding part starts, successively the current check part of Backwards selection, and calculates current verification
The check value of part, makes a look up the check value of calculating in described check code Hash table,
Search the most then, the fileinfo of current check part respective file block is added to not mating into
The fileinfo of merit, until after described local file is all made a look up, by what the match is successful
Fileinfo feeds back to described page end.
10. device as claimed in claim 9, it is characterised in that described verification computing unit,
After being additionally operable to make a look up the check value of calculating in described check code Hash table, searching
Then, the blocks of files sequence number of current check part respective file block and positional information are added to
Join in fileinfo;
Described verification computing unit, be further used for by with the described not fileinfo that the match is successful
Corresponding blocks of files sends to described service end, so that described service end is according to matching files information
The blocks of files received and local file are carried out file splicing, to realize file synchronization.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610158075.1A CN105872017A (en) | 2016-03-18 | 2016-03-18 | Method and apparatus for carrying out file differential encoding synchronization at web page side |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610158075.1A CN105872017A (en) | 2016-03-18 | 2016-03-18 | Method and apparatus for carrying out file differential encoding synchronization at web page side |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105872017A true CN105872017A (en) | 2016-08-17 |
Family
ID=56625576
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610158075.1A Pending CN105872017A (en) | 2016-03-18 | 2016-03-18 | Method and apparatus for carrying out file differential encoding synchronization at web page side |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105872017A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107480267A (en) * | 2017-08-17 | 2017-12-15 | 无锡清华信息科学与技术国家实验室物联网技术中心 | A kind of method that file difference synchronizing speed is improved using locality |
CN107770273A (en) * | 2017-10-23 | 2018-03-06 | 上海斐讯数据通信技术有限公司 | A kind of big file cloud synchronous method and system |
CN109756568A (en) * | 2018-12-29 | 2019-05-14 | 上海掌门科技有限公司 | Processing method, equipment and the computer readable storage medium of file |
CN117112508A (en) * | 2023-10-20 | 2023-11-24 | 杭州美创科技股份有限公司 | File synchronization method and device based on serial numbers, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065098A (en) * | 2010-12-31 | 2011-05-18 | 网宿科技股份有限公司 | Method and system for synchronizing data among network nodes |
CN102163308A (en) * | 2011-04-18 | 2011-08-24 | 中国科学院计算技术研究所 | Flow service data uploading system and method |
US20130086009A1 (en) * | 2011-09-29 | 2013-04-04 | International Business Machines Corporation | Method and system for data deduplication |
CN103428242A (en) * | 2012-05-18 | 2013-12-04 | 阿里巴巴集团控股有限公司 | Method, device and system for increment synchronization |
CN103685509A (en) * | 2013-12-12 | 2014-03-26 | 深圳市彩讯科技有限公司 | Method for synchronizing file delta |
CN105100274A (en) * | 2015-08-31 | 2015-11-25 | 北京奇虎科技有限公司 | File uploading/downloading method and system in web environment, client and server |
-
2016
- 2016-03-18 CN CN201610158075.1A patent/CN105872017A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065098A (en) * | 2010-12-31 | 2011-05-18 | 网宿科技股份有限公司 | Method and system for synchronizing data among network nodes |
CN102163308A (en) * | 2011-04-18 | 2011-08-24 | 中国科学院计算技术研究所 | Flow service data uploading system and method |
US20130086009A1 (en) * | 2011-09-29 | 2013-04-04 | International Business Machines Corporation | Method and system for data deduplication |
CN103428242A (en) * | 2012-05-18 | 2013-12-04 | 阿里巴巴集团控股有限公司 | Method, device and system for increment synchronization |
CN103685509A (en) * | 2013-12-12 | 2014-03-26 | 深圳市彩讯科技有限公司 | Method for synchronizing file delta |
CN105100274A (en) * | 2015-08-31 | 2015-11-25 | 北京奇虎科技有限公司 | File uploading/downloading method and system in web environment, client and server |
Non-Patent Citations (1)
Title |
---|
周忠庆等: "《HTML 5 & CSS3 & JavaScript App程序开发实战》", 31 May 2014 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107480267A (en) * | 2017-08-17 | 2017-12-15 | 无锡清华信息科学与技术国家实验室物联网技术中心 | A kind of method that file difference synchronizing speed is improved using locality |
CN107770273A (en) * | 2017-10-23 | 2018-03-06 | 上海斐讯数据通信技术有限公司 | A kind of big file cloud synchronous method and system |
CN109756568A (en) * | 2018-12-29 | 2019-05-14 | 上海掌门科技有限公司 | Processing method, equipment and the computer readable storage medium of file |
CN109756568B (en) * | 2018-12-29 | 2022-05-27 | 上海掌门科技有限公司 | File processing method and device and computer readable storage medium |
CN117112508A (en) * | 2023-10-20 | 2023-11-24 | 杭州美创科技股份有限公司 | File synchronization method and device based on serial numbers, computer equipment and storage medium |
CN117112508B (en) * | 2023-10-20 | 2024-02-06 | 杭州美创科技股份有限公司 | File synchronization method and device based on serial numbers, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9792297B2 (en) | File folder transmission on network | |
CN105872017A (en) | Method and apparatus for carrying out file differential encoding synchronization at web page side | |
CN106452506B (en) | A kind of method that multiple data item disposably acquire | |
CN107037978B (en) | Data Migration bearing calibration and system | |
CN104378234B (en) | Across the data transmission processing method and system of data center | |
CN104348859B (en) | File synchronisation method, device, server, terminal and system | |
CN103297447B (en) | A kind of resource share method and its equipment | |
CN103401934A (en) | Method and system for acquiring log data | |
CN104410692A (en) | Method and system for uploading duplicated files | |
CN103389969A (en) | Method, device and system for previewing PDF (portable document format) file on mobile terminal | |
CN104079623B (en) | Multistage cloud storage synchronisation control means and system | |
CN103116615A (en) | Data index method and server based edition vector | |
CN108959278B (en) | Data synchronization method and device, electronic equipment and storage medium | |
CN105721526A (en) | Terminal and server file synchronization methods and device | |
CN111800223B (en) | Method, device and system for generating sending message and processing receiving message | |
CN105721520A (en) | File synchronization method and file synchronization device | |
CN105634721B (en) | A kind of RPKI data warehouse increment synchronization method | |
CN108900621A (en) | A kind of otherness cloud synchronous method calculating mode based on mist | |
CN104065613B (en) | Synchronous method, system and the device of a kind of off-line operation data of application | |
CN104994074B (en) | A kind of implementation method of the health examination machine communication server | |
CN103685509A (en) | Method for synchronizing file delta | |
CN110378154A (en) | A kind of method and device of file set completeness check | |
CN104079368B (en) | A kind of the test data transmission method and server of application software | |
CN113872994B (en) | Organization architecture synchronization method, device, computer equipment and storage medium | |
CN107707590A (en) | System, the method and device of data transfer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160817 |
|
RJ01 | Rejection of invention patent application after publication |