WO2018076868A1 - Data synchronization method, device and system, storage medium and server - Google Patents

Data synchronization method, device and system, storage medium and server Download PDF

Info

Publication number
WO2018076868A1
WO2018076868A1 PCT/CN2017/095626 CN2017095626W WO2018076868A1 WO 2018076868 A1 WO2018076868 A1 WO 2018076868A1 CN 2017095626 W CN2017095626 W CN 2017095626W WO 2018076868 A1 WO2018076868 A1 WO 2018076868A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
synchronized
terminal
backup
sub
Prior art date
Application number
PCT/CN2017/095626
Other languages
French (fr)
Chinese (zh)
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 WO2018076868A1 publication Critical patent/WO2018076868A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data synchronization method, apparatus, system, storage medium, and server.
  • Cloud backup has many advantages over traditional backups.
  • users only need to install a sophisticated client or plug-in on the data machine. After setting the task, they can back up the file data according to the daily or weekly backup interval.
  • cloud backup itself solves the problem of remote disaster recovery of data and solves the technical problem of users building their own disaster recovery backup system.
  • cloud backup pays more attention to the security of data transmission and data storage.
  • the embodiment of the invention provides a data synchronization method, device, system, storage medium and server, which can improve the efficiency of data synchronization.
  • an embodiment of the present invention provides a data synchronization method, including the following steps:
  • the embodiment of the present invention further provides a data synchronization apparatus, including: an instruction receiving module, a backup data acquiring module, a processing module, and a data sending module;
  • the instruction receiving module is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
  • the backup data obtaining module is configured to acquire backup data according to the data synchronization instruction
  • the processing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
  • the data sending module is configured to send the target to-be-synchronized data to a login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  • an embodiment of the present invention further provides a data synchronization system, including: a terminal and a server, wherein the server includes the data synchronization device as described above.
  • the present invention also provides a storage medium having a plurality of instructions stored therein, the instructions being adapted to be loaded by a processor to perform the following steps:
  • an embodiment of the present invention provides a server, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
  • the embodiment of the invention provides a data synchronization method, device, system, storage medium and server, which can improve the efficiency of data synchronization.
  • FIG. 1 is a schematic diagram of a scenario of a data synchronization system according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart diagram of a data synchronization method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of another data synchronization method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of another data synchronization apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of still another data synchronization apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • the principles of the present invention operate using many other general purpose or special purpose computing, communication environments, or configurations.
  • Examples of well-known computing systems, environments, and configurations suitable for use with the present invention may include, but are not limited to, hand-held phones, personal computers, servers, multi-processor systems, microcomputer-based systems, mainframe computers, and A distributed computing environment, including any of the above systems or devices.
  • the embodiment of the present invention firstly receives a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized, acquires backup data according to the data synchronization instruction, and performs deduplication processing on the synchronization data according to the backup data to obtain a target to be synchronized.
  • the data is sent to the login terminal that logs in to the cloud account to send the target to be synchronized data, so that the login terminal completes the data synchronization.
  • the solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, reduce the amount of data, thereby speeding up data transmission, and effectively improving the efficiency of data synchronization.
  • the embodiment of the invention provides a data synchronization method, including:
  • the method further includes:
  • the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  • the step of performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data includes:
  • the step of acquiring the same repeated sub-data of the plurality of sub-data as the backup data comprises:
  • the target to be synchronized data is sent to the login terminal that logs in to the cloud account.
  • the method further includes:
  • the terminal corresponding to the terminal identifier is a login terminal.
  • the method further includes:
  • the step of acquiring the backup data according to the data synchronization instruction specifically includes:
  • the method before the receiving the data synchronization instruction sent by the terminal, the method further includes:
  • a data synchronization instruction is generated based on the modified target data.
  • the data synchronization system mainly includes a server and a terminal.
  • the above terminal may be specifically integrated in a mobile terminal such as a tablet computer or a mobile phone.
  • the server and the terminal can be connected through a wired or wireless network.
  • FIG. 1 is a schematic diagram of a scenario of a data synchronization system according to the present invention.
  • the data synchronization device is specifically integrated in a server, and is mainly used to receive a data synchronization instruction sent by a terminal, where the data synchronization instruction carries a cloud account and The data to be synchronized is obtained according to the data synchronization instruction, and the data to be synchronized is de-duplicated according to the backup data to obtain the target to be synchronized data, and the target to be synchronized data is sent to the login terminal that logs in to the cloud account, so that the login terminal is completed. data synchronization.
  • the data synchronization system may further include a terminal.
  • the data synchronization system can generate a data synchronization instruction and send it to the server, and can also receive the target synchronization data to be synchronized sent by the server, and perform data synchronization.
  • FIG. 2 is a schematic flowchart of a data synchronization method according to an embodiment of the present invention.
  • the data synchronization method in this embodiment includes:
  • Step S101 Receive a data synchronization instruction sent by the terminal.
  • the data synchronization instruction carries cloud account information and data to be synchronized that needs to be synchronized.
  • at least two terminals simultaneously log in to the cloud account, and each terminal can perform cloud backup on the server through the cloud account.
  • the above-mentioned data to be synchronized may include an address book, a memo, a short message, a chat record, a picture information, a multimedia information, an application usage record, and the like.
  • the data synchronization command may be generated by the terminal according to a user operation, or may be automatically generated when the data in the terminal is modified, which is not further limited by the present invention.
  • a prompt box may pop up to prompt the user to synchronize the contact information to other terminals.
  • the user may click the “OK” button on the terminal screen, and the terminal is based on the terminal.
  • the above new contact information generates a data synchronization instruction and sends it to the server.
  • Step S102 acquiring backup data according to the data synchronization instruction.
  • the backup data is data that is last backed up by the terminal on the cloud server, where the terminal can be any terminal that logs in to the cloud account.
  • the server receives a data synchronization instruction sent by the terminal, where the instruction includes data to be synchronized that needs to be synchronized, and most of the data to be synchronized may have been backed up in the server, and only a small part of the data is needed.
  • Synchronized target to be synchronized data For example, when the terminal adds a contact information, a data synchronization instruction is generated, and the instruction can carry all the contact information stored on the terminal. Synchronizing all contact information as target synchronization data to other terminals will result in a large amount of data duplication and will also consume more server resources.
  • the server only needs to filter the newly added one of the contact information, so in the embodiment, the data to be synchronized may be de-screened by the backup data.
  • the data to be synchronized included in the data synchronization instruction received in step S101 may be all data in the terminal, or may be part of data.
  • the server needs to first determine the data type of the synchronization data, and then acquire the backup data corresponding to the data type in step S102. That is, before the data synchronization instruction sent by the terminal is received, and the data is synchronized according to the data synchronization instruction, the method in this embodiment may further include:
  • the steps of obtaining backup data according to the data synchronization instruction specifically include:
  • the same backup data as the data type is obtained according to the data synchronization instruction.
  • Step S103 performing deduplication processing on the data to be synchronized according to the backup data to obtain data to be synchronized.
  • the data to be synchronized may be divided into a plurality of sub-data according to a certain preset rule, and then it is determined whether the sub-data has the same data sample in the backup data, and if so, the sub-data is determined to be a repetitive sub-data, if not If yes, it is determined that the sub data is the target to be synchronized data that needs to be synchronized. Then, the repeated sub-data in the data to be synchronized is deleted, and the remaining data after the deletion is the target to be synchronized data that needs to be synchronized.
  • the foregoing preset rule may be divided according to a data type, or according to a data size or the like.
  • the method in this embodiment may further include: before the de-duplication processing of the data to be synchronized according to the backup data, after the data is obtained according to the data synchronization instruction, the method in this embodiment may further include:
  • the synchronized data is divided according to a preset rule to obtain a plurality of sub-data.
  • the step of performing deduplication processing on the data to be synchronized according to the backup data to obtain the target data to be synchronized may specifically include:
  • the duplicate sub-data in the data to be synchronized is deleted to obtain the deleted target to be synchronized data.
  • the foregoing sub-data may be a sub-data or a batch of sub-data, that is to say, the judging method in the embodiment of the present invention may judge a plurality of sub-data one by one, or may simultaneously judge a plurality of sub-data (ie, Batch processing).
  • determining whether the subdata is the same as the backup data may be implemented by using a hash value.
  • the hash value is a value obtained by logical operation based on the data of the contents of the file. Different files (even the same file name) get different hash values. So the hash value becomes the ID of each file.
  • the hash value of the sub data may be obtained, and compared with the hash value of the backup data to check whether there is an identical item. If yes, it is determined that the same item is a duplicate sub-data and is deleted, so as to be deleted.
  • the target is to be synchronized data.
  • the duplicate sub-data may also be determined by the history record corresponding to the backup data.
  • the historical record may include feature information of the backup data that has been backed up, and then extract feature information of the sub data, and compare with the feature information of the backup data, and determine the sub data having the same feature information as the backup data as The sub-data is repeated, and the sub-data different from the feature information of the backup data is the target to-be-synchronized data.
  • the server may further back up the target to be synchronized data. For example, if the backup data includes 10 sub-data, first determine whether the 10 sub-data has been backed up. If 6 sub-data has been backed up, that is, repeat the sub-data, the remaining 4 sub-data are determined as the target to-be-synchronized data. And backup these 4 sub-data to the storage medium of the server.
  • Step S104 Send the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes the data synchronization.
  • the login terminal and the terminal are terminals that log in to the same cloud account, and the login terminal may be one or more.
  • the data synchronization can be completed based on the cloud account. For example, in the case that a backup account corresponds to multiple terminals, after the server obtains the target to be synchronized data, the target to be synchronized data can be sent to all the login logs. On the terminal of the account.
  • the terminal is the initiator of the data synchronization instruction
  • the terminal does not need to receive the target to be synchronized data, so all terminals that log in to the cloud account can be obtained, and the terminal other than the terminal is determined to be the login terminal.
  • the login terminal can be determined by the terminal identifier.
  • the method in this embodiment may further include: performing de-duplication processing on the data to be synchronized according to the backup data to obtain the target to-be-synchronized data, and before sending the target to-be-synchronized data to the login terminal that is logged in to the cloud account, the method in this embodiment may further include:
  • the terminal identifier may be a unique identifier of the terminal, and specifically, may be an identifier of the terminal in the communication network terminal. There may be multiple types of terminal identifiers.
  • the terminal identifier may be IMEI (International Mobile Equipment Identity, International Mobile Device Identity), MAC Address (Media Access) Control, physical address), or the number used by the terminal (such as mobile phone number).
  • the server may pause the data transmission and record the data interruption node.
  • the information when the above fault is recovered, can continue to transmit the target to be synchronized data according to the node information, thereby ensuring data integrity.
  • the data synchronization method can receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized, acquires backup data according to the data synchronization instruction, and performs synchronization data according to the backup data. De-reprocessing to obtain the target to-be-synchronized data, and sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes the data synchronization.
  • the solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, and reduce the amount of data that needs to be synchronized, thereby speeding up data transmission, effectively improving the efficiency of data synchronization, thereby saving users. Time, with a better user experience.
  • the user data in one of the terminals can be synchronized to other terminals through the server after being modified. For example, a contact information is added to the terminal.
  • the server often receives all the contact information in the terminal and synchronizes it to other terminals, which occupies more resources of the server. Big will also make data synchronization slower. Therefore, the present invention provides a data synchronization method, which can perform deduplication processing on synchronous data, and send the processed target to be synchronized data to other terminals for synchronization, thereby greatly improving synchronization efficiency.
  • FIG. 3 a data synchronization method, and the specific process is as follows:
  • Step S201 Receive a data synchronization instruction sent by the terminal.
  • the data synchronization instruction carries a cloud account and data to be synchronized that needs to be synchronized.
  • the above-mentioned data to be synchronized may include an address book, a memo, a short message, a chat record, a picture information, a multimedia information, an application usage record, and the like.
  • a prompt box may pop up to prompt the user to synchronize the contact information to other terminals.
  • the user may click the “OK” button on the terminal screen, and the terminal is based on the terminal.
  • the above new contact information generates a data synchronization instruction and sends it to the server.
  • Step S202 acquiring backup data according to the data synchronization instruction.
  • the backup data is the data that is last backed up by the terminal on the cloud server, where the terminal may be any terminal that logs in to the cloud account.
  • Step S203 dividing the data to be synchronized according to a preset rule to obtain a plurality of sub-data.
  • the classified data may be classified according to the data type, and the data to be classified may be divided into address book sub data, picture sub data, music sub data, short message sub data, and the like. It can also be divided according to the data size or other characteristic values, and is not further limited herein.
  • Step S204 acquiring the same repeated sub-data of the plurality of sub-data as the backup data.
  • the embodiment of the present invention may be implemented by using a hash value, for example, a hash value of the sub data may be obtained, and compared with the hash value of the backup data to check whether there is an identical item, and if yes, determining that the same item is a duplicate Subdata.
  • a hash value of the sub data may be obtained, and compared with the hash value of the backup data to check whether there is an identical item, and if yes, determining that the same item is a duplicate Subdata.
  • the duplicate sub-data may also be determined by the history corresponding to the backup data.
  • the historical record may include the feature information of the backup data that has been backed up, and then extract the feature information of the sub-data, and compare with the feature information of the backup data to determine the sub-data having the same feature information as the backup data. To repeat the subdata.
  • Step S205 deleting the repeated sub-data in the data to be synchronized to obtain the target to-be-synchronized data after the deletion.
  • the backup data includes 10 sub-data
  • Step S206 Acquire a terminal identifier corresponding to the terminal that logs in to the cloud account.
  • step S207 it is determined whether there is a sample identifier that is the same as the terminal identifier in the preset identifier set. If yes, step S208 is performed, and if not, the process ends.
  • Step S208 determining that the terminal corresponding to the terminal identifier is a login terminal.
  • a whitelist may be set in advance, and after obtaining the terminal identifier corresponding to the terminal that is logged in to the cloud account, it is determined whether the terminal identifier is in the whitelist, and if so, the terminal corresponding to the terminal identifier is determined to be the login terminal, That is, the terminal that needs to synchronize data.
  • a blacklist may be set, and then the terminal identifier corresponding to the terminal that logs in to the cloud account is determined to be in the blacklist. If not, the terminal corresponding to the terminal identifier is determined to be the login terminal.
  • Step S209 the target to-be-synchronized data is sent to the login terminal, so that the login terminal completes the data synchronization.
  • the data synchronization method can receive the data synchronization instruction sent by the terminal, acquire the backup data according to the data synchronization instruction, divide the synchronization data according to the preset rule, and obtain multiple sub-data to obtain multiple sub-data.
  • the duplicate sub-data in the same manner as the backup data is deleted, and the duplicate sub-data in the data to be synchronized is deleted, so that the deleted target data to be synchronized is obtained, and the terminal identifier corresponding to the terminal that logs in to the cloud account is obtained, and the preset identifier set is determined. Whether there is a sample identifier that is the same as the terminal identifier.
  • the terminal corresponding to the terminal identifier is determined to be a login terminal, and the target to-be-synchronized data is sent to the login terminal, so that the login terminal completes data synchronization.
  • the solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, and reduce the amount of data that needs to be synchronized, thereby speeding up data transmission, effectively improving the efficiency of data synchronization, thereby saving users. Time, with a better user experience.
  • an embodiment of the present invention further provides an apparatus and system based on the foregoing data synchronization method.
  • the meaning of the noun is the same as that in the above data synchronization method.
  • An embodiment of the present invention provides a data synchronization apparatus, including: an instruction receiving module, a backup data acquiring module, a processing module, and a data sending module;
  • the instruction receiving module is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
  • the backup data obtaining module is configured to acquire backup data according to the data synchronization instruction
  • the processing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
  • the data sending module is configured to send the target to-be-synchronized data to a login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  • the apparatus further includes: a dividing module
  • the dividing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data, after the backup data obtaining module acquires backup data according to the data synchronization instruction, to obtain a target to be synchronized Before the data, the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  • the processing module specifically includes: a data acquisition submodule and a deletion submodule;
  • the data acquisition sub-module is configured to acquire the same repeated sub-data of the plurality of sub-data as the backup data
  • the deleting sub-module is configured to delete the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
  • the device further includes: an identifier obtaining module, a determining module, and a determining module;
  • the identifier obtaining module is configured to: after the processing module performs deduplication processing on the to-be-synchronized data according to the backup data, to obtain the target to-be-synchronized data, the data sending module logs in to the cloud account Before the terminal sends the target to be synchronized data, acquiring a terminal identifier corresponding to the terminal that logs in to the cloud account;
  • the determining module is configured to determine whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
  • the determining module is configured to: when the determining module determines to be YES, determine that the terminal corresponding to the terminal identifier is a login terminal.
  • FIG. 4 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention.
  • the data synchronization device 30 includes an instruction receiving module 301, a backup data obtaining module 302, a processing module 303, and a data sending module 304.
  • the instruction receiving module 301 is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized.
  • the backup data obtaining module 302 is configured to obtain backup data according to the data synchronization instruction.
  • the processing module 303 is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data.
  • the data sending module 304 is configured to send the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  • the data synchronization apparatus 30 may further include: a division module 305.
  • a dividing module 305 configured to perform deduplication processing on the to-be-synchronized data according to the backup data, after the backup data acquiring module acquires backup data according to the data synchronization instruction, to obtain target to-be-synchronized data.
  • the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  • the processing module 303 may specifically include: a data acquisition submodule 3031 and a deletion submodule 3032.
  • the data acquisition sub-module 3031 is configured to acquire the same duplicate sub-data of the plurality of sub-data as the backup data.
  • the deleting sub-module 3032 is configured to delete the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
  • the data synchronization apparatus may further include: an identifier obtaining module, a determining module, and a determining module.
  • An identifier obtaining module configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain the target to-be-synchronized data, and the data sending module 304 logs in to the cloud account Before the terminal sends the target to be synchronized data, the terminal identifier corresponding to the terminal that logs in to the cloud account is obtained.
  • the determining module is configured to determine whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set.
  • a determining module configured to: when the determining module determines to be YES, determine that the terminal corresponding to the terminal identifier is a login terminal.
  • the data synchronization device can receive the data synchronization instruction sent by the terminal by the instruction receiving module 301, where the data synchronization instruction carries the cloud account and the data to be synchronized, and the backup data obtaining module 302 obtains according to the data synchronization instruction.
  • the processing module 303 performs deduplication processing on the data to be synchronized according to the backup data to obtain the target to be synchronized data.
  • the data sending module 304 sends the target to be synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes the data synchronization.
  • the solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, and reduce the amount of data that needs to be synchronized, thereby speeding up data transmission, effectively improving the efficiency of data synchronization, thereby saving users. Time, with a better user experience.
  • an embodiment of the present invention further provides a data synchronization system, including a server and a terminal, wherein the server includes the foregoing data synchronization device.
  • the server may include any of the data synchronization devices provided in the foregoing embodiments, and the terminal may be a mobile phone, a tablet, or the like.
  • An embodiment of the present invention further provides a server, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
  • the processor is further configured to perform the following steps:
  • the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  • the processor when the data to be synchronized is subjected to deduplication processing according to the backup data to obtain data to be synchronized, the processor is configured to perform the following steps:
  • the processor when acquiring the same repeated sub-data of the plurality of sub-data as the backup data, the processor is configured to perform the following steps:
  • the processor is further configured to perform the following steps:
  • the terminal corresponding to the terminal identifier is a login terminal.
  • the processor is further configured to perform the following steps:
  • the step of acquiring the backup data according to the data synchronization instruction specifically includes:
  • the processor before the data synchronization instruction sent by the receiving terminal, the processor is further configured to perform the following steps:
  • a data synchronization instruction is generated based on the modified target data.
  • FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • the server 400 may include one or more processors 401 of the processing core, a memory 402 of one or more computer readable storage media, a communication unit 403, a power source 404, an input unit 405, and a display unit 406. .
  • the server structure illustrated in FIG. 7 does not constitute a limitation to the server, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements. among them:
  • the processor 401 is the control center of the server, connecting various portions of the entire server using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 402, and recalling data stored in the memory 402, Execute the server's various functions and process data to monitor the server as a whole.
  • the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 401.
  • Memory 402 can be used to store software programs as well as modules.
  • the processor 401 executes various functional applications and data processing by running software programs and modules stored in the memory 402.
  • the communication unit 403 can be used for receiving and transmitting signals during the transmission and reception of information.
  • the communication unit 403 receives the signal transmitted by the terminal and passes the signal to one or more processors 401 for processing.
  • the communication unit 403 transmits the feedback signal sent by the processor 401 to the terminal.
  • the server also includes a power source 404 (such as a battery) that powers the various components.
  • the power source can be logically connected to the processor 401 through the power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the power supply 404 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the server can also include an input unit 405 that can be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • an input unit 405 can be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • the server can also include a display unit 406 that can be used to display information entered by the user or information provided to the user, as well as various graphical user interfaces of the server, which can be composed of graphics, text, icons, video, and It is composed of any combination.
  • the display unit 406 can include a display panel, and optionally, a liquid crystal display can be used. (LCD, Liquid Crystal Display), Organic Light Emitting Diode (OLED, Organic Light-Emitting) Diode) and other forms to configure the display panel.
  • LCD Liquid Crystal Display
  • OLED Organic Light Emitting Diode
  • the processor 401 in the server loads the executable file corresponding to the process of one or more applications into the memory 402 according to the following instruction, and is stored in the memory by the processor 401.
  • the application in 402 thus implementing various functions, as follows:
  • the data synchronization instruction carrying the cloud account and the data to be synchronized, acquiring the backup data according to the data synchronization instruction, performing deduplication processing on the synchronization data according to the backup data, to obtain the target to be synchronized data, and logging in to the above
  • the login terminal of the cloud account sends the target to be synchronized data, so that the login terminal completes the data synchronization.
  • the foregoing modules may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities.
  • the foregoing modules refer to the foregoing method embodiments, and details are not described herein again.
  • the embodiment of the invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the following steps:
  • ROM read only memory
  • RAM Random Access Memory
  • the functional modules may be integrated into one processing chip, or each module may exist physically or separately.
  • One or more modules are integrated in one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the principles and embodiments of the present invention are described herein with reference to specific examples. The description of the above embodiments is only for the purpose of understanding the method of the present invention and the core idea thereof. Also, those skilled in the art according to the present invention The present invention is not limited by the scope of the present invention.

Landscapes

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

Abstract

Disclosed is a data synchronization method, comprising: receiving a data synchronization instruction sent by a terminal; obtaining backup data according to the data synchronization instruction; de-duplicating data to be synchronized according to the backup data so as to obtain target data to be synchronized; and sending the target data to be synchronized to a login terminal logging in to the cloud account number so as to enable the login terminal to complete data synchronization. Further provided in an embodiment of the present invention are a data synchronization device and system, a storage medium and a server.

Description

一种数据同步方法、装置、系统、存储介质和服务器 Data synchronization method, device, system, storage medium and server
本申请要求于2016年10月25日提交中国专利局、申请号为 201610949142.1 、发明名称为“一种数据同步方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the Chinese Patent Office on October 25, 2016, and the application number is 201610949142.1 The title of the invention is the priority of the Chinese patent application, the entire disclosure of which is incorporated herein by reference.
技术领域Technical field
本发明涉及通信技术领域,具体涉及一种数据同步方法、装置、系统、存储介质和服务器。The present invention relates to the field of communications technologies, and in particular, to a data synchronization method, apparatus, system, storage medium, and server.
背景技术Background technique
随着云计算的兴起,将备份作为一种服务的方式提供给广大客户使用越来越受用户的欢迎,这种备份服务就叫做云备份。和传统的备份相比,云备份有着诸多优点。首先,云备份的安装、使用、维护都比传统的备份软件更简便。通常用户只需要在数据机安装精巧的客户端或插件,经过设置任务后,就可以按照每天或者每周的备份间隔来备份文件数据。其次,作为一种网络服务,云备份本身解决了数据的异地容灾问题,解决了用户自行构建容灾备份系统的技术难题。同时,与一般的备份相比,云备份更注重数据传输和数据存储的安全性。With the rise of cloud computing, the use of backup as a service to customers is increasingly popular with users. This backup service is called cloud backup. Cloud backup has many advantages over traditional backups. First, the installation, use, and maintenance of cloud backups are easier than traditional backup software. Usually users only need to install a sophisticated client or plug-in on the data machine. After setting the task, they can back up the file data according to the daily or weekly backup interval. Secondly, as a kind of network service, cloud backup itself solves the problem of remote disaster recovery of data and solves the technical problem of users building their own disaster recovery backup system. At the same time, compared with general backup, cloud backup pays more attention to the security of data transmission and data storage.
技术问题technical problem
本发明实施例提供一种数据同步方法、装置、系统、存储介质和服务器,可以提高数据同步的效率。The embodiment of the invention provides a data synchronization method, device, system, storage medium and server, which can improve the efficiency of data synchronization.
技术解决方案Technical solution
第一方面,本发明实施例提供一种数据同步方法,包括以下步骤:In a first aspect, an embodiment of the present invention provides a data synchronization method, including the following steps:
接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
第二方面,本发明实施例还提供了一种数据同步装置,包括:指令接收模块、备份数据获取模块、处理模块以及数据发送模块;In a second aspect, the embodiment of the present invention further provides a data synchronization apparatus, including: an instruction receiving module, a backup data acquiring module, a processing module, and a data sending module;
所述指令接收模块,用于接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;The instruction receiving module is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
所述备份数据获取模块,用于根据所述数据同步指令获取备份数据;The backup data obtaining module is configured to acquire backup data according to the data synchronization instruction;
所述处理模块,用于根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;The processing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
所述数据发送模块,用于向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。The data sending module is configured to send the target to-be-synchronized data to a login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
第三方面,本发明实施例还提供了一种数据同步系统,包括:终端和服务器,其中服务器包括如上所述的数据同步装置。In a third aspect, an embodiment of the present invention further provides a data synchronization system, including: a terminal and a server, wherein the server includes the data synchronization device as described above.
第四方面,本发明还提供一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:In a fourth aspect, the present invention also provides a storage medium having a plurality of instructions stored therein, the instructions being adapted to be loaded by a processor to perform the following steps:
接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
第五方面,本发明实施例提供一种服务器,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:In a fifth aspect, an embodiment of the present invention provides a server, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
有益效果 Beneficial effect
本发明实施例提供一种数据同步方法、装置、系统、存储介质和服务器,可以提高数据同步的效率。The embodiment of the invention provides a data synchronization method, device, system, storage medium and server, which can improve the efficiency of data synchronization.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings can also be obtained from those skilled in the art based on these drawings without paying any creative effort.
图1为本发明实施例提供的数据同步系统的场景示意图。FIG. 1 is a schematic diagram of a scenario of a data synchronization system according to an embodiment of the present invention.
图2为本发明实施例提供的一种数据同步方法的流程示意图。FIG. 2 is a schematic flowchart diagram of a data synchronization method according to an embodiment of the present invention.
图3为本发明实施例提供的另一种数据同步方法的流程示意图。FIG. 3 is a schematic flowchart diagram of another data synchronization method according to an embodiment of the present invention.
图4为本发明实施例提供的一种数据同步装置的结构示意图。FIG. 4 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention.
图5为本发明实施例提供的另一种数据同步装置的结构示意图。FIG. 5 is a schematic structural diagram of another data synchronization apparatus according to an embodiment of the present invention.
图6为本发明实施例提供的又一种数据同步装置的结构示意图。FIG. 6 is a schematic structural diagram of still another data synchronization apparatus according to an embodiment of the present invention.
图7为本发明实施例提供的服务器的结构示意图。FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
请参照图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Referring to the drawings, wherein like reference numerals refer to the same components, the principles of the invention are illustrated in the context of a suitable computing environment. The following description is based on the specific embodiments of the invention, which are not to be construed as limiting the invention.
在以下的说明中,本发明的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存系统中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实体位置,其具有由该数据格式所定义的特定特性。但是,本发明原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, specific embodiments of the present invention will be described with reference to the steps and symbols that are executed by one or more computers, unless otherwise stated. Thus, these steps and operations will be referred to several times by a computer, and the computer execution referred to herein includes the operation of a computer processing unit that represents an electronic signal in data in a structured version. This operation converts the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which is not intended to be a limitation, and those skilled in the art will appreciate that the various steps and operations described below can also be implemented in hardware.
本发明的原理使用许多其它泛用性或特定目的运算、通信环境或组态来进行操作。所熟知的适合用于本发明的运算系统、环境与组态的范例可包括(但不限于)手持电话、个人计算机、服务器、多处理器系统、微电脑为主的系统、主架构型计算机、及分布式运算环境,其中包括了任何的上述系统或装置。The principles of the present invention operate using many other general purpose or special purpose computing, communication environments, or configurations. Examples of well-known computing systems, environments, and configurations suitable for use with the present invention may include, but are not limited to, hand-held phones, personal computers, servers, multi-processor systems, microcomputer-based systems, mainframe computers, and A distributed computing environment, including any of the above systems or devices.
本发明实施例首先接收终端发送的数据同步指令,该数据同步指令携带云账号和待同步数据,根据上述数据同步指令获取备份数据,根据备份数据对待同步数据进行去重处理,以得到目标待同步数据,向登录上述云账号的登录终端发送目标待同步数据,以使登录终端完成数据同步。该方案可以实现终端与终端之间的数据同步,并且能够对需要同步的数据进行去重处理,精简数据量,从而加快数据的传输,有效提升了数据同步的效率。The embodiment of the present invention firstly receives a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized, acquires backup data according to the data synchronization instruction, and performs deduplication processing on the synchronization data according to the backup data to obtain a target to be synchronized. The data is sent to the login terminal that logs in to the cloud account to send the target to be synchronized data, so that the login terminal completes the data synchronization. The solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, reduce the amount of data, thereby speeding up data transmission, and effectively improving the efficiency of data synchronization.
本发明实施例提供一种数据同步方法,包括:The embodiment of the invention provides a data synchronization method, including:
接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
一实施例中,在根据所述数据同步指令获取备份数据之后,根据所述备份数据对所述待同步数据进行去重处理之前,所述方法还包括:In an embodiment, after the data is obtained according to the data synchronization instruction, before the de-duplication processing is performed on the data to be synchronized according to the backup data, the method further includes:
按照预设规则对所述待同步数据进行划分,以得到多个子数据。The data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
一实施例中,所述根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据的步骤具体包括:In an embodiment, the step of performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data includes:
获取所述多个子数据中与所述备份数据相同的重复子数据;Obtaining the same repeated sub-data of the plurality of sub-data as the backup data;
删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。Deleting the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
一实施例中,获取所述多个子数据中与所述备份数据相同的重复子数据的步骤包括:In an embodiment, the step of acquiring the same repeated sub-data of the plurality of sub-data as the backup data comprises:
分别获取所述多个子数据对应的哈希值;Obtaining a hash value corresponding to the multiple sub-data respectively;
根据所述哈希值判断所述备份数据当中是否存在与所述子数据相同的数据;Determining, according to the hash value, whether the same data as the sub data exists in the backup data;
若存在,则确定所述子数据为重复子数据。If so, it is determined that the subdata is a duplicate subdata.
一实施例中,在所述根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述向登录所述云账号的登录终端发送所述目标待同步数据之前,所述方法还包括:In an embodiment, after the de-duplication processing is performed on the to-be-synchronized data according to the backup data to obtain the target to-be-synchronized data, the target to be synchronized data is sent to the login terminal that logs in to the cloud account. Previously, the method further includes:
获取登录所述云账号的终端所对应的终端标识;Obtaining a terminal identifier corresponding to the terminal that logs in to the cloud account;
判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识;Determining whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
若存在,则确定所述终端标识对应的终端为登录终端。If yes, it is determined that the terminal corresponding to the terminal identifier is a login terminal.
一实施例中,在所述接收终端发送的数据同步指令之后,根据所述数据同步指令获取备份数据之前,所述方法还包括:In an embodiment, after the data synchronization instruction sent by the receiving terminal is used to acquire the backup data according to the data synchronization instruction, the method further includes:
确定所述待同步数据的数据类型;Determining a data type of the data to be synchronized;
所述根据所述数据同步指令获取备份数据的步骤具体包括:The step of acquiring the backup data according to the data synchronization instruction specifically includes:
根据所述数据同步指令获取与所述数据类型相同的备份数据。Obtaining the same backup data as the data type according to the data synchronization instruction.
一实施例中,在所述接收终端发送的数据同步指令之前,所述方法还包括:In an embodiment, before the receiving the data synchronization instruction sent by the terminal, the method further includes:
检测所述终端中的目标数据是否被修改;Detecting whether target data in the terminal is modified;
若是,则根据所述被修改的目标数据生成数据同步指令。If so, a data synchronization instruction is generated based on the modified target data.
以下将分别进行详细说明。The details will be described separately below.
本发明实施例提供的数据同步系统,主要包括服务器和终端。其中,上述终端具体可以集成在如平板电脑,手机等移动终端中。该服务器与终端可通过有线或无线网络进行连接。The data synchronization system provided by the embodiment of the invention mainly includes a server and a terminal. The above terminal may be specifically integrated in a mobile terminal such as a tablet computer or a mobile phone. The server and the terminal can be connected through a wired or wireless network.
比如,请参考图1,图1为本发明提供的数据同步系统的场景示意图,该数据同步装置具体集成在服务器中,主要用于接收终端发送的数据同步指令,该数据同步指令携带云账号和待同步数据,根据上述数据同步指令获取备份数据,根据备份数据对待同步数据进行去重处理,以得到目标待同步数据,向登录上述云账号的登录终端发送目标待同步数据,以使登录终端完成数据同步。For example, please refer to FIG. 1. FIG. 1 is a schematic diagram of a scenario of a data synchronization system according to the present invention. The data synchronization device is specifically integrated in a server, and is mainly used to receive a data synchronization instruction sent by a terminal, where the data synchronization instruction carries a cloud account and The data to be synchronized is obtained according to the data synchronization instruction, and the data to be synchronized is de-duplicated according to the backup data to obtain the target to be synchronized data, and the target to be synchronized data is sent to the login terminal that logs in to the cloud account, so that the login terminal is completed. data synchronization.
另外,如图1所示,该数据同步系统还可以包括终端。该数据同步系统可以生成数据同步指令并发送至服务器,还可以接收服务器发送的需要同步的目标待同步数据,并进行数据同步。In addition, as shown in FIG. 1, the data synchronization system may further include a terminal. The data synchronization system can generate a data synchronization instruction and send it to the server, and can also receive the target synchronization data to be synchronized sent by the server, and perform data synchronization.
在本实施例中,将从数据同步装置的角度进行描述,该数据同步装置具体可以集成在服务器中。In the present embodiment, description will be made from the perspective of a data synchronizing apparatus, which may be specifically integrated in a server.
请参阅图2,图2为本发明实施例提供的一种数据同步方法的流程示意图,本实施例的数据同步方法包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of a data synchronization method according to an embodiment of the present invention. The data synchronization method in this embodiment includes:
步骤S101,接收终端发送的数据同步指令。Step S101: Receive a data synchronization instruction sent by the terminal.
其中,所述数据同步指令携带云账号信息和需要同步的待同步数据。在本实施例当中,首先至少有两个终端同时登录上述云账号,每个终端都可以通过该云账号在服务器上进行云备份。而上述的待同步数据可以包括通讯录、备忘录、短信、聊天记录、图片信息、多媒体信息和应用程序使用记录等等。The data synchronization instruction carries cloud account information and data to be synchronized that needs to be synchronized. In this embodiment, at least two terminals simultaneously log in to the cloud account, and each terminal can perform cloud backup on the server through the cloud account. The above-mentioned data to be synchronized may include an address book, a memo, a short message, a chat record, a picture information, a multimedia information, an application usage record, and the like.
在本发明实施例当中,上述数据同步指令可以为终端根据用户操作生成的,也可以为终端中的数据被修改时自动生成的,本发明对此不做进一步限定。比如,用户在终端上新增一个联系人信息时,可以弹出一个提示框提示用户是否将该联系人信息同步至其他终端,用户可以点击终端屏幕中的“确定”按钮,此时该终端则根据上述新增的联系人信息生成数据同步指令,并发送至服务器。In the embodiment of the present invention, the data synchronization command may be generated by the terminal according to a user operation, or may be automatically generated when the data in the terminal is modified, which is not further limited by the present invention. For example, when a user adds a contact information to the terminal, a prompt box may pop up to prompt the user to synchronize the contact information to other terminals. The user may click the “OK” button on the terminal screen, and the terminal is based on the terminal. The above new contact information generates a data synchronization instruction and sends it to the server.
步骤S102,根据数据同步指令获取备份数据。Step S102, acquiring backup data according to the data synchronization instruction.
该备份数据为终端最近一次在云服务器上面所备份的数据,其中,该终端可以为登录上述云账号的任意一个终端。The backup data is data that is last backed up by the terminal on the cloud server, where the terminal can be any terminal that logs in to the cloud account.
在实际应用当中,服务器接收终端发送的数据同步指令,该指令包括需要同步的待同步数据,而该待同步数据当中可能有大部分数据已经在所述服务器当中备份过,只有小部分数据为需要同步的目标待同步数据。比如当终端新增一个联系人信息后,生成数据同步指令,该指令可以携带终端上存储的所有联系人信息。若将全部的联系人信息都作为目标待同步数据同步至其他终端就会导致大量数据重复的问题,也会占用较多的服务器资源。优选地,服务器只需要将上述新增的一个联系人信息筛选出来即可,故在本实施例中,可以通过备份数据对上述待同步数据进行去重筛选。In an actual application, the server receives a data synchronization instruction sent by the terminal, where the instruction includes data to be synchronized that needs to be synchronized, and most of the data to be synchronized may have been backed up in the server, and only a small part of the data is needed. Synchronized target to be synchronized data. For example, when the terminal adds a contact information, a data synchronization instruction is generated, and the instruction can carry all the contact information stored on the terminal. Synchronizing all contact information as target synchronization data to other terminals will result in a large amount of data duplication and will also consume more server resources. Preferably, the server only needs to filter the newly added one of the contact information, so in the embodiment, the data to be synchronized may be de-screened by the backup data.
优选地,步骤S101当中接收到的数据同步指令包含的待同步数据可以为终端中的全部数据,也可以为一部分数据。比如只将终端中的通讯录信息作为待同步数据发送至服务器,此时服务器需要先确定该同步数据的数据类型,然后在步骤S102中获取与该数据类型相对应的备份数据。也即在接收终端发送的数据同步指令之后,根据数据同步指令获取备份数据之前,本实施例方法还可以包括:Preferably, the data to be synchronized included in the data synchronization instruction received in step S101 may be all data in the terminal, or may be part of data. For example, only the address book information in the terminal is sent to the server as the data to be synchronized. At this time, the server needs to first determine the data type of the synchronization data, and then acquire the backup data corresponding to the data type in step S102. That is, before the data synchronization instruction sent by the terminal is received, and the data is synchronized according to the data synchronization instruction, the method in this embodiment may further include:
确定待同步数据的数据类型;Determining the data type of the data to be synchronized;
根据数据同步指令获取备份数据的步骤具体包括:The steps of obtaining backup data according to the data synchronization instruction specifically include:
根据数据同步指令获取与该数据类型相同的备份数据。The same backup data as the data type is obtained according to the data synchronization instruction.
步骤S103,根据备份数据对待同步数据进行去重处理,以得到目标待同步数据。Step S103, performing deduplication processing on the data to be synchronized according to the backup data to obtain data to be synchronized.
在本发明实施例当中,上述根据备份数据对待同步数据进行去重处理的方法可以有多种。比如可以将待同步数据根据一定的预设规则划分为多个子数据,然后判断所述子数据在备份数据当中是否存在相同的数据样本,若存在,则确定该子数据为重复子数据,若不存在,则确定该子数据为需要同步的目标待同步数据。然后删除待同步数据中的重复子数据,删除后剩下的数据即为需要同步的目标待同步数据。其中,上述预设规则可以为根据数据类型划分,或者根据数据大小等等。也即在根据数据同步指令获取备份数据之后,根据备份数据对待同步数据进行去重处理之前,本实施例方法还可以包括:In the embodiment of the present invention, there may be various methods for performing deduplication processing on the data to be synchronized according to the backup data. For example, the data to be synchronized may be divided into a plurality of sub-data according to a certain preset rule, and then it is determined whether the sub-data has the same data sample in the backup data, and if so, the sub-data is determined to be a repetitive sub-data, if not If yes, it is determined that the sub data is the target to be synchronized data that needs to be synchronized. Then, the repeated sub-data in the data to be synchronized is deleted, and the remaining data after the deletion is the target to be synchronized data that needs to be synchronized. The foregoing preset rule may be divided according to a data type, or according to a data size or the like. The method in this embodiment may further include: before the de-duplication processing of the data to be synchronized according to the backup data, after the data is obtained according to the data synchronization instruction, the method in this embodiment may further include:
按照预设规则对待同步数据进行划分,以得到多个子数据。The synchronized data is divided according to a preset rule to obtain a plurality of sub-data.
根据备份数据对待同步数据进行去重处理,以得到目标待同步数据的步骤可以具体包括:The step of performing deduplication processing on the data to be synchronized according to the backup data to obtain the target data to be synchronized may specifically include:
获取多个子数据中与备份数据相同的重复子数据;Obtaining the same repeated sub-data of the plurality of sub-data as the backup data;
删除待同步数据中的重复子数据,以得到删除后的目标待同步数据。The duplicate sub-data in the data to be synchronized is deleted to obtain the deleted target to be synchronized data.
其中,在判断所述子数据在备份数据当中是否存在相同的数据样本的步骤中。上述子数据可以是一个子数据,也可以为一批子数据,也就是说本发明实施例中的判断方法既可以对多个子数据逐个进行判断,也可以对多个子数据同时进行判断(也即批量处理)。Wherein, in the step of determining whether the subdata has the same data sample in the backup data. The foregoing sub-data may be a sub-data or a batch of sub-data, that is to say, the judging method in the embodiment of the present invention may judge a plurality of sub-data one by one, or may simultaneously judge a plurality of sub-data (ie, Batch processing).
具体的,判断子数据是否与备份数据相同可以通过哈希值来实现。哈希值是根据文件的内容的数据通过逻辑运算得到的数值, 不同的文件(即使是相同的文件名)得到的哈希值是不同的, 所以哈希值就成了每一个文件的身份证。具体的,可以获取子数据的哈希值,并将其与备份数据的哈希值进行对比,查看是否有相同项,若是,则确定该相同项为重复子数据并进行删除,以得到删除后的目标待同步数据。Specifically, determining whether the subdata is the same as the backup data may be implemented by using a hash value. The hash value is a value obtained by logical operation based on the data of the contents of the file. Different files (even the same file name) get different hash values. So the hash value becomes the ID of each file. Specifically, the hash value of the sub data may be obtained, and compared with the hash value of the backup data to check whether there is an identical item. If yes, it is determined that the same item is a duplicate sub-data and is deleted, so as to be deleted. The target is to be synchronized data.
在其他实施例当中,还可以通过备份数据所对应的历史记录来确定重复子数据。其中,上述历史记录中可以包含已经备份过的备份数据的特征信息,然后提取子数据的特征信息,并与备份数据的特征信息进行对比,将具有与备份数据相同的特征信息的子数据确定为重复子数据,与备份数据的特征信息不同的子数据即为目标待同步数据。In other embodiments, the duplicate sub-data may also be determined by the history record corresponding to the backup data. The historical record may include feature information of the backup data that has been backed up, and then extract feature information of the sub data, and compare with the feature information of the backup data, and determine the sub data having the same feature information as the backup data as The sub-data is repeated, and the sub-data different from the feature information of the backup data is the target to-be-synchronized data.
优选地,再确定目标待同步数据之后,服务器还可以对该目标待同步数据进行备份。例如,备份数据中包含10个子数据,那么首先确定该10个子数据是否已经备份,如果有6个子数据已经备份,也即重复子数据,则对于剩余的4个子数据,确定为目标待同步数据,并将这4个子数据备份至服务器的存储介质当中。Preferably, after determining the target to be synchronized data, the server may further back up the target to be synchronized data. For example, if the backup data includes 10 sub-data, first determine whether the 10 sub-data has been backed up. If 6 sub-data has been backed up, that is, repeat the sub-data, the remaining 4 sub-data are determined as the target to-be-synchronized data. And backup these 4 sub-data to the storage medium of the server.
步骤S104,向登录云账号的登录终端发送目标待同步数据,以使登录终端完成数据同步。Step S104: Send the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes the data synchronization.
在本发明实施例当中,所述登录终端与所述终端为登录同一个云账号的终端,其中登录终端可以为一个或者多个。本实施例可以基于云账号来完成数据同步,比如,对于在一个备份账号对应多个终端的情况下,当服务器获取到目标待同步数据之后,可以将该目标待同步数据发送给所有登录该云账号的终端上。In the embodiment of the present invention, the login terminal and the terminal are terminals that log in to the same cloud account, and the login terminal may be one or more. In this embodiment, the data synchronization can be completed based on the cloud account. For example, in the case that a backup account corresponds to multiple terminals, after the server obtains the target to be synchronized data, the target to be synchronized data can be sent to all the login logs. On the terminal of the account.
考虑到上述终端为数据同步指令的发起者,所以该终端没有必要接收上述目标待同步数据,因此可以获取所有登陆该云账号的终端,并确定其中所述终端以外的终端为登录终端。Considering that the terminal is the initiator of the data synchronization instruction, the terminal does not need to receive the target to be synchronized data, so all terminals that log in to the cloud account can be obtained, and the terminal other than the terminal is determined to be the login terminal.
优选地,在本发明实施例中,可以通过终端标识来确定登录终端。具体地,在根据备份数据对待同步数据进行去重处理,以得到目标待同步数据之后,向登录所述云账号的登录终端发送目标待同步数据之前,本实施例方法还可以包括:Preferably, in the embodiment of the present invention, the login terminal can be determined by the terminal identifier. Specifically, the method in this embodiment may further include: performing de-duplication processing on the data to be synchronized according to the backup data to obtain the target to-be-synchronized data, and before sending the target to-be-synchronized data to the login terminal that is logged in to the cloud account, the method in this embodiment may further include:
获取登录该云账号的终端所对应的终端标识;Obtaining a terminal identifier corresponding to the terminal that logs in to the cloud account;
判断预设标识集合当中是否存在与终端标识相同的样本标识;Determining whether there is a same sample identifier as the terminal identifier in the preset identifier set;
若存在,则确定终端标识对应的终端为登录终端。If yes, it is determined that the terminal corresponding to the terminal identifier is the login terminal.
该终端标识可以为终端的唯一标识,具体地,可以为终端在通讯网络终端的标识。终端标识的可以有多种,比如,该终端标识可以为IMEI(International Mobile Equipment Identity,国际移动设备标识)、MAC地址(Media Access Control,物理地址)、或者终端使用的号码(如手机号码)等等。The terminal identifier may be a unique identifier of the terminal, and specifically, may be an identifier of the terminal in the communication network terminal. There may be multiple types of terminal identifiers. For example, the terminal identifier may be IMEI (International Mobile Equipment Identity, International Mobile Device Identity), MAC Address (Media Access) Control, physical address), or the number used by the terminal (such as mobile phone number).
可选地,本方案中的服务器在向登录终端发送目标待同步数据的过程中,若由于登录终端的网络故障或服务器故障等原因造成传输中断,则可以暂停数据传输,并记录数据中断的节点信息,当上述故障恢复后则可以根据该节点信息继续传输目标待同步数据,从而保证了数据的完整性。Optionally, in the process of sending the target to be synchronized data to the login terminal, if the server is interrupted due to a network failure or a server failure of the login terminal, the server may pause the data transmission and record the data interruption node. The information, when the above fault is recovered, can continue to transmit the target to be synchronized data according to the node information, thereby ensuring data integrity.
由上可知,本发明实施例提供的数据同步方法可以接收终端发送的数据同步指令,该数据同步指令携带云账号和待同步数据,根据上述数据同步指令获取备份数据,根据备份数据对待同步数据进行去重处理,以得到目标待同步数据,向登录上述云账号的登录终端发送目标待同步数据,以使登录终端完成数据同步。该方案可以实现终端与终端之间的数据同步,并且能够对需要同步的数据进行去重处理,精简需要同步的数据量,从而加快数据的传输,有效提升了数据同步的效率,从而节省了用户的时间,具有较好的用户体验。It can be seen that the data synchronization method provided by the embodiment of the present invention can receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized, acquires backup data according to the data synchronization instruction, and performs synchronization data according to the backup data. De-reprocessing to obtain the target to-be-synchronized data, and sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes the data synchronization. The solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, and reduce the amount of data that needs to be synchronized, thereby speeding up data transmission, effectively improving the efficiency of data synchronization, thereby saving users. Time, with a better user experience.
首先,当用户同时使用多个终端时,在其中一个终端中的用户数据修改后可以通过服务器同步至其他的终端。比如终端中新增了一个联系人信息,然而在进行数据同步时,服务器往往会接收到终端中的全部联系人信息,并同步至其他终端,这会占用服务器较多的资源,数据量的过大也会使数据同步的速度变得较为缓慢。因此本发明提供一种数据同步方法,可以对同步数据进行去重处理,并将处理后的目标待同步数据发送至其他终端进行同步,大大提升了同步效率。First, when a user simultaneously uses a plurality of terminals, the user data in one of the terminals can be synchronized to other terminals through the server after being modified. For example, a contact information is added to the terminal. However, when data synchronization is performed, the server often receives all the contact information in the terminal and synchronizes it to other terminals, which occupies more resources of the server. Big will also make data synchronization slower. Therefore, the present invention provides a data synchronization method, which can perform deduplication processing on synchronous data, and send the processed target to be synchronized data to other terminals for synchronization, thereby greatly improving synchronization efficiency.
在一优选实施例当中,请参阅图3,一种数据同步方法,具体流程如下:In a preferred embodiment, please refer to FIG. 3, a data synchronization method, and the specific process is as follows:
步骤S201,接收终端发送的数据同步指令。Step S201: Receive a data synchronization instruction sent by the terminal.
其中,所述数据同步指令携带云账号和需要同步的待同步数据。上述的待同步数据可以包括通讯录、备忘录、短信、聊天记录、图片信息、多媒体信息和应用程序使用记录等等。The data synchronization instruction carries a cloud account and data to be synchronized that needs to be synchronized. The above-mentioned data to be synchronized may include an address book, a memo, a short message, a chat record, a picture information, a multimedia information, an application usage record, and the like.
比如,用户在终端上新增一个联系人信息时,可以弹出一个提示框提示用户是否将该联系人信息同步至其他终端,用户可以点击终端屏幕中的“确定”按钮,此时该终端则根据上述新增的联系人信息生成数据同步指令,并发送至服务器。For example, when a user adds a contact information to the terminal, a prompt box may pop up to prompt the user to synchronize the contact information to other terminals. The user may click the “OK” button on the terminal screen, and the terminal is based on the terminal. The above new contact information generates a data synchronization instruction and sends it to the server.
步骤S202,根据数据同步指令获取备份数据。Step S202, acquiring backup data according to the data synchronization instruction.
在本实施例中,该备份数据为终端最近一次在云服务器上面所备份的数据,其中,该终端可以为登录上述云账号的任意一个终端。In this embodiment, the backup data is the data that is last backed up by the terminal on the cloud server, where the terminal may be any terminal that logs in to the cloud account.
步骤S203,按照预设规则对待同步数据进行划分,以得到多个子数据。Step S203, dividing the data to be synchronized according to a preset rule to obtain a plurality of sub-data.
比如可以根据数据类型对待分类数据进行分类,可以将待分类数据划分为通讯录子数据、图片子数据、音乐子数据、短信子数据等等。还可以根据数据大小或其他特征值进行划分,在此不做进一步限定。For example, the classified data may be classified according to the data type, and the data to be classified may be divided into address book sub data, picture sub data, music sub data, short message sub data, and the like. It can also be divided according to the data size or other characteristic values, and is not further limited herein.
步骤S204,获取多个子数据中与所述备份数据相同的重复子数据。Step S204, acquiring the same repeated sub-data of the plurality of sub-data as the backup data.
本发明实施例可以通过哈希值来实现,比如可以获取子数据的哈希值,并将其与备份数据的哈希值进行对比,查看是否有相同项,若是,则确定该相同项为重复子数据。The embodiment of the present invention may be implemented by using a hash value, for example, a hash value of the sub data may be obtained, and compared with the hash value of the backup data to check whether there is an identical item, and if yes, determining that the same item is a duplicate Subdata.
在其他实施例中,还可以通过备份数据所对应的历史记录来确定重复子数据。其中,上述历史记录中可以包含已经备份过的备份数据的特征信息,然后提取上述子数据的特征信息,并与备份数据的特征信息进行对比,将具有与备份数据相同的特征信息的子数据确定为重复子数据。In other embodiments, the duplicate sub-data may also be determined by the history corresponding to the backup data. The historical record may include the feature information of the backup data that has been backed up, and then extract the feature information of the sub-data, and compare with the feature information of the backup data to determine the sub-data having the same feature information as the backup data. To repeat the subdata.
步骤S205,删除待同步数据中的重复子数据,以得到删除后的目标待同步数据。Step S205, deleting the repeated sub-data in the data to be synchronized to obtain the target to-be-synchronized data after the deletion.
例如,备份数据中包含10个子数据,那么首先确定该10个子数据是否已经备份,如果有6个子数据已经备份,也即重复子数据,则对于剩余的4个子数据,确定为目标待同步数据。For example, if the backup data includes 10 sub-data, firstly, it is determined whether the 10 sub-data has been backed up. If 6 sub-data has been backed up, that is, the sub-data is repeated, the remaining 4 sub-data are determined as the target to-be-synchronized data.
步骤S206,获取登录云账号的终端所对应的终端标识。Step S206: Acquire a terminal identifier corresponding to the terminal that logs in to the cloud account.
步骤S207,判断预设标识集合当中是否存在与终端标识相同的样本标识,若存在,则执行步骤S208,若不存在,则结束流程。In step S207, it is determined whether there is a sample identifier that is the same as the terminal identifier in the preset identifier set. If yes, step S208 is performed, and if not, the process ends.
步骤S208,确定上述终端标识对应的终端为登录终端。Step S208, determining that the terminal corresponding to the terminal identifier is a login terminal.
比如,可以预先设置一个白名单,在获取登录该云账号的终端所对应的终端标识后,判断该终端标识是否在该白名单当中,若是,则确定该终端标识对应的终端为登录终端,也即需要进行数据同步的终端。For example, a whitelist may be set in advance, and after obtaining the terminal identifier corresponding to the terminal that is logged in to the cloud account, it is determined whether the terminal identifier is in the whitelist, and if so, the terminal corresponding to the terminal identifier is determined to be the login terminal, That is, the terminal that needs to synchronize data.
可选的,在其他实施例当中还可以设置一个黑名单,然后判断登录云账号的终端所对应的终端标识是否在黑名单当中,若否,则确定该终端标识对应的终端为登录终端。Optionally, in another embodiment, a blacklist may be set, and then the terminal identifier corresponding to the terminal that logs in to the cloud account is determined to be in the blacklist. If not, the terminal corresponding to the terminal identifier is determined to be the login terminal.
步骤S209,向登录终端发送目标待同步数据,以使登录终端完成数据同步。Step S209, the target to-be-synchronized data is sent to the login terminal, so that the login terminal completes the data synchronization.
由上可知,本发明实施例提供的数据同步方法可以接收终端发送的数据同步指令,根据数据同步指令获取备份数据,按照预设规则对待同步数据进行划分,以得到多个子数据,获取多个子数据中与所述备份数据相同的重复子数据,删除待同步数据中的重复子数据,以得到删除后的目标待同步数据,获取登录云账号的终端所对应的终端标识,判断预设标识集合当中是否存在与终端标识相同的样本标识,若存在,则确定上述终端标识对应的终端为登录终端,向登录终端发送目标待同步数据,以使登录终端完成数据同步。该方案可以实现终端与终端之间的数据同步,并且能够对需要同步的数据进行去重处理,精简需要同步的数据量,从而加快数据的传输,有效提升了数据同步的效率,从而节省了用户的时间,具有较好的用户体验。It can be seen that the data synchronization method provided by the embodiment of the present invention can receive the data synchronization instruction sent by the terminal, acquire the backup data according to the data synchronization instruction, divide the synchronization data according to the preset rule, and obtain multiple sub-data to obtain multiple sub-data. The duplicate sub-data in the same manner as the backup data is deleted, and the duplicate sub-data in the data to be synchronized is deleted, so that the deleted target data to be synchronized is obtained, and the terminal identifier corresponding to the terminal that logs in to the cloud account is obtained, and the preset identifier set is determined. Whether there is a sample identifier that is the same as the terminal identifier. If yes, the terminal corresponding to the terminal identifier is determined to be a login terminal, and the target to-be-synchronized data is sent to the login terminal, so that the login terminal completes data synchronization. The solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, and reduce the amount of data that needs to be synchronized, thereby speeding up data transmission, effectively improving the efficiency of data synchronization, thereby saving users. Time, with a better user experience.
为便于更好的实施本发明实施例提供的数据同步方法,本发明实施例还提供了一种基于上述数据同步方法的装置以及系统。其中名词的含义与上述数据同步方法中相同,具体实现细节可以参考方法实施例中的说明。In order to facilitate the implementation of the data synchronization method provided by the embodiment of the present invention, an embodiment of the present invention further provides an apparatus and system based on the foregoing data synchronization method. The meaning of the noun is the same as that in the above data synchronization method. For specific implementation details, refer to the description in the method embodiment.
本发明实施例提供一种数据同步装置,包括:指令接收模块、备份数据获取模块、处理模块以及数据发送模块;An embodiment of the present invention provides a data synchronization apparatus, including: an instruction receiving module, a backup data acquiring module, a processing module, and a data sending module;
所述指令接收模块,用于接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;The instruction receiving module is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
所述备份数据获取模块,用于根据所述数据同步指令获取备份数据;The backup data obtaining module is configured to acquire backup data according to the data synchronization instruction;
所述处理模块,用于根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;The processing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
所述数据发送模块,用于向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。The data sending module is configured to send the target to-be-synchronized data to a login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
一实施例中,所述装置还包括:划分模块;In an embodiment, the apparatus further includes: a dividing module;
所述划分模块,用于在所述备份数据获取模块根据所述数据同步指令获取备份数据之后,所述处理模块根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之前,按照预设规则对所述待同步数据进行划分,以得到多个子数据。The dividing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data, after the backup data obtaining module acquires backup data according to the data synchronization instruction, to obtain a target to be synchronized Before the data, the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
一实施例中,所述处理模块具体包括:数据获取子模块和删除子模块;In an embodiment, the processing module specifically includes: a data acquisition submodule and a deletion submodule;
所述数据获取子模块,用于获取所述多个子数据中与所述备份数据相同的重复子数据;The data acquisition sub-module is configured to acquire the same repeated sub-data of the plurality of sub-data as the backup data;
所述删除子模块,用于删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。The deleting sub-module is configured to delete the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
一实施例中,所述装置还包括:标识获取模块、判断模块以及确定模块;In an embodiment, the device further includes: an identifier obtaining module, a determining module, and a determining module;
所述标识获取模块,用于在所述处理模块根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述数据发送模块向登录所述云账号的登录终端发送所述目标待同步数据之前,获取登录所述云账号的终端所对应的终端标识;The identifier obtaining module is configured to: after the processing module performs deduplication processing on the to-be-synchronized data according to the backup data, to obtain the target to-be-synchronized data, the data sending module logs in to the cloud account Before the terminal sends the target to be synchronized data, acquiring a terminal identifier corresponding to the terminal that logs in to the cloud account;
所述判断模块,用于判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识;The determining module is configured to determine whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
所述确定模块,用于当所述判断模块判断为是时,确定所述终端标识对应的终端为登录终端。The determining module is configured to: when the determining module determines to be YES, determine that the terminal corresponding to the terminal identifier is a login terminal.
请参阅图4,图4为本发明实施例提供的一种数据同步装置的结构示意图。该数据同步装置30包括:指令接收模块301、备份数据获取模块302、处理模块303以及数据发送模块304。Referring to FIG. 4, FIG. 4 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention. The data synchronization device 30 includes an instruction receiving module 301, a backup data obtaining module 302, a processing module 303, and a data sending module 304.
指令接收模块301,用于接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据。The instruction receiving module 301 is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized.
备份数据获取模块302,用于根据所述数据同步指令获取备份数据。The backup data obtaining module 302 is configured to obtain backup data according to the data synchronization instruction.
处理模块303,用于根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据。The processing module 303 is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data.
数据发送模块304,用于向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。The data sending module 304 is configured to send the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
进一步地,如图5所示,本发明实施例提供的数据同步装置30还可以包括:划分模块305。Further, as shown in FIG. 5, the data synchronization apparatus 30 provided by the embodiment of the present invention may further include: a division module 305.
划分模块305,用于在所述备份数据获取模块根据所述数据同步指令获取备份数据之后,所述处理模块根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之前,按照预设规则对所述待同步数据进行划分,以得到多个子数据。a dividing module 305, configured to perform deduplication processing on the to-be-synchronized data according to the backup data, after the backup data acquiring module acquires backup data according to the data synchronization instruction, to obtain target to-be-synchronized data. Previously, the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
更进一步地,如图6所示,在该数据同步装置30当中,处理模块303可以具体包括:数据获取子模块3031和删除子模块3032。Further, as shown in FIG. 6, in the data synchronization device 30, the processing module 303 may specifically include: a data acquisition submodule 3031 and a deletion submodule 3032.
数据获取子模块3031,用于获取所述多个子数据中与所述备份数据相同的重复子数据。The data acquisition sub-module 3031 is configured to acquire the same duplicate sub-data of the plurality of sub-data as the backup data.
删除子模块3032,用于删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。The deleting sub-module 3032 is configured to delete the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
可选的,本发明实施例提供的数据同步装置还可以包括:标识获取模块、判断模块以及确定模块。Optionally, the data synchronization apparatus provided by the embodiment of the present invention may further include: an identifier obtaining module, a determining module, and a determining module.
标识获取模块,用于在所述处理模块303根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述数据发送模块304向登录所述云账号的登录终端发送所述目标待同步数据之前,获取登录所述云账号的终端所对应的终端标识。An identifier obtaining module, configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain the target to-be-synchronized data, and the data sending module 304 logs in to the cloud account Before the terminal sends the target to be synchronized data, the terminal identifier corresponding to the terminal that logs in to the cloud account is obtained.
判断模块,用于判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识。The determining module is configured to determine whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set.
确定模块,用于当所述判断模块判断为是时,确定所述终端标识对应的终端为登录终端。And a determining module, configured to: when the determining module determines to be YES, determine that the terminal corresponding to the terminal identifier is a login terminal.
由上可知,本发明实施例提供的数据同步装置可以由指令接收模块301接收终端发送的数据同步指令,该数据同步指令携带云账号和待同步数据,备份数据获取模块302根据上述数据同步指令获取备份数据,处理模块303根据备份数据对待同步数据进行去重处理,以得到目标待同步数据,数据发送模块304向登录上述云账号的登录终端发送目标待同步数据,以使登录终端完成数据同步。该方案可以实现终端与终端之间的数据同步,并且能够对需要同步的数据进行去重处理,精简需要同步的数据量,从而加快数据的传输,有效提升了数据同步的效率,从而节省了用户的时间,具有较好的用户体验。It can be seen that the data synchronization device provided by the embodiment of the present invention can receive the data synchronization instruction sent by the terminal by the instruction receiving module 301, where the data synchronization instruction carries the cloud account and the data to be synchronized, and the backup data obtaining module 302 obtains according to the data synchronization instruction. After the data is backed up, the processing module 303 performs deduplication processing on the data to be synchronized according to the backup data to obtain the target to be synchronized data. The data sending module 304 sends the target to be synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes the data synchronization. The solution can realize data synchronization between the terminal and the terminal, and can de-reprocess the data that needs to be synchronized, and reduce the amount of data that needs to be synchronized, thereby speeding up data transmission, effectively improving the efficiency of data synchronization, thereby saving users. Time, with a better user experience.
另外,本发明实施例还提供一种数据同步系统,包括服务器以及终端,其中,所述服务器包括上述数据同步装置。请参考图1,其中该服务器可以包括如上实施例所提供的任一数据同步装置,终端可以为手机、平板电脑等。In addition, an embodiment of the present invention further provides a data synchronization system, including a server and a terminal, wherein the server includes the foregoing data synchronization device. Please refer to FIG. 1 , wherein the server may include any of the data synchronization devices provided in the foregoing embodiments, and the terminal may be a mobile phone, a tablet, or the like.
本发明实施例还提供一种服务器,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:An embodiment of the present invention further provides a server, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
一实施例中,在根据所述数据同步指令获取备份数据之后,所述处理器还用于执行以下步骤:In an embodiment, after acquiring the backup data according to the data synchronization instruction, the processor is further configured to perform the following steps:
按照预设规则对所述待同步数据进行划分,以得到多个子数据。The data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
一实施例中,根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据时,所述处理器用于执行以下步骤:In an embodiment, when the data to be synchronized is subjected to deduplication processing according to the backup data to obtain data to be synchronized, the processor is configured to perform the following steps:
获取所述多个子数据中与所述备份数据相同的重复子数据;Obtaining the same repeated sub-data of the plurality of sub-data as the backup data;
删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。Deleting the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
一实施例中,获取所述多个子数据中与所述备份数据相同的重复子数据时,所述处理器用于执行以下步骤:In an embodiment, when acquiring the same repeated sub-data of the plurality of sub-data as the backup data, the processor is configured to perform the following steps:
分别获取所述多个子数据对应的哈希值;Obtaining a hash value corresponding to the multiple sub-data respectively;
根据所述哈希值判断所述备份数据当中是否存在与所述子数据相同的数据;Determining, according to the hash value, whether the same data as the sub data exists in the backup data;
若存在,则确定所述子数据为重复子数据。If so, it is determined that the subdata is a duplicate subdata.
一实施例中,在所述根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述处理器还用于执行以下步骤:In an embodiment, after the de-duplication processing is performed on the to-be-synchronized data according to the backup data to obtain the target to-be-synchronized data, the processor is further configured to perform the following steps:
获取登录所述云账号的终端所对应的终端标识;Obtaining a terminal identifier corresponding to the terminal that logs in to the cloud account;
判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识;Determining whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
若存在,则确定所述终端标识对应的终端为登录终端。If yes, it is determined that the terminal corresponding to the terminal identifier is a login terminal.
一实施例中,在所述接收终端发送的数据同步指令之后,所述处理器还用于执行以下步骤:In an embodiment, after the data synchronization instruction sent by the receiving terminal, the processor is further configured to perform the following steps:
确定所述待同步数据的数据类型;Determining a data type of the data to be synchronized;
所述根据所述数据同步指令获取备份数据的步骤具体包括:The step of acquiring the backup data according to the data synchronization instruction specifically includes:
根据所述数据同步指令获取与所述数据类型相同的备份数据。Obtaining the same backup data as the data type according to the data synchronization instruction.
一实施例中,在所述接收终端发送的数据同步指令之前,所述处理器还用于执行以下步骤:In an embodiment, before the data synchronization instruction sent by the receiving terminal, the processor is further configured to perform the following steps:
检测所述终端中的目标数据是否被修改;Detecting whether target data in the terminal is modified;
若是,则根据所述被修改的目标数据生成数据同步指令。If so, a data synchronization instruction is generated based on the modified target data.
请参考图7,其示出了本发明实施例所涉及的服务器的结构示意图。具体来讲:该服务器400可以包括一个或者一个以上处理核心的处理器401、一个或一个以上计算机可读存储介质的存储器402、通讯单元403、电源404、输入单元405、以及显示单元406等部件。本领域技术人员可以理解,图7中示出的服务器结构并不构成对服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:Please refer to FIG. 7, which is a schematic structural diagram of a server according to an embodiment of the present invention. Specifically, the server 400 may include one or more processors 401 of the processing core, a memory 402 of one or more computer readable storage media, a communication unit 403, a power source 404, an input unit 405, and a display unit 406. . Those skilled in the art will appreciate that the server structure illustrated in FIG. 7 does not constitute a limitation to the server, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements. among them:
处理器401是该服务器的控制中心,利用各种接口和线路连接整个服务器的各个部分,通过运行或执行存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行服务器的各种功能和处理数据,从而对服务器进行整体监控。可选的,处理器401可包括一个或多个处理核心;优选的,处理器401可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器401中。The processor 401 is the control center of the server, connecting various portions of the entire server using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 402, and recalling data stored in the memory 402, Execute the server's various functions and process data to monitor the server as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 401.
存储器402可用于存储软件程序以及模块。处理器401通过运行存储在存储器402的软件程序以及模块,从而执行各种功能应用以及数据处理。Memory 402 can be used to store software programs as well as modules. The processor 401 executes various functional applications and data processing by running software programs and modules stored in the memory 402.
通讯单元403可用于收发信息过程中,信号的接收和发送,特别地,通讯单元403接收终端发送的信号,并将该信号交由一个或者一个以上处理器401处理。同时通讯单元403将处理器401发出的反馈信号发送给终端。The communication unit 403 can be used for receiving and transmitting signals during the transmission and reception of information. In particular, the communication unit 403 receives the signal transmitted by the terminal and passes the signal to one or more processors 401 for processing. At the same time, the communication unit 403 transmits the feedback signal sent by the processor 401 to the terminal.
服务器还包括给各个部件供电的电源404(比如电池)。优选的,电源可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源404还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The server also includes a power source 404 (such as a battery) that powers the various components. Preferably, the power source can be logically connected to the processor 401 through the power management system to manage functions such as charging, discharging, and power management through the power management system. The power supply 404 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
该服务器还可包括输入单元405,该输入单元405可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。 The server can also include an input unit 405 that can be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
该服务器还可包括显示单元406,该显示单元406可用于显示由用户输入的信息或提供给用户的信息以及服务器的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元406可包括显示面板,可选的,可以采用液晶显示器 (LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。The server can also include a display unit 406 that can be used to display information entered by the user or information provided to the user, as well as various graphical user interfaces of the server, which can be composed of graphics, text, icons, video, and It is composed of any combination. The display unit 406 can include a display panel, and optionally, a liquid crystal display can be used. (LCD, Liquid Crystal Display), Organic Light Emitting Diode (OLED, Organic Light-Emitting) Diode) and other forms to configure the display panel.
具体在本实施例中,服务器中的处理器401会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能,如下:Specifically, in this embodiment, the processor 401 in the server loads the executable file corresponding to the process of one or more applications into the memory 402 according to the following instruction, and is stored in the memory by the processor 401. The application in 402, thus implementing various functions, as follows:
接收终端发送的数据同步指令,该数据同步指令携带云账号和待同步数据,根据上述数据同步指令获取备份数据,根据备份数据对待同步数据进行去重处理,以得到目标待同步数据,向登录上述云账号的登录终端发送目标待同步数据,以使登录终端完成数据同步。Receiving a data synchronization instruction sent by the terminal, the data synchronization instruction carrying the cloud account and the data to be synchronized, acquiring the backup data according to the data synchronization instruction, performing deduplication processing on the synchronization data according to the backup data, to obtain the target to be synchronized data, and logging in to the above The login terminal of the cloud account sends the target to be synchronized data, so that the login terminal completes the data synchronization.
具体的操作,可以参考前面数据同步方法实施例的详细描述。For specific operations, reference may be made to the detailed description of the foregoing data synchronization method embodiment.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。For the specific implementation, the foregoing modules may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities. For the specific implementation of the foregoing modules, refer to the foregoing method embodiments, and details are not described herein again.
本发明实施例还提供一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:The embodiment of the invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to perform the following steps:
接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如信息发布方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, such as It is stored in the memory of the terminal and executed by at least one processor within the terminal, and may include a flow of an embodiment of the information distribution method during execution. The storage medium may include: a read only memory (ROM, Read) Only Memory), Random Access Memory (RAM), disk or CD.
以上对本发明实施例提供的一种数据同步方法、装置、系统、存储介质和服务器进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The data synchronization method, device, system, storage medium and server provided by the embodiments of the present invention are described in detail. The functional modules may be integrated into one processing chip, or each module may exist physically or separately. One or more modules are integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The principles and embodiments of the present invention are described herein with reference to specific examples. The description of the above embodiments is only for the purpose of understanding the method of the present invention and the core idea thereof. Also, those skilled in the art according to the present invention The present invention is not limited by the scope of the present invention.

Claims (20)

  1. 一种数据同步方法,其中,包括以下步骤:A data synchronization method, comprising the following steps:
    接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
    根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
    根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
    向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  2. 如权利要求1所述的数据同步方法,其中,在根据所述数据同步指令获取备份数据之后,根据所述备份数据对所述待同步数据进行去重处理之前,所述方法还包括:The data synchronization method according to claim 1, wherein the method further comprises: performing de-duplication processing on the data to be synchronized according to the backup data after acquiring the backup data according to the data synchronization instruction, the method further comprising:
    按照预设规则对所述待同步数据进行划分,以得到多个子数据。The data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  3. 如权利要求2所述的数据同步方法,其中,所述根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据的步骤具体包括:The data synchronization method according to claim 2, wherein the step of performing de-duplication processing on the data to be synchronized according to the backup data to obtain target to-be-synchronized data comprises:
    获取所述多个子数据中与所述备份数据相同的重复子数据;Obtaining the same repeated sub-data of the plurality of sub-data as the backup data;
    删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。Deleting the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
  4. 如权利要求3所述的数据同步方法,其中,获取所述多个子数据中与所述备份数据相同的重复子数据的步骤包括:The data synchronization method according to claim 3, wherein the step of acquiring the same duplicate sub-data of the plurality of sub-data as the backup data comprises:
    分别获取所述多个子数据对应的哈希值;Obtaining a hash value corresponding to the multiple sub-data respectively;
    根据所述哈希值判断所述备份数据当中是否存在与所述子数据相同的数据;Determining, according to the hash value, whether the same data as the sub data exists in the backup data;
    若存在,则确定所述子数据为重复子数据。If so, it is determined that the subdata is a duplicate subdata.
  5. 如权利要求1所述的数据同步方法,其中,在所述根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述向登录所述云账号的登录终端发送所述目标待同步数据之前,所述方法还包括:The data synchronization method according to claim 1, wherein after the de-duplication processing is performed on the data to be synchronized according to the backup data to obtain target to-be-synchronized data, the login to the cloud account is logged in Before the terminal sends the target to be synchronized data, the method further includes:
    获取登录所述云账号的终端所对应的终端标识;Obtaining a terminal identifier corresponding to the terminal that logs in to the cloud account;
    判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识;Determining whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
    若存在,则确定所述终端标识对应的终端为登录终端。If yes, it is determined that the terminal corresponding to the terminal identifier is a login terminal.
  6. 如权利要求1所述的数据同步方法,其中,在所述接收终端发送的数据同步指令之后,根据所述数据同步指令获取备份数据之前,所述方法还包括:The data synchronization method according to claim 1, wherein the method further comprises: after the data synchronization instruction sent by the receiving terminal, before acquiring the backup data according to the data synchronization instruction, the method further comprises:
    确定所述待同步数据的数据类型;Determining a data type of the data to be synchronized;
    所述根据所述数据同步指令获取备份数据的步骤具体包括:The step of acquiring the backup data according to the data synchronization instruction specifically includes:
    根据所述数据同步指令获取与所述数据类型相同的备份数据。Obtaining the same backup data as the data type according to the data synchronization instruction.
  7. 如权利要求1所述的数据同步方法,其中,在所述接收终端发送的数据同步指令之前,所述方法还包括:The data synchronization method according to claim 1, wherein before the receiving the data synchronization instruction sent by the terminal, the method further comprises:
    检测所述终端中的目标数据是否被修改;Detecting whether target data in the terminal is modified;
    若是,则根据所述被修改的目标数据生成数据同步指令。If so, a data synchronization instruction is generated based on the modified target data.
  8. 一种数据同步装置,其中,包括:指令接收模块、备份数据获取模块、处理模块以及数据发送模块;A data synchronization device, comprising: an instruction receiving module, a backup data acquiring module, a processing module, and a data sending module;
    所述指令接收模块,用于接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;The instruction receiving module is configured to receive a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
    所述备份数据获取模块,用于根据所述数据同步指令获取备份数据;The backup data obtaining module is configured to acquire backup data according to the data synchronization instruction;
    所述处理模块,用于根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;The processing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
    所述数据发送模块,用于向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。The data sending module is configured to send the target to-be-synchronized data to a login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  9. 如权利要求8所述的数据同步装置,其中,所述装置还包括:划分模块;The data synchronization device of claim 8, wherein the device further comprises: a partitioning module;
    所述划分模块,用于在所述备份数据获取模块根据所述数据同步指令获取备份数据之后,所述处理模块根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之前,按照预设规则对所述待同步数据进行划分,以得到多个子数据。The dividing module is configured to perform deduplication processing on the to-be-synchronized data according to the backup data, after the backup data obtaining module acquires backup data according to the data synchronization instruction, to obtain a target to be synchronized Before the data, the data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  10. 如权利要求9所述的数据同步装置,其中,所述处理模块具体包括:数据获取子模块和删除子模块;The data synchronization device of claim 9, wherein the processing module comprises: a data acquisition sub-module and a deletion sub-module;
    所述数据获取子模块,用于获取所述多个子数据中与所述备份数据相同的重复子数据;The data acquisition sub-module is configured to acquire the same repeated sub-data of the plurality of sub-data as the backup data;
    所述删除子模块,用于删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。The deleting sub-module is configured to delete the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
  11. 如权利要求8所述的数据同步装置,其中,所述装置还包括:标识获取模块、判断模块以及确定模块;The data synchronization device of claim 8, wherein the device further comprises: an identification acquisition module, a determination module, and a determination module;
    所述标识获取模块,用于在所述处理模块根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述数据发送模块向登录所述云账号的登录终端发送所述目标待同步数据之前,获取登录所述云账号的终端所对应的终端标识;The identifier obtaining module is configured to: after the processing module performs deduplication processing on the to-be-synchronized data according to the backup data, to obtain the target to-be-synchronized data, the data sending module logs in to the cloud account Before the terminal sends the target to be synchronized data, acquiring a terminal identifier corresponding to the terminal that logs in to the cloud account;
    所述判断模块,用于判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识;The determining module is configured to determine whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
    所述确定模块,用于当所述判断模块判断为是时,确定所述终端标识对应的终端为登录终端。The determining module is configured to: when the determining module determines to be YES, determine that the terminal corresponding to the terminal identifier is a login terminal.
  12. 一种数据同步系统,其中,包括终端和服务器,其中所述服务器包括如权利要求8-11任一项所述的数据同步装置。A data synchronization system, comprising a terminal and a server, wherein the server comprises the data synchronization device according to any one of claims 8-11.
  13. 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行以下步骤:A storage medium, wherein the storage medium stores a plurality of instructions adapted to be loaded by a processor to perform the following steps:
    接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
    根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
    根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
    向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  14. 一种服务器,其中,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:A server, comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading instructions in the memory for performing the following steps:
    接收终端发送的数据同步指令,所述数据同步指令携带云账号和待同步数据;Receiving a data synchronization instruction sent by the terminal, where the data synchronization instruction carries a cloud account and data to be synchronized;
    根据所述数据同步指令获取备份数据;Obtaining backup data according to the data synchronization instruction;
    根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据;Performing deduplication processing on the to-be-synchronized data according to the backup data to obtain target to-be-synchronized data;
    向登录所述云账号的登录终端发送所述目标待同步数据,以使所述登录终端完成数据同步。Sending the target to-be-synchronized data to the login terminal that logs in to the cloud account, so that the login terminal completes data synchronization.
  15. 如权利要求14所述的服务器,其中,在根据所述数据同步指令获取备份数据之后,所述处理器还用于执行以下步骤:The server according to claim 14, wherein after acquiring the backup data according to the data synchronization instruction, the processor is further configured to perform the following steps:
    按照预设规则对所述待同步数据进行划分,以得到多个子数据。The data to be synchronized is divided according to a preset rule to obtain a plurality of sub-data.
  16. 如权利要求15所述的服务器,其中,根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据时,所述处理器用于执行以下步骤:The server according to claim 15, wherein when the data to be synchronized is subjected to deduplication processing according to the backup data to obtain data to be synchronized, the processor is configured to perform the following steps:
    获取所述多个子数据中与所述备份数据相同的重复子数据;Obtaining the same repeated sub-data of the plurality of sub-data as the backup data;
    删除所述待同步数据中的所述重复子数据,以得到删除后的目标待同步数据。Deleting the repeated sub-data in the to-be-synchronized data to obtain the deleted target to-be-synchronized data.
  17. 如权利要求16所述的服务器,其中,获取所述多个子数据中与所述备份数据相同的重复子数据时,所述处理器用于执行以下步骤:The server according to claim 16, wherein when acquiring the same duplicate sub-data of the plurality of sub-data as the backup data, the processor is configured to perform the following steps:
    分别获取所述多个子数据对应的哈希值;Obtaining a hash value corresponding to the multiple sub-data respectively;
    根据所述哈希值判断所述备份数据当中是否存在与所述子数据相同的数据;Determining, according to the hash value, whether the same data as the sub data exists in the backup data;
    若存在,则确定所述子数据为重复子数据。If so, it is determined that the subdata is a duplicate subdata.
  18. 如权利要求14所述的服务器,其中,在所述根据所述备份数据对所述待同步数据进行去重处理,以得到目标待同步数据之后,所述处理器还用于执行以下步骤:The server according to claim 14, wherein after the de-duplication processing is performed on the data to be synchronized according to the backup data to obtain data to be synchronized, the processor is further configured to perform the following steps:
    获取登录所述云账号的终端所对应的终端标识;Obtaining a terminal identifier corresponding to the terminal that logs in to the cloud account;
    判断所述预设标识集合当中是否存在与所述终端标识相同的样本标识;Determining whether a sample identifier that is the same as the terminal identifier exists in the preset identifier set;
    若存在,则确定所述终端标识对应的终端为登录终端。If yes, it is determined that the terminal corresponding to the terminal identifier is a login terminal.
  19. 如权利要求14所述的服务器,其中,在所述接收终端发送的数据同步指令之后,所述处理器还用于执行以下步骤:The server according to claim 14, wherein said processor is further configured to perform the following steps after said data synchronization instruction sent by said receiving terminal:
    确定所述待同步数据的数据类型;Determining a data type of the data to be synchronized;
    所述根据所述数据同步指令获取备份数据的步骤具体包括:The step of acquiring the backup data according to the data synchronization instruction specifically includes:
    根据所述数据同步指令获取与所述数据类型相同的备份数据。Obtaining the same backup data as the data type according to the data synchronization instruction.
  20. 如权利要求14所述的服务器,其中,在所述接收终端发送的数据同步指令之前,所述处理器还用于执行以下步骤:The server according to claim 14, wherein said processor is further configured to perform the following steps before said data synchronization instruction sent by said receiving terminal:
    检测所述终端中的目标数据是否被修改;Detecting whether target data in the terminal is modified;
    若是,则根据所述被修改的目标数据生成数据同步指令。If so, a data synchronization instruction is generated based on the modified target data.
PCT/CN2017/095626 2016-10-25 2017-08-02 Data synchronization method, device and system, storage medium and server WO2018076868A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610949142.1 2016-10-25
CN201610949142.1A CN106487911A (en) 2016-10-25 2016-10-25 A kind of method of data synchronization, device and system

Publications (1)

Publication Number Publication Date
WO2018076868A1 true WO2018076868A1 (en) 2018-05-03

Family

ID=58271694

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095626 WO2018076868A1 (en) 2016-10-25 2017-08-02 Data synchronization method, device and system, storage medium and server

Country Status (2)

Country Link
CN (1) CN106487911A (en)
WO (1) WO2018076868A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545301A (en) * 2018-05-29 2019-12-06 视联动力信息技术股份有限公司 monitoring resource synchronization method and device
CN111930841A (en) * 2020-08-07 2020-11-13 中国工商银行股份有限公司 Data synchronization method and device
CN112347185A (en) * 2019-08-09 2021-02-09 安徽寒武纪信息科技有限公司 Data synchronization method and device and related product
CN113407356A (en) * 2021-05-24 2021-09-17 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113407498A (en) * 2021-06-18 2021-09-17 北京金山云网络技术有限公司 Data synchronization method, device, cloud platform, system and storage medium
CN113923230A (en) * 2020-06-22 2022-01-11 华为技术有限公司 Data synchronization method, electronic device, and computer-readable storage medium
CN114124508A (en) * 2021-11-16 2022-03-01 上海浦东发展银行股份有限公司 Application login method and system
US11886880B2 (en) 2019-04-04 2024-01-30 Cambricon Technologies Corporation Limited Data processing apparatus and related products with descriptor management

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487911A (en) * 2016-10-25 2017-03-08 广东欧珀移动通信有限公司 A kind of method of data synchronization, device and system
CN107015888B (en) * 2017-03-30 2019-06-18 华中科技大学 A kind of data back up method and system based on submodule model
CN107197027B (en) * 2017-06-14 2020-06-12 北京数科网维技术有限责任公司 File synchronization method and cloud platform
CN107135474B (en) * 2017-06-15 2019-12-20 北京一数科技有限公司 Data synchronization method and device and mobile device
CN108551515A (en) * 2018-03-29 2018-09-18 中国联合网络通信集团有限公司 Address book updating method and address list more new system
CN109246686B (en) * 2018-08-29 2021-07-23 湖南人文科技学院 Multi-card user address book updating method and device based on cloud technology
CN111240896B (en) * 2020-01-06 2024-04-02 深圳市卡数科技有限公司 Terminal data synchronization method, device, server and storage medium
CN112115495B (en) * 2020-09-25 2024-07-02 深圳赛安特技术服务有限公司 Offline cloud data storage method, system, computer equipment and storage medium
CN112565455B (en) * 2020-12-23 2023-01-20 深圳市安数科技有限责任公司 Multi-event synchronous processing method, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120059940A1 (en) * 2010-09-02 2012-03-08 Hon Hai Precision Industry Co., Ltd. Terminal device and data synchronization method
CN102404354A (en) * 2010-09-10 2012-04-04 北京创新方舟科技有限公司 Method and device for achieving synchronism of data between updating devices based on internet device
CN103327037A (en) * 2012-03-20 2013-09-25 中兴通讯股份有限公司 Data synchronizing method and device
CN104283926A (en) * 2013-07-10 2015-01-14 腾讯科技(深圳)有限公司 Data synchronization method, device and server
CN106487911A (en) * 2016-10-25 2017-03-08 广东欧珀移动通信有限公司 A kind of method of data synchronization, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624682B (en) * 2011-06-30 2015-01-07 小米科技有限责任公司 Method for managing client data
CN103577280A (en) * 2012-07-30 2014-02-12 北京网秦天下科技有限公司 Method and system for duplicating data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120059940A1 (en) * 2010-09-02 2012-03-08 Hon Hai Precision Industry Co., Ltd. Terminal device and data synchronization method
CN102404354A (en) * 2010-09-10 2012-04-04 北京创新方舟科技有限公司 Method and device for achieving synchronism of data between updating devices based on internet device
CN103327037A (en) * 2012-03-20 2013-09-25 中兴通讯股份有限公司 Data synchronizing method and device
CN104283926A (en) * 2013-07-10 2015-01-14 腾讯科技(深圳)有限公司 Data synchronization method, device and server
CN106487911A (en) * 2016-10-25 2017-03-08 广东欧珀移动通信有限公司 A kind of method of data synchronization, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIANG, TAO ET AL.: "Research and Implement of SyncML Protocol on embedded System", ELECTRONIC TECHNOLOGY & INFORMATION SCIENCE, CHINESE SELECTED DOCTORAL DISSERTATIONS AND MASTER'S THESES FULL-TEXT DATABASE, no. 10, 15 October 2006 (2006-10-15), ISSN: 1671-6779 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545301A (en) * 2018-05-29 2019-12-06 视联动力信息技术股份有限公司 monitoring resource synchronization method and device
CN110545301B (en) * 2018-05-29 2022-06-17 视联动力信息技术股份有限公司 Monitoring resource synchronization method and device
US11886880B2 (en) 2019-04-04 2024-01-30 Cambricon Technologies Corporation Limited Data processing apparatus and related products with descriptor management
CN112347185A (en) * 2019-08-09 2021-02-09 安徽寒武纪信息科技有限公司 Data synchronization method and device and related product
CN113923230A (en) * 2020-06-22 2022-01-11 华为技术有限公司 Data synchronization method, electronic device, and computer-readable storage medium
CN111930841A (en) * 2020-08-07 2020-11-13 中国工商银行股份有限公司 Data synchronization method and device
CN113407356A (en) * 2021-05-24 2021-09-17 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113407498A (en) * 2021-06-18 2021-09-17 北京金山云网络技术有限公司 Data synchronization method, device, cloud platform, system and storage medium
CN114124508A (en) * 2021-11-16 2022-03-01 上海浦东发展银行股份有限公司 Application login method and system

Also Published As

Publication number Publication date
CN106487911A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2018076868A1 (en) Data synchronization method, device and system, storage medium and server
WO2018076812A1 (en) Data request response method and device, storage medium, server and system
WO2018076889A1 (en) Data backup method, device, system, storage medium and server
WO2018076867A1 (en) Data backup deleting method, device and system, storage medium and server
WO2018076841A1 (en) Data sharing method, apparatus, storage medium and server
WO2018076829A1 (en) Terminal data processing method, apparatus, system, storage medium and server
WO2018076840A1 (en) Data sharing method, device, storage medium and server
WO2018120681A1 (en) Data synchronization method, device and system, data processing server, and storage medium
CN104247376A (en) File uploading method in cloud storage, client, application server, and cloud storage system
WO2018076861A1 (en) Data transmission control method, apparatus, storage medium, server and system
WO2018076866A1 (en) Data processing method, device, storage medium, electronic device and server
WO2018076864A1 (en) Data synchronization method, apparatus, storage medium and electronic device
WO2018076819A1 (en) Data upload method, apparatus, storage medium, electronic device and system
WO2018076869A1 (en) Data backup method, apparatus, storage medium and electronic device
WO2018090823A1 (en) Method and system for protecting system partition key data, and terminal
WO2017206862A1 (en) Bright screen lock-based processing method and apparatus, storage medium, and electronic device
WO2017206883A1 (en) Application processing method and apparatus, storage medium, and electronic device
WO2018028128A1 (en) Method for feeding back information of uplink data and related apparatus
WO2016171401A1 (en) Method and device for sharing cooperative editing document
WO2018076818A1 (en) Data backup method, apparatus, electronic device, storage medium, and system
WO2018076870A1 (en) Data processing method and apparatus, storage medium, server, and data processing system
WO2015102220A1 (en) Storage system having security storage device and management method therefor
WO2018076890A1 (en) Data backup method, device, storage medium, server and system
WO2018076872A1 (en) Data backup method, apparatus, storage medium and server
WO2018076811A1 (en) Data sharing method, device, system, storage medium and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17863834

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17863834

Country of ref document: EP

Kind code of ref document: A1