CN106331182B - A kind of file synchronisation method based on desktop virtualization - Google Patents

A kind of file synchronisation method based on desktop virtualization Download PDF

Info

Publication number
CN106331182B
CN106331182B CN201610994297.7A CN201610994297A CN106331182B CN 106331182 B CN106331182 B CN 106331182B CN 201610994297 A CN201610994297 A CN 201610994297A CN 106331182 B CN106331182 B CN 106331182B
Authority
CN
China
Prior art keywords
file
user
information
synchronization
modification
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.)
Active
Application number
CN201610994297.7A
Other languages
Chinese (zh)
Other versions
CN106331182A (en
Inventor
袁东风
曹野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University
Original Assignee
Shandong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University filed Critical Shandong University
Priority to CN201610994297.7A priority Critical patent/CN106331182B/en
Publication of CN106331182A publication Critical patent/CN106331182A/en
Application granted granted Critical
Publication of CN106331182B publication Critical patent/CN106331182B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to a kind of file synchronisation methods based on desktop virtualization, the method that the present invention carries out file synchronization for different file types and size dynamic adjustment file synchronization strategy, for different file sizes, dynamic select file synchronization strategy, simultaneously, for larger binary file, the file modification characteristic information provided based on user, use different file difference comparison algorithms and cutting method, efficient identification file changes position and sends change content, it synchronizes, avoids transmitting entire file, save a large amount of calculating and Internet resources.

Description

A kind of file synchronisation method based on desktop virtualization
Technical field
The present invention relates to a kind of file synchronisation methods based on desktop virtualization, especially suitable for desktop virtualization applied field Scape, while it being directed to different size of file, different synchronization policies are dynamically taken, field of computer technology is belonged to.
Background technique
Desktop virtual technology provides a kind of new computer usage mode for user, but since desktop virtualization is logical It is often long-range handling characteristics, it is same generally requires the file that user carries out distance host and local terminal using File Synchronization tool Step.
When traditional File Synchronization tool often uses text comparison in difference, file to update when carrying out file synchronization function Between the methods of compare with piecemeal comparison in difference, these methods have relatively better performance to small documents and text file, but It is, during larger binary file is compared, due to that cannot modify to file itself, often using content point Block algorithm, but this algorithm, in two parts of differential position differences for comparing file, performance cannot be guaranteed to stablize, for example, CDC is calculated Method it is possible that ill phenomenon, meanwhile, each file comparison, which is required, carries out whole file scannings to two parts of files, so to being The computing resource consumption of system is larger, and the file verification information due to needing to transmit both ends in comparison process, so if dividing Block algorithm is too small to file granularity of division, also results in the loss of Internet resources.
To sum up, existing method often lacks good support for big binary file, cause these tools to big two into A large amount of calculating and Internet resources are consumed when file processed synchronizes.
Summary of the invention
In view of the deficiencies of the prior art, the present invention provides a kind of file synchronisation methods based on desktop virtualization;
The method that the present invention carries out file synchronization for different file types and size dynamic adjustment file synchronization strategy, needle To different file sizes, dynamic select file synchronization strategy, meanwhile, for larger binary file, provided based on user File modification characteristic information, using different file difference comparison algorithms and cutting method, efficient identification file changes position simultaneously Change content is sent, is synchronized, avoids transmitting entire file, saving largely calculates and Internet resources.
Term is explained
SOCKET, also known as " socket ", application program usually pass through " socket " and issue request or answering net to network Network request.
The technical solution of the present invention is as follows:
A kind of file synchronisation method based on desktop virtualization, including management node MON, operates in user terminal Client (user) and the Server for operating in remote dummy host, the management node MON are for saving user information and being somebody's turn to do The corresponding remote dummy host information of user, user information includes that user corresponds to account, password and terminal network IP, described remote Journey fictitious host computer information includes the corresponding remote dummy host domain name of user or IP, the user name of remote dummy host access and close Code, specific steps include:
(1) when running for the first time, user provides user terminal synchronization folder path and remote dummy host synchronization file Path;
(2) start synchronization program, enter step (3);
(3) Client connection management node M ON, sends the user information of user oneself, and management node MON obtains user's letter It ceases and is verified, if user information is correct, inquires the corresponding remote dummy host information of the user in the database and return Back to Client, otherwise, it re-execute the steps (3) or prompt mistake;
(4) it after Client obtains corresponding remote dummy host information, attempts to connect the remote dummy host, if connecting into Function then carries out step (5), otherwise, return step (3) or prompt mistake;
(5) All Files under user terminal synchronization folder path are generated file hash information by Client, and file dissipates Column information refers to the binary value that one section of specific length that MD5 operation obtains is carried out to file, and after the completion, Client is whole by user The file information of directory information and All Files under the synchronization folder path of end is sent to the Server of the remote dummy host, The file information includes filename, modification time, size, file hash information;
(6) Server receives the directory information and all texts under the user terminal synchronization folder path of Client transmission After the file information of part, the All Files under the remote dummy host synchronization folder path are generated into file hash information, and The file hash information and the remote dummy host of All Files under the user terminal synchronization folder path that Client is sent The file hash information of All Files under synchronization folder path is compared, comparison method are as follows: if file meets condition a Or otherwise condition b, the then file for determining this document to need to carry out file synchronization then determine that this document is not need to carry out text The synchronous file of part;Condition a refers to: belonging to the file existed only under user terminal synchronization folder path or exists only in remote File under journey fictitious host computer synchronization folder path;Condition b refers to: the text of the file under user terminal synchronization folder path Part name is identical as the filename of certain file under remote dummy host synchronization folder path and file hash information is different;
(7) judge whether that user is needed to provide the modification for the file for needing to carry out file synchronization that step (6) determine manually Characteristic information, judgment method are as follows:
A, user sets a file size threshold value MFS according to demand synchronization time or oneself institute's active file content character (max file size);The value range of MFS is voluntarily determined by actual user, and meaning is that user determines a file Sizes values, just without file comparison work, directly carry out whole file transmission when needing synchronous file to be less than this numerical value, Its unit can be the file sizes units such as Byte, KB, MB, GB.
B, the file that file synchronization is carried out for institute's some need that step (6) determine, less than being marked as directly for MFS Transmission is marked as needing user to provide file modification characteristic information more than or equal to MFS;
C, it enumerates and is marked as needing user to provide the listed files of file modification characteristic information, while being passed through by user can Visual interface is artificially that the file in listed files selects files and modifies the option of characteristic information, the choosing of file modification characteristic information Item includes stem addition, stem modification, whole file is synchronous, tail portion is modified, tail portion addition;
D, the file synchronous with whole file is chosen to be for the file for being marked as directly transmitting carries out directly synchronous; For the file for being chosen to be stem addition, stem modification, tail portion modification, tail portion addition, it is synchronous to carry out piecemeal.
It is preferred according to the present invention, in the step D, for the file for being marked as directly transmitting and it is chosen to be full text The synchronous file of part directly synchronize, if specific steps include: that file meets condition a, then be used directly SOCKET or text There are ends to be sent to the other end by file for part transport protocol, and when meeting condition a, this document exists only in user terminal or long-range empty Intend host side, one end existing for this file is referred to as file there are end, and transmission process is that there are end hairs from file by file It send to the other end;If file meets: with the file or remote dummy host synchronization text under user terminal synchronization folder path Part presss from both sides the file filename having the same under path, then according to two file renewal times, from later update one end by this article Part is sent to the other end, and replaces file identical with its filename.
It is preferred according to the present invention, in the step D, for be chosen to be stem addition, stem modification, tail portion modification, The file of tail portion addition carries out piecemeal and synchronizes, and specific steps include:
For be marked as stem addition, stem modification, tail portion modification or tail portion addition need synchronous documents, this document must So all exist in Client and Server and filename is identical.Different Documents Comparisons and synchronous plan are taken to this variety of situation Slightly, as follows respectively.
1. taking modification time in user terminal and remote dummy host side both ends for the file for being chosen to be stem addition File earlier takes this document size FS (file size) as reference value, in the file later from modification time, with file Tail portion is basic point, takes FS size forward, intercepts remainder, remainder is sent to the other end, the other end obtains remainder Point, it is incorporated into its local file stem, completes file synchronization, local file is exactly the text of the other end oneself local Part;
2. taking modification time in user terminal and remote dummy host side both ends for the file for being chosen to be tail portion addition File earlier takes its file size FS1 (file size) as reference value, in the file later from modification time, with file Stem is basic point, takes FS1 size backward, intercepts remainder, remainder is sent to the other end, the other end obtains remainder Point, it is incorporated into local file tail portion, completes file synchronization;
3. carrying out piecemeal for the file for being chosen to be stem modification and synchronizing, specific steps include:
(I) modification time file earlier is taken in user terminal and remote dummy host side both ends, its file size FS2 is taken (file size) is used as reference value, and as mark position MP (mark point), mark position refers to file for the position FS2/2 As 0, position moves backward the numerical value of particular size for initial position, for example, the position FS2/2 is half file size number Value, using MP as stepping position SP (step point);
(II) hashed value of user terminal and remote dummy host side both ends file from mark position MP to end-of-file is calculated, And be compared, if hashed value is identical, retains MP and carry out taking half operation, hold again as cleavage CP (cut point), MP Row step (II), until hashed value difference or MP < MFS;If hashed value is different, SP becomes SP*0.5, retains MP as cleavage CP (cut point), MP becomes MP+SP, re-execute the steps (II), until (FS-MP) < MFS or hashed value are identical;
(III) after the completion of calculating, 0 to CP section of the interception later file of modification time is sent to the other end, and the other end obtains surplus Remaining part point is incorporated into local file stem, completes file synchronization;
4. carrying out piecemeal for the file for being chosen to be tail portion modification and synchronizing, specific steps include:
(IV) modification time file earlier is taken in user terminal and remote dummy host side both ends, its file size is taken FS3 (file size) is used as reference value, and from the position FS3/2 as mark position MP1 (mark point), this MP1 numerical value is made For stepping position SP1 (step point);
(V) hashed value of user terminal and remote dummy host side both ends file from stem to MP1 is calculated, and is compared Compared with, if hashed value is different, retaining MP1 as cleavage CP1 (cut point), MP1 takes half operation, it is re-execute the steps (V), Until hashed value comparison result is identical or MP1 < MFS;If this hashed value is identical, SP1 becomes SP1+ (FS3-SP1)/2, protects Stay MP1 as cleavage CP1 (cut point), while MP1 becomes MP1+SP1, re-execute the steps (V), until FS3-MP1 Until < MFS or hashed value are different;
(VI) after the completion of calculating, the CP for intercepting the later file of modification time is sent to the other end, the other end to file endpiece Remainder is obtained, local file tail portion is incorporated into, completes file synchronization.
The invention has the benefit that
1, in the present invention, during file synchronization, if the file of required synchronization needs to carry out diversity ratio pair Larger binary file takes dichotomy to read file content to find file different piece then in comparison process, than To in the process, user terminal and remote dummy host side only need to exchange file hash information several times, rather than frequent exchange base In the file content characteristic information that other block algorithms generate, a large amount of Internet resources can be saved in file comparison process, together When, in generating file hash information process, due to using dichotomy thought, it may not be necessary to read all files content, energy The a large amount of calculating and I/O resource for enough saving node do not need to pass finally, due to only need to transmit difference section in synchronizing process Defeated All Files equally also save a large amount of Internet resources.
2, it in the present invention, is directly connected to by user terminal and remote dummy host side, does not need central node and participate in work, Central node is only responsible for authentication and the publication of fundamental node information when starting, avoids the possibility of Single Point of Faliure, significantly It improves to apply in desktop virtualization and needs the file synchronization efficiency in file synchronization application scenarios with other.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the file synchronisation method based on desktop virtualization of the present invention;
Fig. 2 is to carry out the synchronous process schematic of piecemeal for the file for being chosen to be stem modification;
Specific embodiment
The present invention is further qualified with embodiment with reference to the accompanying drawings of the specification, but not limited to this.
Embodiment
A kind of file synchronisation method based on desktop virtualization, including management node MON, operates in user terminal Client (user) and the Server for operating in remote dummy host, the management node MON are for saving user information and being somebody's turn to do The corresponding remote dummy host information of user, user information includes that user corresponds to account, password and terminal network IP, described remote Journey fictitious host computer information includes the corresponding remote dummy host domain name of user or IP, the user name of remote dummy host access and close Code, as shown in Figure 1, specific steps include:
(1) when running for the first time, user provides user terminal synchronization folder path and remote dummy host synchronization file Path;
(2) start synchronization program, enter step (3);
(3) Client connection management node M ON, sends the user information of user oneself, and management node MON obtains user's letter It ceases and is verified, if user information is correct, inquires the corresponding remote dummy host information of the user in the database and return Back to Client, otherwise, it re-execute the steps (3) or prompt mistake;
(4) it after Client obtains corresponding remote dummy host information, attempts to connect the remote dummy host, if connecting into Function then carries out step (5), otherwise, return step (3) or prompt mistake;
(5) All Files under user terminal synchronization folder path are generated file hash information by Client, and file dissipates Column information refers to the binary value that one section of specific length that MD5 operation obtains is carried out to file, and after the completion, Client is whole by user The file information of directory information and All Files under the synchronization folder path of end is sent to the Server of the remote dummy host, The file information includes filename, modification time, size, file hash information;
(6) Server receives the directory information and all texts under the user terminal synchronization folder path of Client transmission After the file information of part, the All Files under the remote dummy host synchronization folder path are generated into file hash information, and The file hash information and the remote dummy host of All Files under the user terminal synchronization folder path that Client is sent The file hash information of All Files under synchronization folder path is compared, comparison method are as follows: if file meets condition a Or otherwise condition b, the then file for determining this document to need to carry out file synchronization then determine that this document is not need to carry out text The synchronous file of part;Condition a refers to: belonging to the file existed only under user terminal synchronization folder path or exists only in remote File under journey fictitious host computer synchronization folder path;Condition b refers to: the text of the file under user terminal synchronization folder path Part name is identical as the filename of certain file under remote dummy host synchronization folder path and file hash information is different;
(7) judge whether that user is needed to provide the modification for the file for needing to carry out file synchronization that step (6) determine manually Characteristic information, judgment method are as follows:
A, user sets a file size threshold value MFS according to demand synchronization time or oneself institute's active file content character (max file size);The value range of MFS is voluntarily determined by actual user, and meaning is that user determines a file Sizes values, just without file comparison work, directly carry out whole file transmission when needing synchronous file to be less than this numerical value, Its unit can be the file sizes units such as Byte, KB, MB, GB.
B, the file that file synchronization is carried out for institute's some need that step (6) determine, less than being marked as directly for MFS Transmission is marked as needing user to provide file modification characteristic information more than or equal to MFS;
C, it enumerates and is marked as needing user to provide the listed files of file modification characteristic information, while being passed through by user can Visual interface is artificially that the file in listed files selects files and modifies the option of characteristic information, the choosing of file modification characteristic information Item includes stem addition, stem modification, whole file is synchronous, tail portion is modified, tail portion addition;
D, the file synchronous with whole file is chosen to be for the file for being marked as directly transmitting carries out directly synchronous; For the file for being chosen to be stem addition, stem modification, tail portion modification, tail portion addition, it is synchronous to carry out piecemeal.
In the step D, for the file for being marked as directly the transmitting file synchronous with whole file is chosen to be, carry out Directly synchronous, if specific steps include: that file meets condition a, SOCKET or the File Transfer Protocol of thening be used directly are by file There are ends to be sent to the other end, and when meeting condition a, this document exists only in user terminal or remote dummy host side, this file Existing one end is referred to as file there are end, and transmission process is that from file, there are ends to be sent to the other end by file;If File meets: with the file under user terminal synchronization folder path or the file under remote dummy host synchronization folder path Filename having the same is sent to the other end from later update one end by this document then according to two file renewal times, and Replace file identical with its filename.
In the step D, for be chosen to be stem addition, stem modification, tail portion modification, tail portion addition file, into Row piecemeal is synchronous, and specific steps include:
For be marked as stem addition, stem modification, tail portion modification or tail portion addition need synchronous documents, this document must So all exist in Client and Server and filename is identical.Different Documents Comparisons and synchronous plan are taken to this variety of situation Slightly, as follows respectively.
1. taking modification time in user terminal and remote dummy host side both ends for the file for being chosen to be stem addition File earlier takes this document size FS (file size) as reference value, in the file later from modification time, with file Tail portion is basic point, takes FS size forward, intercepts remainder, remainder is sent to the other end, the other end obtains remainder Point, it is incorporated into its local file stem, completes file synchronization;
2. taking modification time in user terminal and remote dummy host side both ends for the file for being chosen to be tail portion addition File earlier takes its file size FS1 (file size) as reference value, in the file later from modification time, with file Stem is basic point, takes FS1 size backward, intercepts remainder, remainder is sent to the other end, the other end obtains remainder Point, it is incorporated into local file tail portion, completes file synchronization;
3. carrying out piecemeal for the file for being chosen to be stem modification and synchronizing, specific steps include:
(I) modification time file earlier is taken in user terminal and remote dummy host side both ends, its file size FS2 is taken (file size) is used as reference value, and as mark position MP (mark point), mark position refers to file for the position FS2/2 As 0, position moves backward the numerical value of particular size for initial position, for example, the position FS2/2 is half file size number Value, using MP as stepping position SP (step point);
(II) hashed value of user terminal and remote dummy host side both ends file from mark position MP to end-of-file is calculated, And be compared, if hashed value is identical, retains MP and carry out taking half operation, hold again as cleavage CP (cut point), MP Row step (II), until hashed value difference or MP < MFS;If hashed value is different, SP becomes SP*0.5, retains MP as cleavage CP (cut point), MP becomes MP+SP, re-execute the steps (II), until (FS-MP) < MFS or hashed value are identical;
(III) after the completion of calculating, 0 to CP section of the interception later file of modification time is sent to the other end, and the other end obtains surplus Remaining part point is incorporated into local file stem, completes file synchronization;
Step is 3. as shown in Figure 2, the specific steps are as follows:
E, dichotomy is cut for the first time, compares the file hash information of right part;
F, the file hash information of right part is identical, and cleavage is moved to the left MP/2 and carries out second of cutting;
G, continue file hash information on the right side of comparison, it is as a result identical, continue to be moved to the left cleavage;
H, third time is cut, and comparison result is different, and using second of cleavage as final result, Documents Comparison is completed.
4. carrying out piecemeal for the file for being chosen to be tail portion modification and synchronizing, specific steps include:
(IV) modification time file earlier is taken in user terminal and remote dummy host side both ends, its file size is taken FS3 (file size) is used as reference value, and from the position FS3/2 as mark position MP1 (mark point), this MP1 numerical value is made For stepping position SP1 (step point);
(V) hashed value of user terminal and remote dummy host side both ends file from stem to MP1 is calculated, and is compared Compared with, if hashed value is different, retaining MP1 as cleavage CP1 (cut point), MP1 takes half operation, it is re-execute the steps (V), Until hashed value comparison result is identical or MP1 < MFS;If this hashed value is identical, SP1 becomes SP1+ (FS3-SP1)/2, protects Stay MP1 as cleavage CP1 (cut point), while MP1 becomes MP1+SP1, re-execute the steps (V), until FS3-MP1 Until < MFS or hashed value are different;
(VI) after the completion of calculating, the CP for intercepting the later file of modification time is sent to the other end, the other end to file endpiece Remainder is obtained, local file tail portion is incorporated into, completes file synchronization.

Claims (3)

1. a kind of file synchronisation method based on desktop virtualization, which is characterized in that including management node MON, operate in user The Client of the terminal and Server for operating in remote dummy host, the management node MON are for saving user information and being somebody's turn to do The corresponding remote dummy host information of user, user information includes that user corresponds to account, password and terminal network IP, described remote Journey fictitious host computer information includes the corresponding remote dummy host domain name of user or IP, the user name of remote dummy host access and close Code, specific steps include:
(1) when running for the first time, user provides user terminal synchronization folder path and remote dummy host synchronization folder path;
(2) start synchronization program, enter step (3);
(3) Client connection management node M ON, sends the user information of user oneself, and management node MON obtains user information simultaneously It is verified, if user information is correct, inquires the corresponding remote dummy host information of the user in the database and return to Otherwise Client re-execute the steps (3) or prompt mistake;
(4) it after Client obtains corresponding remote dummy host information, attempts to connect the remote dummy host, if successful connection, Step (5) are then carried out, otherwise, return step (3) or prompt mistake;
(5) All Files under user terminal synchronization folder path are generated file hash information, file hash letter by Client Breath refers to the binary value that one section of specific length that MD5 operation obtains is carried out to file, and after the completion, Client is same by user terminal The file information of directory information and All Files under step file folder path is sent to the Server of the remote dummy host, described The file information includes filename, modification time, size, file hash information;
(6) Server receives directory information and All Files under the user terminal synchronization folder path of Client transmission After the file information, the All Files under the remote dummy host synchronization folder path are generated into file hash information, and will The file hash information of All Files and the remote dummy host are same under the user terminal synchronization folder path that Client is sent The file hash information of All Files under step file folder path is compared, comparison method are as follows: if file meet condition a or Otherwise condition b, the then file for determining this document to need to carry out file synchronization then determine that this document is not need to carry out file Synchronous file;Condition a refers to: belonging to the file existed only under user terminal synchronization folder path or exists only in long-range File under fictitious host computer synchronization folder path;Condition b refers to: the file of the file under user terminal synchronization folder path Name is identical as the filename of certain file under remote dummy host synchronization folder path and file hash information is different;
(7) judge whether that user is needed to provide the modification feature for the file for needing to carry out file synchronization that step (6) determine manually Information, judgment method are as follows:
A, user sets a file size threshold value MFS;
B, the file that file synchronization is carried out for institute's some need that step (6) determine, is marked as directly passing less than MFS It is defeated, it is marked as needing user to provide file modification characteristic information more than or equal to MFS;
C, it enumerates and is marked as needing user to provide the listed files of file modification characteristic information, while being passed through by user can visual field Face is artificially that the file in listed files selects files and modifies the option of characteristic information, the option packet of file modification characteristic information Include stem addition, stem modification, whole file synchronization, tail portion modification, tail portion addition;
D, the file synchronous with whole file is chosen to be for the file for being marked as directly transmitting carries out directly synchronous;For It is chosen to be the file of stem addition, stem modification, tail portion modification, tail portion addition, it is synchronous to carry out piecemeal.
2. a kind of file synchronisation method based on desktop virtualization according to claim 1, which is characterized in that the step In D, for the file for being marked as directly the transmitting file synchronous with whole file is chosen to be, directly synchronous, specific step is carried out If including: suddenly that file meets condition a, SOCKET or the File Transfer Protocol of thening be used directly by file there are end be sent to it is another End, when meeting condition a, this document exists only in user terminal or remote dummy host side, and one end existing for this file is claimed It is file there are end, transmission process is that from file, there are ends to be sent to the other end by file;If file meets: with user's end The file under synchronization folder path or the file filename having the same under remote dummy host synchronization folder path are held, Then according to two file renewal times, it is sent to the other end from later update one end by this document, and replace and its file famous prime minister Same file.
3. a kind of file synchronisation method based on desktop virtualization according to claim 1, which is characterized in that the step In D, for the file for being chosen to be stem addition, stem modification, tail portion modification, tail portion addition, progress piecemeal is synchronous, specific to walk Suddenly include:
1. taking modification time in user terminal and remote dummy host side both ends more early for the file for being chosen to be stem addition File, take this document size FS as reference value, in the file later from modification time, using tail of file as basic point, forward FS size is taken, remainder is intercepted, remainder is sent to the other end, the other end obtains remainder, is incorporated into it Local file stem completes file synchronization;
2. taking modification time in user terminal and remote dummy host side both ends more early for the file for being chosen to be tail portion addition File, take its file size FS1 as reference value, in the file later from modification time, using file header as basic point, backward FS1 size is taken, remainder is intercepted, remainder is sent to the other end, the other end obtains remainder, is incorporated into this Ground tail of file completes file synchronization;
3. carrying out piecemeal for the file for being chosen to be stem modification and synchronizing, specific steps include:
(I) modification time file earlier is taken in user terminal and remote dummy host side both ends, the FS2 conduct of its file size is taken Reference value, as mark position MP, mark position refers to that position moves backward spy using file initial position as 0 for the position FS2/2 The numerical value for determining size, using MP as stepping position SP;
(II) hashed value of user terminal and remote dummy host side both ends file from mark position MP to end-of-file is calculated, is gone forward side by side Row compares, if hashed value is identical, retains MP and carries out taking half operation as cleavage CP, MP, re-execute the steps (II), until Hashed value difference or MP < MFS;If hashed value is different, SP becomes SP*0.5, and retaining MP as cleavage CP, MP becomes MP+SP, It is re-execute the steps (II), until (FS-MP) < MFS or hashed value are identical;
(III) after the completion of calculating, 0 to CP section of the interception later file of modification time is sent to the other end, and the other end obtains remainder Point, it is incorporated into local file stem, completes file synchronization;
4. carrying out piecemeal for the file for being chosen to be tail portion modification and synchronizing, specific steps include:
(IV) modification time file earlier is taken in user terminal and remote dummy host side both ends, its file size FS3 is taken to make For reference value, from the position FS3/2 as mark position MP1, using this MP1 numerical value as stepping position SP1;
(V) hashed value of user terminal and remote dummy host side both ends file from stem to MP1 is calculated, and is compared, if Hashed value is different, retains MP1 as cleavage CP1, MP1 and takes half operation, re-execute the steps (V), until hashed value compares knot Until fruit is identical or MP1 < MFS;If this hashed value is identical, SP1 becomes SP1+ (FS3-SP1)/2, retains MP1 as cleavage CP1, while MP1 becomes MP1+SP1, re-execute the steps (V), until FS3-MP1 < MFS or hashed value are different;
(VI) after the completion of calculating, the CP for intercepting the later file of modification time is sent to the other end to file endpiece, and the other end obtains Remainder is incorporated into local file tail portion, completes file synchronization.
CN201610994297.7A 2016-11-11 2016-11-11 A kind of file synchronisation method based on desktop virtualization Active CN106331182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610994297.7A CN106331182B (en) 2016-11-11 2016-11-11 A kind of file synchronisation method based on desktop virtualization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610994297.7A CN106331182B (en) 2016-11-11 2016-11-11 A kind of file synchronisation method based on desktop virtualization

Publications (2)

Publication Number Publication Date
CN106331182A CN106331182A (en) 2017-01-11
CN106331182B true CN106331182B (en) 2019-05-07

Family

ID=57817024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610994297.7A Active CN106331182B (en) 2016-11-11 2016-11-11 A kind of file synchronisation method based on desktop virtualization

Country Status (1)

Country Link
CN (1) CN106331182B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509172B (en) * 2018-04-13 2024-05-24 北京神州数码云科信息技术有限公司 Synchronous display data transmission method, device, system and computer storage medium
CN109271167A (en) * 2018-10-08 2019-01-25 郑州云海信息技术有限公司 A kind of document transmission method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354708A (en) * 2008-07-29 2009-01-28 四川大学 Remote file rapid synchronization method
CN103634406A (en) * 2013-12-11 2014-03-12 北京荣之联科技股份有限公司 File synchronization method and terminal thereof
CN104348884A (en) * 2013-08-08 2015-02-11 中国科学院计算机网络信息中心 Cloud storage automatic synchronization method
CN105302486A (en) * 2015-10-20 2016-02-03 山东乾云启创信息科技股份有限公司 Virtual offline desktop block device storage synchronization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60213419T2 (en) * 2001-03-16 2007-10-31 Novell, Inc., Provo CLIENT SERVER MODEL FOR SYNCHRONIZING FILES

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354708A (en) * 2008-07-29 2009-01-28 四川大学 Remote file rapid synchronization method
CN104348884A (en) * 2013-08-08 2015-02-11 中国科学院计算机网络信息中心 Cloud storage automatic synchronization method
CN103634406A (en) * 2013-12-11 2014-03-12 北京荣之联科技股份有限公司 File synchronization method and terminal thereof
CN105302486A (en) * 2015-10-20 2016-02-03 山东乾云启创信息科技股份有限公司 Virtual offline desktop block device storage synchronization method

Also Published As

Publication number Publication date
CN106331182A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
EP3660664B1 (en) File folder transmission on network
WO2017114205A1 (en) Short link processing method, device and server
US20160057201A1 (en) File Uploading Method, Client, and Application Server in Cloud Storage, and Cloud Storage System
US8180054B2 (en) Authenticating system, authenticating method, and authenticating program
CN103812849B (en) A kind of local cache update method, system, client and server
WO2004063928A1 (en) Database load reducing system and load reducing program
RU2004132538A (en) FILES REPLICATION OPTIMIZATION USING BINARY COMPARISONS
CN101854391B (en) Realization method of ares protocol analysis system based on peer-to-peer network
US20120303680A1 (en) Method for the preemptive creation of binary delta information within a computer network
JP6079152B2 (en) Document editing notification method, server, program and system thereof
WO1998038762A2 (en) Determining visibility to a remote database client
WO2017215646A1 (en) Data transmission method and apparatus
US7082129B2 (en) Secure method and system to prevent external unauthorized remotely initiated power up events in computer
CN106331182B (en) A kind of file synchronisation method based on desktop virtualization
US9390101B1 (en) Social deduplication using trust networks
CN103024085A (en) System and method for processing P2P (peer-to-peer) node request
KR102295593B1 (en) Automatically generating certification documents
CN102523290A (en) Data processing method, device and system
US20130159525A1 (en) Information processing apparatus and data control method
CN104639546A (en) Multi-biometric feature comprehensive authentication method, device and system
WO2019196237A1 (en) Resident household registration information management method, server and computer readable storage medium
CN101360111A (en) Customer managing method, apparatus and system
WO2015124668A1 (en) Tree-structure storage method for managing computation offloading data
CN104994179B (en) A kind of data processing method and server
CN108243207A (en) A kind of date storage method of network cloud disk

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant