CN107577718A - A kind of method and system of the file synchronization of Dropbox server and terminal - Google Patents

A kind of method and system of the file synchronization of Dropbox server and terminal Download PDF

Info

Publication number
CN107577718A
CN107577718A CN201710682473.8A CN201710682473A CN107577718A CN 107577718 A CN107577718 A CN 107577718A CN 201710682473 A CN201710682473 A CN 201710682473A CN 107577718 A CN107577718 A CN 107577718A
Authority
CN
China
Prior art keywords
terminal
structure table
bibliographic structure
preserves
file
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
CN201710682473.8A
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.)
Hangzhou Jiji Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201710682473.8A priority Critical patent/CN107577718A/en
Publication of CN107577718A publication Critical patent/CN107577718A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention provides a kind of method and system of file synchronization, and terminal scanning own files obtain the first bibliographic structure table;Terminal will be scanning and file corresponding to the first filename in the bibliographic structure table that terminal preserves is not sent to Dropbox server, and the bibliographic structure table preserved is updated to the first bibliographic structure table;Terminal request Dropbox server sends Dropbox server directory structure table;After terminal receives the bibliographic structure table that Dropbox server is sent, by the bibliographic structure table of Dropbox server compared with the first bibliographic structure table that terminal preserves;If comparative result includes different filenames respectively for the bibliographic structure table of Dropbox server from the first bibliographic structure table that terminal preserves, the file that terminal synchronization Dropbox server preserves is the file that terminal preserves, and the first bibliographic structure table that more new terminal preserves is Dropbox server directory structure table.Terminal and Dropbox server can be caused to be always maintained at management by synchronization file and fileinfo.

Description

A kind of method and system of the file synchronization of Dropbox server and terminal
Technical field
The present embodiments relate to the side of Internet technology, more particularly to the file synchronization of a kind of Dropbox server and terminal Method and system.
Background technology
Dropbox, also known as Network U plate, network hard disc, it is by the online storage service of Internet firm's release, server room Certain disk space is divided for user, the storage of file, access is provided for user's free of charge, backup, the file such as shares The functions such as management, and possess advanced disaster-tolerant backup all over the world.User can regard Dropbox as one and be placed on network Hard disk or USB flash disk, either at home, unit or it is other Anywhere, as long as being connected to internet, it is possible to read, manage, Edit the file in Dropbox, it is not necessary to carry with, be not afraid of loss more.
With increasingly fierce and memory technology the continuous development of Dropbox market competition, traditional Dropbox technology has seemed Unable to do what one wishes, the bottlenecks such as transmission speed is slow, redundancy backup and recovery capability are low, security is poor, operation costs are high annoying always Dropbox enterprise.
The cloud computing storing technology of more recent application, new revolution is brought for Dropbox industry, traditional Dropbox will progressively by Cloud storage substitutes.Cloud storage is data center of the structure in high speed distributed storage network, and it is by a large amount of inhomogeneities in network The storage device of type gathers collaborative work by application software, the system for forming the data storage and access of a safety, Suitable for a series of demands such as the storage of the data information of major medium-sized and small enterprises and personal user, backup, filings.
In general, terminal is come and Dropbox server by running the application program (Application, APP) of its installation Interact, APP refers to the third party application of intelligent terminal installation, is referred to as " Mobile solution ".App clients (APP Client the application client in terminal) is referred to, terminal is handed over by running App clients and the Dropbox server Mutually, for example, the Miscellaneous Documents (such as audio file, video file, text file) that are preserved of terminal are to the Dropbox service Device is sent, or receives the Miscellaneous Documents that the Dropbox server is sent, to reach terminal and Dropbox server interaction text The purpose of part.
But current Dropbox server, the file that usually terminal is needed to be saved in Dropbox server are sent to The Dropbox server, or terminal obtain the file needed from Dropbox server, but because terminal and Dropbox server do not have There is holding synchronously, when terminal and the one of modification file of Dropbox server or file-related information, terminal and net can be caused The file or information of disk server admin redundancy, it can not keep synchronous.
The content of the invention
The embodiment of the present invention provides a kind of method and system of the file synchronization of Dropbox server and terminal, can cause terminal Management by synchronization file and fileinfo are always maintained at Dropbox server.
The method that an aspect of of the present present invention provides the file synchronization of a kind of Dropbox server and terminal, methods described include:
The terminal scanning own files obtain the first bibliographic structure table;
The terminal by it is scanning and not the terminal preserve bibliographic structure table in the first filename corresponding to File is sent to the Dropbox server, and the bibliographic structure table preserved is updated to the first bibliographic structure table;
Dropbox server described in the terminal request sends the Dropbox server directory structure table;
After the terminal receives the bibliographic structure table that the Dropbox server is sent, by the institute of the Dropbox server Bibliographic structure table is stated compared with the first bibliographic structure table that the terminal preserves;
If comparative result is the bibliographic structure table and described the first of terminal preservation of the Dropbox server Bibliographic structure table includes different filenames respectively, and the terminal file that synchronously the Dropbox server preserves is the terminal The file of preservation, and it is the Dropbox server directory structure table to update the first bibliographic structure table that the terminal preserves.
Alternatively, the terminal is compared the bibliographic structure table that the first bibliographic structure table preserves with the terminal Compared with;
The bibliographic structure table that the terminal is preserved is updated to the first bibliographic structure table and specifically included:
The terminal will appear in the first bibliographic structure table and be not present in the bibliographic structure table that the terminal preserves Information be added to the bibliographic structure table that the terminal preserves;
The terminal deletion appears in the bibliographic structure table that the terminal preserves and is not present in first bibliographic structure The information of table;
The terminal retain in the bibliographic structure table that the terminal preserves not only appear in the first bibliographic structure table but also Appear in the identical information for the bibliographic structure table that the terminal preserves.
Alternatively, if the institute that comparative result preserves for the bibliographic structure table of the Dropbox server with the terminal State that All Files name that the first bibliographic structure table includes respectively is identical but other information is different, the terminal and the Dropbox service For device without the synchronization of file, it is the Dropbox server mesh only to update the first bibliographic structure table that the terminal preserves Directory structures table.
Alternatively, if the comparative result preserves for the bibliographic structure table of the Dropbox server with the terminal The first bibliographic structure table include different filenames respectively, the terminal file that synchronously the Dropbox server preserves The file preserved for the terminal specifically includes:
If the comparative result does not have for the second filename that the bibliographic structure table of the Dropbox server includes Appear in the first bibliographic structure table that the terminal preserves, Dropbox server described in the terminal request is by second text File corresponding to part name is sent to the terminal;
Do not have if the comparative result is the 3rd filename that the first bibliographic structure table that the terminal preserves includes Occur in the bibliographic structure table of the Dropbox server, the terminal itself is deleting the 3rd filename correspondingly File.
Alternatively, the bibliographic structure table and first catalogue that the first bibliographic structure table, the terminal preserve Structure table includes:Identify (id) field, path (path) field, modification time (mtime) field and parent directory (parent) Field, wherein, the id fields represent filename and represent file path, institute for the unique mark of file, the path fields State mtime fields and represent the file Last modification time, the parent field records parent directory ID, the parent directory ID are 0 represents the file under root or root.
Another aspect of the present invention provides a kind of system of file synchronization, and the system includes:Dropbox server and terminal
The terminal, the first bibliographic structure table is obtained for scanning own files;Will be scanning and not in the terminal File corresponding to the first filename in the bibliographic structure table of preservation is sent to the Dropbox server, and the catalogue preserved Structure table is updated to the first bibliographic structure table;The Dropbox server is asked to send the Dropbox server directory structure Table;
The Dropbox server, for sending the bibliographic structure table of the Dropbox server to the terminal;
The terminal is additionally operable to preserve the bibliographic structure table of the Dropbox server and the terminal described the One bibliographic structure table is compared;If comparative result is protected for the bibliographic structure table of the Dropbox server with the terminal The the first bibliographic structure table deposited includes different filenames respectively, and the file that the synchronous Dropbox server preserves is protected for it The file deposited, and the first bibliographic structure table for updating its preservation is the Dropbox server directory structure table.
Alternatively, the terminal is additionally operable to enter in the bibliographic structure table that the first bibliographic structure table preserves with the terminal Row compares;The information that will appear in the first bibliographic structure table and be not present in the bibliographic structure table that the terminal preserves adds The bibliographic structure table preserved to the terminal;Delete and appear in the bibliographic structure table that the terminal preserves and be not present in described the The information of one bibliographic structure table;Retain in the bibliographic structure table that the terminal preserves and both appear in the first bibliographic structure table The identical information for the bibliographic structure table that the terminal preserves is appeared in again.
Alternatively, the terminal, is additionally operable to, if comparative result for the Dropbox server the bibliographic structure table with The All Files name that the first bibliographic structure table that the terminal preserves includes respectively is identical but other information is different, and described For Dropbox server without the synchronization of file, it is the Dropbox only to update the first bibliographic structure table that the terminal preserves Server directory structure table.
Alternatively, the terminal, is additionally operable to, if the comparative result is the bibliographic structure of the Dropbox server The second filename that table includes is not appeared in the first bibliographic structure table that the terminal preserves, and asks the Dropbox to take File corresponding to second filename is sent to the terminal by business device;If the institute that the comparative result preserves for the terminal The 3rd filename that stating the first bibliographic structure table includes is not appeared in the bibliographic structure table of the Dropbox server, Itself delete file corresponding to the 3rd filename.
Alternatively, the bibliographic structure table and first catalogue that the first bibliographic structure table, the terminal preserve Structure table includes:Identify (id) field, path (path) field, modification time (mtime) field and parent directory (parent) Field, wherein, the id fields represent filename and represent file path, institute for the unique mark of file, the path fields State mtime fields and represent the file Last modification time, the parent field records parent directory ID, the parent directory ID are 0 represents the file under root or root.
The method and system of the Dropbox server of foregoing description and the file synchronization of terminal, terminal and Dropbox service can make it that Device is always maintained at management by synchronization file and fileinfo.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 be one embodiment of the invention a kind of Dropbox server and terminal file synchronization method flow schematic diagram;
Fig. 2 is a kind of bibliographic structure table structural representation of another embodiment of the present invention;
Fig. 3 is a kind of structural representation of the system of file synchronization of one embodiment of the invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The techniques described herein may be used in various communication systems, such as 2G, 3G, 4G communication system and next generation communication system Unite (for example, 5G), such as global mobile communication (Global System forMobile Communication, GSM) system, CDMA (Code Division MultipleAccess, CDMA) system, time division multiple acess (Time Division MultipleAccess, TDMA) system, WCDMA (Wideband Code Division Multiple Access, WCDMA) system, frequency division multiple access (Frequency Division MultipleAccess, FDMA) system, OFDM (Orthogonal Frequency-Division Multiple Access, OFDMA) system, Single Carrier Frequency Division Multiple Access (SC-FDMA) System, GPRS (General Packet Radio Service, GPRS) system, Long Term Evolution (Long Term Evolution, LTE) system, and other such communication systems.Cdma system can realize that such as wireless universal land connects Enter the radiotechnics such as (Universal Terrestrial RadioAccess, UTRA), CDMA2000.UTRA include broadband- CDMA (WCDMA) and other CDMA variants.In addition, CDAM2000 covers IS-2000, IS-95 and IS-856 standard.TDMA system The radiotechnics of global system for mobile communications (GSM) etc. can be achieved.OFDMA system can realize such as evolved universal terrestrial Wireless access (Evolved-UMTS Terrestrial Radio Access, E-UTRA), Ultra-Mobile Broadband (Ultra Mobile Broadband, UMB), IEEE802.11 (Wi-Fi), IEEE802.16 (WiMAX), IEEE802.20, Flash- The radiotechnics such as OFDMA.UTRA and E-UTRA is UMTS (Universal Mobile Telecommunication System, UMTS) a part.3GPP Long Term Evolutions (for example, LTE) are UMTS use E- UTRA version, it can use OFDMA on the uplink, and can use SC-FDMA on uplink.UTRA、E-UTRA、 UMTS, LTE and GSM are described in the document of " third generation partnership project (3GPP) " tissue.In addition, CDAM2000 and UMB descriptions In the document of " third generation partnership project 2 (3GPP2) " tissue.
Terminal device herein, can be that wireless terminal can also be catv terminal, wireless terminal can be directed to use The equipment that family provides voice and/or data connectivity, there is the portable equipment of wireless connecting function or be connected to wireless-modulated Other processing equipments of demodulator.Wireless terminal can be through wireless access network (RadioAccess Network, RAN) and one Or multiple core nets are communicated, wireless terminal can be mobile terminal, such as mobile phone (or being " honeycomb " phone) and tool There is the computer of mobile terminal, for example, it may be portable, pocket, hand-held, built-in computer or vehicle-mounted movement Device, they exchange language and/or data with wireless access network.For example, PCS (Personal Communication Service, PCS) phone, wireless phone, Session initiation Protocol (SIP) phone, WLL (Wireless Local Loop, WLL) is stood, personal digital assistant (Personal Digital Assistant, PDA) etc. is set It is standby.Wireless terminal is referred to as system, subscri er unit (Subscriber Unit), subscriber station (Subscriber Station), movement station (Mobile Station), mobile station (Mobile), distant station (Remote Station), access point (Access Point), remote terminal (Remote Terminal), access terminal (Access Terminal), user terminal (UserTerminal), user agent (UserAgent) or user equipment (User Equipment).
The terms "and/or", only a kind of incidence relation for describing affiliated partner, expression may have three kinds of passes System, for example, A and/or B, can be represented:Individualism A, while A and B be present, these three situations of individualism B.In addition, herein Middle character "/", it is a kind of relation of "or" to typically represent forward-backward correlation object.In addition, the terms " system " and " network " Often it is used interchangeably herein.
A kind of as shown in figure 1, method flow of the file synchronization of Dropbox server and terminal for one embodiment of the invention Schematic diagram.
The Dropbox server and the terminal respectively preserve a bibliographic structure table, if the Dropbox server Synchronized with the terminal, then the bibliographic structure table that the Dropbox server and the terminal preserve respectively is identical, if institute Dropbox server and the terminal are stated also without synchronous, the then bibliographic structure that the Dropbox server and the terminal preserve respectively Table may differ.
The Dropbox server can provide following function:The transmission of bibliographic structure table, the load of file, file upload, are literary Establishment, the deletion of file or folder of part folder.
The bibliographic structure table can be with as shown in Fig. 2 show for a kind of bibliographic structure table structure of another embodiment of the present invention It is intended to, the bibliographic structure table includes:Identify (id) field, path (path) field, modification time (mtime) field and father's mesh Record (parent) field;The id fields represent filename and are the unique mark of file, for example, id fields are word document Name, song title, movie name or pdf document name;The path fields represent file path, for example, the path fields are:Work Make 2017;The mtime fields represent the file Last modification time, for example, the mtime fields are:2010 8 On the moon 4 20:39;The parent field records parent directory ID, the parent directory ID are under 0 expression root or root File.
Step 101, the terminal scanning own files obtain the first bibliographic structure table.
The terminal starts the APP clients for above-mentioned Dropbox, and scanning is selected in the APP clients, according to sweeping Retouch option scanning need file, for example, Scanning Options can be scanning word document, pdf document, audio file (such as MP3) or video file (such as video file of AVI, mpeg format), the terminal scanning own files obtain current newest First bibliographic structure table.
Step 102, the terminal by it is scanning and not the terminal preserve bibliographic structure table in the first file File corresponding to name is sent to the Dropbox server, and the bibliographic structure table preserved is updated to first bibliographic structure Table.
The terminal by the first bibliographic structure table scanned compared with its bibliographic structure preserved table, if described First bibliographic structure table is as the bibliographic structure table that the terminal preserves, then the terminal does not update the bibliographic structure of its preservation Table.
If the first bibliographic structure table and the bibliographic structure table that the terminal preserves are different, the terminal processes can With as described below.
For example, the terminal will appear in the first bibliographic structure table and be not present in the catalogue knot that the terminal preserves The information of structure table is added to the bibliographic structure table that the terminal preserves.
For example, the terminal deletion appears in the bibliographic structure table that the terminal preserves and is not present in first catalogue The information of structure table.
For example, the terminal retains in the bibliographic structure table that the terminal preserves both appears in first bibliographic structure Table appears in the identical information for the bibliographic structure table that the terminal preserves again.
In another embodiment of the invention, in order to reduce scanning and compare difficulty, the terminal is scanned using sectional lists Mode, for example, the terminal scans root fileinfo first, the bibliographic structure table then preserved with it is contrasted (namely literary name section parent be 0 file), if filename and Last modification time all as will stop scanning, such as Fruit is different, first determines whether that different is filename or folder name.
If the terminal judges that different is filename, the terminal is according to following several situations, processing mode Also it is different.
If the terminal is judged in the bibliographic structure table that the filename appears in its preservation, without appearing in In the first bibliographic structure table, then the terminal deletes the correlation of the filename in its described bibliographic structure table preserved Information, that is, update the bibliographic structure table.
If the terminal judges that the filename is not appeared in the bibliographic structure table of its preservation, and appears in institute State in the first bibliographic structure table, then the terminal uploads file corresponding to the filename to the Dropbox server, and should The related information of filename is added to the bibliographic structure table of the preservation, that is, updates the bibliographic structure table.
If the terminal is judged in the bibliographic structure table that the filename had both appeared in its preservation, institute is appeared in again State in the first bibliographic structure table, but modification time is different, then the terminal is updated in the bibliographic structure table of the preservation The modification time of file name is the modification time scanned.
If the terminal judges that different is folder name, the terminal is according to following several situations, processing side Formula is also different.
If the terminal is judged in the bibliographic structure table that the folder name appears in its preservation, without occurring In the first bibliographic structure table, then the terminal deletes the file famous prime minister in its described bibliographic structure table preserved The information of pass, that is, update the bibliographic structure table.
If the terminal judges that the folder name is not appeared in the bibliographic structure table of its preservation, and appears in In the first bibliographic structure table, then the terminal creates file corresponding to the folder name and this document is pressed from both sides into correlation Information is added to the bibliographic structure table of the preservation, that is, updates the bibliographic structure table.
Step 103, Dropbox server described in the terminal request sends the Dropbox server directory structure table.
Step 104, after the terminal receives the bibliographic structure table that the Dropbox server is sent, the Dropbox is taken The bibliographic structure table of business device is compared with the first bibliographic structure table that the terminal preserves.
Step 105, if the bibliographic structure table and terminal preservation of the comparative result for the Dropbox server The first bibliographic structure table includes different filenames respectively, and its synchronous file preserved of the terminal is the Dropbox service The file that device preserves, and it is the Dropbox server directory structure to update the first bibliographic structure table that the terminal preserves Table.
In another embodiment of the invention, if comparative result for the Dropbox server the bibliographic structure table with The All Files name that the first bibliographic structure table that the terminal preserves includes respectively is identical but other information is different, the end With the Dropbox server without the synchronous of file, only updating the first bibliographic structure table that the terminal preserves is at end The Dropbox server directory structure table.
In another embodiment of the invention, if the comparative result is the bibliographic structure of the Dropbox server The second filename that table includes is not appeared in the first bibliographic structure table that the terminal preserves, the terminal request institute State Dropbox server and file corresponding to second filename is sent to the terminal.
In another embodiment of the invention, if the comparative result is the first catalogue knot that the terminal preserves The 3rd filename that structure table includes is not appeared in the bibliographic structure table of the Dropbox server, and the terminal is at it Body deletes file corresponding to the 3rd filename.
To improve the efficiency of its bibliographic structure table of Dropbox server transport and being easier to make for comparing, the end During the request of end, the request carries instruction, and the instruction is used to indicate that the Dropbox server is only returned only to catalogue structure tree.Institute Stating terminal will be contrasted after the bibliographic structure table of the Dropbox server received with its own bibliographic structure table, such as The bibliographic structure table that the bibliographic structure table and the terminal of Dropbox server described in fruit preserve is different, then judges different Judgement be that filename or folder name are different.
If filename is different, then the terminal is also different according to following several situations, processing mode.
If the terminal is judged in the bibliographic structure table that different filename appears in the Dropbox server, And do not appear in the bibliographic structure table that the terminal preserves, then described in the terminal request from Dropbox server download not File corresponding to the same filename, and the related information of this document is increased into the bibliographic structure table that the terminal preserves, i.e., more The bibliographic structure table that the new terminal preserves.
If the terminal judges that different filename does not appear in the bibliographic structure table of the Dropbox server In, and appear in the bibliographic structure table that the terminal preserves, the terminal is corresponding in deletion different filename itself File, and delete the related information of this document in the bibliographic structure table that the terminal preserves.
If the terminal is judged in the bibliographic structure table that filename had both appeared in the Dropbox server, occur again In the bibliographic structure table that the terminal preserves, but modification time is different, and the terminal device only updates the terminal and preserved Bibliographic structure table, the word will be updated in institute by the modification time of this document in the bibliographic structure table that preserves of the terminal State the modification time of the bibliographic structure table of Dropbox server.
If folder name is different, the bibliographic structure table of the Dropbox server.
If the terminal judges that different folder name appears in the bibliographic structure table of the Dropbox server In, and do not appear in the bibliographic structure table that the terminal preserves, then the terminal creates the different folder name pair The file answered, and this document is pressed from both sides into the bibliographic structure table that related information increases to the terminal and preserve, that is, update the end Hold the bibliographic structure table preserved.
If the terminal judges that different folder name does not appear in the bibliographic structure of the Dropbox server In table, and appear in the bibliographic structure table that the terminal preserves, the terminal deletes the different folder name at itself Corresponding file, and delete the related information of this document folder in the bibliographic structure table that the terminal preserves.
If the terminal is judged in the bibliographic structure table that folder name had both appeared in the Dropbox server, go out again In the bibliographic structure table that the terminal preserves now, but modification time is different, and the terminal device, which only updates the terminal, to be protected The bibliographic structure table deposited, will in the bibliographic structure table that preserves of the terminal file corresponding to this document folder name modification time It is updated to the modification time that the word is clipped in the bibliographic structure table of the Dropbox server.
By above-mentioned synchronization, the terminal and the Dropbox server complete full content and the catalogue knot each preserved Structure table is synchronous.
In another embodiment of the invention, the terminal can all ask most to the Dropbox server at regular intervals New directory structure table keeps newest synchronization.
As shown in figure 3, the structural representation of the system for a kind of file synchronization of one embodiment of the invention, the file are same The system of step includes terminal 31 and Dropbox server 32, and the terminal 31 and the Dropbox server 32 are between each other by various GSM, WiFi or wire communication.
The Dropbox server 32 and the terminal 31 respectively preserve a bibliographic structure table, if the Dropbox takes Business device 32 and the terminal 31 are synchronized, then the bibliographic structure table that the Dropbox server 32 and the terminal 31 preserve respectively It is identical, if the Dropbox server 32 and the terminal 31 are also without synchronous, the Dropbox server 32 and the terminal The 31 bibliographic structure tables preserved respectively may differ.
The Dropbox server 32 can provide following function:The transmission of bibliographic structure table, the load of file, file upload, The establishment of file, the deletion of file or folder.
The bibliographic structure table can be with as shown in Fig. 2 show for a kind of bibliographic structure table structure of another embodiment of the present invention It is intended to, the bibliographic structure table includes:Identify (id) field, path (path) field, modification time (mtime) field and father's mesh Record (parent) field;The id fields represent filename and are the unique mark of file, for example, id fields are word document Name, song title, movie name or pdf document name;The path fields represent file path, for example, the path fields are:Work Make 2017;The mtime fields represent the file Last modification time, for example, the mtime fields are:2010 8 On the moon 4 20:39;The parent field records parent directory ID, the parent directory ID are under 0 expression root or root File.
The terminal 31 obtains the first bibliographic structure table for scanning own files.
The terminal 31 is used to start the APP clients for above-mentioned Dropbox, and scanning is selected in the APP clients, The file needed according to Scanning Options scanning, for example, Scanning Options can be scanning word document, pdf document, audio file (such as MP3) or video file (such as video file of AVI, mpeg format), the terminal 31, which scans own files, to be worked as Preceding the first newest bibliographic structure table.
The terminal 31 is used for scan and not the first file in the bibliographic structure table that the terminal 31 preserves File corresponding to name is sent to the Dropbox server 32, and the bibliographic structure table preserved is updated to the first catalogue knot Structure table.
The first bibliographic structure table that the terminal 31 is used to scan is compared with its bibliographic structure preserved table, such as First bibliographic structure table described in fruit is as the bibliographic structure table that the terminal 31 preserves, then the terminal 31 does not update its preservation Bibliographic structure table.
If the first bibliographic structure table and the bibliographic structure table that the terminal 31 preserves are different, at the terminal 31 Reason can be as described below.
For example, the terminal 31 is used to will appear in the first bibliographic structure table and be not present in the terminal 31 and preserve The information of bibliographic structure table be added to the bibliographic structure table that the terminal 31 preserves.
Appear in the bibliographic structure table that the terminal 31 preserves for example, the terminal 31 is used to delete and be not present in described The information of first bibliographic structure table.
For example, the terminal 31 is used in the bibliographic structure table that the terminal 31 preserves retain both to appear in described first Bibliographic structure table appears in the identical information for the bibliographic structure table that the terminal 31 preserves again.
In another embodiment of the invention, in order to reduce scanning and compare difficulty, the terminal 31 is used to use subhead The mode of scanning is recorded, for example, the terminal 31 scans root fileinfo first, the bibliographic structure table then preserved with it enters Row contrast (namely literary name section parent be 0 file), if filename and Last modification time all as will stop Scanning, if different, first determines whether that different is filename or folder name.
If the terminal 31 judges that different is filename, the terminal 31 is according to following several situations, processing Mode is also different.
If the terminal 31 is used to judge that the filename is appeared in the bibliographic structure table that it is preserved, without Appear in the first bibliographic structure table, then the terminal 31 deletes the file in its described bibliographic structure table preserved The relevant information of name, that is, update the bibliographic structure table.
If the terminal 31 is used to judge that the filename is not appeared in the bibliographic structure table of its preservation, and goes out In the present first bibliographic structure table, then the terminal 31 uploads file corresponding to the filename to the Dropbox server 32, and the related information of file name is added to the bibliographic structure table of the preservation, that is, update the bibliographic structure table.
If the terminal 31 is used to judge that the filename had both been appeared in the bibliographic structure table that it is preserved, go out again In the present first bibliographic structure table, but modification time is different, then the terminal 31 updates the catalogue of the preservation The modification time of file name is the modification time scanned in structure table.
If the terminal 31 is used to judge that different is folder name, the terminal 31 is according to following several feelings Condition, processing mode are also different.
If the terminal 31 is used to judge that the folder name is appeared in the bibliographic structure table that it is preserved, and does not have Occur in the first bibliographic structure table, then the terminal 31 deletes the text in its described bibliographic structure table preserved The related information of part folder name, that is, update the bibliographic structure table.
If the terminal 31 is used to judge that the folder name is not appeared in the bibliographic structure table of its preservation, and Appear in the first bibliographic structure table, then the terminal 31 creates file corresponding to the folder name and by this document The related information of folder is added to the bibliographic structure table of the preservation, that is, updates the bibliographic structure table.
The terminal 31 is used to ask the Dropbox server 32 to send the bibliographic structure table of Dropbox server 32.
The terminal 31 is used for after receiving the bibliographic structure table that the Dropbox server 32 is sent, and the Dropbox is taken The bibliographic structure table of business device 32 is compared with the first bibliographic structure table that the terminal 31 preserves.
If comparative result preserves described for the bibliographic structure table of the Dropbox server 32 with the terminal 31 First bibliographic structure table includes different filenames respectively, and its synchronous file preserved of the terminal 31 is the Dropbox server 32 files preserved, and it is the catalogue knot of Dropbox server 32 to update the first bibliographic structure table that the terminal 31 preserves Structure table.
In another embodiment of the invention, if comparative result is the bibliographic structure table of the Dropbox server 32 The All Files name that the first bibliographic structure table preserved from the terminal 31 includes respectively is identical but other information is different, institute Terminal 31 is stated with the Dropbox server 32 without the synchronous of file, only updates first mesh that the terminal 31 preserves Directory structures table is the bibliographic structure table of Dropbox server 32.
In another embodiment of the invention, if the comparative result is the catalogue knot of the Dropbox server 32 The second filename that structure table includes is not appeared in the first bibliographic structure table that the terminal 31 preserves, the terminal 31 Ask the Dropbox server 32 that file corresponding to second filename is sent into the terminal 31.
In another embodiment of the invention, if the comparative result is first catalogue that the terminal 31 preserves The 3rd filename that structure table includes is not appeared in the bibliographic structure table of the Dropbox server 32, the terminal 31 Itself deleting file corresponding to the 3rd filename.
The efficiency of its bibliographic structure table is transmitted for the raising Dropbox server 32 and is easier to make for comparing, it is described When terminal 31 is asked, the request carries instruction, and the instruction is used to indicate that the Dropbox server 32 is only returned only to root knot Paper mulberry.The terminal 31 by after the bibliographic structure table of the Dropbox server 32 received with its own bibliographic structure table Contrasted, if the bibliographic structure table that the bibliographic structure table of the Dropbox server 32 preserves with the terminal 31 differs Sample, then judge that different judgement is that filename or folder name are different.
If filename is different, then the terminal 31 is also different according to following several situations, processing mode.
If the terminal 31 judges that different filename appears in the bibliographic structure of the Dropbox server 32 In table, and do not appear in the bibliographic structure table that the terminal 31 preserves, then the terminal 31 is asked from the Dropbox server 32 download file corresponding to the different filenames, and the related information of this document is increased into the mesh that the terminal 31 preserves Directory structures table, that is, update the bibliographic structure table that the terminal 31 preserves.
If the terminal 31 judges that different filename does not appear in the catalogue knot of the Dropbox server 32 In structure table, and appear in the bibliographic structure table that the terminal 31 preserves, the terminal 31 deletes the different text at itself File corresponding to part name, and delete the related information of this document in the bibliographic structure table that the terminal 31 preserves.
If the terminal 31 is judged in the bibliographic structure table that filename had both appeared in the Dropbox server 32, again Appear in the bibliographic structure table that the terminal 31 preserves, but modification time is different, and the equipment of terminal 31 only updates described The bibliographic structure table that terminal 31 preserves, the modification time of this document it will be updated in the bibliographic structure table that preserves of the terminal 31 Modification time of the word in the bibliographic structure table of the Dropbox server 32.
If folder name is different, the bibliographic structure table of the Dropbox server 32.
If the terminal 31 judges that different folder name appears in the catalogue knot of the Dropbox server 32 In structure table, and do not appear in the bibliographic structure table that the terminal 31 preserves, then the terminal 31 creates the different text File corresponding to part folder name, and this document is pressed from both sides into the bibliographic structure table that related information increases to the terminal 31 and preserve, i.e., Update the bibliographic structure table that the terminal 31 preserves.
If the terminal 31 judges that different folder name does not appear in the catalogue of the Dropbox server 32 In structure table, and appear in the bibliographic structure table that the terminal 31 preserves, the terminal 31 is deleted described different at itself File corresponding to folder name, and delete the related information of this document folder in the bibliographic structure table that the terminal 31 preserves.
If the terminal 31 is judged in the bibliographic structure table that folder name had both appeared in the Dropbox server 32, Appear in again in the bibliographic structure table that the terminal 31 preserves, but modification time is different, and the equipment of terminal 31 only updates institute The bibliographic structure table of the preservation of terminal 31 is stated, will file corresponding to this document folder name in the bibliographic structure table that preserves of the terminal 31 The modification time of folder is updated to the modification time that the word is clipped in the bibliographic structure table of the Dropbox server 32.
By above-mentioned synchronization, the terminal 31 and the Dropbox server 32 complete full content and the mesh each preserved Directory structures table is synchronous.
In another embodiment of the invention, the terminal 31 can all ask to the Dropbox server 32 at regular intervals Latest list structure table is sought to keep newest synchronization.
The method and system of the Dropbox server of above-mentioned multiple embodiment descriptions and the file synchronization of terminal, can cause terminal Management by synchronization file and fileinfo are always maintained at Dropbox server.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the module or The division of unit, only a kind of division of logic function, can there are other dividing mode, such as multiple units when actually realizing Or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, institute Display or the mutual coupling discussed or direct-coupling or communication connection can be by some interfaces, device or unit INDIRECT COUPLING or communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the application is substantially The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer It is each that equipment (can be personal computer, server, or network equipment etc.) or processor (processor) perform the application The all or part of step of embodiment methods described.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD Etc. it is various can be with the medium of store program codes.
Described above, above example is only to illustrate the technical scheme of the application, rather than its limitations;Although with reference to before Embodiment is stated the application is described in detail, it will be understood by those within the art that:It still can be to preceding State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of each embodiment technical scheme of the application.

Claims (10)

1. the method for the file synchronization of a kind of Dropbox server and terminal, it is characterised in that methods described includes:
The terminal scanning own files obtain the first bibliographic structure table;
The terminal by it is scanning and not the terminal preserve bibliographic structure table in the first filename corresponding to file The Dropbox server is sent to, and the bibliographic structure table preserved is updated to the first bibliographic structure table;
Dropbox server described in the terminal request sends the Dropbox server directory structure table;
After the terminal receives the bibliographic structure table that the Dropbox server is sent, by the mesh of the Dropbox server Directory structures table is compared with the first bibliographic structure table that the terminal preserves;
If first catalogue that comparative result preserves for the bibliographic structure table of the Dropbox server with the terminal Structure table includes different filenames respectively, and the terminal file that synchronously the Dropbox server preserves preserves for the terminal File, and it is the Dropbox server directory structure table to update the first bibliographic structure table that the terminal preserves.
2. the method as described in claim 1, it is characterised in that methods described also includes:
The terminal is by the first bibliographic structure table compared with the bibliographic structure table that the terminal preserves;
The bibliographic structure table that the terminal is preserved is updated to the first bibliographic structure table and specifically included:
The terminal will appear in the first bibliographic structure table and be not present in the letter for the bibliographic structure table that the terminal preserves Breath is added to the bibliographic structure table that the terminal preserves;
The terminal deletion appears in the bibliographic structure table that the terminal preserves and is not present in the first bibliographic structure table Information;
The terminal retains in the bibliographic structure table that the terminal preserves not only to be appeared in the first bibliographic structure table but also occurs In the identical information for the bibliographic structure table that the terminal preserves.
3. the method as described in claim 1, it is characterised in that methods described also includes:
If first catalogue that comparative result preserves for the bibliographic structure table of the Dropbox server with the terminal The All Files name that structure table includes respectively is identical but other information is different, and the terminal is with the Dropbox server without text The synchronization of part, it is the Dropbox server directory structure table only to update the first bibliographic structure table that the terminal preserves.
4. the method as described in claim 1, it is characterised in that if the comparative result is the described of the Dropbox server Bibliographic structure table includes different filenames respectively from the first bibliographic structure table that the terminal preserves, and the terminal is synchronous The file that the Dropbox server preserves specifically includes for the file that the terminal preserves:
If the comparative result does not occur for the second filename that the bibliographic structure table of the Dropbox server includes In the first bibliographic structure table that the terminal preserves, Dropbox server described in the terminal request is by second filename Corresponding file is sent to the terminal;
Do not go out if the comparative result is the 3rd filename that the first bibliographic structure table that the terminal preserves includes In the bibliographic structure table of the present Dropbox server, the terminal itself is deleting text corresponding to the 3rd filename Part.
5. the method as described in claim 1-4 any one, it is characterised in that the first bibliographic structure table, the terminal The bibliographic structure table and the first bibliographic structure table preserved includes:When identifying id fields, path path fields, modification Between mtime fields and parent directory parent fields, wherein, the id fields represent filename and for the unique mark of file, institutes State path fields and represent file path, the mtime fields represent file Last modification time, the parent fields note Record parent directory ID, the parent directory ID are the file under 0 expression root or root.
6. a kind of system of file synchronization, it is characterised in that the system includes:Dropbox server and terminal
The terminal, the first bibliographic structure table is obtained for scanning own files;By it is scanning and not the terminal preserve Bibliographic structure table in the first filename corresponding to file be sent to the Dropbox server, and the bibliographic structure preserved Table is updated to the first bibliographic structure table;The Dropbox server is asked to send the Dropbox server directory structure table;
The Dropbox server, for sending the bibliographic structure table of the Dropbox server to the terminal;
The terminal is additionally operable to first mesh for preserving the bibliographic structure table of the Dropbox server and the terminal Directory structures table is compared;If comparative result preserves for the bibliographic structure table of the Dropbox server with the terminal The first bibliographic structure table includes different filenames respectively, and the file that the synchronous Dropbox server preserves is its preservation File, and the first bibliographic structure table for updating its preservation is the Dropbox server directory structure table.
7. system as claimed in claim 6, it is characterised in that the terminal is additionally operable to the first bibliographic structure table and institute The bibliographic structure table for stating terminal preservation is compared;It will appear in the first bibliographic structure table and be not present in the terminal and protect The information for the bibliographic structure table deposited is added to the bibliographic structure table that the terminal preserves;Delete and appear in the mesh that the terminal preserves Directory structures table and be not present in the information of the first bibliographic structure table;Retain both in the bibliographic structure table that the terminal preserves Appear in the identical information that the first bibliographic structure table appears in the bibliographic structure table that the terminal preserves again.
8. system as claimed in claim 6, it is characterised in that the terminal, be additionally operable to, if comparative result is the Dropbox The All Files name that the first bibliographic structure table that the bibliographic structure table of server preserves with the terminal includes respectively Identical but other information is different, with the Dropbox server without the synchronous of file, only updates the institute that the terminal preserves It is the Dropbox server directory structure table to state the first bibliographic structure table.
9. system as claimed in claim 6, it is characterised in that the terminal, be additionally operable to, if the comparative result is described The second filename that the bibliographic structure table of Dropbox server includes does not appear in first mesh that the terminal preserves In directory structures table, ask the Dropbox server that file corresponding to second filename is sent into the terminal;It is if described Comparative result is that the 3rd filename that the first bibliographic structure table that the terminal preserves includes does not appear in the Dropbox In the bibliographic structure table of server, file corresponding to the 3rd filename itself is being deleted.
10. the system as described in claim 6-9 any one, it is characterised in that the first bibliographic structure table, the terminal The bibliographic structure table and the first bibliographic structure table preserved includes:When identifying id fields, path path fields, modification Between mtime fields and parent directory parent fields, wherein, the id fields represent filename and for the unique mark of file, institutes State path fields and represent file path, the mtime fields represent file Last modification time, the parent fields note Record parent directory ID, the parent directory ID are the file under 0 expression root or root.
CN201710682473.8A 2017-08-10 2017-08-10 A kind of method and system of the file synchronization of Dropbox server and terminal Pending CN107577718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710682473.8A CN107577718A (en) 2017-08-10 2017-08-10 A kind of method and system of the file synchronization of Dropbox server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710682473.8A CN107577718A (en) 2017-08-10 2017-08-10 A kind of method and system of the file synchronization of Dropbox server and terminal

Publications (1)

Publication Number Publication Date
CN107577718A true CN107577718A (en) 2018-01-12

Family

ID=61034553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710682473.8A Pending CN107577718A (en) 2017-08-10 2017-08-10 A kind of method and system of the file synchronization of Dropbox server and terminal

Country Status (1)

Country Link
CN (1) CN107577718A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067913A (en) * 2018-09-19 2018-12-21 量子云未来(北京)信息科技有限公司 A kind of method and device for maintaining data synchronous
CN110377665A (en) * 2019-07-24 2019-10-25 无锡华云数据技术服务有限公司 Method of data synchronization, device, electronic equipment and storage medium
CN110704389A (en) * 2019-09-24 2020-01-17 武汉意畅智云科技有限公司 Bidirectional file synchronization method based on drive and state
CN116010364A (en) * 2023-03-27 2023-04-25 天津联想协同科技有限公司 Method and device for updating network disk file state, network disk and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172483A1 (en) * 2007-01-12 2008-07-17 Thinprint Gmbh Method and system for managing data, and a corresponding computer program and a corresponding computer-reading storage medium
CN102790760A (en) * 2012-05-31 2012-11-21 清华大学 Data synchronization method based on directory tree in safe network disc system
CN102857570A (en) * 2012-09-13 2013-01-02 清华大学 Cloud synchronized method of files and cloud storage server
CN103605537A (en) * 2013-11-08 2014-02-26 北京奇虎科技有限公司 Software installation method and device
CN103605798A (en) * 2013-12-05 2014-02-26 上海够快网络科技有限公司 Method for directly operating file stored at cloud end
CN106101265A (en) * 2016-07-26 2016-11-09 浪潮软件股份有限公司 Method for synchronizing files between network disk and desktop end
CN106131123A (en) * 2016-06-21 2016-11-16 福建星网视易信息系统有限公司 The remote resource synchronous method of three-tier architecture and system
CN106657170A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Data synchronization method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172483A1 (en) * 2007-01-12 2008-07-17 Thinprint Gmbh Method and system for managing data, and a corresponding computer program and a corresponding computer-reading storage medium
CN102790760A (en) * 2012-05-31 2012-11-21 清华大学 Data synchronization method based on directory tree in safe network disc system
CN102857570A (en) * 2012-09-13 2013-01-02 清华大学 Cloud synchronized method of files and cloud storage server
CN103605537A (en) * 2013-11-08 2014-02-26 北京奇虎科技有限公司 Software installation method and device
CN103605798A (en) * 2013-12-05 2014-02-26 上海够快网络科技有限公司 Method for directly operating file stored at cloud end
CN106657170A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Data synchronization method and device
CN106131123A (en) * 2016-06-21 2016-11-16 福建星网视易信息系统有限公司 The remote resource synchronous method of three-tier architecture and system
CN106101265A (en) * 2016-07-26 2016-11-09 浪潮软件股份有限公司 Method for synchronizing files between network disk and desktop end

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067913A (en) * 2018-09-19 2018-12-21 量子云未来(北京)信息科技有限公司 A kind of method and device for maintaining data synchronous
CN110377665A (en) * 2019-07-24 2019-10-25 无锡华云数据技术服务有限公司 Method of data synchronization, device, electronic equipment and storage medium
CN110377665B (en) * 2019-07-24 2020-10-30 华云数据控股集团有限公司 Data synchronization method and device, electronic equipment and storage medium
CN110704389A (en) * 2019-09-24 2020-01-17 武汉意畅智云科技有限公司 Bidirectional file synchronization method based on drive and state
CN110704389B (en) * 2019-09-24 2022-02-01 武汉意畅智云科技有限公司 Bidirectional file synchronization method based on drive and state
CN116010364A (en) * 2023-03-27 2023-04-25 天津联想协同科技有限公司 Method and device for updating network disk file state, network disk and storage medium
CN116010364B (en) * 2023-03-27 2023-08-04 天津联想协同科技有限公司 Method and device for updating network disk file state, network disk and storage medium

Similar Documents

Publication Publication Date Title
US10992781B2 (en) Method, user equipment, server, and apparatus for implementing information sharing
CN107577718A (en) A kind of method and system of the file synchronization of Dropbox server and terminal
US8620366B2 (en) Data synchronization method between mobile terminal and server
CN103905495B (en) A kind of synchronous method and background server of application
JP5870468B2 (en) Method and apparatus for managing images of mobile terminals
CN102368746A (en) Picture information promotion method and apparatus thereof
CN103841180B (en) A kind of network data synchronizing method, apparatus, terminal device and server based on operational order
CN102722428A (en) Address book backup and recovery method and address book backup and recovery device
CN102737690B (en) Method and terminal that music application starts
CN106933853A (en) A kind of files passe processing method and processing device
CN105577893A (en) Method, device and terminal for information backup
CN102571990A (en) E-mail synchronization method and system for mobile terminal
CN102594874B (en) Synchronization processing method and device
CN109213955A (en) Data processing method and relevant device
US10862842B2 (en) Managing specialized objects in a message store
CN105634933B (en) The processing method and intelligent terminal of the history message of public account in converged communication
CN105228024A (en) Set-top box users exchange method
WO2018001054A1 (en) Method and device for synchronizing cloud desktop data
CN106790716A (en) Picture method for pushing and system based on screen lock state
WO2016197884A1 (en) Identity-based data processing method and device
EP3378202B1 (en) Archiving messages without message copying
CN106341307A (en) Information processing method, sever, client and system
CN104065673B (en) A kind of implementation method and device by address list synchronization to server
CN102316427B (en) A kind of method and terminal of processing short message
EP2751720A1 (en) Processing communications data

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
TA01 Transfer of patent application right

Effective date of registration: 20201117

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant before: Phicomm (Shanghai) Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20180112

RJ01 Rejection of invention patent application after publication