Intelligent data synchronization method and system based on cloud storageTechnical Field
The invention relates to the field of data storage and management, in particular to an intelligent data synchronization method and system based on cloud storage.
Background
With the increasingly developed network communication and the coming of 5G wave, the mobile intelligent device is widely popularized and used. Therefore, mobile intelligent devices have become essential for our lives and work, and are important tools for people to handle daily interpersonal communication, work and the like. Due to the rapid growth of personal data files that need to be handled on a daily basis, more and more files, photos, videos, etc. are stored in mobile personal devices, and more problems arise when managing the stored data of the mobile personal devices, such as: the data files of a plurality of users in a family can not be managed and checked in a unified mode, stored data are messy, and the stored data are easy to miss or repeatedly backup. When the specified data file is recovered, searching from a plurality of devices one by one is needed; when a user backs up a specified data file, repeated backup may occur, and the storage space of the system is wasted; similarly, when a user deletes a specified data file, the data files need to be deleted one by one in a plurality of devices; these operations are very cumbersome and time consuming when performing data synchronization management, and are not conducive to unified management and storage of data files.
Disclosure of Invention
In order to overcome the defects, the invention establishes a data management mechanism which takes the family cloud disk as a sharing platform, realizes the unified management of data files of a plurality of users in a family by using a data synchronization state table, and provides an intelligent data synchronization method and system based on cloud storage.
In order to achieve the above object, the present invention provides the following technical solutions:
an intelligent data synchronization method based on cloud storage comprises the following steps:
s1, a data transmission link is established between intelligent terminal equipment and a home cloud disk, a file synchronous backup state table is stored in the home cloud disk, and a terminal synchronous backup state sub-table is stored in the intelligent terminal equipment;
and S2, synchronously modifying the contents of the file synchronous backup state table and the terminal synchronous backup state sub-table through a preset file synchronous backup control program, and realizing data synchronous management of data between the intelligent terminal device and the home cloud disk, wherein the data synchronous management comprises backup, deletion and recovery.
As a preferred scheme, the file synchronization backup state table is a directory structure, and the content of the directory structure includes a user name, a name of an intelligent terminal device under the user name, a folder or a file directory under the name of the intelligent terminal device, and first cloud state information of each folder or file, where the user name is used to distinguish multiple users using the home cloud disk, the name of the intelligent terminal device under the user name is used by the user of the user name, and the first cloud state information stores the state of the file or the folder in the home cloud disk.
Preferably, the terminal synchronous backup state sub-table establishes a sub-table directory structure according to a document structure of the intelligent terminal device, and the sub-table directory structure content includes a drive letter, a name of a terminal folder or file under the drive letter, and first terminal state information corresponding to the terminal folder or file.
As a preferred scheme, the content of the first cloud state information includes that the first cloud state information is backed up to a home cloud disk, backed up to an intelligent terminal device, locally deleted, deleted from the home cloud disk, completely deleted, restored to the home cloud disk, restored to the intelligent terminal device, backed up to the home cloud disk, backed up to the intelligent terminal device, locally deleted, deleted from the home cloud disk, completely deleted, restored to the home cloud disk, and restored to the intelligent terminal device;
the content of the first terminal state information comprises non-executed backup, backed-up to the home cloud disk, locally deleted, deleted from the home cloud disk, completely deleted, restored to the home cloud disk, backed-up to the intelligent terminal device, restored to the intelligent terminal device, backed-up to the home cloud disk, backed-up to the intelligent terminal device, locally deleted, deleted from the home cloud disk, completely deleted, restored to the home cloud disk, and restored to the intelligent terminal device.
Further, the backup in the data synchronization management comprises the copying of files or folders from the intelligent terminal device to the home cloud disk, the copying of files or folders from the home cloud disk to the intelligent terminal device,
files or folders are copied from the intelligent terminal device to the home cloud disk, and the method specifically comprises the following steps:
s11, correspondingly adding names and corresponding first cloud state information of the intelligent terminal cloud disk backup files or folders in the file synchronous backup state table, setting the first cloud state information of the intelligent terminal cloud disk backup files or folders as backup to a home cloud disk,
s12, when the first cloud state information is 'backup to the home cloud disk', copying an intelligent terminal-cloud disk backup file or folder in the intelligent terminal device to the home cloud disk,
s13, setting the first terminal state information of the intelligent terminal-cloud disk backup file or folder in the terminal synchronous backup state sub-table as 'backed up to the family cloud disk',
s14, setting first cloud state information of the intelligent terminal-cloud disk backup file or folder as 'backed-up to a home cloud disk';
files or folders are copied from the family cloud disk to the intelligent terminal device, and the method specifically comprises the following steps:
s21, setting first cloud state information of a cloud disk-intelligent terminal backup file or folder in a file synchronous backup state table as backup to intelligent terminal equipment;
s22, when the first cloud state information of the cloud disk-intelligent terminal backup file or folder is set to be 'backed up to the intelligent terminal device', the cloud disk-intelligent terminal backup file or folder in the family cloud disk is copied to the intelligent terminal device;
s23, correspondingly adding names and corresponding first terminal state information of the cloud disk-intelligent terminal backup files or folders in the terminal synchronous backup state sub-table, wherein the first terminal state information of the cloud disk-intelligent terminal backup files or folders is set as 'backed-up to intelligent terminal equipment';
and S24, setting the first cloud state information of the cloud disk-intelligent terminal backup file or folder as 'backed-up to the intelligent terminal equipment'.
Further, the specific deletion steps in the data synchronization management include:
s31, searching the corresponding local file or folder to be deleted in the file synchronous backup state table, setting the first cloud state information corresponding to the local file or folder to be deleted as 'local deletion',
s32, deleting the local file or folder to be deleted in the intelligent terminal equipment, setting the first terminal state information corresponding to the local file or folder to be deleted in the terminal synchronous backup state sub-table as 'locally deleted',
s33, setting the first cloud state information corresponding to the local file or folder to be deleted as 'locally deleted';
the method also comprises the step of deleting files or folders in the family cloud disk, and the steps comprise:
s41, searching the corresponding cloud file or folder to be deleted in the file synchronization backup state table, and setting first cloud state information corresponding to the cloud file or folder to be deleted as 'deleted in a home cloud disk';
s42, deleting the cloud files or folders to be deleted in the home cloud disk, and setting first terminal state information corresponding to the cloud files or folders to be deleted in the terminal synchronous backup state sub-table as 'deleted in the home cloud disk';
and S43, setting the first cloud state information corresponding to the cloud file or folder to be deleted as 'deleted in the household cloud disk'.
Further, the method comprises the following steps: the synchronous data management among the intelligent terminal equipment, the home cloud disk and the mobile cloud disk is realized by synchronously modifying the contents of the file synchronous backup state table and the terminal synchronous backup state sub-table,
each folder or file in the file synchronization backup state table is also corresponding to second cloud state information, the second cloud state information stores the state of the file or folder in the mobile cloud disk, and the second cloud state information comprises the state of being backed up to the mobile cloud disk, deleted from the mobile cloud disk, restored to the mobile cloud disk, backed up to the mobile cloud disk, deleted from the mobile cloud disk and restored to the mobile cloud disk,
the first cloud state information and the first terminal state information further comprise information of being backed up to the mobile cloud disk, deleted in the mobile cloud disk, restored to the mobile cloud disk, backed up to the mobile cloud disk, deleted in the mobile cloud disk and restored to the mobile cloud disk.
Further, the method comprises the following steps:
s51, modifying the second cloud state information into 'backup to mobile cloud disk', 'delete in mobile cloud disk' or 'restore to mobile cloud disk';
s52, when the second cloud state information is 'backup to mobile cloud disk',
copying an intelligent terminal-mobile file or folder in the intelligent terminal device to the mobile cloud disk, setting first terminal state information corresponding to the intelligent terminal-mobile file or folder in the terminal synchronous backup state sub-table as 'backed up to the mobile cloud disk', and changing second cloud state information into 'backed up to the mobile cloud disk';
when the second cloud state information is 'delete in mobile cloud disk',
deleting the mobile-deleted files or folders in the mobile cloud disk, setting first terminal state information corresponding to the mobile-deleted files or folders in the terminal synchronous backup state sub-table to be deleted in the mobile cloud disk, and changing second cloud state information into deleted in the mobile cloud disk;
when the second cloud state information is 'restore to mobile cloud disk',
and copying the mobile-recovery file or folder on the intelligent terminal device or in the home cloud disk to the mobile cloud disk, and simultaneously setting the first terminal state information corresponding to the mobile-recovery file or folder in the terminal synchronous backup state sub-table as 'recovered to the mobile cloud disk', and changing the second cloud state information into 'recovered to the mobile cloud disk'.
As the same conception, the invention also provides an intelligent data synchronization system based on cloud storage, which comprises intelligent terminal equipment and a family cloud disk,
a bidirectional data transmission link is established between the intelligent terminal equipment and the household cloud disk;
the intelligent terminal device stores a terminal synchronous backup state sub-table, the home cloud disk stores a file synchronous backup state table, the contents of the file synchronous backup state table and the terminal synchronous backup state sub-table are synchronously modified through a preset file synchronous backup control program, and data synchronous management is performed between the intelligent terminal device and the home cloud disk by adopting any one of the methods.
Based on the same conception, the invention also provides an intelligent data synchronization system based on cloud storage, which comprises intelligent terminal equipment, a family cloud disk and a mobile cloud disk,
a bidirectional data transmission link is established between the intelligent terminal equipment and the home cloud disk, a bidirectional data transmission link is established between the home cloud disk and the mobile cloud disk, and a bidirectional data transmission link is established between the intelligent terminal equipment and the mobile cloud disk;
the intelligent terminal device is stored with a terminal synchronous backup state sub-table, the home cloud disk is stored with a file synchronous backup state table, the contents of the file synchronous backup state table and the terminal synchronous backup state sub-table are synchronously modified through a preset file synchronous backup control program, and the intelligent terminal device, the home cloud disk and the mobile cloud disk adopt any one of the methods to carry out data synchronous management.
Compared with the prior art, the invention has the beneficial effects that:
1. the intelligent data synchronization method and system based on cloud storage can realize unified management of data in the intelligent terminal device, the household cloud disk and the mobile cloud disk in one intelligent terminal device, realize intelligent backup, deletion and recovery of the data, and enable a user to manage own data files very conveniently, efficiently and quickly.
2. The method and the system for synchronously managing the storage data of the plurality of users by taking a family as a unit are provided, which are beneficial to the centralized management of all the storage data of the users in the family and convenient for the operations of check, backup, synchronization, deletion, recovery and the like.
3. The cloud disk of the intelligent data synchronization method for cloud storage is stored and managed by family members, and is encrypted for storage, so that the safety of data is effectively guaranteed.
Drawings
Description of the drawings:
FIG. 1 is a flow chart of an intelligent data synchronization method based on cloud storage according to the present invention;
FIG. 2 is a block diagram of a file synchronization backup status table according to embodiment 1 of the present invention;
fig. 3 is a block diagram of an intelligent data synchronization system based on cloud storage in embodiment 1 of the present invention;
fig. 4 is a block diagram of an intelligent data synchronization system based on cloud storage in embodiment 2 of the present invention.
Detailed Description
The present invention will be described in further detail with reference to test examples and specific embodiments. It should be understood that the scope of the above-described subject matter of the present invention is not limited to the following examples, and any technique realized based on the contents of the present invention is within the scope of the present invention.
Example 1
An intelligent data synchronization method based on cloud storage is shown in fig. 1, and includes the following steps:
s1, a data transmission link is established between at least one intelligent terminal device and a home cloud disk, a data transmission link between the home cloud disk and a mobile cloud disk is established, a file synchronous backup state table is stored in the home cloud disk, and a terminal synchronous backup state sub-table is stored in the intelligent terminal device.
The intelligent terminal device can be a mobile phone, a tablet personal computer and the like, when the link between the intelligent terminal device and the household cloud disk is established, the backup between the intelligent terminal device and the household cloud disk can be realized, and because the intelligent terminal device, the mobile cloud disk and the household cloud disk are usually established due to the fact that the intelligent terminal device, the mobile cloud disk and the household cloud disk are convenient to carry when people go out, the intelligent terminal device, the mobile cloud disk and the household cloud disk can be linked, and the intelligent file synchronization and the backup of data among the intelligent terminal device, the mobile cloud disk and the household cloud disk can be realized. The constructed link system has the concept of a 'family domain', and a user, the intelligent terminal equipment, the mobile cloud disk and the family cloud disk all belong to the same family domain. Each user has a unique ID within the home domain.
The intelligent terminal device always belongs to a certain user, and the certain user can simultaneously own a plurality of intelligent terminal devices. The mobile cloud disk belongs to a family domain, and one family can have a plurality of mobile cloud disks, but generally only one family cloud disk. The mobile cloud disk and the family cloud disk also belong to a family domain, generally, the family cloud disk is fixedly stored in a place which is considered to be reliable and safe by a family domain user, the mobile cloud disk stores data which is the same as the family cloud disk, can be considered as backup of the family cloud disk, and is convenient to carry when the family cloud disk goes out. The mobile cloud disk and the home cloud disk can be used by all users in the home domain at the same time.
In order to use the mobile cloud disk and the home cloud disk to backup and synchronize data, the user's smart terminal needs to join the home domain first. The unique home domain to which the mobile cloud disk and the home cloud disk device belong is stored in the internal memory of the mobile cloud disk and the home cloud disk device permanently.
For each user, a corresponding storage space is arranged on the home cloud disk of the home domain, and the data of the user is stored.
The data transmission link established among the intelligent terminal device, the mobile cloud disk and the family cloud disk can be established through a public network or an intranet, the mobile cloud disk and the family cloud disk are accessed through the public network, the risk of data leakage is still caused in the transmission process, however, if the intelligent terminal device, the mobile cloud disk and the family cloud disk transmit data through the intranet, the risk of data leakage in the transmission process is avoided, and the mobile cloud disk and the family cloud disk are private storage spaces, so that the data safety is improved.
And S2, synchronously modifying the contents of the file synchronous backup state table and the terminal synchronous backup state sub-table through a preset file synchronous backup control program, and realizing data synchronous management between the intelligent terminal device and the home cloud disk, wherein the data synchronous management comprises backup, deletion and recovery.
Data synchronization management among the intelligent terminal device, the mobile cloud disk and the home cloud disk is achieved through a file synchronization backup control program, and the intelligent terminal device, the mobile cloud disk and the home cloud disk are all provided with the file synchronization backup control program. The file synchronous backup control program installed on the intelligent terminal device can execute operations of backup, deletion, recovery and the like of files on the local device, and can also monitor operations of other programs (such as a camera, a picture and video processing APP and the like) on the device on backup, deletion, recovery and the like of the files.
The file synchronous backup control program also maintains a file synchronous backup state table in the home cloud disk and a terminal synchronous backup state sub-table in the intelligent terminal device. This file synchronous backup status table records, for each file (which has not been selected by the user for complete deletion), its basic information (name, generation time, place, etc.), and its synchronous backup-related status information, but does not contain the file data itself.
The terminal synchronous backup state sub-table on the intelligent terminal device is only related to folders and files (such as files generated by a mobile phone camera, a picture and video processing APP and the like) which need to be synchronously backed up by the local computer. On the intelligent terminal device, the "synchronous backup state" (first terminal state information) of each file is as follows: a backup is not performed; has been backed up to the mobile disk; has been backed up to the home disk; backing up to the mobile disk; locally deleted files, etc. (these status items are multiple-choice, not mutually exclusive). The terminal synchronous backup state sub-table establishes a sub-table directory structure according to the document structure of the intelligent terminal device, wherein the content of the sub-table directory structure comprises a disc character, the name of a terminal folder or file under the disc character, and first terminal state information corresponding to the name of the sub-table of the terminal folder or file.
On a mobile cloud disk and a home cloud disk, a file storage space and a corresponding file synchronous backup state table are maintained for each terminal device of each user using the cloud disk. The file storage space stores files backed up from the intelligent terminal equipment, and the directory structure of the files corresponds to the directory structure of the video and photo files on the intelligent terminal. On the mobile cloud disk, the "synchronous backup state" of each file is as follows: has been backed up to the present mobile disc; has been backed up to the home disk; local deleted; restored to the intelligent terminal, etc. On a home cloud disk, the "synchronous backup state" of each file is as follows: the home cloud disk is backed up; local deleted; the intelligent terminal is recovered; has reverted to a mobile cloud disk, etc.
The file synchronous backup state table adopts an intelligent data directory structure, the data directory structure is as shown in fig. 2, and a three-level hierarchical tree type directory structure is mainly adopted to uniformly manage data files so as to facilitate management and operation of user data. And the data directory structure adopts the same data storage mode in the mobile cloud disk and the home cloud disk so as to facilitate data backup and synchronization between the mobile cloud disk and the home cloud disk.
The user directory mainly aims at distinguishing different users, each user has a special directory structure and is logically isolated from other user directory structures, and data stored by each user cannot be accessed and copied by other users unless authorized by the user, so that the data security is greatly improved.
Each user may have multiple mobile devices, and for convenience of user data usage, a hierarchical tree directory structure supports multiple devices for each user.
The directory under each device is a final data file directory of the user, and the data directory is mainly directories such as folders and files generated by other applications on the device and stores different types of user data respectively, so that the user can conveniently manage, access, store, back up, synchronize and the like.
Files stored in an intelligent private storage system adopt a special file encryption processing algorithm, and only mobile phone users authorized and registered by an administrator can perform data file operation, so that the data security can be effectively improved, and the personal data privacy is protected from being leaked; meanwhile, the portable mobile cloud disk is not worried about that even if the portable mobile cloud disk is lost carelessly, the data file can not be read and copied.
The data backup and synchronization can realize a plurality of data backup and synchronization mechanisms such as one key, timing, manual operation, automatic operation and the like in daily use in the future as long as the user finishes initial configuration (system data backup and synchronization options), and the synchronous operation is not required to be carried out every time, thereby greatly facilitating the use and operation of the user.
The file synchronous backup program in each device manages a corresponding 'file synchronous backup state table' (corresponding to a terminal synchronous backup state sub-table in the intelligent terminal device), realizes the functions of file synchronization, backup, deletion, recovery and the like of data among the mobile cloud disk, the home cloud disk and the intelligent terminal, and automatically updates and maintains the 'file synchronous backup state table' mutually.
The file synchronous backup state table is an index summary of information and states of all files in each device of the cloud storage system, the file synchronous backup state table stores information and states of each file or folder in each device of the cloud storage system, and the information mainly comprises names of the files and folders, generation or modification time, generation places, devices generated in the devices and the like;
the file or folder state mainly includes two main types, one is that the file or folder has been updated, but the state has not been really executed by the file synchronization backup program, and these states mainly include "backup or synchronization", "local deletion", "complete deletion", "restore", and the like of the file or folder.
The other is that the file or folder has been executed by the file synchronization backup program in the state specified in the "file synchronization backup state table", and these states mainly contain "backed up or synchronized", "deleted locally", "restored", and the like of the file or folder.
A structure diagram of an intelligent data synchronization system based on cloud storage is shown in fig. 3, the system comprises a plurality of intelligent terminal devices and a home cloud disk,
a bidirectional data transmission link is established between the intelligent terminal equipment and the household cloud disk, and the communication link can be a public network or a private local area network.
The intelligent terminal device and the household cloud disk are respectively stored with a file synchronous backup control program and a file synchronous backup state table, the file synchronous backup control program is used for backup, deletion and recovery of data between the intelligent terminal device and the household cloud disk, and the file synchronous backup state table and the terminal synchronous backup state sub-table set the state information of the files in real time according to backup, deletion and recovery operations of the data.
Another structure diagram of an intelligent data synchronization system based on cloud storage is shown in fig. 4, and includes multiple intelligent terminal devices, a home cloud disk, and a mobile cloud disk.
A bidirectional data transmission link is established between the intelligent terminal equipment and the home cloud disk, a bidirectional data transmission link is established between the home cloud disk and the mobile cloud disk, the home cloud disk is fixedly arranged, and the mobile cloud disk can be carried about and is used as a backup of the home cloud disk;
the intelligent terminal device stores a file synchronous backup control program, a terminal synchronous backup state sub-table and a file synchronous backup control program which are used for backup, deletion and recovery of data among the intelligent terminal device, the home cloud disk and the mobile cloud disk, and the file synchronous backup state sub-table sets state information of files in real time according to backup, deletion and recovery of the data.
Example 2
The method and the system for managing the data comprise the following specific steps of:
file backup operations
On the intelligent terminal device (mobile phone, tablet), every time a new file is generated (user takes a picture, processes a picture, records a video and the like by using various APPs), the file synchronization backup control program adds a new item on the file synchronization backup state table aiming at the file, and the state is 'non-execution backup'. When a user uses a file synchronous backup control program on the intelligent terminal device to perform file backup, the program scans a file synchronous backup state table, and transmits files with the state of 'non-execution backup' to a certain cloud disk (a preferred family cloud disk and a mobile cloud disk) for backup.
If the backup is successful, the backup state of the file on the intelligent terminal is 'backed up to the home cloud disk' or 'backed up to the mobile cloud disk'. To save local space, the user may choose to delete the local file automatically after the backup is completed (if the backup status of the file on the terminal is increased by a "local deleted" item after such backup is completed). Meanwhile, because the mobile cloud disk or the home cloud disk backs up the file, a new item is added to the file synchronization backup state table, and the state is 'backed up to the mobile disk' or 'backed up to the home disk'.
When the connection between the mobile cloud disk and the home cloud disk is available, the user can directly operate the mobile cloud disk (for example, press a certain special function key of the mobile cloud disk) to perform data synchronization between the mobile cloud disk and the home cloud disk. At this time, the program on the mobile cloud disk scans the file synchronization backup state table, and transfers the file whose state is "backup executed" but does not include "backup to home cloud disk" to the home cloud disk for backup. If the backup is successful, the backup state of the file on the mobile cloud disk is 'backed up to the home cloud disk'. In order to save the local space of the mobile cloud disk, the user can select to automatically delete the local file of the mobile cloud disk after the backup is completed (if the backup state of the file on the mobile cloud disk is added with a local deleted item after the backup is completed). Meanwhile, because the home cloud disk backs up the file, a new item is added on the file synchronous backup state table, and the state is 'backed up to the home cloud disk'.
And (3) file deletion operation:
if the user only deletes a certain file (such as photographing, picture processing, video recording and the like by various APPs) in the intelligent terminal equipment on the intelligent terminal equipment, and the file is not backed up and synchronized on a home cloud disk or a mobile cloud disk from generation to the present, after the user deletes the file, the file synchronization backup program on the intelligent terminal equipment does not perform any operation on the file synchronization backup state table.
If the user only deletes the designated file stored in the intelligent terminal device, and the file is the file which is backed up and synchronized to any device of the family cloud disk or the mobile cloud disk before the user, at the moment, the user only deletes the file stored in the intelligent terminal device when deleting the file; a file synchronous backup program for updating the file state of the file in the intelligent terminal device on the terminal synchronous backup state sub-table to be locally deleted; but the storage state attribute of the file in the home cloud disk or the mobile cloud disk is still stored in the file synchronization backup state table in the home cloud disk or the mobile cloud disk.
If the user wants to delete the designated file completely, and the file is backed up and synchronized to any one of the home cloud disk or the mobile cloud disk before the user selects to delete the file completely, the file stored in the intelligent terminal device is deleted firstly, and the file synchronous backup program updates the states of the file synchronous backup state table and the terminal synchronous backup state sub-table to be 'deleted locally + deleted in the home cloud disk' or 'deleted completely'.
When the home cloud disk, the mobile cloud disk and the intelligent terminal are synchronously connected and available in the whole home domain, a file synchronous backup program in each device automatically scans a file synchronous backup state table according to each file state attribute in the file synchronous backup state table. If all the devices in the home domain completely delete a specified file, the state attribute of the file in the file synchronization backup state table of each device of the file is synchronously deleted, and the file is not visible in the file synchronization backup state tables of all the devices after the file is completely deleted.
And (3) file recovery operation:
the file recovery function can recover specified files which are not completely deleted and stored on the home cloud disk, the mobile cloud disk and the intelligent terminal, and any file which is not completely deleted can be recovered through a file synchronization backup program in each device as long as any device of the three devices stores the file to be recovered.
When the intelligent terminal device needs to restore a specified file, namely a file which is deleted locally on the intelligent terminal device before (for example, a certain special function key of a mobile cloud disk is pressed), the file state can be modified on a file synchronization backup state table to be restored to the intelligent terminal through a file synchronization backup program aiming at the file, when the connection between the mobile cloud disk or the home cloud disk and the intelligent terminal device is available, the file is firstly selected to be restored from the home cloud disk, if the file does not exist in the home cloud disk, scanning is selected to be restored from the mobile cloud disk, and when the file is successfully restored, the file synchronization backup program updates the file synchronization backup state table in the device to be restored.