WO2019205348A1 - 文件同步方法、装置、计算机装置及存储介质 - Google Patents

文件同步方法、装置、计算机装置及存储介质 Download PDF

Info

Publication number
WO2019205348A1
WO2019205348A1 PCT/CN2018/099782 CN2018099782W WO2019205348A1 WO 2019205348 A1 WO2019205348 A1 WO 2019205348A1 CN 2018099782 W CN2018099782 W CN 2018099782W WO 2019205348 A1 WO2019205348 A1 WO 2019205348A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
folder
synchronization
synchronized
storage address
Prior art date
Application number
PCT/CN2018/099782
Other languages
English (en)
French (fr)
Inventor
宋剑锋
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019205348A1 publication Critical patent/WO2019205348A1/zh

Links

Images

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/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a file synchronization method, apparatus, computer device, and storage medium.
  • the application provides a file synchronization method, the method comprising:
  • the application also provides a file synchronization device, the device comprising:
  • a first obtaining module configured to obtain a folder to be synchronized, and perform statistics on file information included in the folder to be synchronized to obtain a first file list
  • the first obtaining module is further configured to acquire a storage address before synchronization of the folder to be synchronized and a storage address after synchronization;
  • a synchronization module configured to synchronize, by using an RSYNC instruction, a file included in the folder to be synchronized from the pre-synchronization storage address to the post-synchronization storage address;
  • a statistics module configured to obtain a post-synchronization folder, and collect file information included in the synchronized folder to obtain a second file list
  • a matching module configured to match the first file list with the second file list to determine whether file synchronization is completed.
  • the application further provides a computer device comprising a memory and a processor, the memory for storing at least one instruction, the processor for executing the at least one instruction to implement the file described in any embodiment Synchronization method.
  • the present application also provides a non-volatile readable storage medium, wherein the storage medium stores at least one instruction, and the at least one instruction is executed by a processor to implement the file synchronization method described in any embodiment. .
  • the present application obtains a file to be synchronized, and collects file information included in the to-be-synchronized folder to obtain a first file list; and obtains a storage address and synchronization of the to-be-synchronized folder before synchronization. Storing an address; synchronizing the file included in the folder to be synchronized from the pre-synchronization storage address to the post-synchronization storage address by using an RSYNC command; obtaining a post-synchronization folder, and collecting file information included in the synchronized folder, Obtaining a second file list; matching the first file list with the second file list to determine whether file synchronization is completed.
  • the file synchronization can be obtained to determine whether the synchronization is successful. Therefore, when a large-scale file is transmitted, there is no need to be on duty, and no human effort is required to check the synchronization result one by one, thereby achieving the purpose of improving the efficiency of large-scale file synchronization and the reliability of file synchronization.
  • FIG. 1 is a flowchart of a file synchronization method according to an embodiment of the present application
  • FIG. 2 is a functional block diagram of a file synchronization apparatus according to an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a computer apparatus according to a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a file synchronization method according to an embodiment of the present application.
  • the order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.
  • S10 Acquire a folder to be synchronized, and perform statistics on file information included in the to-be-synchronized folder to obtain a first file list.
  • the file synchronization method described in this application can be used not only for large-scale file transmission, but also for non-bulk file synchronization, that is, it can be applied to any scenario for file synchronization.
  • the folder to be synchronized is a folder to be synchronized, and the folder is used to store files in the computer system, and a folder may include several files.
  • the number of acquired folders to be synchronized may be one or more, and the number of files in the folder to be synchronized may be one or more.
  • the statistics of the file information to be included in the synchronization folder include, but are not limited to, one or more of the following: the number of files to be included in the synchronization folder, the name of the file, the type of the file, the modification time of each file, and the like. Items or multiple pieces of information are counted.
  • the acquiring the to-be-synchronized folder may include:
  • the foregoing storage may refer to a storage medium stored in a folder to be synchronized, such as a certain hard disk.
  • the above storage may also be a storage space in the storage medium that can store data.
  • the root folder is the folder under the root directory.
  • the root directory refers to the top-level directory of the logical drive. For example, if the storage is divided into M area and N area, then for M: ⁇ user1 ⁇ data, M: ⁇ is the root directory, and folder user1 is the folder under the root directory, that is, the folder user1 is the root directory folder. Data is a subdirectory folder, which can also be called a subfolder.
  • the preset time can be set according to requirements. For example, if the preset time is 1st of the current month, it is determined that the root folder modified after the 1st is the folder to be synchronized, so that the modified folder within one month can be filtered out. And then synchronize.
  • the modified root folder can be obtained for synchronization in a period of time.
  • the user can quickly locate and synchronize, and no manual manual search is needed, thereby improving the efficiency of file synchronization.
  • the acquiring the to-be-synchronized folder may further include:
  • the preset access frequency can be set as needed.
  • the preset access frequency is 20 times a day, or the access frequency is 100 times a week.
  • the folders with higher access frequency can be quickly filtered out and then synchronized. For example, if large-scale file synchronization is to be performed in batches, the folders with higher access frequency can be preferentially synchronized, and files with higher access frequency can be preferentially synchronized to other storages for quick and convenient access through other storage. A file with a higher frequency.
  • the obtaining the to-be-synchronized folder may further include:
  • the folder to be synchronized is a folder designated by the user, which satisfies the personalized requirement when the user files are synchronized.
  • the storage address before the synchronization of the to-be-synchronized folder may be acquired together when the folder to be synchronized is acquired.
  • the above-mentioned post-synchronization storage address refers to the location where the folder to be synchronized is placed. For example, after the synchronization, the storage address is in the B storage, or after the synchronization, the storage address is in the userdata file directory of the B storage.
  • the method described in the present application may further include:
  • step S30 After the storage address of the synchronization is obtained, it is determined whether the capacity of the storage space to which the storage address belongs after the synchronization meets the preset capacity condition; if yes, step S30 is performed.
  • the capacity size satisfies the preset capacity condition, that is, the capacity size is greater than the total size of the folder to be synchronized, or the difference between the capacity size and the size of the folder to be synchronized is greater than the preset capacity.
  • the preset capacity can be set as needed.
  • the storage address is B storage
  • the storage capacity of the storage address to which the storage address belongs after synchronization is the storage capacity of the B storage.
  • the userdata file directory whose address is stored in B is stored, and the capacity of the storage space to which the storage address belongs after synchronization is also the capacity of the B storage.
  • the method described in the present application may further include:
  • step S30 After the synchronization storage address is obtained, it is determined whether the storage address after the synchronization is a preset storage address; if yes, step S30 is performed.
  • the above preset storage address may be a preset storage address.
  • the file when file synchronization is performed, the file is not synchronized to a folder outside the preset range, and security during file synchronization is ensured.
  • RSYNC command can implement remote data synchronization, and a detailed description of the RSYNC can be obtained from the prior art, and details are not described herein again.
  • RSYNC can perform incremental synchronization or full synchronization. That is, all the files in the folder to be synchronized are synchronized, or the delta files in the folder to be synchronized are synchronized.
  • the RSYNC command has the characteristics of fast file transfer
  • the RSYNC command is used for file synchronization, which improves the speed of file synchronization and achieves the purpose of fast file synchronization.
  • the transfer time can be greatly saved compared to the use of other instructions for transmission.
  • the synchronization folder may be encrypted first, or the files included in the folder to be synchronized may be encrypted, and then the file is synchronized by the RSYNC command.
  • the files included in the folder to be synchronized may be encrypted, and then the file is synchronized by the RSYNC command.
  • S40 Obtain a post-synchronization folder, and collect file information included in the synchronized folder to obtain a second file list.
  • the above-mentioned synchronized folder is the folder after the folder to be synchronized is synchronized.
  • the foregoing statistics on the file information included in the synchronized folder may include, but are not limited to, one or more items such as the number of files included in the synchronized folder, the name of the file, the type of the file, and the modification time of each file. Information is statistic.
  • the second file list contains the synchronized folder.
  • the name of the file contained in and the number of files is counted.
  • S50 Match the first file list with the second file list to determine whether file synchronization is completed.
  • the matching between the first file list and the second file list is used to determine whether the files included in the folder to be synchronized before synchronization are consistent with the files included in the folder to be synchronized after synchronization, and if they are consistent, it is determined that the file synchronization is completed.
  • the file synchronization is completed.
  • the file with the same file name and the file size in the second file list can be displayed in the first file list. Since most of the file transfers have been completed at this time, only some of the files may be different in size, so the way of displaying the notifications allows the user to know which files are not fully synchronized, so that the user can see if the first file list needs to be
  • the files in the second file list have the same file name and files with different file sizes are synchronized.
  • each item in the file list can be matched one by one.
  • the file name contained in the first file list with the file name contained in the second file list to determine whether the file names are consistent.
  • the number of files included in the first file list is matched with the number of second files to determine whether the number of files is consistent. If they are consistent, make sure to complete the file synchronization.
  • the total file size in the first file list and the total number of files and the total file size in the second file list are matched with the total number of files. If they are consistent, the file name and file size in the first file list are The file creation time is matched with the file name, file size, and file creation time in the second file list. If they are consistent, it is determined that the file synchronization is completed.
  • each file has its creation time. If the file is modified, the file has its modification time, and the modification time belongs to one of the attribute information of the file.
  • the modification time of the file will change and the contents of the file may be updated. Therefore, in this embodiment, if a file with the same name is encountered during the file synchronization process, whether the file is overwritten may be determined by the modification time of the file. This makes the latest files not overwritten by old files during the synchronization process.
  • file coverage is performed. If the file type of the first file is not the specified file type, and the first modification time is closer to the current system time than the second modification time, file coverage is performed. If the file type of the first file is the specified file type, the first file is not overwritten regardless of whether the first modification time is closer to the current system time than the second modification time.
  • the log of the synchronization file can be output and marked, so that the user can quickly understand the file that is not completely synchronized, and then trigger the synchronization instruction to synchronize the file again, saving The time it takes for the file to sync.
  • the abnormal cause is a network connection abnormality
  • the synchronized file in the to-be-synchronized folder is obtained from the synchronization log
  • the unsynchronized file in the to-be-synchronized folder is synchronized to the post-synchronization storage address by the RSYNC command.
  • the abnormal cause of the outgoing process can be obtained by capturing the abnormal function.
  • the above synchronization log is log information that records the file synchronization process. For example, the name of the transferred file can be recorded during the synchronization process, and the synchronized file in the folder to be synchronized can be obtained from the synchronization log.
  • the synchronization log can also print related information of all the synchronization files in the file synchronization process, so that the relevant staff can conveniently understand the abnormality in the file synchronization process and know the synchronization result.
  • the total number of files to be synchronized includes twenty-six files
  • the synchronized files recorded in the synchronization log are three files A, B, and C
  • Files other than the three files A, B, and C are unsynchronized files.
  • the storage to which the address belongs may be actively connected after the interval is synchronized.
  • the notification message that the network connection is normal may be determined.
  • the unsynchronized file in the folder to be synchronized is synchronized to the post-synchronization storage address by the RSYNC instruction.
  • the exception processing is added to improve the fault tolerance processing capability when the abnormality occurs, and the reliability of the file transmission success is further improved.
  • a reminder message is sent.
  • an abnormality occurs in the file synchronization, and the abnormality cannot promptly remind the relevant staff to perform the reminder by re-actively transmitting the file synchronization, so that the problem in the file synchronization process can be timely found and solved in time. Reduce the time to complete file synchronization.
  • the file synchronization method provided by the present application obtains a folder to be synchronized, performs statistics on the file information included in the folder to be synchronized, and obtains a first file list; and obtains a storage address before synchronization and a storage address after synchronization; Synchronizing the file included in the folder to be synchronized from the pre-synchronization storage address to the post-synchronization storage address by using the RSYNC command; acquiring the synchronized folder, and collecting the file information included in the synchronized folder to obtain the second a file list; matching the first file list with the second file list to determine whether file synchronization is completed.
  • the file synchronization can be acquired to determine whether the synchronization is successful. Therefore, when a large-scale file is transmitted, there is no need to be on duty, and no human effort is required to check the synchronization result one by one, thereby achieving the purpose of improving the efficiency of large-scale file synchronization and the reliability of file synchronization.
  • FIG. 2 is a functional block diagram of a file synchronization apparatus according to an embodiment of the present application.
  • the file synchronization device includes a first acquisition module 210, a synchronization module 220, a statistics module 230, and a matching module 240.
  • a module as referred to herein refers to a series of computer readable instruction segments that can be executed by a processor of a computer device and that are capable of performing a fixed function, which are stored in a memory of the computer device.
  • the functions of the respective modules will be described in detail in the subsequent embodiments.
  • the first obtaining module 210 is configured to obtain a folder to be synchronized, and perform statistics on the file information included in the to-be-synchronized folder to obtain a first file list.
  • the file synchronization device described in this application can be used not only for large-volume file transmission, but also for non-bulk file synchronization, that is, it can be applied to any scenario for file synchronization.
  • the folder to be synchronized is a folder to be synchronized, and the folder is used to store files in the computer system, and a folder may include several files.
  • the number of acquired folders to be synchronized may be one or more, and the number of files in the folder to be synchronized may be one or more.
  • the statistics of the file information to be included in the synchronization folder include, but are not limited to, one or more of the following: the number of files to be included in the synchronization folder, the name of the file, the type of the file, the modification time of each file, and the like. Items or multiple pieces of information are counted.
  • the acquiring, by the first obtaining module 210, the folder to be synchronized includes:
  • the foregoing storage may refer to a storage medium stored in a folder to be synchronized, such as a certain hard disk.
  • the above storage may also be a storage space in the storage medium that can store data.
  • the root folder is the folder under the root directory.
  • the root directory refers to the top-level directory of the logical drive. For example, if the storage is divided into M area and N area, then for M: ⁇ user1 ⁇ data, M: ⁇ is the root directory, and folder user1 is the folder under the root directory, that is, the folder user1 is the root directory folder. Data is a subdirectory folder, which can also be called a subfolder.
  • the preset time can be set according to requirements. For example, if the preset time is 1st of the current month, it is determined that the root folder modified after the 1st is the folder to be synchronized, so that the modified folder within one month can be filtered out. And then synchronize.
  • the modified root folder can be obtained for synchronization in a period of time.
  • the user can quickly locate and synchronize, and no manual manual search is needed, thereby improving the efficiency of file synchronization.
  • the acquiring, by the first obtaining module 210, the folder to be synchronized may include:
  • the preset access frequency can be set as needed.
  • the preset access frequency is 20 times a day, or the access frequency is 100 times a week.
  • the folders with higher access frequency can be quickly filtered out and then synchronized. For example, if large-scale file synchronization is to be performed in batches, the folders with higher access frequency can be preferentially synchronized, and files with higher access frequency can be preferentially synchronized to other storages for quick and convenient access through other storage. A file with a higher frequency.
  • the acquiring, by the first obtaining module 210, the folder to be synchronized includes
  • the folder to be synchronized is a folder designated by the user, which satisfies the personalized requirement when the user files are synchronized.
  • the first obtaining module 210 is further configured to obtain the pre-synchronized folder pre-synchronization storage address and the post-synchronization storage address.
  • the storage address before the synchronization of the to-be-synchronized folder may be acquired together when the folder to be synchronized is acquired.
  • the above-mentioned post-synchronization storage address refers to the location where the folder to be synchronized is placed. For example, after the synchronization, the storage address is in the B storage, or after the synchronization, the storage address is in the userdata file directory of the B storage.
  • the apparatus described in the application may further include a determining module and a triggering module.
  • the determining module is configured to determine whether the capacity of the storage space to which the storage address belongs after the synchronization meets the preset capacity condition.
  • a triggering module configured to: if the size of the storage space to which the storage address belongs after the synchronization meets the preset capacity condition, trigger the synchronization module to synchronize the file included in the to-be-synchronized folder from the pre-synchronization storage address to the Store the address after synchronization.
  • the capacity size satisfies the preset capacity condition, that is, the capacity size is greater than the total size of the folder to be synchronized, or the difference between the capacity size and the size of the folder to be synchronized is greater than the preset capacity.
  • the preset capacity can be set as needed.
  • the storage address is B storage
  • the storage capacity of the storage address to which the storage address belongs after synchronization is the storage capacity of the B storage.
  • the userdata file directory whose address is stored in B is stored, and the capacity of the storage space to which the storage address belongs after synchronization is also the capacity of the B storage.
  • the determining module is further configured to: after obtaining the stored address after the synchronization, determine whether the stored address after the synchronization is a preset storage address.
  • the triggering module is further configured to: if the storage address after the synchronization is a preset storage address, trigger the synchronization module to use the RSYNC command, the pre-synchronization storage address, and the post-synchronization storage address to synchronize the folder to be synchronized.
  • the included files are synchronized.
  • the above preset storage address may be a preset storage address.
  • the file when file synchronization is performed, the file is not synchronized to a folder outside the preset range, and security during file synchronization is ensured.
  • the synchronization module 220 is configured to synchronize, by using the RSYNC instruction, the file included in the folder to be synchronized from the pre-synchronization storage address to the post-synchronization storage address.
  • RSYNC command can implement remote data synchronization, and a detailed description of the RSYNC can be obtained from the prior art, and details are not described herein again.
  • RSYNC can perform incremental synchronization or full synchronization. That is, all the files in the folder to be synchronized are synchronized, or the delta files in the folder to be synchronized are synchronized.
  • the RSYNC command has the characteristics of fast file transfer
  • the RSYNC command is used for file synchronization, which improves the speed of file synchronization and achieves the purpose of fast file synchronization.
  • the transfer time can be greatly saved compared to the use of other instructions for transmission.
  • the synchronization folder may be encrypted before the synchronization module 220 is executed, or the files included in the folder to be synchronized are encrypted, and then the file is processed by the RSYNC command. Synchronize to improve security during file synchronization.
  • the statistics module 230 is configured to obtain a post-synchronization folder, and collect file information included in the synchronized folder to obtain a second file list.
  • the above-mentioned synchronized folder is the folder after the folder to be synchronized is synchronized.
  • the foregoing statistics on the file information included in the synchronized folder may include, but are not limited to, one or more items such as the number of files included in the synchronized folder, the name of the file, the type of the file, and the modification time of each file. Information is statistic.
  • the second file list contains the synchronized folder.
  • the name of the file contained in and the number of files is counted.
  • the matching module 240 is configured to match the first file list with the second file list to determine whether file synchronization is completed.
  • the matching between the first file list and the second file list is used to determine whether the files included in the folder to be synchronized before synchronization are consistent with the files included in the folder to be synchronized after synchronization, and if they are consistent, it is determined that the file synchronization is completed.
  • the file with the same file name and the file size in the second file list can be displayed in the first file list. Since most of the file transfers have been completed at this time, only some of the files may be different in size, so the way of displaying the notifications allows the user to know which files are not fully synchronized, so that the user can see if the first file list needs to be
  • the files in the second file list have the same file name and files with different file sizes are synchronized.
  • each item in the file list can be matched one by one.
  • the file name contained in the first file list with the file name contained in the second file list to determine whether the file names are consistent.
  • the number of files included in the first file list is matched with the number of second files to determine whether the number of files is consistent. If they are consistent, make sure to complete the file synchronization.
  • the total file size in the first file list and the total number of files and the total file size in the second file list are matched with the total number of files. If they are consistent, the file name and file size in the first file list are The file creation time is matched with the file name, file size, and file creation time in the second file list. If they are consistent, it is determined that the file synchronization is completed.
  • the file synchronization process if the file has the same name, it can be processed by the second obtaining module and the processing module:
  • a second obtaining module configured to acquire a first modification of the first file if the first file included in the post-synchronization storage address and the second file included in the to-be-synchronized folder have the same name in the synchronization process Time and second modification time of the second file.
  • a processing module if the first modification time is closer to the current system time than the second modification time, the first file is not overwritten; if the second modification time is closer to the current system time than the first modification time, Then the first file is overwritten.
  • each file has its creation time. If the file is modified, the file has its modification time, and the modification time belongs to one of the attribute information of the file.
  • the modification time of the file will change and the contents of the file may be updated. Therefore, in this embodiment, if a file with the same name is encountered during the file synchronization process, whether the file is overwritten may be determined by the modification time of the file. This makes the latest files not overwritten by old files during the synchronization process.
  • file coverage is performed. If the file type of the first file is not the specified file type, and the first modification time is closer to the current system time than the second modification time, file coverage is performed. If the file type of the first file is the specified file type, the first file is not overwritten regardless of whether the first modification time is closer to the current system time than the second modification time.
  • the log of the synchronization file can be output and marked, so that the user can quickly understand the file that is not completely synchronized, and then trigger the synchronization instruction to synchronize the file again, saving The time it takes for the file to sync.
  • the exception processing module may perform processing.
  • the exception handling module is used to:
  • the synchronized file in the to-be-synchronized folder is obtained from the synchronization log;
  • the unsynchronized file in the to-be-synchronized folder is synchronized to the post-synchronization storage address by using the RSYNC command.
  • the cause of the abnormality occurring in the outgoing process can be obtained by capturing an abnormal function.
  • the above synchronization log is log information that records the file synchronization process. For example, the name of the transferred file can be recorded during the synchronization process, and the synchronized file in the folder to be synchronized can be obtained from the synchronization log.
  • the synchronization log can also print related information of all the synchronization files in the file synchronization process, so that the relevant staff can conveniently understand the abnormality in the file synchronization process and know the synchronization result.
  • the total number of files to be synchronized includes twenty-six files
  • the synchronized files recorded in the synchronization log are three files A, B, and C
  • Files other than the three files A, B, and C are unsynchronized files.
  • the storage to which the address belongs may be actively connected after the interval is synchronized.
  • the notification message that the network connection is normal may be determined.
  • the unsynchronized file in the folder to be synchronized is synchronized to the post-synchronization storage address by the RSYNC instruction.
  • the exception processing is added to improve the fault tolerance processing capability when the abnormality occurs, and the reliability of the file transmission success is further improved.
  • the exception processing module is further configured to: if the abnormal cause is insufficient storage space, issue reminding information.
  • an abnormality occurs in the file synchronization, and the abnormality cannot promptly remind the relevant staff to perform the reminder by re-actively transmitting the file synchronization, so that the problem in the file synchronization process can be timely found and solved in time. Reduce the time to complete file synchronization.
  • the file synchronization device obtains a folder to be synchronized through a first acquisition module, performs statistics on file information included in the folder to be synchronized, obtains a first file list, and obtains a storage address before synchronization of the folder to be synchronized. And storing the address after the synchronization; the synchronization module synchronizes the file included in the folder to be synchronized from the pre-synchronization storage address to the post-synchronization storage address by using the RSYNC command; the statistics module obtains the post-synchronization folder, and statistics the synchronization
  • the file information included in the folder is obtained as a second file list; the matching module matches the first file list with the second file list to determine whether file synchronization is completed.
  • the file synchronization can be obtained to determine whether the synchronization is successful. Therefore, when a large-scale file is transmitted, there is no need to be on duty, and no human effort is required to check the synchronization result one by one, thereby achieving the purpose of improving the efficiency of large-scale file synchronization and the reliability of file synchronization.
  • the above-described integrated unit implemented in the form of a software function module can be stored in a non-volatile readable storage medium.
  • the software function module described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods described in various embodiments of the present application. Part of the steps.
  • FIG. 3 is a schematic structural diagram of a computer apparatus according to a preferred embodiment of the present invention.
  • the computer device comprises at least one transmitting device 31, at least one memory 32, at least one processor 33, at least one receiving device 34 and at least one communication bus.
  • the communication bus is used to implement connection communication between these components.
  • the computer device is a device capable of automatically performing numerical calculation and/or information processing according to an instruction set or stored in advance, and the hardware thereof includes but is not limited to a microprocessor and an application specific integrated circuit (ASIC). , Field-Programmable Gate Array (FPGA), Digital Signal Processor (DSP), embedded devices, etc.
  • the computer device may also include a network device and/or a user device.
  • the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud computing-based cloud composed of a large number of hosts or network servers, where the cloud computing is distributed computing.
  • a super virtual computer consisting of a group of loosely coupled computers.
  • the computer device may be, but is not limited to, any electronic product that can interact with a user through a keyboard, a touch pad or a voice control device, such as a tablet, a smart phone, or a personal digital assistant (Personal Digital Assistant, PDA), smart wearable devices, camera devices, monitoring devices and other terminals.
  • a keyboard e.g., a keyboard
  • a touch pad e.g., a touch pad
  • a voice control device such as a tablet, a smart phone, or a personal digital assistant (Personal Digital Assistant, PDA), smart wearable devices, camera devices, monitoring devices and other terminals.
  • PDA Personal Digital Assistant
  • the network in which the computer device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
  • the Internet includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
  • VPN virtual private network
  • the receiving device 34 and the transmitting device 31 may be wired transmission ports, or may be wireless devices, for example, including antenna devices, for performing data communication with other devices.
  • the memory 32 is used to store program code.
  • the memory 32 may be a circuit having a memory function in a physical form, such as a RAM (Random-Access Memory), a FIFO (First In First Out) memory, or the like.
  • the memory 32 may also be a memory having a physical form, such as a memory stick, a TF card (Trans-flash Card), a smart media card, a secure digital card, a flash memory card. Storage devices such as (flash card) and the like.
  • the processor 33 can include one or more microprocessors, digital processors.
  • the processor 33 can call program code stored in the memory 32 to perform related functions.
  • the various units described in FIG. 3 are program code stored in the memory 32 and executed by the processor 33 to implement a file synchronization method.
  • the processor 33 also known as a central processing unit (CPU), is a very large-scale integrated circuit, which is a computing core (Core) and a control unit (Control Unit).
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software function modules.

Landscapes

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

Abstract

本申请提供一种文件同步方法,包括:获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;获取所述待同步文件夹同步前存放地址与同步后存放地址;通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。本申请还公开了一种文件同步装置、计算机装置和存储介质。本申请可以在大批量文件传输时无需有人值守,并且能够提高大批量文件同步的效率以及文件同步时的可靠性。

Description

文件同步方法、装置、计算机装置及存储介质
本申请要求于2018年04月23日提交中国专利局,申请号为201810368082.3发明名称为“文件同步方法、装置、计算机装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种文件同步方法、装置、计算机装置及存储介质。
背景技术
随着计算机技术的发展,存储(如硬盘、移动存储设备等)的容量越来越大。在存储中,可以存放各种类型的文件,例如,文本、图片、视音频等各种类型的文件。然而,当存储容量不够时,可能需要将存储内容进行迁移,此时,通常需要将存储中大批量的文件进行同步。
现有技术中,在进行大批量文件同步时,通常由图形化工具来完成。然而通过图形化工具进行操作时,需要有人值守,耗时耗力,而大批量文件由于数量多且大小较大通常会花费大量的时间,同步效率也不够高。
发明内容
鉴于以上内容,有必要提供一种文件同步方法、装置、计算机装置及存储介质,使得当大批量文件传输时无需有人值守,并且能够提高大批量文件同步的效率以及文件同步时的可靠性。
本申请提供一种文件同步方法,所述方法包括:
获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;
获取所述待同步文件夹同步前存放地址与同步后存放地址;
通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;
获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;
将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
本申请还提供一种文件同步装置,所述装置包括:
第一获取模块,用于获取待同步文件夹,对所述待同步文件夹包含的文 件信息进行统计,得到第一文件清单;
所述第一获取模块,还用于获取所述待同步文件夹同步前存放地址与同步后存放地址;
同步模块,用于通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;
统计模块,用于获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;
匹配模块,用于将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
本申请还提供一种计算机装置,所述计算机装置包括存储器及处理器,所述存储器用于存储至少一个指令,所述处理器用于执行所述至少一个指令以实现任意实施例中所述的文件同步方法。
本申请还提供一种非易失性可读存储介质,其特征在于,所述存储介质存储有至少一个指令,所述至少一个指令被处理器执行时实现任意实施例中所述的文件同步方法。
由以上技术方案看出,本申请通过获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;获取所述待同步文件夹同步前存放地址与同步后存放地址;通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。由于通过RSYNC指令进行数据同步,并且同步之后将待同步文件夹同步前的第一清单与待同步文件夹同步后的第二清单进行匹配,从而可以获取文件同步的情况,来判断是否同步成功。因此当大批量文件传输时无需有人值守,也无需人力去一一检查同步结果,实现了提高大批量文件同步的效率以及文件同步时的可靠性的目的。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1是本申请实施例提供的一种文件同步方法的流程图;
图2是本申请实施例提供的文件同步装置的功能模块图;
图3是本申请实现文件同步方法的较佳实施例的计算机装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
如图1所示,图1为本申请实施例提供的一种文件同步方法的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。
S10,获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单。
本申请所述的文件同步方法不仅可以用于大批量文件传输,同样的,也可以用于非大批量的文件同步,即可以应用于任何进行文件同步的场景中。
其中,上述待同步文件夹是要进行同步的文件夹,在计算机系统中文件夹用于存放文件,一个文件夹内可以包括若干文件。
在本实施例中,获取到的待同步文件夹的数量可以是一个或者是多个,待同步文件夹中文件的数量可以是一个或多个。
上述对待同步文件夹包含的文件信息进行统计具体包括,但不限于以下一种或者多种:对待同步文件夹包含的文件的数量、文件的名称、文件的类型、每个文件的修改时间等一项或多项信息进行统计。
可选的,在本申请另一实施例中,所述获取待同步文件夹可包括:
(1)获取存储中包含的根目录文件夹。
(2)获取所述根目录文件夹的修改时间。
(3)确定修改时间在预设时间之后的根目录文件夹为待同步文件夹。
其中,上述存储可以是指待同步文件夹所存放的存储介质,例如某一硬盘。上述存储也可以是存储介质中的一块可以存放数据的存储空间。
根目录文件夹是指根目录下的文件夹。根目录是指逻辑驱动器的最上一级目录。例如,存储分为M区和N区,则对于M:\user1\data来说,M:\是根目录,文件夹user1为根目录下的文件夹,即文件夹user1为根目录文件夹,data为子目录文件夹,也可称为子文件夹。
上述预设时间可以根据需要设定,例如预设时间为当月1号,则确定在1号之后修改的根目录文件夹为待同步文件夹,从而可以将一个月内修改过的文件夹筛选出来,进而进行同步。
通过上述步骤,可以获取一段时间内修改过的根目录文件夹进行同步,当仅需要同步修改过的文件夹时,可以快速定位进而同步,无需人工手动查找,进而提高文件同步的效率。
可选的,在本申请另一实施例中,所述获取待同步文件夹又可包括:
(1)获取存储中包含的根目录文件夹。
(2)获取所述根目录文件夹的访问频率。
(3)确定访问频率大于预设访问频率的根目录文件夹为待同步文件夹。
其中,上述预设访问频率可以根据需要设定。例如,预设访问频率为一天20次,或者访问频率为一周100次等。
通过上述步骤,可以快捷的将访问频率较高的文件夹筛选出来,进而进行同步。例如,若要分批进行大批量文件同步时,可以优先将访问频率较高的文件夹进行同步,则访问频率较高的文件可以被优先同步至其他存储中,以方便快速的通过其他存储访问频率较高的文件。
可选的,在本申请另一实施例中,所述获取待同步文件夹还可包括:
(1)获取存储中包含的根目录文件夹。
(2)从根目录文件夹中选择用户指定的根目录文件夹为待同步文件夹。
例如,扫描存储,获取该存储中包含的根目录文件夹并显示,使用户通过输入命令指定要同步的文件夹,以快速的帮助用户定位要同步的文件夹。
通过上述步骤,使得待同步的文件夹为用户指定的文件夹,满足用户文件同步时的个性化需求。
S20,获取所述待同步文件夹同步前存放地址与同步后存放地址。
其中,上述待同步文件夹同步前存放地址可以在获取待同步文件夹时一并获取。上述同步后存放地址是指将待同步文件夹放置的位置。例如,同步后存放地址为B存储中,或者同步后存放地址为B存储的userdata文件目录下。
可选的,在本申请另一实施例中,本申请所述的方法还可包括:
获取所述同步后存放地址之后,判断所述同步后存放地址所属存储空间的容量大小是否满足预设容量条件;若是,执行步骤S30。
其中,容量大小满足预设容量条件可以是容量大小大于待同步文件夹的总大小,或者是容量大小与待同步文件夹的大小之差大于预设容量。具体的,预设容量可以根据需要设定。
例如,同步后存放地址为B存储,则同步后存储地址所属存储空间的容量大小为B存储的容量大小。或者,同步后存放地址为B存储的userdata文件目录,则同步后存储地址所属存储空间的容量大小同样为B存储的容量大小。当B存储的容量大小大于待同步文件夹的总大小时,才执行步骤S30,即才执行进行后续同步文件的操作。
通过本实施例,可以避免文件同步后的因磁盘空间不足出现异常,增加文件同步的成功率。
可选的,在本申请另一实施例中,本申请所述的方法还可包括:
获取所述同步后存放地址之后,判断所述同步后存放地址是否为预设存放地址;若是,执行步骤S30。
上述预设存放地址可以为预先设定的存放地址。
在本实施例中,在进行文件同步时,不会将文件同步至预设范围之外的文件夹中,保证了文件同步时的安全性。
S30,通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址。
其中,上述RSYNC指令可以实现远程数据同步,RSYNC的详细说明可以从现有技术中获取,此处不再赘述。
具体的,RSYNC可以进行增量同步或者是进行全量同步。即,将待同步文件夹中的所有文件进行同步,或者是将待同步文件夹中的增量文件进行同步。
由于RSYNC指令具有快速的进行文件传输的特点,因此,在本实施例中,采用RSYNC指令进行文件同步,提高了文件同步的速度,实现了快速文件同步的目的。当应用在大批量文件传输的情况下时,相比使用其他的指令进行传输,可以极大的节省传输时间。
可选的,在本申请其他实施例中,还可以在执行步骤S30之前,先对待同步文件夹进行加密,或者是将待同步文件夹中包含的文件进行加密,再通过RSYNC指令将文件进行同步,以提高文件同步过程中的安全性。
S40,获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单。
其中,上述同步后文件夹即为待同步文件夹同步后的文件夹。
上述对同步后文件夹包含的文件信息进行统计具体可包括但不限于:对同步后文件夹包含的文件的数量、文件的名称、文件的类型、每个文件的修改时间等一项或多项信息进行统计。
在具体实施时,在同步前对文件夹包含的内容统计了哪些信息,在同步后也可以进行同样的信息统计。
例如,第一文件清单包含文件的名称和文件的数量,则在获取同步后文件夹之后,统计同步后文件夹包含的文件的名称以及文件的数量,即第二文件清单中包含同步后文件夹中包含的文件的名称和文件的数量。
S50,将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
其中,将第一文件清单与第二文件清单进行匹配用于确定同步前待同步文件夹中包含的文件与同步后待同步文件夹中包含的文件是否一致,若一致,确定完成文件同步。
若第一文件清单与第二文件清单包含的文件名称全部一致,但有少数文件大小不同,也可以确定文件同步完成。同时,可以将第一文件清单中与第二文件清单之中文件名称相同,文件大小不同的文件显示出来。由于此时,已经完成了大部分的文件传输,仅部分文件的大小可能不同,因此可以通知显示的方式让用户知晓哪些文件没有完全同步,以使用户查看是否需要再次将第一文件清单中与第二文件清单之中文件名称相同,文件大小不同的文件进行同步。
具体的,在将第一文件清单与第二文件清单进行匹配时,可以将文件清单中的每一项逐一进行匹配。
例如,将第一文件清单包含的文件名称与第二文件清单包含的文件名称进行匹配,以确定文件的名称是否一致。同时,将第一文件清单包含的文件 的数量与第二文件的数量进行匹配,以确定文件的数量是否一致。若一致,确定完成文件同步。
又比如,将第一文件清单中的文件总大小与文件总数量与第二文件清单中的文件总大小与文件总数量进行匹配,若一致,将第一文件清单中的文件名称、文件大小、文件创建时间与第二文件清单中的文件名称、文件大小、文件创建时间进行匹配,若一致,确定文件同步完成。
在本实施例中,通过对同步后的第二文件清单与同步前的第一文件清单进行匹配,可以更加精确的定位文件同步是否全部完成,而不需要用户一一去检查文件是否同步完成,可以节省用户的时间。特别是当大批量文件进行传输时,由于文件传输的数量较多,通过本申请所述的方法进行文件同步,可以极大降低人工复核的时间,并且及时定位同步不完全的文件,有利于对文件同步的效果进行及时的反馈。
同时,在本申请其他实施例中,在文件同步过程中,若有文件同名,可通过以下步骤进行处理:
(1)在同步过程中,若所述同步后存放地址中包含的第一文件与所述待同步文件夹中包含的第二文件同名,获取所述第一文件的第一修改时间以及所述第二文件的第二修改时间。
(2)若第一修改时间相比第二修改时间更接近当前系统时间,则不将所述第一文件进行覆盖。
(3)若第二修改时间相比第一修改时间更接近当前系统时间,则将所述第一文件进行覆盖。
通常,每个文件有其创建时间,若对文件进行了修改,则文件有其修改时间,修改时间属于文件的属性信息中的一项。
若文件进行了修改,文件的修改时间随之变化,同时文件的内容可能进行了更新。因此,在本实施例中,若在文件同步过程中,遇到文件同名的情况,可以通过文件的修改时间来确定是否将文件进行覆盖。使得在同步过程中,最新的文件不会被旧的文件覆盖掉。
同时,在其他实施例中,也可以判断第一文件的文件类型是否为指定类型。
若第一文件的文件类型不为指定的文件类型时,且第一修改时间相比第二修改时间更接近当前系统时间,进行文件覆盖。若第一文件的文件类型为指定的文件类型时,无论第一修改时间相比第二修改时间是否更接近当前系统时间,都不将所述第一文件进行覆盖。
通过以上实施方式,使得在某一类文件即时在同名的情况下,也可以快速的同步,无需进行提醒。
同时,在具体实施时,无论在覆盖或者是未覆盖同名文件,可将同步文件的日志进行输出并标记,以使用户快速的了解未完全同步的文件,进而再次触发同步指令进行文件同步,节省文件同步所花费的时间。
在本申请其他实施例中,在文件同步过程中,若出现异常,可通过以下 步骤进行处理:
(1)若同步时发生异常,获取异常原因;
(2)若异常原因为网络连接异常,从同步日志中获取所述待同步文件夹中的已同步文件;
(3)确定所述待同步文件夹中所述已同步文件以外的文件为所述待同步文件夹中的未同步文件;
(4)若接收到网络连接正常的通知消息,通过RSYNC指令将所述待同步文件夹中的未同步文件同步至所述同步后存放地址。
在具体实施时,可以通过捕获异常的函数来获取传出过程中出现的异常原因。
上述同步日志是将文件同步过程进行记录的日志信息。例如,在同步过程中可以将已传输文件的名称记录,则从该同步日志中可以获取待同步文件夹中的已同步文件。
同时,同步日志还可以将文件同步过程中的所有同步文件的相关信息进行打印,使得相关工作人员可以方便的了解文件同步过程中的异常以及知晓同步结果。
例如,若待同步文件夹中共计包括二十六个文件,其中同步日志中记录的已同步文件为A、B、C三个文件,则确定待同步文件夹中二十六个文件之中除了A、B、C三个文件以外的文件为未同步文件。
当网络连接异常时候时,可以每间隔一段时间主动连接同步后存放地址所属的存储,当连接成功反馈消息时,可以确定为接收到网络连接正常的通知消息。此时,通过RSYNC指令将待同步文件夹中的未同步文件同步至同步后存放地址。
在本实施例中,加入异常的处理,提高了异常出现时的容错处理能力,进一步提升了文件传输成功的可靠性。
进一步地,在本申请其他实施例中,若异常原因为存储空间不足,发出提醒信息。
在进行提醒时,可以通过弹出提示框的方式向相关工作人员进行提醒。
通过本申请实施例,可以在文件同步发生异常,并且该异常无法通过再次主动传输完成文件同步的情况下及时的提醒相关工作人员进行提醒,以使文件同步过程中的问题能及时发现及时解决,缩短完成文件同步的时间。
本申请提供的文件同步方法获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;获取所述待同步文件夹同步前存放地址与同步后存放地址;通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。由于通过RSYNC指令进行数据同步,并且同步之后将待同步文件夹同步前的第一清单与待同步文件夹同步后的第二清单进行匹配,从而可以获取文件同步的情 况,来判断是否同步成功。因此当大批量文件传输时无需有人值守,也无需人力去一一检查同步结果,实现了提高大批量文件同步的效率以及文件同步时的可靠性的目的。
如图2所示,图2为本申请实施例提供的文件同步装置的功能模块图。所述文件同步装置包括第一获取模块210、同步模块220、统计模块230和匹配模块240。本申请所称的模块是指一种能够被计算机装置的处理器所执行并且能够完成固定功能的一系列计算机可读指令段,其存储在计算机装置的存储器中。在本实施例中,关于各模块的功能将在后续的实施例中详述。
第一获取模块210,用于获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;
本申请所述的文件同步装置不仅可以用于大批量文件传输,同样的,也可以用于非大批量的文件同步,即可以应用于任何进行文件同步的场景中。
其中,上述待同步文件夹是要进行同步的文件夹,在计算机系统中文件夹用于存放文件,一个文件夹内可以包括若干文件。
在本实施例中,获取到的待同步文件夹的数量可以是一个或者是多个,待同步文件夹中文件的数量可以是一个或多个。
上述对待同步文件夹包含的文件信息进行统计具体包括,但不限于以下一种或者多种:对待同步文件夹包含的文件的数量、文件的名称、文件的类型、每个文件的修改时间等一项或多项信息进行统计。
可选的,在本申请另一实施例中,所述第一获取模块210获取待同步文件夹包括可包括:
(1)获取存储中包含的根目录文件夹。
(2)获取所述根目录文件夹的修改时间。
(3)确定修改时间在预设时间之后的根目录文件夹为待同步文件夹。
其中,上述存储可以是指待同步文件夹所存放的存储介质,例如某一硬盘。上述存储也可以是存储介质中的一块可以存放数据的存储空间。
根目录文件夹是指根目录下的文件夹。根目录是指逻辑驱动器的最上一级目录。例如,存储分为M区和N区,则对于M:\user1\data来说,M:\是根目录,文件夹user1为根目录下的文件夹,即文件夹user1为根目录文件夹,data为子目录文件夹,也可称为子文件夹。
上述预设时间可以根据需要设定,例如预设时间为当月1号,则确定在1号之后修改的根目录文件夹为待同步文件夹,从而可以将一个月内修改过的文件夹筛选出来,进而进行同步。
通过本实施例,可以获取一段时间内修改过的根目录文件夹进行同步,当仅需要同步修改过的文件夹时,可以快速定位进而同步,无需人工手动查找,进而提高文件同步的效率。
可选的,在本申请另一实施例中,所述第一获取模块210获取待同步文件夹可包括:
(1)获取存储中包含的根目录文件夹。
(2)获取所述根目录文件夹的访问频率。
(3)确定访问频率大于预设访问频率的根目录文件夹为待同步文件。
其中,上述预设访问频率可以根据需要设定。例如,预设访问频率为一天20次,或者访问频率为一周100次等。
通过本实施例,可以快捷的将访问频率较高的文件夹筛选出来,进而进行同步。例如,若要分批进行大批量文件同步时,可以优先将访问频率较高的文件夹进行同步,则访问频率较高的文件可以被优先同步至其他存储中,以方便快速的通过其他存储访问频率较高的文件。
可选的,在本申请另一实施例中,所述第一获取模块210获取待同步文件夹包括还可包括:
(1)获取存储中包含的根目录文件夹。
(2)从根目录文件夹中选择用户指定的根目录文件夹为待同步文件夹。
例如,扫描存储,获取该存储中包含的根目录文件夹并显示,使用户通过输入命令指定要同步的文件夹,以快速的帮助用户定位要同步的文件夹。
通过本实施例,使得待同步的文件夹为用户指定的文件夹,满足用户文件同步时的个性化需求。
第一获取模块210,还用于获取所述待同步文件夹同步前存放地址与同步后存放地址。
其中,上述待同步文件夹同步前存放地址可以在获取待同步文件夹时一并获取。上述同步后存放地址是指将待同步文件夹放置的位置。例如,同步后存放地址为B存储中,或者同步后存放地址为B存储的userdata文件目录下。
可选的,在本申请另一实施例中,本申请所述的装置还可包括判断模块和触发模块。
判断模块,用于获取所述同步后存放地址之后,判断所述同步后存放地址所属存储空间的容量大小是否满足预设容量条件。
触发模块,用于若同步后存放地址所属存储空间的容量大小满足预设容量条件,触发所述同步模块通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址。
其中,容量大小满足预设容量条件可以是容量大小大于待同步文件夹的总大小,或者是容量大小与待同步文件夹的大小之差大于预设容量。具体的,预设容量可以根据需要设定。
例如,同步后存放地址为B存储,则同步后存储地址所属存储空间的容量大小为B存储的容量大小。或者,同步后存放地址为B存储的userdata文件目录,则同步后存储地址所属存储空间的容量大小同样为B存储的容量大小。当B存储的容量大小大于待同步文件夹的总大小时,才触发同步模块进行同步操作。
通过本实施例,可以避免文件同步后的因磁盘空间不足出现异常,增加 文件同步的成功率。
可选的,在本申请另一实施例中,所述判断模块,还用于获取所述同步后存放地址之后,判断所述同步后存放地址是否为预设存放地址。
所述触发模块,还用于若所述同步后存放地址为预设存放地址,触发所述同步模块通过RSYNC指令、所述同步前存放地址、所述同步后存放地址将所述待同步文件夹包含的文件进行同步。
上述预设存放地址可以为预先设定的存放地址。
在本实施例中,在进行文件同步时,不会将文件同步至预设范围之外的文件夹中,保证了文件同步时的安全性。
同步模块220,用于通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址。
其中,上述RSYNC指令可以实现远程数据同步,RSYNC的详细说明可以从现有技术中获取,此处不再赘述。
具体的,RSYNC可以进行增量同步或者是进行全量同步。即,将待同步文件夹中的所有文件进行同步,或者是将待同步文件夹中的增量文件进行同步。
由于RSYNC指令具有快速的进行文件传输的特点,因此,在本实施例中,采用RSYNC指令进行文件同步,提高了文件同步的速度,实现了快速文件同步的目的。当应用在大批量文件传输的情况下时,相比使用其他的指令进行传输,可以极大的节省传输时间。
可选的,在本申请其他实施例中,还可以在同步模块220执行之前,先对待同步文件夹进行加密,或者是将待同步文件夹中包含的文件进行加密,再通过RSYNC指令将文件进行同步,以提高文件同步过程中的安全性。
统计模块230,用于获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单。
其中,上述同步后文件夹即为待同步文件夹同步后的文件夹。
上述对同步后文件夹包含的文件信息进行统计具体可包括但不限于:对同步后文件夹包含的文件的数量、文件的名称、文件的类型、每个文件的修改时间等一项或多项信息进行统计。
在具体实施时,在同步前对文件夹包含的内容统计了哪些信息,在同步后也可以进行同样的信息统计。
例如,第一文件清单包含文件的名称和文件的数量,则在获取同步后文件夹之后,统计同步后文件夹包含的文件的名称以及文件的数量,即第二文件清单中包含同步后文件夹中包含的文件的名称和文件的数量。
匹配模块240,用于将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
其中,将第一文件清单与第二文件清单进行匹配用于确定同步前待同步文件夹中包含的文件与同步后待同步文件夹中包含的文件是否一致,若一致,确定完成文件同步。
若第一文件清单与第二文件清单包含的文件名称全部一致,但有少数文件大小不同,可以确定文件同步完成。同时,可以将第一文件清单中与第二文件清单之中文件名称相同,文件大小不同的文件显示出来。由于此时,已经完成了大部分的文件传输,仅部分文件的大小可能不同,因此可以通知显示的方式让用户知晓哪些文件没有完全同步,以使用户查看是否需要再次将第一文件清单中与第二文件清单之中文件名称相同,文件大小不同的文件进行同步。
具体的,在将第一文件清单与第二文件清单进行匹配时,可以将文件清单中的每一项逐一进行匹配。
例如,将第一文件清单包含的文件名称与第二文件清单包含的文件名称进行匹配,以确定文件的名称是否一致。同时,将第一文件清单包含的文件的数量与第二文件的数量进行匹配,以确定文件的数量是否一致。若一致,确定完成文件同步。
又比如,将第一文件清单中的文件总大小与文件总数量与第二文件清单中的文件总大小与文件总数量进行匹配,若一致,将第一文件清单中的文件名称、文件大小、文件创建时间与第二文件清单中的文件名称、文件大小、文件创建时间进行匹配,若一致,确定文件同步完成。
在本实施例中,通过对同步后的第二文件清单与同步前的第一文件清单进行匹配,可以更加精确的定位文件同步是否全部完成,而不需要用户一一去检查文件是否同步完成,可以节省用户的时间。特别是当大批量文件进行传输时,由于文件传输的数量较多,通过本申请所述的方法进行文件同步,可以极大降低人工复核的时间,并且及时定位同步不完全的文件,有利于对文件同步的效果进行及时的反馈。
同时,在本申请其他实施例中,在文件同步过程中,若有文件同名,可通过第二获取模块和处理模块进行处理:
第二获取模块,用于在同步过程中,若所述同步后存放地址中包含的第一文件与所述待同步文件夹中包含的第二文件同名,获取所述第一文件的第一修改时间以及所述第二文件的第二修改时间。
处理模块,用于若第一修改时间相比第二修改时间更接近当前系统时间,则不将所述第一文件进行覆盖;若第二修改时间相比第一修改时间更接近当前系统时间,则将所述第一文件进行覆盖。
通常,每个文件有其创建时间,若对文件进行了修改,则文件有其修改时间,修改时间属于文件的属性信息中的一项。
若文件进行了修改,文件的修改时间随之变化,同时文件的内容可能进行了更新。因此,在本实施例中,若在文件同步过程中,遇到文件同名的情况,可以通过文件的修改时间来确定是否将文件进行覆盖。使得在同步过程中,最新的文件不会被旧的文件覆盖掉。
同时,在其他实施例中,也可以判断第一文件的文件类型是否为指定类型。
若第一文件的文件类型不为指定的文件类型时,且第一修改时间相比第二修改时间更接近当前系统时间,进行文件覆盖。若第一文件的文件类型为指定的文件类型时,无论第一修改时间相比第二修改时间是否更接近当前系统时间,都不将所述第一文件进行覆盖。
通过以上实施方式,使得在某一类文件即时在同名的情况下,也可以快速的同步,无需进行提醒。
同时,在具体实施时,无论在覆盖或者是未覆盖同名文件,可将同步文件的日志进行输出并标记,以使用户快速的了解未完全同步的文件,进而再次触发同步指令进行文件同步,节省文件同步所花费的时间。
在本申请其他实施例中,在文件同步过程中,若出现异常,可通过异常处理模块进行处理。所述异常处理模块用于:
若同步时发生异常,获取异常原因;
若异常原因为网络连接异常,从同步日志中获取所述待同步文件夹中的已同步文件;
确定所述待同步文件夹中所述已同步文件以外的文件为所述待同步文件夹中的未同步文件;
若接收到网络连接正常的通知消息,通过RSYNC指令将所述待同步文件夹中的未同步文件同步至所述同步后存放地址。
在具体实施中,可以通过捕获异常的函数来获取传出过程中出现的异常原因。
上述同步日志是将文件同步过程进行记录的日志信息。例如,在同步过程中可以将已传输文件的名称记录,则从该同步日志中可以获取待同步文件夹中的已同步文件。
同时,同步日志还可以将文件同步过程中的所有同步文件的相关信息进行打印,使得相关工作人员可以方便的了解文件同步过程中的异常以及知晓同步结果。
例如,若待同步文件夹中共计包括二十六个文件,其中同步日志中记录的已同步文件为A、B、C三个文件,则确定待同步文件夹中二十六个文件之中除了A、B、C三个文件以外的文件为未同步文件。
当网络连接异常时候时,可以每间隔一段时间主动连接同步后存放地址所属的存储,当连接成功反馈消息时,可以确定为接收到网络连接正常的通知消息。此时,通过RSYNC指令将待同步文件夹中的未同步文件同步至同步后存放地址。
在本实施例中,加入异常的处理,提高了异常出现时的容错处理能力,进一步提升了文件传输成功的可靠性。
进一步地,在本申请其他实施例中,所述异常处理模块,还用于:若异常原因为存储空间不足,发出提醒信息。
在进行提醒时,可以通过弹出提示框的方式向相关工作人员进行提醒。
通过本申请实施例,可以在文件同步发生异常,并且该异常无法通过再 次主动传输完成文件同步的情况下及时的提醒相关工作人员进行提醒,以使文件同步过程中的问题能及时发现及时解决,缩短完成文件同步的时间。
本申请提供的文件同步装置通过第一获取模块获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;以及获取所述待同步文件夹同步前存放地址与同步后存放地址;同步模块通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;统计模块获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;匹配模块将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。由于通过RSYNC指令进行数据同步,并且同步之后将待同步文件夹同步前的第一清单与待同步文件夹同步后的第二清单进行匹配,从而可以获取文件同步的情况,来判断是否同步成功。因此当大批量文件传输时无需有人值守,也无需人力去一一检查同步结果,实现了提高大批量文件同步的效率以及文件同步时的可靠性的目的。
上述以软件功能模块的形式实现的集成的单元,可以存储在一个非易失性可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分步骤。
如图3所示,图3是本申请实现文件同步方法的较佳实施例的计算机装置的结构示意图。所述计算机装置包括至少一个发送装置31、至少一个存储器32、至少一个处理器33、至少一个接收装置34以及至少一个通信总线。其中,所述通信总线用于实现这些组件之间的连接通信。
所述计算机装置是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。所述计算机装置还可包括网络设备和/或用户设备。其中,所述网络设备包括但不限于单个网络服务器、多个网络服务器组成的服务器组或基于云计算(Cloud Computing)的由大量主机或网络服务器构成的云,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
所述计算机装置可以是,但不限于任何一种可与用户通过键盘、触摸板或声控设备等方式进行人机交互的电子产品,例如,平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、智能式穿戴式设备、摄像设备、监控设备等终端。
所述计算机装置所处的网络包括,但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。
其中,所述接收装置34和所述发送装置31可以是有线发送端口,也可以为无线设备,例如包括天线装置,用于与其他设备进行数据通信。
所述存储器32用于存储程序代码。所述存储器32可以是集成电路中没有 实物形式的具有存储功能的电路,如RAM(Random-Access Memory,随机存取存储器)、FIFO(First In First Out,先进先出)存储器等。或者,所述存储器32也可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)、智能媒体卡(smart media card)、安全数字卡(secure digital card)、快闪存储器卡(flash card)等储存设备等等。
所述处理器33可以包括一个或者多个微处理器、数字处理器。所述处理器33可调用存储器32中存储的程序代码以执行相关的功能。例如,图3中所述的各个单元是存储在所述存储器32中的程序代码,并由所述处理器33所执行,以实现一种文件同步方法。所述处理器33又称中央处理器(CPU,Central Processing Unit),是一块超大规模的集成电路,是运算核心(Core)和控制核心(Control Unit)。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种文件同步方法,其特征在于,所述方法包括:
    获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;
    获取所述待同步文件夹同步前存放地址与同步后存放地址;
    通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;
    获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;
    将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
  2. 如权利要求1所述的方法,其特征在于,所述获取待同步文件夹包括:
    获取存储中包含的根目录文件夹;
    获取所述根目录文件夹的修改时间;
    确定修改时间在预设时间之后的根目录文件夹为待同步文件夹。
  3. 如权利要求1所述的方法,其特征在于,所述获取待同步文件夹包括:
    获取存储中包含的根目录文件夹;
    获取所述根目录文件夹的访问频率;
    确定访问频率大于预设访问频率的根目录文件夹为待同步文件夹。
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    获取所述同步后存放地址之后,判断所述同步后存放地址所属存储空间的容量大小是否满足预设容量条件;
    若是,执行所述通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址的操作。
  5. 如权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    若同步时发生异常,获取异常原因;
    若异常原因为网络连接异常,从同步日志中获取所述待同步文件夹中的已同步文件;
    确定所述待同步文件夹中所述已同步文件以外的文件为所述待同步文件夹中的未同步文件;
    若接收到网络连接正常的通知消息,通过RSYNC指令将所述待同步文件夹中的未同步文件同步至所述同步后存放地址。
  6. 如权利要求5所述的方法,其特征在于,所述方法还包括:
    若异常原因为存储空间不足,发出提醒信息。
  7. 如权利要求1至3中任一项所述的方法,其特征在于,所述方法还包 括:
    在同步过程中,若所述同步后存放地址中包含的第一文件与所述待同步文件夹中包含的第二文件同名,获取所述第一文件的第一修改时间以及所述第二文件的第二修改时间;
    若第一修改时间相比第二修改时间更接近当前系统时间,则不将所述第一文件进行覆盖;
    若第二修改时间相比第一修改时间更接近当前系统时间,则将所述第一文件进行覆盖。
  8. 一种文件同步装置,其特征在于,所述装置包括:
    第一获取模块,用于获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;
    所述第一获取模块,还用于获取所述待同步文件夹同步前存放地址与同步后存放地址;
    同步模块,用于通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;
    统计模块,用于获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;
    匹配模块,用于将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
  9. 一种计算机装置,其特征在于,所述计算机装置包括存储器及处理器,所述存储器用于存储至少一个指令,所述处理器用于执行所述至少一个指令以实现以下步骤:
    获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;
    获取所述待同步文件夹同步前存放地址与同步后存放地址;
    通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;
    获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;
    将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
  10. 如权利要求9所述的计算机装置,其特征在于,所述获取待同步文件夹包括:
    获取存储中包含的根目录文件夹;
    获取所述根目录文件夹的修改时间;
    确定修改时间在预设时间之后的根目录文件夹为待同步文件夹。
  11. 如权利要求9所述的计算机装置,其特征在于,所述获取待同步文件夹包括:
    获取存储中包含的根目录文件夹;
    获取所述根目录文件夹的访问频率;
    确定访问频率大于预设访问频率的根目录文件夹为待同步文件夹。
  12. 如权利要求9至11中任一项所述的计算机装置,其特征在于,所述处理器执行所述至少一个指令还实现以下步骤:
    获取所述同步后存放地址之后,判断所述同步后存放地址所属存储空间的容量大小是否满足预设容量条件;
    若是,执行所述通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址的操作。
  13. 如权利要求9至11中任一项所述的计算机装置,其特征在于,所述处理器执行所述至少一个指令还实现以下步骤:
    若同步时发生异常,获取异常原因;
    若异常原因为网络连接异常,从同步日志中获取所述待同步文件夹中的已同步文件;
    确定所述待同步文件夹中所述已同步文件以外的文件为所述待同步文件夹中的未同步文件;
    若接收到网络连接正常的通知消息,通过RSYNC指令将所述待同步文件夹中的未同步文件同步至所述同步后存放地址。
  14. 如权利要求9至11中任一项所述的计算机装置,其特征在于,所述处理器执行所述至少一个指令还实现以下步骤:
    在同步过程中,若所述同步后存放地址中包含的第一文件与所述待同步文件夹中包含的第二文件同名,获取所述第一文件的第一修改时间以及所述第二文件的第二修改时间;
    若第一修改时间相比第二修改时间更接近当前系统时间,则不将所述第一文件进行覆盖;
    若第二修改时间相比第一修改时间更接近当前系统时间,则将所述第一文件进行覆盖。
  15. 一种非易失性可读存储介质,其上存储有计算机指令,其特征在于,所述计算机指令被处理器执行时实现以下步骤:
    获取待同步文件夹,对所述待同步文件夹包含的文件信息进行统计,得到第一文件清单;
    获取所述待同步文件夹同步前存放地址与同步后存放地址;
    通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址;
    获取同步后文件夹,统计所述同步后文件夹包含的文件信息,得到第二文件清单;
    将所述第一文件清单与所述第二文件清单进行匹配,确定是否完成文件同步。
  16. 如权利要求15所述的存储介质,其特征在于,所述获取待同步文件夹包括:
    获取存储中包含的根目录文件夹;
    获取所述根目录文件夹的修改时间;
    确定修改时间在预设时间之后的根目录文件夹为待同步文件夹。
  17. 如权利要求16所述的存储介质,其特征在于,所述获取待同步文件夹包括:
    获取存储中包含的根目录文件夹;
    获取所述根目录文件夹的访问频率;
    确定访问频率大于预设访问频率的根目录文件夹为待同步文件夹。
  18. 如权利要求15至17中任一项所述的存储介质,其特征在于,所述至少一个指令被所述处理器执行时还实现以下步骤:
    获取所述同步后存放地址之后,判断所述同步后存放地址所属存储空间的容量大小是否满足预设容量条件;
    若是,执行所述通过RSYNC指令将所述待同步文件夹包含的文件从所述同步前存放地址同步到所述同步后存放地址的操作。
  19. 如权利要求15至17中任一项所述的存储介质,其特征在于,所述至少一个指令被所述处理器执行时还实现以下步骤:
    若同步时发生异常,获取异常原因;
    若异常原因为网络连接异常,从同步日志中获取所述待同步文件夹中的已同步文件;
    确定所述待同步文件夹中所述已同步文件以外的文件为所述待同步文件夹中的未同步文件;
    若接收到网络连接正常的通知消息,通过RSYNC指令将所述待同步文件夹中的未同步文件同步至所述同步后存放地址。
  20. 如权利要求15至17中任一项所述的存储介质,其特征在于,所述至少一个指令被所述处理器执行时还实现以下步骤:
    在同步过程中,若所述同步后存放地址中包含的第一文件与所述待同步文件夹中包含的第二文件同名,获取所述第一文件的第一修改时间以及所述第二文件的第二修改时间;
    若第一修改时间相比第二修改时间更接近当前系统时间,则不将所述第一文件进行覆盖;
    若第二修改时间相比第一修改时间更接近当前系统时间,则将所述第一文件进行覆盖。
PCT/CN2018/099782 2018-04-23 2018-08-10 文件同步方法、装置、计算机装置及存储介质 WO2019205348A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810368082.3 2018-04-23
CN201810368082.3A CN108647256A (zh) 2018-04-23 2018-04-23 文件同步方法、装置、计算机装置及存储介质

Publications (1)

Publication Number Publication Date
WO2019205348A1 true WO2019205348A1 (zh) 2019-10-31

Family

ID=63747350

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/099782 WO2019205348A1 (zh) 2018-04-23 2018-08-10 文件同步方法、装置、计算机装置及存储介质

Country Status (2)

Country Link
CN (1) CN108647256A (zh)
WO (1) WO2019205348A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508356B (zh) * 2018-11-14 2024-05-03 平安科技(深圳)有限公司 数据异常预警方法、装置、计算机设备及存储介质
CN111291011B (zh) * 2020-02-19 2023-10-20 北京百度网讯科技有限公司 文件同步方法及装置、电子设备和可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955790A (zh) * 2011-08-23 2013-03-06 苏州彭华信息技术有限公司 网络文件同步方法及装置
CN103023988A (zh) * 2012-11-27 2013-04-03 北京金山云科技有限公司 文件同步方法、服务器、客户端及终端设备
WO2013075427A1 (zh) * 2011-11-22 2013-05-30 中兴通讯股份有限公司 数据更新信息获取方法、装置及数据同步方法、装置
CN103327123A (zh) * 2013-07-12 2013-09-25 北京金山云网络技术有限公司 一种文件同步的方法、客户端、服务器端及设备
CN104348859A (zh) * 2013-07-30 2015-02-11 深圳市腾讯计算机系统有限公司 文件同步方法、装置、服务器、终端及系统

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357234A (zh) * 2014-08-18 2016-02-24 中兴通讯股份有限公司 无线数据卡、通信系统及数据同步方法
CN105338093A (zh) * 2015-11-16 2016-02-17 中国建设银行股份有限公司 一种数据同步方法和系统
CN105872056B (zh) * 2016-04-01 2019-03-08 浪潮电子信息产业股份有限公司 一种快速同步计算机集群数据的方法和系统
CN107800754B (zh) * 2016-09-07 2021-01-29 腾讯科技(深圳)有限公司 数据传输任务处理、数据传输任务监控方法和装置
CN106569919A (zh) * 2016-11-07 2017-04-19 天脉聚源(北京)传媒科技有限公司 一种同步文件的方法及装置
CN106874403A (zh) * 2017-01-18 2017-06-20 武汉天喻教育科技有限公司 对压缩文件进行差异同步的系统及方法
CN107291796A (zh) * 2017-05-05 2017-10-24 平安科技(深圳)有限公司 文件管理方法及装置
CN107707645A (zh) * 2017-09-27 2018-02-16 北京机电工程研究所 用于pdm的远程文件同步装置及方法
CN107659663A (zh) * 2017-10-27 2018-02-02 北京锐安科技有限公司 一种数据同步的方法、装置、设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955790A (zh) * 2011-08-23 2013-03-06 苏州彭华信息技术有限公司 网络文件同步方法及装置
WO2013075427A1 (zh) * 2011-11-22 2013-05-30 中兴通讯股份有限公司 数据更新信息获取方法、装置及数据同步方法、装置
CN103023988A (zh) * 2012-11-27 2013-04-03 北京金山云科技有限公司 文件同步方法、服务器、客户端及终端设备
CN103327123A (zh) * 2013-07-12 2013-09-25 北京金山云网络技术有限公司 一种文件同步的方法、客户端、服务器端及设备
CN104348859A (zh) * 2013-07-30 2015-02-11 深圳市腾讯计算机系统有限公司 文件同步方法、装置、服务器、终端及系统

Also Published As

Publication number Publication date
CN108647256A (zh) 2018-10-12

Similar Documents

Publication Publication Date Title
US9311326B2 (en) Virtual file system for automated data replication and review
US9817862B2 (en) Associating metadata with results produced by applying a pipelined search command to machine data in timestamped events
US10110656B2 (en) Systems and methods for providing shell communication in a cloud-based platform
US9436693B1 (en) Dynamic network access of snapshotted versions of a clustered file system
EP3304310B1 (en) System and method for automatic cloud-based full-data backup and restore on mobile devices
US9646042B2 (en) Data consistency and rollback for cloud analytics
US9189495B1 (en) Replication and restoration
US11627003B2 (en) Systems and methods for a blockchain multi-chain smart contract time envelope
US9495434B1 (en) Geographic distribution of files
US20220138150A1 (en) Managing cluster to cluster replication for distributed file systems
US10341436B2 (en) Using cloud storage as temporary cache for backup
US11106691B2 (en) Automated extraction rule generation using a timestamp selector
US10917466B1 (en) Methods for synchronizing files in a cloud network
EP2674882A1 (en) Case data visualization application
US10033796B2 (en) SAAS network-based backup system
US10235504B2 (en) Facilitating access to content from group interactions
US11360936B2 (en) Managing per object snapshot coverage in filesystems
US20170324832A1 (en) Techniques to transfer large collection containers
US11151092B2 (en) Data replication in distributed file systems
US11372735B2 (en) Recovery checkpoints for distributed file systems
WO2019205348A1 (zh) 文件同步方法、装置、计算机装置及存储介质
US20170199903A1 (en) System for backing out data
US20170262538A1 (en) Method of and system for grouping object in a storage device
RU2643429C2 (ru) Способ управления синхронизацией файлов (варианты), электронное устройство (варианты) и машиночитаемый носитель
US20150227556A1 (en) Information terminal device and storage service use method

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/02/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18916130

Country of ref document: EP

Kind code of ref document: A1