CN108200217A - The synchronous method and system of a kind of data - Google Patents

The synchronous method and system of a kind of data Download PDF

Info

Publication number
CN108200217A
CN108200217A CN201810179780.9A CN201810179780A CN108200217A CN 108200217 A CN108200217 A CN 108200217A CN 201810179780 A CN201810179780 A CN 201810179780A CN 108200217 A CN108200217 A CN 108200217A
Authority
CN
China
Prior art keywords
data
file
storage medium
synchronizer
condition 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
Application number
CN201810179780.9A
Other languages
Chinese (zh)
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.)
Jilin Institute of Chemical Technology
Original Assignee
Jilin Institute of Chemical Technology
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 Jilin Institute of Chemical Technology filed Critical Jilin Institute of Chemical Technology
Priority to CN201810179780.9A priority Critical patent/CN108200217A/en
Publication of CN108200217A publication Critical patent/CN108200217A/en
Pending legal-status Critical Current

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/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

This application discloses a kind of methods that data synchronize, this method carries out two-way pairing using the condition code of readable storage medium storing program for executing and data synchronizer, and comparison between data file parameter information is carried out using performing the data synchronization log that synchronous initiation operates after two-way pairing passes through, older data file is replaced using the latest data file looked for, it is newest with all data files ensured in readable storage mechanism and data synchronizer, data synchronize exhaustive, are manually operated, improve the usage experience of user without user.The application further simultaneously discloses the system that a kind of data synchronize, and has above-mentioned advantageous effect.

Description

The synchronous method and system of a kind of data
Technical field
This application involves data field of synchronization, the synchronous method and system of more particularly to a kind of data.
Background technology
With the facility of traffic, go to it is in all parts of the country expand that client, commencing business becomes increasingly common, thus two places are done Public, the phenomenon that even handling official business mostly, occurs more therewith, also results in staff sometimes for last bus or other reasons is caught up with and needs Same action is being carried out, therefore how to ensure correctly not omit newest content, just except normal office work place True preservation and carrying just seems most important to office space.
The prior art realized mostly using two class modes, one:Using network cloud disk, manually or automatically carried out by user Biography task, according to the mode uploaded manually, it is also necessary to it is special vacate part-time recall which data file be it is modified, Or All Files are carried out compression be packaged to upload, complicated for operation, cumbersome and memory is unreliable, easily occurs omitting or wrong phenomenon; According to the mode uploaded automatically, it will one fixed upload path of setting, all data files under destination path are equal Network cloud disk is uploaded to, due to and there is no Filtering system, it may appear that the file renaming phenomenon largely occurred due to duplication of name, And do not know that data file how many days is respectively positioned under a path, it is especially inconvenient to cause to find;Secondly:Utilize tradition Storage medium do data transmission carrier, such as USB flash disk, but this method still need user oneself judge which be need I into Row is transferred to the latest data file of USB flash disk, often forgets to copy latest data file in the case of hasty to USB flash disk, causes Waste the time.
So technological deficiency existing for how overcoming the available data method of synchronization, provide it is a kind of it is full-automatic, to data file Parameter information carry out accurately analysis, data synchronize exhaustive, need not occupy the data synchronization mechanism of individual synchronization time and be Those skilled in the art's urgent problem to be solved.
Invention content
The purpose of the application is to provide a kind of method that data synchronize, and utilizes readable storage medium storing program for executing and data synchronizer Condition code carries out two-way pairing, and the data synchronization log operated after two-way pairing passes through using synchronous initiation is performed The comparison between data file parameter information is carried out, older data file is replaced using the latest data file looked for, with true All data files protected in readable storage mechanism and data synchronizer are newest, and data synchronize exhaustive, without user It is manually operated, improves the usage experience of user.
The another object of the application is the provision of the system that a kind of data synchronize.
To achieve the above object, the application provides a kind of method that data synchronize, and this method includes:
The storage medium condition code of acquisition readable storage medium storing program for executing and the synchronizer condition code of data synchronizer, and according to The first pairing of storage medium condition code generation file matches file according to synchronizer condition code generation second;
Described first pairing file is preserved and is matched to the first preset path of the data synchronizer, by described second File is preserved to the second preset path of the readable storage medium storing program for executing;
Synchronous initiation operation is performed both by the readable storage medium storing program for executing and the data synchronizer, obtains data synchronization Daily record;
Judge whether the practical storage medium condition code got of the data synchronizer has been in described first successively It matches in file, whether the practical synchronizer condition code got of the readable storage medium storing program for executing has been in the second pairing text In part;
If being to be, data synchronization log described in the readable storage medium storing program for executing and the data synchronizer Parameter information, and all data files are updated to the version for possessing the newest modification date.
Optionally, the storage medium condition code of readable storage medium storing program for executing and the synchronizer feature of data synchronizer are obtained Code, and match using the first pairing of storage medium condition code generation file, using synchronizer condition code generation second To file, including:
The hardware configuration information of the readable storage medium storing program for executing is obtained, and the first configuration file is generated by preset format requirement, And the storage medium condition code is obtained by hash algorithm to first configuration file;
The hardware configuration information of the data synchronizer is obtained, and the second configuration file is generated by the preset format, And to described and configuration file obtains the synchronizer condition code by the hash algorithm;
The storage medium condition code is stored in the first notepad and obtains the first pairing file, by the synchronization Equipment condition code is stored in the second notepad, obtains the second pairing file.
Optionally, it preserves under the first preset path to the data synchronizer in the described first pairing file, by institute It states before the second pairing file preserved to the second preset path of the readable storage medium storing program for executing, further includes:
Judge whether there are entitled " data synchronous documents under first preset path and second preset path The file of folder ";
If it is not, then the file is created under first preset path and second preset path.
Optionally, synchronous initiation operation is performed both by the readable storage medium storing program for executing and the data synchronizer, is obtained Reference synchronization data, including:
Obtain the parameter information of all data files in the file;Wherein, the parameter information include data format, The modification time of size of data and data;
The parameter information that the data file of the same title will be belonged to according to the different names of each data file is whole Reason obtains the reference synchronization data under identical title.
Optionally, the parameter of data synchronization log described in the readable storage medium storing program for executing and the data synchronizer Information, and all data files are updated to the version for possessing the newest modification date, including:
Extraction obtains the first parameter information, from preservation from the data synchronization log being stored in the readable storage medium storing program for executing Extraction obtains the second parameter information in data synchronization log in the data synchronizer;
Compare first parameter information and described second from parameter information each data file modification day Duration of the phase away from current time;
To possess the data file appended synchronization label most long in short-term away from the current time;
Other data files for possessing identical data title are covered using the data file for being attached with the synchronous marked price, directly To modification duration all same of the date away from the current time of all data files.
Optionally, this method further includes:
The data file of the generation data modification under the file is automatically saved every preset period of time, and It is stored under default hidden folder, and the modification date of the corresponding data file in parameter information described in real-time update.
To achieve the above object, present invention also provides the system that a kind of data synchronize, which includes:
Condition code obtains and pairing file generating unit, for obtaining the storage medium condition code sum number of readable storage medium storing program for executing According to the synchronizer condition code of synchronizer, and according to the first pairing of storage medium condition code generation file, basis Synchronizer condition code generation the second pairing file;
Preset path storage unit, it is first pre- to the data synchronizer for preserving the described first pairing file If it is preserved under path, by the described second pairing file to the second preset path of the readable storage medium storing program for executing;
Synchronous initiation operation execution unit, for being performed both by the readable storage medium storing program for executing and the data synchronizer Synchronous initiation operates, and obtains data synchronization log;
Condition code matches judging unit, for judging that the practical storage medium got of the data synchronizer is special successively Whether sign code, which be in, described first is matched in file, the practical synchronizer condition code that gets of the readable storage medium storing program for executing is It is no to be in the second pairing file;
Data synchronization updating unit, for data described in the readable storage medium storing program for executing and the data synchronizer The parameter information of synchronization log, and all data files are updated to the version for possessing the newest modification date.
Optionally, described document information obtains and pairing file generating unit includes:
Storage medium condition code obtains subelement, for obtaining the hardware configuration information of the readable storage medium storing program for executing, and presses Preset format requirement the first configuration file of generation, and the storage medium is obtained by hash algorithm to first configuration file Condition code;
Synchronizer condition code obtains subelement, for obtaining the hardware configuration information of the data synchronizer, and presses The preset format generates the second configuration file, and to described the and configuration file obtains the synchronization by the hash algorithm Equipment condition code;
Match file and obtain subelement, for the storage medium condition code is stored in the first notepad obtain it is described The synchronizer condition code is stored in the second notepad by the first pairing file, obtains the second pairing file.
Optionally, the synchronous initiation operation execution unit, including:
Parameter information obtains subelement, for obtaining the parameter information of all data files in the file;Wherein, institute State the modification time that parameter information includes data format, size of data and data;
Reference synchronization data generate subelement, for it will belong to same according to the different names of each data file described in The parameter information of the data file of title is organized under identical title, obtains the reference synchronization data.
Optionally, the data synchronization updating unit includes:
Parameter information extracts subelement, for being extracted from the data synchronization log being stored in the readable storage medium storing program for executing Obtain the first parameter information, from the data synchronization log being stored in the data synchronizer extraction obtain the second parameter letter Breath;
Duration comparing subunit, for first parameter information and described second from parameter information each number According to modification duration of the date away from current time of file record;
Sync mark adds subelement, for possess the data file appended synchronization most long in short-term away from the current time Label;
Data file update subelement, for possessing phase using the data file covering for being attached with the synchronous marked price is other With the data file of data name, until modification duration of the date away from the current time of all data files is homogeneous Together.
The method that a kind of data provided herein synchronize obtains the storage medium condition code sum number of readable storage medium storing program for executing According to the synchronizer condition code of synchronizer, and according to the first pairing of storage medium condition code generation file, basis Synchronizer condition code generation the second pairing file;Described first pairing file is preserved to the first of the data synchronizer It is preserved under preset path, by the described second pairing file to the second preset path of the readable storage medium storing program for executing;To it is described can It reads storage medium and the data synchronizer is performed both by synchronous initiation operation, obtain data synchronization log;Institute is judged successively State whether the practical storage medium condition code got of data synchronizer has been in the first pairing file, is described readable Whether the practical synchronizer condition code got of storage medium has been in the second pairing file;If being to be, compare The parameter information of data synchronization log described in the readable storage medium storing program for executing and the data synchronizer, and will be all described Data file is updated to the version for possessing the newest modification date.
Obviously, technical solution provided herein, using the condition code of readable storage medium storing program for executing and data synchronizer into The two-way pairing of row, and the data synchronization log progress data operated after two-way pairing passes through using synchronous initiation is performed Comparison between file parameters information replaces older data file using the latest data file looked for, to ensure readable deposit All data files in storage mechanism and data synchronizer be it is newest, data synchronize exhaustive, without user manual operation, Improve the usage experience of user.The application additionally provides the system that a kind of data synchronize simultaneously, has above-mentioned advantageous effect, This is repeated no more.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or it will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application, for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
The flow chart of method that Fig. 1 is synchronized by a kind of data that the embodiment of the present application provides;
The flow chart of method that Fig. 2 is synchronized by another data that the embodiment of the present application provides;
The structure diagram of system that Fig. 3 is synchronized by a kind of data that the embodiment of the present application provides.
Specific embodiment
The core of the application is to provide the method and system that a kind of data synchronize, synchronous with data using readable storage medium storing program for executing The condition code of equipment is matched, and after pairing passes through using perform data synchronization log that synchronous initiation operates into Comparison between row data file parameters information, and whole data synchronization updating is carried out using newest data file is looked for, Be with all data files ensured in readable storage mechanism and data synchronizer it is newest, data synchronize exhaustive, need not User's manual operation, the usage experience for improving user.
Purpose, technical scheme and advantage to make the embodiment of the present application are clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical solution in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art The all other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Below in conjunction with Fig. 1, the flow chart of method that a kind of data that Fig. 1 is provided by the embodiment of the present application synchronize.
It specifically includes following steps:
S101:The storage medium condition code of readable storage medium storing program for executing and the synchronizer condition code of data synchronizer are obtained, And match file according to the first pairing of storage medium condition code generation file, according to synchronizer condition code generation second;
This step is it is intended that how the readable storage medium storing program for executing used in user is matched with numerous data synchronizers Identification, the application utilize the storage medium condition code of readable storage medium storing program for executing and the synchronizer condition code of data synchronizer, and It is laid the groundwork using these condition codes for the bi-directional matching in subsequent step.Wherein, the storage medium condition code and synchronizer are special Sign code is obtained according to the readable storage medium storing program for executing and the data synchronizer, and is unique, that is, there was only uniquely readable deposit Storage media or data synchronizer can obtain the storage medium condition code and synchronizer condition code.
The specific method for how obtaining these condition codes that can uniquely determine readable storage medium storing program for executing and data synchronizer Varied, a kind of method is to generate corresponding code by the intrinsic hardware of these devices, due to these intrinsic hardware It is usually built in readable storage medium storing program for executing or data synchronizer, and these intrinsic hardware are owned by certainly in manufacture Oneself unique number can choose the number for most unlikely replacing or being difficult to change as generation from all intrinsic hardware The basis of condition code.
For example, when a number of units is PC machine according to synchronizer, MAC Address (Medium Access usually may be used Control, media access control, also referred to as physical address, hardware address, for defining the position of the network equipment, and MAC Location is that network interface card determines, is fixed) as its synchronizer condition code, the number of other intrinsic hardware can also be utilized.And The quantity of data synchronizer can according to the difference of actual conditions, can be it is multiple, it is corresponding also will there are multiple same Walk equipment condition code.When readable storage medium storing program for executing is USB flash disk, the number conduct for the flash chip for forming its memory space may be used Storage medium condition code herein and is not specifically limited, can be according to the difference flexibly selection of actual use equipment.
After readable storage medium storing program for executing and the respective condition code of data synchronizer is determined, it is also necessary to utilize these condition codes The corresponding pairing file of generation is verified for bi-directional matching, specifically, is how to judge what the readable storage medium storing program for executing was connected Whether equipment is that user needs the equipment for carrying out data synchronization, how to judge that user needs to carry out to be connected in the equipment of data synchronization Readable storage medium storing program for executing be the readable storage medium storing program for executing for needing to carry out data synchronization, detailed step can be to being said in subsequent step It is bright.
S102:First pairing file is preserved to the first preset path of data synchronizer, matches file by second It preserves to the second preset path of readable storage medium storing program for executing;
On the basis of S101, this step is intended to preserve the first pairing file to the first default road of data synchronizer It is preserved under diameter, by the second pairing file to the second preset path of readable storage medium storing program for executing.It will be according to uniquely representing readable deposit First pairing file of the storage medium condition code generation of storage media is preserved to the first preset path of data synchronizer, is incited somebody to action The second pairing file that synchronizer condition code according to data synchronizer is uniquely represented generates is preserved out to readable storage medium Under second preset path of matter, in order to data synchronizer according to be stored in itself first pairing file to it is each and itself Connected readable storage medium storing program for executing carries out pair verification, readable storage medium storing program for executing and matches file to each according to itself second is stored in The data synchronizer being connected with itself carries out pair verification, so as to pass through rear progress data simultaneously operating in bi-directional verification.
Wherein, first preset path with the second preset path be in order to adapt to different type, model data synchronize set Standby, readable storage medium storing program for executing and set, in order to possess better compatibility.Specifically, first preset path and second is in advance If should be gathered around under path there are one destination folder, for accommodating the data file for needing to carry out data synchronization.
It further, can be straight if causing there is no the destination folder under these preset paths due to unknown It connects and creates the destination folder.
S103:Synchronous initiation operation is performed both by readable storage medium storing program for executing and data synchronizer, data is obtained and synchronizes day Will;
On the basis of S102, this step is intended to be performed both by synchronous initiation to readable storage medium storing program for executing and data synchronizer Operation, obtains data synchronization log.The purpose of this step is to be detected the data file state under the file destination, and root Corresponding data synchronization log is generated according to specific testing result, in order to be synchronized in follow-up data synchronizing process according to the data How daily record is carried out the differentiation of data synchronization.
Wherein, synchronous initiation operation can by under file destination there is currently data file parameter information system Meter gets up, these parameter informations can include data name, data type, size of data and most important data modification day Phase.Under normal conditions, other features such as the title of data, size of data are not enough to judge whether the data file is newest number According to file because should title is not known, the size of data of modified data file may reduce and be also possible to become larger, Therefore can only use data finally change the date as whether be newest data file judgment basis.The data generated Last this parameter of modification daily record in synchronization log is to carry out data in subsequent process to synchronize judgement volume important evidence.
Further, can also be the accuracy and reliability for keeping parameter information in the data synchronization log, every pre- If the time cycle automatically saves the data file of the generation data modification under destination folder, and is stored in default hide Under file, and the modification date of the corresponding data file in real-time update parameter information.
S104:Judge whether the practical storage medium condition code got of data synchronizer has been in the first pairing successively In file, the practical synchronizer condition code got of readable storage medium storing program for executing whether be in second pairing file in;
On the basis of S103, this step is intended for two-way pairing, that is, judges that data synchronizer is practical and get Whether storage medium condition code has been in the first pairing file, the practical synchronizer condition code got of readable storage medium storing program for executing Whether the mode in file has been matched in second to be judged.
S105:Compare the parameter information of data synchronization log in readable storage medium storing program for executing and data synchronizer, and will be all Data file is updated to the version for possessing the newest modification date.
This step establish S104 judging result for the practical storage medium condition code got of data synchronizer In first pairing file in, the practical synchronizer condition code got of readable storage medium storing program for executing also be in second match file In on the basis of, i.e., bi-directional matching passes through, that is to say, that the data synchronizer needs to carry out each other with the readable storage medium storing program for executing Two equipment that data synchronize, this step is same by comparing data in readable storage medium storing program for executing and data synchronizer on this basis The parameter information of daily record is walked, so that all data files to be updated to the version for possessing the newest modification date.
Under normal conditions, it may appear that following several situations, one:By comparing discovery, the readable storage medium storing program for executing and the number The newest modification date according to the data file of same names all in synchronizer is all consistent, that is to say, that in the two equipment simultaneously Data modification did not occurred, does not also just need to carry out data update, because both newest;Secondly:One of them sets The newest modification date of some data file in standby and the newest modification day of the same names data file of another equipment Phase is inconsistent, and some in two modification dates is inevitable nearer at a distance of current time, is needed in such cases using newer Data file covers older data file to complete data synchronization process.
It is because big as the mode for differentiating same data file in two equipment why to use data name herein Do not allow for identical data name occur in an equipment or system in most equipment and file system, that is to say, that The data file for occurring two identical data titles on different devices is only possible to, identical data name exists under normal conditions Two data files that should be identical are represented herein, but is not excluded for the situation that malice is distorted and occurs, and are deliberately carried out nominally It distorts, this is can also to be carried out secondary testing school, such as pass through data text according to the other parameters information of data file got Part size or other representative parameters carry out, and herein and are not specifically limited.
Based on above-mentioned technical proposal, a kind of method of data synchronization provided by the embodiments of the present application utilizes readable storage medium Matter and the condition code of data synchronizer are matched, and the number operated after pairing passes through using synchronous initiation is performed The comparison between data file parameter information is carried out, and whole number is carried out using newest data file is looked for according to synchronization log It is newest with all data files ensured in readable storage mechanism and data synchronizer, data synchronize according to synchronized update Exhaustive, the usage experience for being manually operated, improving user without user.
Below in conjunction with Fig. 2, the flow chart of method that another data that Fig. 2 is provided by the embodiment of the present application synchronize.
It specifically includes following steps:
S201:The hardware configuration information of readable storage medium storing program for executing is obtained, and the first configuration file is generated by preset format requirement, And storage medium condition code is obtained by hash algorithm to the first configuration file;
S202:The hardware configuration information of data synchronizer is obtained, and the second configuration file is generated, and right by preset format And configuration file obtains synchronizer condition code by hash algorithm;
Happening for Electronic Numbering, S201, S202 of the present embodiment are corresponded to prevent malice from distorting some intrinsic hardware It is generated using all hardware configuration information for obtaining the readable storage medium storing program for executing and the data synchronizer, and by it by preset format Corresponding configuration file, and the condition code uniquely determined using hash algorithm to the configuration file generation of generation, since Hash is calculated The characteristic of method in itself as long as any hardware configuration information is changed, would not obtain identical condition code, therefore can be more preferable Prevent malice distort caused by data synchronous abnormality phenomenon.
S203:Storage medium condition code is stored in the first notepad obtain the first pairing file, by synchronizer spy Sign code is stored in the second notepad, obtains the second pairing file;
On the basis of S202, this step is intended to using notepad that the storage medium condition code and synchronizer of acquisition is special Sign code is recorded respectively, respectively obtains the first pairing file and the second pairing file.
S204:Judge whether there are entitled " data synchronization folders " under the first preset path and the second preset path File;
S205:Establishment file is pressed from both sides under the first preset path and the second preset path;
The foundation of this step is in the base that the judging result of S204 is the file that entitled " data synchronization folder " is not present On plinth, it is intended to the file of entitled " data synchronization folder " is created under the first preset path and the second preset path.
S206:Any operation is not performed;
This step establish S204 judging result for there are entitled " data synchronization folder " file basis On, it also need not just perform any operation.
S207:First pairing file is preserved to the first preset path of data synchronizer, matches file by second It preserves to the second preset path of readable storage medium storing program for executing;
This step is then on the basis of the file for centainly having entitled " the data synchronization folder ", by the first pairing File preserves into the file under the first preset path of data synchronizer, preserves the second pairing file to readable storage In file under second preset path of medium.
S208:Obtain the parameter information of all data files in file;Wherein, parameter information includes data format, number According to the modification date of size and data;
S209:The parameter information for the data file for belonging to same name is organized according to the different names of each data file Under identical title, reference synchronization data are obtained;
S208 and S209 is intended to illustrate how to obtain reference synchronization data, by obtaining all data files in file The modification time of parameter information, wherein data, it may also be said to be obtain finally to change based on the date, the ginseng supplemented by other parameters Number acquisition process, and be organized in the parameter information for the data file for belonging to same name according to the different names of each data file Under identical title, reference synchronization data are finally obtained.
S210:Judge whether the practical storage medium condition code got of data synchronizer has been in the first pairing successively In file, the practical synchronizer condition code got of readable storage medium storing program for executing whether be in second pairing file in;
This step is substantially the same with S104, and associated description content may refer to the partial content in S104, no longer superfluous herein It states.
S211:The first parameter information is extracted from the data synchronization log being stored in readable storage medium storing program for executing, from preservation The second parameter information is extracted in data synchronization log in data synchronizer;
S212:Compare the first parameter information and second from parameter information each data file the modification date away from current The duration of time, and to possess the data file appended synchronization label most long in short-term away from current time;
S213:Other data files for possessing identical data title are covered using the data file for being attached with synchronous marked price, Until duration all same of the modification date away from current time of all data files.
S211, S212 and S213 are established on the basis of the judging result of S210 passes through for two-way pairing, it is intended to from It extracts to change to the end the date in data synchronization log, and in the difference last modification date of multiple same data files really Fixed newest data file, and operated using the update of newest data file progress data synchronization.
Based on above-mentioned technical proposal, a kind of method of data synchronization provided by the embodiments of the present application utilizes readable storage medium Matter and the condition code of data synchronizer are matched, and the number operated after pairing passes through using synchronous initiation is performed The comparison between data file parameter information is carried out, and whole number is carried out using newest data file is looked for according to synchronization log It is newest with all data files ensured in readable storage mechanism and data synchronizer, data synchronize according to synchronized update Exhaustive, the usage experience for being manually operated, improving user without user.
Because situation is complicated, it can not enumerate and be illustrated, those skilled in the art should be able to be recognized according to the application The basic skills principle combination actual conditions of offer may have many examples, in the case where not paying enough creative works, It should be in the protection domain of the application.
Fig. 3, the structure diagram of system that Fig. 3 is synchronized by a kind of data that the embodiment of the present application provides are referred to below.
The system can include:
Condition code obtains and pairing file generating unit 100, for obtaining the storage medium condition code of readable storage medium storing program for executing With the synchronizer condition code of data synchronizer, and according to storage medium condition code generation first pairing file, according to synchronization Equipment condition code generation the second pairing file;
Preset path storage unit 200, for preserving the first pairing file to the first default road of data synchronizer It is preserved under diameter, by the second pairing file to the second preset path of readable storage medium storing program for executing;
Synchronous initiation operation execution unit 300, it is synchronous for being performed both by readable storage medium storing program for executing with data synchronizer Initialization operation obtains data synchronization log;
Condition code matches judging unit 400, for judging that the practical storage medium got of data synchronizer is special successively Whether sign code has been in the first pairing file, whether the practical synchronizer condition code got of readable storage medium storing program for executing has been in In second pairing file;
Data synchronization updating unit 500, for comparing data synchronization log in readable storage medium storing program for executing and data synchronizer Parameter information, and all data files are updated to the version for possessing the newest modification date.
Optionally, condition code obtains and pairing file generating unit 100 includes:
Storage medium condition code obtains subelement, for obtaining the hardware configuration information of readable storage medium storing program for executing, and by default Call format generates the first configuration file, and obtains storage medium condition code by hash algorithm to the first configuration file;
Synchronizer condition code obtains subelement, for obtaining the hardware configuration information of data synchronizer, and by default Form generates the second configuration file, and to the and configuration file obtains synchronizer condition code by hash algorithm;
It matches file and obtains subelement, the first pairing is obtained for storage medium condition code to be stored in the first notepad Synchronizer condition code is stored in the second notepad by file, obtains the second pairing file.
Optionally, synchronous initiation operation execution unit 300, including:
Parameter information obtains subelement, for obtaining the parameter information of all data files in file;Wherein, parameter is believed Breath includes the modification time of data format, size of data and data;
Reference synchronization data generate subelement, the number that will belong to same name for the different names according to each data file It is organized according to the parameter information of file under identical title, obtains reference synchronization data.
Optionally, data synchronization updating unit 500 includes:
Parameter information extracts subelement, is obtained for being extracted from the data synchronization log being stored in readable storage medium storing program for executing First parameter information, extraction obtains the second parameter information from the data synchronization log being stored in data synchronizer;
Duration comparing subunit, for compare the first parameter information and second from parameter information each data file Change duration of the date away from current time;
Sync mark adds subelement, for possess the data file appended synchronization mark most long in short-term away from current time Note;
Data file update subelement, for possessing identical number using the data file covering for being attached with synchronous marked price is other According to the data file of title, until duration all same of the modification date away from current time of all data files.
Each embodiment is described by the way of progressive in specification, the highlights of each of the examples are with other realities Apply the difference of example, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related part is referring to method part illustration .
Professional further appreciates that, with reference to each exemplary unit of the embodiments described herein description And algorithm steps, can be realized with the combination of electronic hardware, computer software or the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is performed actually with hardware or software mode, specific application and design constraint depending on technical solution.Profession Technical staff can realize described function to each specific application using distinct methods, but this realization should not Think beyond scope of the present application.
The principle and implementation of this application are described for specific case used herein, and above example is said It is bright to be merely used to help understand the present processes and its core concept.It should be pointed out that the ordinary skill for the art For personnel, under the premise of the application principle is not departed from, can also to the application, some improvement and modification can also be carried out, these improvement It is also fallen into the application scope of the claims with modification.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only include that A little elements, but also including the other elements being not explicitly listed or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except also there are other identical elements in the process including element, method, article or equipment.

Claims (10)

1. a kind of method that data synchronize, which is characterized in that including:
The storage medium condition code of readable storage medium storing program for executing and the synchronizer condition code of data synchronizer are obtained, and according to described The first pairing of storage medium condition code generation file matches file according to synchronizer condition code generation second;
Described first pairing file is preserved to the first preset path of the data synchronizer, the described second pairing is literary Part is preserved to the second preset path of the readable storage medium storing program for executing;
Synchronous initiation operation is performed both by the readable storage medium storing program for executing and the data synchronizer, data is obtained and synchronizes day Will;
Judge whether the practical storage medium condition code got of the data synchronizer has been in first pairing successively In file, the practical synchronizer condition code got of the readable storage medium storing program for executing whether be in it is described second pairing file In;
If being to be, the parameter of data synchronization log described in the readable storage medium storing program for executing and the data synchronizer Information, and all data files are updated to the version for possessing the newest modification date.
2. method according to claim 1, which is characterized in that obtain the storage medium condition code and data of readable storage medium storing program for executing The synchronizer condition code of synchronizer, and using the first pairing of storage medium condition code generation file, using described same Equipment condition code generation the second pairing file is walked, including:
The hardware configuration information of the readable storage medium storing program for executing is obtained, and the first configuration file is generated, and right by preset format requirement First configuration file obtains the storage medium condition code by hash algorithm;
The hardware configuration information of the data synchronizer is obtained, and the second configuration file is generated, and right by the preset format Described and configuration file obtains the synchronizer condition code by the hash algorithm;
The storage medium condition code is stored in the first notepad and obtains the first pairing file, by the synchronizer Condition code is stored in the second notepad, obtains the second pairing file.
3. method according to claim 2, which is characterized in that preserve to the data to synchronize and set in the described first pairing file Under the first standby preset path, by described second pairing file preserve to the second preset path of the readable storage medium storing program for executing under it Before, it further includes:
Judge whether there are entitled " data synchronization folders " under first preset path and second preset path File;
If it is not, then the file is created under first preset path and second preset path.
4. method according to claim 3, which is characterized in that equal to the readable storage medium storing program for executing and the data synchronizer Synchronous initiation operation is performed, obtains reference synchronization data, including:
Obtain the parameter information of all data files in the file;Wherein, the parameter information includes data format, data The modification time of size and data;
The parameter information for the data file for belonging to the same title is organized according to the different names of each data file Under identical title, the reference synchronization data are obtained.
5. method according to claim 4, which is characterized in that the readable storage medium storing program for executing and the data synchronizer Described in data synchronization log parameter information, and all data files are updated to and possess the newest modification date Version, including:
Extraction obtains the first parameter information, from being stored in from the data synchronization log being stored in the readable storage medium storing program for executing It states extraction in the data synchronization log in data synchronizer and obtains the second parameter information;
Compare first parameter information and described second from parameter information each data file the modification date away from The duration of current time;
To possess the data file appended synchronization label most long in short-term away from the current time;
Other data files for possessing identical data title are covered using the data file for being attached with the synchronous marked price, until institute There is modification duration all same of the date away from the current time of the data file.
6. method according to claim 5, which is characterized in that further include:
The data file of the generation data modification under the file is automatically saved, and store every preset period of time Under default hidden folder, and the modification date of the corresponding data file in parameter information described in real-time update.
7. a kind of system that data synchronize, which is characterized in that including:
Condition code obtains and pairing file generating unit, same for obtaining the storage medium condition code of readable storage medium storing program for executing and data The synchronizer condition code of equipment is walked, and file is matched, according to the synchronization according to storage medium condition code generation first Equipment condition code generation the second pairing file;
Preset path storage unit, for preserving the described first pairing file to the first default road of the data synchronizer It is preserved under diameter, by the described second pairing file to the second preset path of the readable storage medium storing program for executing;
Synchronous initiation operation execution unit, it is synchronous for being performed both by the readable storage medium storing program for executing with the data synchronizer Initialization operation obtains data synchronization log;
Condition code matches judging unit, for judging the practical storage medium condition code got of the data synchronizer successively Whether be in it is described first pairing file in, the practical synchronizer condition code got of the readable storage medium storing program for executing whether In the described second pairing file;
Data synchronization updating unit, it is synchronous with data described in the data synchronizer for the readable storage medium storing program for executing The parameter information of daily record, and all data files are updated to the version for possessing the newest modification date.
8. system according to claim 7, which is characterized in that described document information obtains and pairing file generating unit includes:
Storage medium condition code obtains subelement, for obtaining the hardware configuration information of the readable storage medium storing program for executing, and by default Call format generates the first configuration file, and obtains the storage medium feature by hash algorithm to first configuration file Code;
Synchronizer condition code obtains subelement, for obtaining the hardware configuration information of the data synchronizer, and by described Preset format generates the second configuration file, and to described the and configuration file obtains the synchronizer by the hash algorithm Condition code;
It matches file and obtains subelement, described first is obtained for the storage medium condition code to be stored in the first notepad The synchronizer condition code is stored in the second notepad by pairing file, obtains the second pairing file.
9. system according to claim 8, which is characterized in that the synchronous initiation operation execution unit, including:
Parameter information obtains subelement, for obtaining the parameter information of all data files in the file;Wherein, the ginseng Number information includes the modification time of data format, size of data and data;
Reference synchronization data generate subelement, for that will belong to the same title according to the different names of each data file The parameter information of data file be organized under identical title, obtain the reference synchronization data.
10. system according to claim 9, which is characterized in that the data synchronization updating unit includes:
Parameter information extracts subelement, is obtained for being extracted from the data synchronization log being stored in the readable storage medium storing program for executing First parameter information, extraction obtains the second parameter information from the data synchronization log being stored in the data synchronizer;
Duration comparing subunit, for first parameter information and described second, each data are literary from parameter information Modification duration of the date away from current time of part record;
Sync mark adds subelement, for possess the data file appended synchronization mark most long in short-term away from the current time Note;
Data file update subelement, for possessing identical number using the data file covering for being attached with the synchronous marked price is other According to the data file of title, until modification duration all same of the date away from the current time of all data files.
CN201810179780.9A 2018-03-05 2018-03-05 The synchronous method and system of a kind of data Pending CN108200217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810179780.9A CN108200217A (en) 2018-03-05 2018-03-05 The synchronous method and system of a kind of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810179780.9A CN108200217A (en) 2018-03-05 2018-03-05 The synchronous method and system of a kind of data

Publications (1)

Publication Number Publication Date
CN108200217A true CN108200217A (en) 2018-06-22

Family

ID=62595088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810179780.9A Pending CN108200217A (en) 2018-03-05 2018-03-05 The synchronous method and system of a kind of data

Country Status (1)

Country Link
CN (1) CN108200217A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346661A (en) * 2020-11-16 2021-02-09 脸萌有限公司 Data processing method and device and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1648878A (en) * 2005-01-07 2005-08-03 清华大学 Method for improving compute system disc synchronous writing property based on movable memory
CN101488952A (en) * 2008-12-10 2009-07-22 华中科技大学 Mobile storage apparatus, data secured transmission method and system
CN101576949A (en) * 2008-05-05 2009-11-11 航天信息股份有限公司 Movable storage device and method for safely transferring tax-controlled data
CN101778094A (en) * 2009-01-08 2010-07-14 北京华旗资讯数码科技有限公司 Mobile storage system used for monitoring
CN102521165A (en) * 2011-11-30 2012-06-27 北京宏思电子技术有限责任公司 Security U disk and recognition method and device thereof
US8595381B2 (en) * 2007-10-31 2013-11-26 Caseware International Inc. Hierarchical file synchronization method, software and devices
CN103927284A (en) * 2014-03-26 2014-07-16 深圳市创荣发电子有限公司 System for multiple computers sharing U disk
US8812860B1 (en) * 2010-12-03 2014-08-19 Symantec Corporation Systems and methods for protecting data stored on removable storage devices by requiring external user authentication

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1648878A (en) * 2005-01-07 2005-08-03 清华大学 Method for improving compute system disc synchronous writing property based on movable memory
US8595381B2 (en) * 2007-10-31 2013-11-26 Caseware International Inc. Hierarchical file synchronization method, software and devices
CN101576949A (en) * 2008-05-05 2009-11-11 航天信息股份有限公司 Movable storage device and method for safely transferring tax-controlled data
CN101488952A (en) * 2008-12-10 2009-07-22 华中科技大学 Mobile storage apparatus, data secured transmission method and system
CN101778094A (en) * 2009-01-08 2010-07-14 北京华旗资讯数码科技有限公司 Mobile storage system used for monitoring
US8812860B1 (en) * 2010-12-03 2014-08-19 Symantec Corporation Systems and methods for protecting data stored on removable storage devices by requiring external user authentication
CN102521165A (en) * 2011-11-30 2012-06-27 北京宏思电子技术有限责任公司 Security U disk and recognition method and device thereof
CN103927284A (en) * 2014-03-26 2014-07-16 深圳市创荣发电子有限公司 System for multiple computers sharing U disk

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
软件之家: "FreeFileSync v9.4", 《URL:HTTP://SOFT.DUBA.COM/SOFT/60000574.HTM》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346661A (en) * 2020-11-16 2021-02-09 脸萌有限公司 Data processing method and device and electronic equipment
WO2022103338A1 (en) * 2020-11-16 2022-05-19 脸萌有限公司 Data processing method and apparatus, and electronic device
CN112346661B (en) * 2020-11-16 2023-09-29 脸萌有限公司 Data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111209346B (en) Block chain data archiving method and device and computer readable storage medium
CN104246767B (en) Telemetry system for cloud synchronization system
JP4725622B2 (en) Log management apparatus, system, method, and program
CN1954317A (en) Method, system, computer programs and devices for management of media items
CN104021132A (en) Method and system for verification of consistency of backup data of host database and backup database
CN106598785A (en) File system backup and restoration method and device
CN103533011A (en) Intelligent terminal data configuration method and system based on cloud terminal
CN104123197B (en) Method for offline evidence-collecting without holding iOS device
CN103942054A (en) Data evidence obtaining system based on Android
CN107767253B (en) Tax information management platform, method and system
CN106503158A (en) Method of data synchronization and device
CN103037005A (en) File synchronization method and device of on-line storage service
CN105117263A (en) UNIX environment software system upgrading method
CN102693233B (en) A kind of method and device realizing c bookmart
CN103167008A (en) Method of multi-terminal synchronous reading
CN105488210A (en) Batch data matching method and device
CN107360265A (en) A kind of equipment exclusive identification code acquisition methods, device and mobile terminal
CN106250548A (en) A kind of code update method
CN108200217A (en) The synchronous method and system of a kind of data
US20140222771A1 (en) Management device and management method
CN106649756A (en) Log synchronization method and device
CN102932513B (en) A kind of business card maintaining method, device and equipment
CN104834549B (en) The application file update method and device of mobile terminal
CN108062295B (en) Content processing method and device
CN105677886A (en) File updating method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180622

RJ01 Rejection of invention patent application after publication