CN103870478B - A kind of method and device for restoring synchrodata - Google Patents

A kind of method and device for restoring synchrodata Download PDF

Info

Publication number
CN103870478B
CN103870478B CN201210535477.0A CN201210535477A CN103870478B CN 103870478 B CN103870478 B CN 103870478B CN 201210535477 A CN201210535477 A CN 201210535477A CN 103870478 B CN103870478 B CN 103870478B
Authority
CN
China
Prior art keywords
synchrodata
database
identification information
newest
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210535477.0A
Other languages
Chinese (zh)
Other versions
CN103870478A (en
Inventor
林晓丹
申玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210535477.0A priority Critical patent/CN103870478B/en
Publication of CN103870478A publication Critical patent/CN103870478A/en
Application granted granted Critical
Publication of CN103870478B publication Critical patent/CN103870478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephonic Communication Services (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a kind of method and device for restoring synchrodata, is related to technical field of communication network, can restore to the synchrodata of loss.The identification information that the embodiment of the present invention passes through the first synchrodata of acquisition, first synchrodata is synchrodata to be restored in terminal, according to the identification information of first synchrodata, first synchrodata corresponding with the identification information of the first synchrodata is inquired in first database, the first database is used to preserve whole identification informations and all the first synchrodata corresponding to the identification information, first synchrodata of inquiry is sent to the second database, second database is for preserving first synchrodata and the corresponding identification information of first synchrodata.Scheme provided in an embodiment of the present invention is adapted for the synchrodata for restoring to lose.

Description

A kind of method and device for restoring synchrodata
Technical field
The present invention relates to technical field of communication network more particularly to a kind of method and devices for restoring synchrodata.
Background technology
Currently, synchronization has been widely used in every field in internet, and different functions is realized, than Such as the bookmark synchronization of browser, the synchronization of the historical records such as webpage is browsed, is led in the terminals such as the synchronization of network hard disc and mobile phone Interrogate the synchronization of record.Manual data synchronization or the mode of automatically synchronizing data may be used during synchrodata.For example, When the bookmark to browser uses manual synchronization, the webpage in browser is saved as into bookmark first, browser can carry at this time Show the database for whether needing the synchronizing web pages to be saved in server, if selection synchronizes the data being saved in server Library, then the related data of the webpage can be saved in while saving as bookmark in the database in server.When to browser Bookmark use automatic synchronization when, while by webpage saves as bookmark in browser, automatically by the related data of the webpage It is saved in the database in server.
Inventor has found that at least there are the following problems in the prior art:It, may be due to user during synchrodata Misoperation or system break down and synchrodata are caused to be lost, cannot be to the synchronization of loss when synchrodata is lost Data are restored, and the permanent loss of synchrodata is caused.
Invention content
The embodiment of the present invention provides a kind of method and device for restoring synchrodata, can to the synchrodata of loss into Row restores.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that:
On the one hand, the embodiment of the present invention provides a kind of method for restoring synchrodata, including:
The identification information of the first synchrodata is obtained, first synchrodata is synchrodata to be restored in terminal;
According to the identification information of first synchrodata, inquiry and first synchrodata in first database First synchrodata corresponding to identification information, the first database is for preserving whole identification informations and all mark Corresponding first synchrodata of information;
First synchrodata of inquiry is sent to the second database, second database is for preserving described the One synchrodata and the corresponding identification information of first synchrodata.
In another embodiment of the invention, before the identification information for obtaining the first synchrodata, further include:
When the terminal and second database synchronization preserve the second synchrodata, where second database Second synchrodata is sent to the first database by server, so that the first database preserves described second together Step data, second synchrodata include first synchrodata.
The first database is with second database in same server;Alternatively, the first database and institute The second database is stated in different servers.
The identification information is the time of preservation synchrodata or the identification information is to preserve at least one every time together Batch number when step data is to second database.
In another embodiment of the invention, first synchrodata is stored in second database, including:
Receive the identification information for the current sync data that the terminal is sent;
According to the identification information of the current sync data, next mark of the identification information of the current sync data is determined Know the newest identification information that information is first synchrodata;
The newest identification information of first synchrodata and first synchrodata are stored in second data In library.
In another embodiment of the invention, first synchrodata is stored in second database, including:
First synchrodata is stored in second database, and determines and preserves first synchrodata Current time is the newest identification information of first synchrodata.
It is described first synchrodata of inquiry is sent to the second database after, further include:
Server where second database by first synchrodata and first synchrodata most New logo information is sent to the first database, to preserve first synchrodata and institute in the first database State the newest identification information of the first synchrodata.
In another embodiment of the invention, it is described by first synchrodata of inquiry be sent to the second database it Afterwards, further include:
When second database preserves first synchrodata, first synchronizes described in the terminal simultaneous display Data.
On the other hand, the embodiment of the present invention provides a kind of device restoring synchrodata, including:
Acquisition module, the identification information for obtaining the first synchrodata, first synchrodata are extensive to be waited in terminal Multiple synchrodata;
Enquiry module, for according to the identification information of first synchrodata, in first database inquiry with it is described First synchrodata corresponding to the identification information of the first synchrodata, the first database for preserve whole identification informations with And the first synchrodata that the whole identification information is corresponding;
First sending module, for first synchrodata of inquiry to be sent to the second database, second number According to library for preserving first synchrodata and the corresponding identification information of first synchrodata.
In another embodiment of the invention, described device further includes:
Second sending module is used for when the terminal and second database synchronization preserve the second synchrodata, will Second synchrodata is sent to the first database, so that the first database preserves second synchrodata, Second synchrodata includes first synchrodata.
Described device further includes:The first database;Alternatively, the first database and second database;
Wherein, the first database, for preserving fully synchronized data and the corresponding mark letter of fully synchronized data Breath;Second database preserves the synchrodata and the corresponding mark of the synchrodata that the terminal is shown for synchronous Know information.
The identification information is the time of preservation synchrodata or the identification information is to preserve at least one every time together Batch number when step data is to second database.
In another embodiment of the invention, the acquisition module, is additionally operable to:Obtain the mark letter of current sync data Breath;
Described device further includes:
Processing module determines the mark of the current sync data for the identification information according to the current sync data The next identification information for knowing information is the newest identification information of first synchrodata;And by first synchrodata Newest identification information is stored in first synchrodata in second database.
The processing module, is additionally operable to:First synchrodata is stored in second database, and determines and protects The current time for depositing first synchrodata is the newest identification information of first synchrodata.
In another embodiment of the invention, second sending module, be additionally operable to first synchrodata and The newest identification information of first synchrodata is sent to the first database, to be preserved in the first database The newest identification information of first synchrodata and first synchrodata;Alternatively,
The acquisition module is additionally operable to the described first same step number that the server where obtaining second database is sent According to this and the newest identification information of first synchrodata, to preserve the described first same step number in the first database According to this and the newest identification information of first synchrodata.
In another embodiment of the invention, described device further includes:
Display module, for when second database preserves first synchrodata, being synchronized in the terminal aobvious Show first synchrodata.
The embodiment of the present invention provides a kind of method and device for restoring synchrodata, by the mark for obtaining the first synchrodata Know information, first synchrodata is synchrodata to be restored in terminal, then according to the mark of first synchrodata Know information, first synchrodata corresponding with the identification information of the first synchrodata is inquired in first database, then will First synchrodata of inquiry is sent to the second database, and second database is for preserving first synchrodata And the corresponding identification information of first synchrodata.Compared with the synchrodata that cannot restore to lose in the prior art, this Inventive embodiments can be by preserving in all synchrodatas to first database, can when some synchrodatas are lost Synchrodata to be restored is needed to be inquired in first database, then synchrodata to be restored is restored, is realized The purpose that the synchrodata of loss is restored.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without having to pay creative labor, may be used also for those of ordinary skill in the art With obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow chart of the method for recovery synchrodata that the embodiment of the present invention 1 provides;
Fig. 2 is the flow chart for another method for restoring synchrodata that the embodiment of the present invention 1 provides;
Fig. 3 is a kind of flow chart of the method for the first synchrodata of preservation that the embodiment of the present invention 1 provides;
Fig. 4 is a kind of block diagram of the device for recovery synchrodata that the embodiment of the present invention 2 provides;
Fig. 5 is the block diagram for another device for restoring synchrodata that the embodiment of the present invention 2 provides.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment shall fall within the protection scope of the present invention.
Embodiment 1
As shown in Figure 1, the embodiment of the present invention provides a kind of method for restoring synchrodata, the executive agent of this method can be with For server, this approach includes the following steps:
Step 101, the identification information of the first synchrodata is obtained, the first synchrodata is same step number to be restored in terminal According to;
After user deletes the identification information of the synchrodata in terminal, the database in server corresponds to identification information Synchrodata also can synchronization removal cause relevant synchrodata that will lose so that user so after user misoperation This synchrodata can not be obtained again.
In the present embodiment, this method is applied to the browser on mobile phone or computer, can carry out the book in browser Label restore synchrodata;Alternatively, this method is applied to the address list on mobile phone, address list can be carried out and restore synchrodata.Example Such as, the identification information that the bookmark name in browser can be regarded as synchrodata, when user preserves a bookmark name, clothes It is engaged in also synchronizing the synchrodata for preserving the boomard comment in the database of device;When user deletes a bookmark name, service In the database of device also can the synchronization removal boomard comment synchrodata;Alternatively, can be the contact person of address list in mobile phone Name regards the identification information of synchrodata as, also can be same in the database of server when user preserves a name of contact person Step preserves the synchrodata of the address list content(The corresponding phone number data of such as contact person);When user deletes a contact When people's name, in the database of server also can the synchronization removal address list content synchrodata.
The identification information of first synchrodata is for searching first synchrodata.In this step, from the first same step number According to identification information in can obtain following information:Preserve the specific time of the first synchrodata, the quantity of the first synchrodata, Affiliated type of first synchrodata etc..Such as:The identification information of first synchrodata can be expressed as:ABCDEFGHI, In, the first six digits ABCDEF of the identification information of the first synchrodata can indicate to preserve the specific time of first synchrodata, For example, on 01 01st, 2012 saves first synchrodata, then 120101 as preserving the specific of first synchrodata Time;The G of centre one of the identification information of first synchrodata can indicate the affiliated type of the first synchrodata, for example, newly Hearing type can indicate that types of entertainment can be indicated with 2 with 1, and life type can be indicated with 3;The mark of first synchrodata Rear two HI for knowing information can indicate the quantity of the synchrodata within the same specific time, for example, at 01 month 2012 01 Three synchrodatas in relation to news type are in a few days saved, the identification information of first synchrodata can be expressed as 120101101,120101102,120101103.Or it can be using the detail time of preservation synchrodata as the synchrodata Identification information, for example, 05 divided at 2012 01 month 01 day 08 and save within 30 seconds a synchrodata, then the synchrodata Identification information can be expressed as 120101080530.
The present embodiment is not intended to limit the representation of the identification information of synchrodata, and the identification information of synchrodata can have The method of a variety of expressions, does not repeat one by one here.
Step 102, according to the identification information of the first synchrodata, inquiry and the first synchrodata in first database First synchrodata corresponding to identification information, first database are corresponded to for preserving whole identification informations and whole identification informations The first synchrodata;
Work as user misoperation, when the first synchrodata being caused to be lost, in general, the first synchrodata of loss is It can not give for change.In the present embodiment, this can be solved the problems, such as.The first database is considered as backup database, is used for Preserve fully synchronized data and the corresponding identification information of fully synchronized data.When the first synchrodata is lost, can pass through The identification information of first synchrodata is searched in first database, then can be with when finding identical identification information Determine the synchrodata that data corresponding to identical identification information are to be restored, i.e. the first synchrodata.It should be noted that First database is not synchronous with terminal, i.e., when terminal preserves data, first database does not preserve this data, but by with The data that server where the second database that terminal synchronizes is sent are preserved so that whole numbers are preserved in first database According to.Second database is considered as sync database.
It should be noted that first database can according to the size of self EMS memory, to the fully synchronized data of preservation into Row limits, for example, first database can preserve the synchrodata of 50-60 items, when being continuously increased new synchrodata and right , can be according to the holding time of synchrodata due to first database limited memory when answering the identification information of synchrodata, it will be compared with It is early to preserve and be automatically deleted more than the synchrodata limited;Alternatively, passing through server where first database and terminal Connection, user can independently delete synchrodata by the display of terminal, smaller to delete some significance levels Synchrodata.
Step 103, the first synchrodata of inquiry is sent to the second database, the second database is same for preserving first Step data and the corresponding identification information of the first synchrodata.
Second database is the database synchronous with terminal, right when terminal preserves the identification information of a synchrodata It answers, the identification information and the synchrodata of the synchrodata is preserved in the second database;When one synchronization of terminal deletion It is corresponding when the identification information of data, the identification information of the synchronization removal synchrodata and the synchronization in the second database Data.
The embodiment of the present invention provides a kind of method for restoring synchrodata, and the mark by obtaining the first synchrodata is believed Breath, the first synchrodata is synchrodata to be restored in terminal, then according to the identification information of the first synchrodata, first Inquire first synchrodata corresponding with the identification information of the first synchrodata in database, then by the first synchrodata of inquiry It is sent to the second database, the second database is for preserving the first synchrodata and the corresponding mark letter of the first synchrodata Breath can achieve the purpose that restore the synchrodata of loss that is, by preserving the first database of all synchrodatas.
As shown in Fig. 2, the embodiment of the present invention provides the flow chart of another method for restoring synchrodata, this method is held Row main body can be server, and this approach includes the following steps:
Step 201, terminal obtains the identification information of the first synchrodata according to the first synchrodata that user selects, and will The identification information of first synchrodata is sent to first server, which is stored in standby by first server again In part database;
First synchrodata is synchrodata to be restored in terminal.First server is the service where backup database Device;Backup database is used to store the identification information of fully synchronized data and corresponding fully synchronized data, and backup database is For first database.
After user deletes the identification information of the synchrodata in terminal, the database in server corresponds to identification information Synchrodata also can synchronization removal cause relevant synchrodata that will lose so that user so after user misoperation This synchrodata can not be obtained again.In the present embodiment, this method is applied to the browser on mobile phone or computer, can carry out Bookmark in browser restores synchrodata;Alternatively, this method is applied to the address list on mobile phone, address list recovery can be carried out Synchrodata.
In this step, following information can be obtained from the identification information of the first synchrodata:Preserve the first same step number According to the specific time, the first synchrodata quantity, the affiliated type of the first synchrodata etc..Such as:First synchrodata Identification information can be expressed as:ABCDEFGHI, wherein the first six digits ABCDEF of the identification information of the first synchrodata can be with table Show the specific time for preserving first synchrodata, for example, on 01 01st, 2012 saves first synchrodata, then 120101 as the specific time for preserving first synchrodata;The G of centre one of the identification information of first synchrodata can be with Indicate the affiliated type of the first synchrodata, for example, news type can be indicated with 1, types of entertainment can be indicated with 2, life Type can be indicated with 3;Rear two HI of the identification information of first synchrodata can be indicated within the same specific time The quantity of synchrodata, for example, saving three synchrodatas in relation to news type on 01 01st, 2012, this first The identification information of synchrodata can be expressed as 120101101,120101101,120101103.Or it can be synchronized preserving Identification information of the detail time of data as the synchrodata, for example, at 2012 01 month 01 day 08 05 divide 30 seconds preserve One synchrodata, then the identification information of the synchrodata can be expressed as 120101080530.
For example, the bookmark name in browser can be regarded as the identification information of synchrodata, when user preserves a book When signature claims, the synchrodata for preserving the boomard comment can be also synchronized in the database of server;When user deletes a bookmark When title, in the database of server also can the synchronization removal boomard comment synchrodata;Alternatively, can be being communicated in mobile phone The name of contact person of record regards the identification information of synchrodata as, when user preserves a name of contact person, the data of server Also the synchrodata for preserving the address list content can be synchronized in library(The corresponding phone number data of such as contact person);When user deletes When except a name of contact person, in the database of server also can the synchronization removal address list content synchrodata.
The present embodiment is not intended to limit the representation of the identification information of synchrodata, and the identification information of synchrodata can have The method of a variety of expressions, does not repeat one by one here.
Step 202, first server receive terminal send the first synchrodata identification information, then according to this first The identification information of synchrodata inquires first synchronization corresponding with the identification information of first synchrodata in backup database Data;
Wherein, backup database is for preserving fully synchronized data and the corresponding identification information of fully synchronized data.Separately Outside, first server can be defined the fully synchronized data of preservation according to the size of backup database memory.For example, Backup database can preserve the synchrodata of 50-60 items, when being continuously increased new synchrodata and corresponding synchrodata When identification information, due to backup database limited memory, more early it can will preserve and surpass according to the holding time of synchrodata The synchrodata limited is crossed to be automatically deleted;Alternatively, by the connection of first server and terminal, user can pass through the aobvious of terminal Show and synchrodata is independently deleted, to delete the smaller synchrodata of some significance levels.
Work as user misoperation, when the first synchrodata being caused to be lost, in general, the first synchrodata of loss is It can not give for change.In the present embodiment, this can be solved the problems, such as.In terminal the second same step number of preservation synchronous with sync database According to when, which is sent to first server by second server, and first server again protects the second synchrodata There are in backup database.Wherein, second server is the server where sync database;Sync database is same with terminal The database of step;Second synchrodata is any bar synchrodata, may include the first synchrodata.
It should be noted that first server is for preserving backup database, second server is for preserving synchrodata Library.Backup database can be in identical server with sync database, i.e., first server and second server are same Server;Backup database and sync database can also be in different servers, i.e. first server and second server For different servers.
When backup database and sync database in a server when, server inquires the in backup database When one synchrodata, the first synchrodata is sent to sync database, and first synchrodata is preserved by sync database.
When backup database is stored in first server, and sync database is stored on second server, when first When server inquires the first synchrodata in backup database, the first synchrodata is sent to the second clothes by first server First synchrodata is stored in sync database by business device, second server again.
In the present embodiment, it is described in different servers from sync database with backup database.
Step 203, first synchrodata of inquiry is sent to second server by first server, and second server is again First synchrodata is stored in sync database;
Specifically, as shown in figure 3, the first synchrodata is stored in the step in sync database such as by second server Under:
Step 301, second server receives the first synchrodata that first server is sent;
When first server inquires corresponding first by the identification information of the first synchrodata in backup database After synchrodata, the first synchrodata is sent to second server by first server, so as to the same step number in second server The first synchrodata is preserved according to library.
Step 302, second server receives the identification information for the current sync data that terminal is sent;
The identification information of current sync data indicates to preserve the identification information of newest synchrodata in the terminal.
Step 303, according to the identification information of current sync data, second server determines the mark letter of current sync data Next identification information of breath is the newest identification information of the first synchrodata;
In this step, the information that the identification information of synchrodata includes has:Preserve specific time, the synchronization of synchrodata The quantity of data, the affiliated type of synchrodata.For example, the type of the first synchrodata is news type, current sync data Identification information for news type is 121101103, it may be determined that the newest identification information of the first synchrodata is 121101104。
Step 304, it when the first synchrodata is stored in sync database by second server, determines and preserves the first same step number According to current time be synchrodata newest identification information;
In this step, the information that the identification information of synchrodata includes is to preserve the detail time of synchrodata.For example, By the first synchrodata be stored in the time of sync database be 01 day 09 November in 2012 when 25 divide 30 seconds, then the first same step number According to newest identification information can be 121101092530, then by the newest identification information of the first synchrodata: 121101092530 are also stored in sync database.
It should be noted that when the identification information of synchrodata is to preserve the time of the synchrodata, in first service First synchrodata is sent to second server by device, and the first synchrodata is stored in sync database by second server again In, sync database is not necessarily to receive the identification information of current sync data, directly preserves the detailed of the first synchrodata according to current The newest identification information of the first synchrodata is arranged in the thin time.
It should be noted that step 303 is step arranged side by side with step 304, that is, determine the identification information of the first synchrodata Two ways.It completes only execute step 303 after step 302 specifically, executing, can also only execute step 304. Step 304 is indicated with dotted line frame in attached drawing 3, to indicate that step 303 can be selected to execute with a step in step 304, when So it can also indicate step 303 with dotted line frame.
Step 305, the newest identification information of the first synchrodata and the first synchrodata are stored in sync database.
It should be noted that the operating method of step 301- steps 305 is that the first synchrodata is stored in synchrodata Step in library continues to execute step 204 after being stored in sync database to the first synchrodata.
Step 204, in the first synchrodata simultaneous display to terminal sync database preserved;
When terminal preserves the identification information of the second synchrodata, the second synchrodata is any bar synchrodata, corresponding , the identification information of second synchrodata and the second synchrodata of corresponding identification information are preserved in sync database; Corresponding when the identification information of terminal synchronization removal the second synchrodata of any bar, synchronization removal should in the second database Second synchrodata of the identification information of the second synchrodata and corresponding identification information.First server will inquire first Synchrodata is sent to second server, when the first synchrodata is stored in sync database by second server again, due to end The synchronized links at end and second server can preserve the identification information of the first synchrodata, and display first in the terminal Synchrodata.
Step 205, second server believes the newest mark of first synchrodata of preservation and the first synchrodata Breath is sent to first server, and first server again protects the newest identification information of the first synchrodata and the first synchrodata There are in backup database.
When the first synchrodata is stored in sync database again, and when with newest identification information, illustrate this first Synchrodata has been successfully recovered.
After the first synchrodata is successfully recovered, the newest mark by first synchrodata and the first synchrodata is needed Know information and be sent to first server, first server again believes the newest mark of the first synchrodata and the first synchrodata Breath is stored in backup database, so that backup database preserves the newest mark of the first synchrodata and the first synchrodata Information improves the information of whole second synchrodatas in backup database in time.
The embodiment of the present invention provides a kind of method for restoring synchrodata, and first server is by obtaining the first synchrodata Identification information, the first synchrodata is synchrodata to be restored in terminal, is then believed according to the mark of the first synchrodata Breath, first server inquire first synchrodata corresponding with the identification information of the first synchrodata in backup database, then First synchrodata of inquiry is sent to the second database, the second database is for preserving the first synchrodata and first together The corresponding identification information of step data.The embodiment of the present invention can restore the synchrodata of loss, and user is facilitated to find The synchrodata of loss.
Embodiment 2
As shown in figure 4, the embodiment of the present invention provides a kind of device restoring synchrodata, including:Acquisition module 401, is looked into Module 402 is ask, the first sending module 403, which can be server.
Acquisition module 401, the identification information for obtaining the first synchrodata, the first synchrodata are to be restored in terminal Synchrodata;
After user deletes the identification information of the synchrodata in terminal, the database in server corresponds to identification information Synchrodata also can synchronization removal cause relevant synchrodata that will lose so that user so after user misoperation This synchrodata can not be obtained again.In the present embodiment, which is applied to the browser on mobile phone or computer, can carry out Bookmark in browser restores synchrodata;Alternatively, this method is applied to the address list on mobile phone, address list recovery can be carried out Synchrodata.
Identification information is to preserve time or the identification information of synchrodata to arrive to preserve at least one synchrodata every time Batch number when the second database.For example, following information can be obtained from the identification information of the first synchrodata:Preserve first The specific time of synchrodata, the quantity of the first synchrodata, affiliated type of the first synchrodata etc..Such as:First synchronizes The identification information of data can be expressed as:ABCDEFGHI, wherein the first six digits ABCDEF of the identification information of the first synchrodata The specific time of first synchrodata can be indicated to preserve, for example, on 01 01st, 2012 saves first synchrodata, Then 120101 as the specific time for preserving first synchrodata;The G of centre one of the identification information of first synchrodata can To indicate the affiliated type of the first synchrodata, for example, news type can be indicated with 1, types of entertainment can be indicated with 2, raw Type living can be indicated with 3;Rear two HI of the identification information of first synchrodata can be indicated within the same specific time Synchrodata quantity, for example, saving three synchrodatas in relation to news type on 01 01st, 2012, this The identification information of one synchrodata can be expressed as 120101101,120101102,120101103.Or it can be same preserving Identification information of the detail time of step data as the synchrodata, for example, at 2012 01 month 01 day 08 05 divide 30 seconds protect A synchrodata is deposited, then the identification information of the synchrodata can be expressed as 120101080530.
The present embodiment is not intended to limit the representation of the identification information of synchrodata, and the identification information of synchrodata can have The method of a variety of expressions, does not repeat one by one here.
After the identification information that acquisition module 401 obtains the first synchrodata, enquiry module 402, for according to first The identification information of synchrodata inquires the first same step number corresponding with the identification information of the first synchrodata in first database It is used to preserve whole identification informations and the first synchrodata corresponding to whole identification informations according to, first database;
Due to user misoperation, when the first synchrodata being caused to be lost, in general, the first synchrodata of loss It can not give for change.In the present embodiment, this can be solved the problems, such as.The first database is considered as backup database, uses In the fully synchronized data of preservation and the corresponding identification information of fully synchronized data.When the first synchrodata is lost, Ke Yitong The identification information for crossing the first synchrodata is searched in first database, when finding identical identification information, then may be used It is synchrodata to be restored, i.e. the first synchrodata with data corresponding to the identical identification information of determination.It needs to illustrate It is that first database is not synchronous with terminal, i.e., when terminal preserves data, first database does not preserve this data, but logical The data that server where crossing the second database synchronous with terminal is sent are preserved so that are preserved in first database complete Portion's data.Second database is considered as sync database.
It is inquired in enquiry module 402 after the first synchrodata corresponding with the identification information of the first synchrodata, first Sending module 403, the first synchrodata for that will inquire are sent to the second database, and the second database is same for preserving first Step data and the corresponding identification information of the first synchrodata.
Second database is the database synchronous with terminal, right when terminal preserves the identification information of a synchrodata It answers, the identification information and the synchrodata of the synchrodata is preserved in the second database;When one synchronization of terminal deletion It is corresponding when the identification information of data, the identification information of the synchronization removal synchrodata and the synchronization in the second database Data.
It is further alternative, as shown in figure 5, the device further includes:Second sending module 404;
Before the identification information that acquisition module 401 obtains the first synchrodata, the second sending module 404, at end When end and the second database synchronization preserve the second synchrodata, the second synchrodata is sent to first database, so as to first Database preserves the second synchrodata, may include the first synchrodata in the second synchrodata.
It is further alternative, as shown in figure 5, the device further includes:405 He of first database 405 or first database Second database 406;
Wherein, first database 405, for preserving fully synchronized data and the corresponding mark letter of fully synchronized data Breath;Second database 406 preserves the synchrodata and the corresponding identification information of synchrodata that terminal is shown for synchronous. That is first database and the second database can be in same servers or first database and the second database can be with In different servers, such as first database, in first server, the second database is in second server.
It is further alternative, as shown in figure 5, the device further includes:Processing module 407;
After the identification information that acquisition module 401 obtains the first synchrodata, acquisition module 401 also obtains current same The identification information of step data;The identification information of current sync data is the identification information for preserving newest synchrodata in the terminal.
After the identification information that acquisition module 401 obtains current sync data, processing module 407 is current for determining Next identification information of the identification information of synchrodata is the newest identification information of the first synchrodata;And by the first same step number According to newest identification information and the first synchrodata be stored in the second database.
For example, the information that the identification information of the first synchrodata includes has:Preserve the first synchrodata the specific time, The quantity of one synchrodata, the affiliated type of the first synchrodata.For example, the type of the first synchrodata is news type, when Preamble data is that the identification information of news type is 121101103, it may be determined that the newest identification information of the first synchrodata It is 121101104.Processing module 407 is additionally operable to the first synchrodata being stored in the second database, and determines and preserve first The current time of synchrodata is the newest identification information of synchrodata.
Further alternative, when preserving first database and the second database in server, processing module 407 is by first Synchrodata is stored in the second database, and determine preserve the first synchrodata current time be the first synchrodata most New logo information, at the same by the newest identification information of synchrodata it is corresponding with the first synchrodata preserve.
For example, the information that the identification information of synchrodata includes is to preserve the detail time of synchrodata.For example, by first 25 divide 30 seconds when the time that synchrodata is stored in the second database is 01 day 09 November in 2012, then the first synchrodata is most New logo information can be 121101092530, then by the newest identification information of the first synchrodata:121101092530 It is stored in the second database.
Further alternative, when first database and the second database are stored in the same server, second sends mould The newest identification information of first synchrodata and the first synchrodata is sent to first database by block 404, so as to first The newest identification information of the first synchrodata and the first synchrodata is preserved in database;
Further alternative, when preserving first database in server, acquisition module 401 obtains where the second database Server send the first synchrodata and the first synchrodata newest identification information, to be protected in first database Deposit the newest identification information of the first synchrodata and the first synchrodata.
Further, which further includes:Display module 408;
When the second database preserves the first synchrodata, display module 408 is in the first synchrodata of terminal simultaneous display.
The embodiment of the present invention provides a kind of device restoring synchrodata, and acquisition module is by obtaining the first synchrodata Identification information, then enquiry module is according to the identification information of the first synchrodata, and inquiry is synchronous with first in first database First synchrodata of inquiry is sent to second by the first synchrodata corresponding to the identification informations of data, the first sending module again Database, the second database is for preserving the first synchrodata and the corresponding identification information of the first synchrodata.The present invention is real The synchrodata of loss can be restored by applying example so that user can give the synchrodata lost for change.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (14)

1. a kind of method for restoring synchrodata, which is characterized in that including:
The identification information of the first synchrodata is obtained, first synchrodata is synchrodata to be restored in terminal;
According to the identification information of first synchrodata, the mark of inquiry and first synchrodata in first database Corresponding first synchrodata of information, the first database is for preserving whole identification informations and all identification information Corresponding first synchrodata;
First synchrodata of inquiry is sent to the second database, second database is synchronous with the terminal Database, second database is for preserving first synchrodata and the corresponding mark letter of first synchrodata Breath;
First synchrodata is stored in second database;
It determines the newest identification information of first synchrodata, and is stored in second database;
The newest identification information of first synchrodata and first synchrodata is stored in the first database.
2. according to the method described in claim 1, it is characterized in that, it is described obtain the first synchrodata identification information it Before, further include:
When the terminal and second database synchronization preserve the second synchrodata, the service where second database Second synchrodata is sent to the first database by device, so that the first database preserves the second same step number According to second synchrodata includes first synchrodata.
3. according to the method described in claim 1, it is characterized in that, the identification information be preserve synchrodata time, or Identification information described in person is to preserve batch number of at least one synchrodata to second database when every time.
4. according to the method described in claim 3, it is characterized in that, the newest mark letter of the determination first synchrodata Breath, including:
Obtain the identification information of current sync data;
According to the identification information of the current sync data, next mark letter of the identification information of the current sync data is determined Breath is the newest identification information of first synchrodata.
5. according to the method described in claim 3, it is characterized in that, the newest mark letter of the determination first synchrodata Breath, including:
The current time for preserving first synchrodata is determined as to the newest identification information of first synchrodata.
6. according to the method described in claim 1, it is characterized in that, described that first synchrodata is synchronous with described first The newest identification information of data is stored in the first database, including:
Server where second database is by the newest mark of first synchrodata and first synchrodata Know information and be sent to the first database, to preserve first synchrodata and described the in the first database The newest identification information of one synchrodata.
7. according to the method described in claim 1, it is characterized in that, described be sent to by first synchrodata of inquiry After two databases, further include:
When second database preserves first synchrodata, the first same step number described in the terminal simultaneous display According to.
8. a kind of device restoring synchrodata, which is characterized in that including:
Acquisition module, the identification information for obtaining the first synchrodata, first synchrodata are to be restored in terminal Synchrodata;
Enquiry module, for the identification information according to first synchrodata, the inquiry and described first in first database First synchrodata corresponding to the identification information of synchrodata, the first database is for preserving whole identification informations and complete First synchrodata corresponding to identification information described in portion;
First sending module, for first synchrodata of inquiry to be sent to the second database, second database For the database synchronous with the terminal, second database is for preserving first synchrodata and described first together The corresponding identification information of step data;
Processing module, for first synchrodata to be stored in second database;
The processing module is additionally operable to determine the newest identification information of first synchrodata, and is stored in second number According in library;
The processing module is additionally operable to preserve the newest identification information of first synchrodata and first synchrodata In the first database.
9. device according to claim 8, which is characterized in that described device further includes:
Second sending module is used for when the terminal and second database synchronization preserve the second synchrodata, will be described Second synchrodata is sent to the first database, described so that the first database preserves second synchrodata Second synchrodata includes first synchrodata.
10. device according to claim 8, which is characterized in that
The identification information is the time of preservation synchrodata or the identification information is to preserve at least one same step number every time Batch number when according to second database.
11. device according to claim 10, which is characterized in that
The acquisition module is additionally operable to obtain the identification information of current sync data;
The processing module is additionally operable to next identification information of the identification information of the current sync data being determined as described The newest identification information of one synchrodata.
12. device according to claim 10, which is characterized in that
The processing module is additionally operable to the current time for preserving first synchrodata being determined as first synchrodata Newest identification information.
13. device according to claim 9, which is characterized in that
Second sending module is additionally operable to believe the newest mark of first synchrodata and first synchrodata Breath is sent to the first database, to preserve first synchrodata and described first in the first database The newest identification information of synchrodata;Alternatively,
The acquisition module, first synchrodata that the server where being additionally operable to obtain second database is sent with And the newest identification information of first synchrodata, so as to preserved in the first database first synchrodata with And the newest identification information of first synchrodata.
14. device according to claim 8, which is characterized in that described device further includes:
Display module is used for when second database preserves first synchrodata, in the terminal simultaneous display institute State the first synchrodata.
CN201210535477.0A 2012-12-12 2012-12-12 A kind of method and device for restoring synchrodata Active CN103870478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210535477.0A CN103870478B (en) 2012-12-12 2012-12-12 A kind of method and device for restoring synchrodata

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210535477.0A CN103870478B (en) 2012-12-12 2012-12-12 A kind of method and device for restoring synchrodata

Publications (2)

Publication Number Publication Date
CN103870478A CN103870478A (en) 2014-06-18
CN103870478B true CN103870478B (en) 2018-09-25

Family

ID=50909022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210535477.0A Active CN103870478B (en) 2012-12-12 2012-12-12 A kind of method and device for restoring synchrodata

Country Status (1)

Country Link
CN (1) CN103870478B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559440B (en) * 2015-09-25 2020-04-28 中兴通讯股份有限公司 Data processing method and device
CN105512171B (en) * 2015-11-23 2019-05-21 北京奇虎科技有限公司 The method and device of database synchronization
CN111611229B (en) * 2020-06-11 2023-05-26 上海乾臻信息科技有限公司 Data storage method and device for data storage

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7472342B2 (en) * 2001-10-24 2008-12-30 Bea Systems, Inc. System and method for portal page layout
GB0308264D0 (en) * 2003-04-10 2003-05-14 Ibm Recovery from failures within data processing systems
US8095511B2 (en) * 2003-06-30 2012-01-10 Microsoft Corporation Database data recovery system and method
US7822831B2 (en) * 2003-07-31 2010-10-26 International Business Machines Corporation Method, system and program product for preserving and restoring mobile device user settings
DE602004026422D1 (en) * 2004-02-25 2010-05-20 Microsoft Corp DATABASE DATA RESTORATION SYSTEM AND METHOD
CN100573462C (en) * 2004-12-30 2009-12-23 伊姆西公司 data recovery system and method
EP1708094A1 (en) * 2005-03-31 2006-10-04 Ubs Ag Computer network system for constructing, synchronizing and/or managing a second database from/with a first database, and methods therefore
CN101677314B (en) * 2008-09-18 2013-01-09 华为终端有限公司 Method, device and system of identification of synchronous data operation
CN101436207B (en) * 2008-12-16 2011-01-19 浪潮通信信息系统有限公司 Data restoring and synchronizing method based on log snapshot

Also Published As

Publication number Publication date
CN103870478A (en) 2014-06-18

Similar Documents

Publication Publication Date Title
CN103294675B (en) Data-updating method and device in a kind of distributed memory system
CN109062489B (en) Message processing method, message processing device, storage medium and electronic device
CN101080056B (en) A management method and system of network browser collection folder of mobile terminal
CN110209726A (en) Distributed experiment & measurement system system, method of data synchronization and storage medium
US8620366B2 (en) Data synchronization method between mobile terminal and server
CN105208545B (en) Communication data management method, device and server based on virtual SIM card
CN105930121B (en) The person's handwriting synchronous method and system of multi-client
CN105407117B (en) The methods, devices and systems of distributed backup data
CN101557427A (en) Method for providing diffluent information and realizing the diffluence of clients, system and server thereof
CN103905495B (en) A kind of synchronous method and background server of application
CN102624682B (en) Method for managing client data
CN104901983B (en) A kind of information synchronization method, apparatus and system
CN104333501B (en) Contact list display method and device
CN102223361A (en) Communication systems and data synchronization methods
CN102722428A (en) Address book backup and recovery method and address book backup and recovery device
CN104283926A (en) Data synchronization method, device and server
CN103631933A (en) Distributed duplication elimination system-oriented data routing method
CN102421091A (en) Address book updating method and system
CN107231400A (en) The synchronous method and device of a kind of data
CN104899161B (en) A kind of caching method of the continuous data protection based on cloud storage environment
CN103870478B (en) A kind of method and device for restoring synchrodata
CN104750729B (en) A kind of data managing method and data management system based on journal file
CN102984357A (en) Contact person information managing method and managing device
CN105915636B (en) A kind of synchronous method and device of contact information
CN102769660A (en) Cloud server, terminal and data backing up method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant