CN103428245A - Method for data backup and recovery, terminal device and server - Google Patents

Method for data backup and recovery, terminal device and server Download PDF

Info

Publication number
CN103428245A
CN103428245A CN201210158971XA CN201210158971A CN103428245A CN 103428245 A CN103428245 A CN 103428245A CN 201210158971X A CN201210158971X A CN 201210158971XA CN 201210158971 A CN201210158971 A CN 201210158971A CN 103428245 A CN103428245 A CN 103428245A
Authority
CN
China
Prior art keywords
data
server
integer
backed
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201210158971XA
Other languages
Chinese (zh)
Inventor
房志勇
赵云涛
孔凯平
陈和平
王赟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201210158971XA priority Critical patent/CN103428245A/en
Publication of CN103428245A publication Critical patent/CN103428245A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The invention discloses a method for data backup, and the method is used for saving flows. The method includes the steps that for every first data of M first data, M second data are obtained and correspond to the M first data, the data capacity of the i<th> first data of the M first data is larger than that of i<th> second data of the M second data, wherein 1<=I<= M, and M is a positive integer; the M second data are sent to a server so that the server determines whether the M first data include K first data to be backed up or not, wherein K is a positive integer, and K<=M; when a compared result obtained from the server shows that the M first data include the K first data to be backed up, the K first data are sent to the server so that the server can back up the K first data. The invention further discloses a method for data recovery, a corresponding terminal device and the corresponding server.

Description

Data backup, restoration methods and terminal equipment, server
Technical field
The present invention relates to computer and the communications field, particularly data backup, restoration methods and terminal equipment, server.
Background technology
Along with the arrival in mobile Internet epoch, the backup of data and recovery have become a common requirements, as contact person, picture, note etc.But, in the back up or restore data, often can expend more flow.
The solution of prior art: each back up or restore, all need to send all data to be backed up to server, for example send all contact datas or all note data.
But, in the process of present inventor's invention technical scheme in realizing the embodiment of the present application, find that at least there is following technical problem in above-mentioned technology:
Comparatively waste flow, and the time of back up or restore is longer.
Summary of the invention
The embodiment of the present invention provides data backup, restoration methods and terminal equipment, server, has solved the technical problem of in the prior art, when data backup or recovery, comparatively wasting flow, has realized saving the technique effect of flow.
A kind of data back up method, be applied to the terminal equipment that can be connected with server, comprises the following steps:
For each first data in M the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer;
Described M the second data are sent to described server, for described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M;
When the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.
Preferably, described the first data at least comprise contact data or note data.
Preferably, if described the first data are contact data, for each first data in M the first data, the step that obtains respectively M second data corresponding with individual the first data of described M is: according to checksum algorithm, for each first data in described M the first data, processed respectively, obtain and described M M the first byte sequence that the first data are corresponding, described the second data are described the first byte sequence.
Preferably, if described the first data are note data, for each first data in M the first data, the step that obtains respectively M second data corresponding with individual the first data of described M is: generate one first identification code according to the first data message of each the first data in described M the first data respectively, described the second data are described the first identification code.
Preferably, described the first data message at least comprises one or more in sender information, receiving time information and locking information.
A kind of data back up method, be applied to server, comprises the following steps:
The M that receiving terminal apparatus sends second data; Wherein, M is positive integer;
For each first data in N the first data of self, obtain respectively and described N N the second data that the first data are corresponding; N is not less than 0 and be not more than the integer of M;
Described M the second data and described N the second data are compared one by one;
According to comparison result, K to be backed up the second data are sent to described terminal equipment; K is the integer that is not more than M.
Preferably, described the first data at least comprise contact data or note data.
Preferably, if described the first data are contact data, described M the second data are compared one by one and also comprised afterwards step with described N the second data: if having the identifier of corresponding the second data in the corresponding identifier of the second data and individual the second data of described N identical in described M the second data, but the content difference that these two the second data are represented, definite these second data are corresponding is the first data to be backed up; And, if having the corresponding identifier of the second data all different from described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
Preferably, if described the first data are note data, individual the second data of described M are compared one by one and also comprised afterwards step from described N the second data: if having the corresponding identifier of the second data all different with described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
A kind of data reconstruction method, be applied to the terminal equipment that can be connected with server, comprises the following steps:
For each the 3rd data in L the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer;
Described L the 4th data are sent to server, determine whether J the 3rd data that remain recovery for described server, wherein, J is not less than 0 integer;
Receive J three data corresponding with individual the 4th data of described J that described server sends.
Preferably, described the 3rd data at least comprise contact data or note data.
Preferably, if described the 3rd data are contact data, for each the 3rd data in L the 3rd data, the step that obtains respectively L four data corresponding with individual the 3rd data of described L is: according to checksum algorithm, for each the 3rd data in described L the 3rd data, processed respectively, obtain and described L L the second byte sequence that the 3rd data are corresponding, described the 4th data are described the second byte sequence.
Preferably, if described the 3rd data are note data, for each the 3rd data in L the 3rd data, the step that obtains respectively L four data corresponding with individual the 3rd data of described L is: generate one second identification code according to the 3rd data message of each the 3rd data in described L the 3rd data respectively, described the 4th data are described the second identification code.
Preferably, described the 3rd data message at least comprises one or more in sender information, receiving time information and locking information.
A kind of data reconstruction method, be applied to server, comprises the following steps:
The L that receiving terminal apparatus sends the 4th data; Wherein, L is not less than zero integer;
For each the 3rd data in H the 3rd data of self, obtain respectively and described H H the 4th data that the 3rd data are corresponding; H is the positive integer that is not less than L;
Whether described L the 4th data and described H the 4th data are compared one by one, to determine in described H the 3rd data, comprised and remain individual the 3rd data of J of recovering, wherein, J is not less than 0 and be not more than the integer of H;
According to comparison result, for J described to be recovered the 4th data, obtain respectively the described J corresponding with it the 3rd data;
Described J the 3rd data are sent to described terminal equipment; J is the integer that is not more than H.
Preferably, described the 3rd data at least comprise contact data and/or note data.
Preferably, if described the 3rd data are contact data, described L the 4th data are compared one by one and also comprised afterwards step with described H the 4th data: if having the identifier of corresponding the 4th data in the corresponding identifier of the 4th data and individual the 4th data of described L identical in described H the 4th data, but these two content differences that the 4th data are represented, definite the 4th data are corresponding is the 3rd data to be recovered; And, if having the corresponding identifier of the 4th data all different from described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
Preferably, if described the 3rd data are note data, individual the 4th data of described L are compared one by one and also comprised afterwards step from described H the 4th data: if having the corresponding identifier of the 4th data all different with described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
A kind of terminal equipment, it can be connected with server, and described terminal equipment comprises:
The first acquisition module, be used for for M each first data of the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer;
Transceiver module, for described M the second data are sent to described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M for described server; And, when the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.
Preferably, described the first data at least comprise contact data or note data.
Preferably, if described the first data are contact data, described the first acquisition module specifically for: according to checksum algorithm, for each first data in described M the first data, processed respectively, obtain and described M M the first byte sequence that the first data are corresponding, described the second data are described the first byte sequence.
Preferably, if described the first data are note data, described the first acquisition module specifically for: generate one first identification code according to the first data message of each the first data in described M the first data respectively, described the second data are described the first identification code.
Preferably, described the first data message at least comprises one or more in sender information, receiving time information and locking information.
A kind of server comprises:
Receiver module, the M sent for receiving terminal apparatus the second data; Wherein, M is positive integer;
The second acquisition module, for the N for self each first data of the first data, obtain respectively and described N N the second data that the first data are corresponding; N is not less than 0 and be not more than the integer of M;
Comparing module, for comparing described M the second data and described N the second data one by one;
Sending module, for according to comparison result, send to described terminal equipment by K to be backed up the second data; K is the integer that is not more than M.
Preferably, described the first data at least comprise contact data or note data.
Preferably, if described the first data are contact data, described comparing module specifically for: if there is the identifier of corresponding the second data in individual the second data of the corresponding identifier of the second data and described N identical in described M the second data, but the content difference that these two the second data are represented, definite these second data are corresponding is the first data to be backed up; And, if having the corresponding identifier of the second data all different from described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
Preferably, if described the first data are note data, described comparing module specifically for: if there is the corresponding identifier of the second data all different with described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
A kind of terminal equipment, it can be connected with server, and described terminal equipment comprises:
The first acquisition module, be used for for L each the 3rd data of the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer;
Transceiver module, for described L the 4th data are sent to server, determine whether J the 3rd data that remain recovery for described server, wherein, J is not less than 0 integer; And J three data corresponding with individual the 4th data of described J of the described server transmission of reception.
Preferably, described the 3rd data at least comprise contact data or note data.
Preferably, if described the 3rd data are contact data, described the first acquisition module specifically for: according to checksum algorithm, for each the 3rd data in described L the 3rd data, processed respectively, obtain and described L L the second byte sequence that the 3rd data are corresponding, described the 4th data are described the second byte sequence.
Preferably, if described the 3rd data are note data, described the first acquisition module specifically for: generate one second identification code according to the 3rd data message of each the 3rd data in described L the 3rd data respectively, described the 4th data are described the second identification code.
Preferably, described the 3rd data message at least comprises one or more in sender information, receiving time information and locking information.
A kind of server comprises:
Receiver module, the L sent for receiving terminal apparatus the 4th data; Wherein, L is not less than zero integer;
The second acquisition module, for the H for self each the 3rd data of the 3rd data, obtain respectively and described H H the 4th data that the 3rd data are corresponding; H is the positive integer that is not less than L; And, according to comparison result, for J described to be recovered the 4th data, obtain respectively the described J corresponding with it the 3rd data;
Whether comparing module, for described L the 4th data and described H the 4th data are compared one by one, comprise and remain individual the 3rd data of J of recovering to determine in described H the 3rd data, and wherein, J is not less than 0 and be not more than the integer of H;
Sending module, for sending to described terminal equipment by described J the 3rd data; J is the integer that is not more than H.
Preferably, described the 3rd data at least comprise contact data and/or note data.
Preferably, if described the 3rd data are contact data, described comparing module specifically for: if there is the identifier of corresponding the 4th data in individual the 4th data of the corresponding identifier of the 4th data and described L identical in described H the 4th data, but these two content differences that the 4th data are represented, definite the 4th data are corresponding is the 3rd data to be recovered; And, if having the corresponding identifier of the 4th data all different from described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
Preferably, if described the 3rd data are note data, described comparing module specifically for: if there is the corresponding identifier of the 4th data all different with described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
Data back up method in the embodiment of the present invention is for each first data in M the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer; Described M the second data are sent to described server, for described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M; When the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.At first by data capacity, the first larger data are converted to the second data that data capacity is less, sending it to server is differentiated again, after server determines which is data to be backed up, terminal equipment is sent to server by data to be backed up again, can effectively save flow like this, save Internet resources, and less because send data, can improve transmitting efficiency.
The accompanying drawing explanation
The main method flow chart that Fig. 1 is terminal side data backup in the embodiment of the present invention;
The main method flow chart that Fig. 2 is server side data backup in the embodiment of the present invention;
Fig. 3 is the main method flow chart that in the embodiment of the present invention, terminal side data recovers;
Fig. 4 is the main method flow chart that in the embodiment of the present invention, the server side data are recovered;
The primary structure figure that Fig. 5 is terminal in the embodiment of the present invention;
The primary structure figure that Fig. 6 is server in the embodiment of the present invention.
Embodiment
Data back up method in the embodiment of the present invention is for each first data in M the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer; Described M the second data are sent to described server, for described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M; When the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.At first by data capacity, the first larger data are converted to the second data that data capacity is less, sending it to server is differentiated again, after server determines which is data to be backed up, terminal equipment is sent to server by data to be backed up again, can effectively save flow like this, save Internet resources, and less because send data, can improve transmitting efficiency.
Referring to Fig. 1, the embodiment of the present invention provides a kind of data back up method, and in its terminal equipment that can be applied to be connected with server, the main flow process of the method is as follows:
Step 101: for each first data in M the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer.
In the embodiment of the present invention, described the first data can be contact data, it can be perhaps note data, can be perhaps other data, for example calendar data, browser bookmark, notebook data etc., those skilled in the art know how thought according to the present invention is carried out the modification of respective handling process to dissimilar data naturally.
If described the first data are contact data, can be according to checksum algorithm, for each contact data, calculated, can all obtain a shorter byte sequence for each contact data, this byte sequence can be called the first byte sequence, and this first byte sequence can be called described the second data.Wherein, for a contact data, the data capacity of himself is greater than the data capacity of the first byte sequence obtained according to it,, in described M the first data, the data capacity of each the first data is greater than the data capacity of second data corresponding with it.
If described the first data are note data, can be processed the first data message of each note data, for example, the first data message described in the embodiment of the present invention at least can comprise sender information (address), one or more in receiving time information (date) and locking information (locked), also can comprise short message content information in described the first data message, but the occupied data capacity of short message content information is larger, deal with not as sender information, receiving time information or locking information etc. are more convenient, result can be all to generate one first identification code for each note data, described the first identification code can be called described the second data.Wherein whether locking information can be locked for meaning this note.In the embodiment of the present invention, described the first identification code can be UUID (Universally Unique Identifier, general unique identifier).
Step 102: described M the second data are sent to described server, for described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M.
After described terminal equipment has obtained M the second data according to M the first data, M the second data that obtain can be sent to the server be connected with described terminal equipment, determine with described M the second data whether include individual the first data of K to be backed up in corresponding individual the first data of described M respectively for described server according to the M received second data, wherein, K can be for being not more than the positive integer of M.
Wherein, if described the first data are contact data, described the second data are described the first byte sequence, can comprise identifier and content byte in this first byte sequence, described identifier is for identifying each first byte sequence, and described content word is saved in meaning the represented content of each the first byte sequence.Originally also can store N the first data in described server, described server can be at first obtains respectively and described N the first data N the second data one to one according to described N the first data, and N is not less than 0 and be not more than the integer of M.
Described server is compared described M the second data that receive and described N the second data that self obtain one by one.If described the first data are contact data, described server can judge in described M the second data that corresponding the second data that whether have in the second data and individual the second data of described N are inconsistent, inconsistent can referring to herein: for the identifier information consistent (meaning that these two second data should be same the second data really) that identifies two the second data, but the content of two the second data is inconsistent.If this kind of situation, described server can determine that corresponding first data of these second data of self storing need to upgrade, and corresponding the first data of these second data are the first data to be backed up.And, if M is greater than N, described server can determine M-N the second data institute respectively the first data of correspondence be the first data to be backed up.And, if there are the second data all different from described N the second data in described M the second data, difference herein refers to: in described M the second data, have identifier corresponding to the second data and described N the second data to distinguish corresponding identifier all different, described server determines that corresponding the first data of these second data are data to be backed up.
If described the first data are note data, if M is greater than N, described server can determine M-N the second data institute respectively the first data of correspondence be the first data to be backed up.And, if there are the second data all different from described N the second data in described M the second data, difference herein refers to: in described M the second data, have identifier corresponding to the second data and described N the second data to distinguish corresponding identifier all different, described server determines that corresponding the first data of these second data are data to be backed up.
Step 103: when the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.
Described server is after defining K to be backed up the first data, this K the corresponding K of the first data the second data all can be sent to described terminal equipment, described terminal equipment is after receiving described K the second data, this K the corresponding K of the second data the first data can be sent to described server, to complete the backup of data to be backed up.
Referring to Fig. 2, the embodiment of the present invention also provides a kind of data back up method, and it can be applied to server, and this server can be connected with described terminal equipment, and the main flow process of described method is as follows:
Step 201: the M that receiving terminal apparatus sends second data; Wherein, M is positive integer.
Described terminal equipment at first can be according to checksum algorithm, the M that self is stored first data are treated to respectively described the first byte sequence, be M the first data acquisition M the first data that at first described terminal equipment is stored according to self, then the M of acquisition the first data are sent to described server.
Step 202: for each first data in N the first data of self, obtain respectively and described N N the second data that the first data are corresponding; N is not less than 0 and be not more than the integer of M.
Can store N the first data in described server, described server also can, according to checksum algorithm, be treated to described the second data by described the first data.
Step 203: described M the second data and described N the second data are compared one by one.
Described server, after receiving described M the second data and obtaining described N the second data, can be compared described M the second data and described N the second data one by one.
If described the first data are contact data, described server can judge in described M the second data that corresponding the second data that whether have in the second data and individual the second data of described N are inconsistent, inconsistent can referring to herein: for the identifier information consistent (meaning that these two second data should be same the second data really) that identifies two the second data, but the content of two the second data is inconsistent.If this kind of situation, described server can determine that corresponding first data of these second data of self storing need to upgrade, and corresponding the first data of these second data are the first data to be backed up.And, if M is greater than N, described server can determine M-N the second data institute respectively the first data of correspondence be the first data to be backed up.And, if there are the second data all different from described N the second data in described M the second data, difference herein refers to: in described M the second data, have identifier corresponding to the second data and described N the second data to distinguish corresponding identifier all different, described server determines that corresponding the first data of these second data are data to be backed up.
If described the first data are note data, if M is greater than N, described server can determine M-N the second data institute respectively the first data of correspondence be the first data to be backed up.And, if there are the second data all different from described N the second data in described M the second data, difference herein refers to: in described M the second data, have identifier corresponding to the second data and described N the second data to distinguish corresponding identifier all different, described server determines that corresponding the first data of these second data are data to be backed up.
Step 204: according to comparison result, K to be backed up the second data are sent to described terminal equipment, K is the integer that is not more than M.
Described server determines that according to comparison result K corresponding the first data of the second data are data to be backed up, described K the second data are sent to described terminal equipment, described terminal equipment is after receiving this K the second data, this K the corresponding K of the second data the first data can be sent to described server, to complete the backup of data.
So, only need or store wrong information by the information that do not have in server in when backup and resend to server and get final product, for the information backed up in server without sending again, with the saving flow.
Referring to Fig. 3, the embodiment of the present invention also provides a kind of data reconstruction method, and it can be applied to the described terminal equipment that can be connected with described server, and the main flow process of described method is as follows:
Step 301: for each the 3rd data in L the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer.
In the embodiment of the present invention, described the 3rd data can be contact data, it can be perhaps note data, can be perhaps other data, for example calendar data, browser bookmark, notebook data etc., those skilled in the art know how thought according to the present invention is carried out the modification of respective handling process to dissimilar data naturally.
If described the 3rd data are contact data, can be according to checksum algorithm, for each contact data, calculated, can all obtain a shorter byte sequence for each contact data, this byte sequence can be called the second byte sequence, and this second byte sequence can be called described the 4th data.Wherein, for a contact data, the data capacity of himself is greater than the data capacity of the first byte sequence obtained according to it,, in described M the 3rd data, the data capacity of each the 3rd data is greater than the data capacity of four data corresponding with it.
If described the 3rd data are note data, can be processed the 3rd data message of each note data, for example, described in the embodiment of the present invention, the 3rd data message at least can comprise one or more in sender information, receiving time information and locking information, also can comprise short message content information in described the 3rd data message, but the occupied data capacity of short message content information is larger, deal with not as sender information, receiving time information or locking information etc. more convenient.Result can be all to generate one second identification code for each note data, and described the second identification code can be called described the 4th data.In the embodiment of the present invention, described the second identification code can be UUID (Universally Unique Identifier, general unique identifier).
Step 302: described L the 4th data are sent to server, determine whether J the 3rd data that remain recovery for described server, wherein, J is not less than 0 integer.
Described terminal equipment, after obtaining L the 4th data, can be sent to described server by described L the 4th data, determines whether J the 3rd data that remain recovery according to described L the 4th data for described server.
Described server, after receiving described L the 4th data and obtaining described H the 4th data, can be compared described L the 4th data and described H the 4th data one by one.
If described the 3rd data are contact data, described server can judge in described H the 4th data that corresponding the 4th data that whether have in the 4th data and individual the 4th data of described L are inconsistent, inconsistent can referring to herein: for the identifier information consistent (meaning that these two the 4th data should be same the 4th data really) that identifies two the 4th data, but the content of two the 4th data is inconsistent.If this kind of situation, described server can determine that corresponding the 3rd data of the 4th data of described terminal equipment storage need to upgrade, and corresponding the 3rd data of the 4th data are the 3rd data to be recovered; And, if H is greater than L, described server can determine H-L the 4th data institute respectively the 3rd data of correspondence be the 3rd data to be recovered; And, if there are the 4th data all different from described L the 4th data in described H the 4th data, difference herein refers to: in described H the 4th data, have identifier corresponding to the 4th data and described L the 4th data to distinguish corresponding identifier all different, described server determines that corresponding the 3rd data of the 4th data are data to be recovered.
If described the 3rd data are note data, if H is greater than L, described server can determine H-L the 4th data institute respectively the 3rd data of correspondence be the 3rd data to be recovered.And, if there are the 4th data all different from described L the 4th data in described H the 4th data, difference herein refers to: in described H the 4th data, have identifier corresponding to the 4th data and described L the 4th data to distinguish corresponding identifier all different, described server can determine that corresponding the 3rd data of the 4th data are data to be recovered.
Step 303: receive J three data corresponding with individual the 4th data of described J that described server sends.
When described server defines corresponding J during wait the 3rd data recovered of J the 4th data, can be according to described J the 4th data acquisition J three data corresponding with it respectively, and described J the 3rd data that obtain are sent to described terminal equipment, to complete data, recover.
Referring to Fig. 4, the embodiment of the present invention also provides a kind of data reconstruction method, and it can be applied to the server be connected with described terminal equipment, and the main flow process of described method is as follows:
Step 401: the L that receiving terminal apparatus sends the 4th data; Wherein, L is not less than zero integer.
Described terminal equipment at first can be according to checksum algorithm, the L that self is stored the 3rd data are treated to respectively described the second byte sequence, be L the 3rd data acquisition L the 4th data that at first described terminal equipment is stored according to self, then the L of acquisition the 4th data are sent to described server.
Step 402: for each the 3rd data in H the 3rd data of self, obtain respectively and described H H the 4th data that the 3rd data are corresponding; H is the positive integer that is not less than L.
Described server self stores H the 3rd data, described server also can be according to checksum algorithm, the H that self is stored the 3rd data are treated to respectively described the second byte sequence, H the 3rd data acquisition H the 4th data that described server can be stored according to self.
Whether step 403: described L the 4th data and described H the 4th data are compared one by one, to determine in described H the 3rd data, comprised and remain individual the 3rd data of J of recovering, wherein, J is not less than 0 and be not more than the integer of H.
Described server, after receiving described L the 4th data and obtaining described H the 4th data, can be compared described L the 4th data and described H the 4th data one by one.
If described the 3rd data are contact data, described server can judge in described H the 4th data that corresponding the 4th data that whether have in the 4th data and individual the 4th data of described L are inconsistent, inconsistent can referring to herein: for the identifier information consistent (meaning that these two the 4th data should be same the 4th data really) that identifies two the 4th data, but the content of two the 4th data is inconsistent.If this kind of situation, described server can determine that corresponding the 3rd data of the 4th data of described terminal equipment storage need to upgrade, and corresponding the 3rd data of the 4th data are the 3rd data to be recovered; And, if H is greater than L, described server can determine H-L the 4th data institute respectively the 3rd data of correspondence be the 3rd data to be recovered; And, if there are the 4th data all different from described L the 4th data in described H the 4th data, difference herein refers to: in described H the 4th data, have identifier corresponding to the 4th data and described L the 4th data to distinguish corresponding identifier all different, described server determines that corresponding the 3rd data of the 4th data are data to be recovered.
If described the 3rd data are note data, if H is greater than L, described server can determine H-L the 4th data institute respectively the 3rd data of correspondence be the 3rd data to be recovered; And, if there are the 4th data all different from described L the 4th data in described H the 4th data, difference herein refers to: in described H the 4th data, have identifier corresponding to the 4th data and described L the 4th data to distinguish corresponding identifier all different, described server can determine that corresponding the 3rd data of the 4th data are data to be recovered.
Step 404: according to comparison result, for J described to be recovered the 4th data, obtain respectively the described J corresponding with it the 3rd data.
It is data to be recovered that described server can define J the corresponding J of the 4th data the 3rd data according to comparison result, and described server can be according to described J J the 3rd data that the 4th data acquisition is corresponding with it.
Step 405: described J the 3rd data are sent to described terminal equipment; J is the integer that is not more than H.
Described server, after obtaining described J the 3rd data, can be sent to described terminal equipment by this J the 3rd data, to complete data, recovers.
One, the following method of introducing data backup in the embodiment of the present invention by several specific embodiments.
Embodiment mono-:
Terminal equipment is mobile phone, and described the first data are contact data, and M is that 30, K is 20, in mobile phone, stores 30 contact data.
At first mobile phone adopts checksum algorithm to be calculated each contact data in these 30 contact data, obtain respectively first byte sequence corresponding with it for each contact data, this first byte sequence is shorter, and with respect to contact data, its data capacity is less.Be that mobile phone obtains 30 the first byte sequences altogether.
30 the first byte sequences that mobile phone will obtain are sent to server, for described server, determine in corresponding 30 contact data of these 30 first byte sequences whether include contact data to be backed up.
In the present embodiment, originally store 10 contact data in described server, described server is after receiving these 30 first byte sequences, can at first adopt checksum algorithm to be calculated each contact data in these 10 contact data, obtain respectively first byte sequence corresponding with it for each contact data, described server obtains 10 the first byte sequences.
30 the first byte sequences that described server will receive and 10 the first byte sequences that self obtain are compared.In the present embodiment, in these 30 first byte sequences, have 10 the first byte sequences identical with described 10 the first byte sequences, described server can determine that in these 30 first byte sequences, corresponding 20 contact data of remaining 20 the first byte sequences are contact data to be backed up.
Described server is sent to mobile phone by these 20 first byte sequences, and mobile phone, after receiving these 20 first byte sequences, is sent to described server by corresponding 20 contact data of these 20 first byte sequences, to complete the data backup process.
Embodiment bis-:
Terminal equipment is mobile phone, and described the first data are contact data, and M is that 30, K is 20, in mobile phone, stores 30 contact data.
At first mobile phone adopts checksum algorithm to be calculated each contact data in these 30 contact data, obtain respectively first byte sequence corresponding with it for each contact data, this first byte sequence is shorter, and with respect to contact data, its data capacity is less.Be that mobile phone obtains 30 the first byte sequences altogether.
30 the first byte sequences that mobile phone will obtain are sent to server, for described server, determine in corresponding 30 contact data of these 30 first byte sequences whether include contact data to be backed up.
In the present embodiment, originally store 11 contact data in described server, described server is after receiving these 30 first byte sequences, can at first adopt checksum algorithm to be calculated each contact data in these 11 contact data, obtain respectively first byte sequence corresponding with it for each contact data, described server obtains 11 the first byte sequences.
30 the first byte sequences that described server will receive and 11 the first byte sequences that self obtain are compared.In the present embodiment, 10 the first byte sequences in 11 the first byte sequences that have 10 the first byte sequences to obtain with described server in these 30 first byte sequences are identical, and described server can determine that corresponding 10 contact data of these 10 first byte sequences in these 30 first byte sequences are not contact data to be backed up.
In the present embodiment, in 11 the first byte sequences that obtain at described server, in 20 the first byte sequences of residue that the identifier that first byte sequence arranged receives with described server, the identifier of corresponding the first byte sequence is identical, but the content that described the first byte sequence means is different, described server determines that the corresponding contact data of this first byte sequence is contact data to be backed up.To define 20 corresponding contact data of the first byte sequence are contact data to be backed up to described server.
Described server is sent to mobile phone by these 20 first byte sequences, and mobile phone, after receiving these 20 first byte sequences, is sent to described server by corresponding 20 contact data of these 20 first byte sequences, to complete the data backup process.
Embodiment tri-:
Terminal equipment is mobile phone, and described the first data are contact data, and M is that 30, K is 20, in mobile phone, stores 30 contact data.
At first mobile phone adopts checksum algorithm to be calculated each contact data in these 30 contact data, obtain respectively first byte sequence corresponding with it for each contact data, this first byte sequence is shorter, and with respect to contact data, its data capacity is less.Be that mobile phone obtains 30 the first byte sequences altogether.
30 the first byte sequences that mobile phone will obtain are sent to server, for described server, determine in corresponding 30 contact data of these 30 first byte sequences whether include contact data to be backed up.
In the present embodiment, originally store 11 contact data in described server, described server is after receiving these 30 first byte sequences, can at first adopt checksum algorithm to be calculated each contact data in these 11 contact data, obtain respectively first byte sequence corresponding with it for each contact data, described server obtains 11 the first byte sequences.
30 the first byte sequences that described server will receive and 10 the first byte sequences that self obtain are compared.In the present embodiment, the identifier of 10 the first byte sequences that the identifier that 10 the first byte sequences are arranged in these 30 first byte sequences obtains with described server respectively is identical, but the content of corresponding the first byte sequence in these 10 first byte sequences that the content that first byte sequence is arranged in these 10 first byte sequences that described server receives obtains from described server is different, and described server can determine in these 30 first byte sequences that it is contact data to be backed up that 21 corresponding contact data of the first byte sequence are arranged.
In the present embodiment, in 11 the first byte sequences that obtain at described server, in 20 the first byte sequences of residue that the identifier that first byte sequence arranged receives with described server, the identifier of corresponding the first byte sequence is identical, but the content that described the first byte sequence means is different, described server determines that the corresponding contact data of this first byte sequence is contact data to be backed up.To define 20 corresponding contact data of the first byte sequence are contact data to be backed up to described server.
Described server is sent to mobile phone by these 20 first byte sequences, and mobile phone, after receiving these 20 first byte sequences, is sent to described server by corresponding 20 contact data of these 20 first byte sequences, to complete the data backup process.
Embodiment tetra-:
Terminal equipment is mobile phone, and described the first data are note data, and M is that 40, K is 20.Be to store 40 notes in mobile phone.
At first mobile phone is distinguished the first corresponding data message according to these 40 note datas and is obtained 40 the first identification codes, the first identification code described in the present embodiment can be UUID, sender information and receiving time information that described the first data message can be every note data, the data capacity of each UUID obviously is less than the data capacity of every note data.
40 UUID that mobile phone will obtain are sent to described server, for described server, determine in corresponding 40 note datas of these 40 UUID whether include note data to be backed up.
In the present embodiment, originally store 20 note datas in described server, described server is after receiving these 40 UUID, and corresponding the first data message of 20 note datas can at first storing according to self obtains 20 UUID, and described server obtains 20 UUID.
40 UUID that described server will receive and 20 UUID that self obtain compare one by one.In the present embodiment, be greater than 20 because of 40, can determine that 40-20=20 the corresponding note data of UUID is note data to be backed up.
Described server is sent to mobile phone by these 20 UUID, and mobile phone, after receiving these 20 UUID, is sent to described server by corresponding 20 note datas of these 20 UUID, to complete the data backup process.
Two, the following method of introducing data recovery in the embodiment of the present invention by several specific embodiments.
Embodiment mono-:
Terminal equipment is mobile phone, and described the first data are contact data.L is that 10, J is 20, in mobile phone, stores 10 contact data.
At first mobile phone adopts checksum algorithm to be calculated each contact data in these 10 contact data, obtain respectively first byte sequence corresponding with it for each contact data, this first byte sequence is shorter, and with respect to contact data, its data capacity is less.Be that mobile phone obtains 10 the first byte sequences altogether.
10 the first byte sequences that mobile phone will obtain are sent to server, for described server, determine whether need the contact data of recovering except corresponding 10 contact data of these 10 first byte sequences.
In the present embodiment, originally store 30 contact data in described server, described server is after receiving these 10 first byte sequences, can at first adopt checksum algorithm to be calculated each contact data in these 30 contact data, obtain respectively first byte sequence corresponding with it for each contact data, described server obtains 30 the first byte sequences.
10 the first byte sequences that described server will receive and 30 the first byte sequences that self obtain are compared one by one.In the present embodiment, in these 30 first byte sequences, have 10 the first byte sequences identical with described 10 the first byte sequences that self obtain, described server can determine that in these 30 first byte sequences, corresponding 20 contact data of remaining 20 the first byte sequences are contact data to be recovered.
Described server obtains 20 contact data according to these 20 the first byte sequences, and 20 contact data that will obtain are sent to mobile phone, to complete the data recovery.
Embodiment bis-:
Terminal equipment is mobile phone, and described the first data are contact data.L is that 10, J is 21, in mobile phone, stores 10 contact data.
At first mobile phone adopts checksum algorithm to be calculated each contact data in these 10 contact data, obtain respectively first byte sequence corresponding with it for each contact data, this first byte sequence is shorter, and with respect to contact data, its data capacity is less.Be that mobile phone obtains 10 the first byte sequences altogether.
10 the first byte sequences that mobile phone will obtain are sent to server, for described server, determine whether need the contact data of recovering except corresponding 10 contact data of these 10 first byte sequences.
In the present embodiment, originally store 30 contact data in described server, described server is after receiving these 10 first byte sequences, can at first adopt checksum algorithm to be calculated each contact data in these 30 contact data, obtain respectively first byte sequence corresponding with it for each contact data, described server obtains 30 the first byte sequences.
10 the first byte sequences that described server will receive and 30 the first byte sequences that self obtain are compared one by one.In the present embodiment, the identifier that 9 the first byte sequences are arranged in these 30 first byte sequences is identical respectively with the identifier of 9 the first byte sequences in described 10 the first byte sequences that self obtain, and described server can determine that corresponding 9 contact data of these 9 first byte sequences are not contact data to be recovered.
In the present embodiment, the identifier that first byte sequence arranged in these 10 first byte sequences is identical with the identifier of first byte sequence in described 30 the first byte sequences that self obtain, but the content difference that these two the first byte sequences are represented, described server can determine that the corresponding contact data of this first byte sequence is contact data to be recovered.
That is,, in the present embodiment, it is contact data to be recovered that described server can define 21 corresponding 21 contact data of the first byte sequence.
Described server obtains 21 contact data according to these 21 the first byte sequences, and 21 contact data that will obtain are sent to mobile phone, to complete the data recovery.
Embodiment tri-:
Terminal equipment is mobile phone, and described the first data are contact data.L is that 11, J is 20, in mobile phone, stores 11 contact data.
At first mobile phone adopts checksum algorithm to be calculated each contact data in these 11 contact data, obtain respectively first byte sequence corresponding with it for each contact data, this first byte sequence is shorter, and with respect to contact data, its data capacity is less.Be that mobile phone obtains 11 the first byte sequences altogether.
11 the first byte sequences that mobile phone will obtain are sent to server, for described server, determine whether need the contact data of recovering except corresponding 11 contact data of these 11 first byte sequences.
In the present embodiment, originally store 30 contact data in described server, described server is after receiving these 11 first byte sequences, can at first adopt checksum algorithm to be calculated each contact data in these 30 contact data, obtain respectively first byte sequence corresponding with it for each contact data, described server obtains 30 the first byte sequences.
11 the first byte sequences that described server will receive and 30 the first byte sequences that self obtain are compared one by one.In the present embodiment, the identifier that 10 the first byte sequences are arranged in these 30 first byte sequences is identical respectively with the identifier of 10 the first byte sequences in described 10 the first byte sequences that self obtain, and described server can determine that corresponding 10 contact data of these 10 first byte sequences are not contact data to be recovered.
In the present embodiment, the identifier that first byte sequence arranged in these 11 first byte sequences is identical with the identifier of first byte sequence in described 30 the first byte sequences that self obtain, but the content difference that these two the first byte sequences are represented, described server can determine that the corresponding contact data of this first byte sequence is contact data to be recovered.
That is,, in the present embodiment, it is contact data to be recovered that described server can define 20 corresponding 20 contact data of the first byte sequence.
Described server obtains 20 contact data according to these 20 the first byte sequences, and 20 contact data that will obtain are sent to mobile phone, to complete the data recovery.
Embodiment tetra-:
Terminal equipment is mobile phone, and described the 3rd data are note data, and H is that 40, L is 20.Be to store 20 notes in mobile phone.
At first mobile phone is distinguished the 3rd corresponding data message according to these 20 note datas and is obtained 20 the second identification codes, the second identification code described in the present embodiment can be UUID, described the 3rd data message can be sender information, receiving time information and the locking information of every note data, and the data capacity of each UUID obviously is less than the data capacity of every note data.
20 UUID that mobile phone will obtain are sent to described server, for described server, determine whether need the note data recovered except corresponding 20 note datas of these 20 UUID.
In the present embodiment, originally store 40 note datas in described server, described server is after receiving these 20 UUID, and corresponding the 3rd data message of 40 note datas can at first storing according to self obtains 40 UUID, and described server obtains 40 UUID.
20 UUID that described server will receive and 40 UUID that self obtain compare one by one.In the present embodiment, be greater than 20 because of 40, can determine that 40-20=20 the corresponding note data of UUID is note data to be recovered.
Described server obtains 20 note datas corresponding with its difference according to these 20 UUID, and 20 note datas of this acquisition are sent to mobile phone, to complete data recovery procedure.
Referring to Fig. 5, the embodiment of the present invention provides a kind of terminal equipment, and it can be connected with server, and described terminal equipment can comprise the first acquisition module 501 and transceiver module 502.
The first acquisition module 501 is for for M each first data of the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer.
Described the first data at least comprise contact data or note data.
If described the first data are contact data, the first acquisition module 501 specifically can be for being processed respectively for described M each first data of the first data according to checksum algorithm, obtain and described M M the first byte sequence that the first data are corresponding, described the second data are described the first byte sequence.
If described the first data are note data, the first acquisition module 501 specifically can be for respectively according to the first data message generation one first identification code of described M each the first data of the first data, and described the second data are described the first identification code.Described the first data message at least comprises one or more in sender information, receiving time information and locking information.
Transceiver module 502, for described M the second data are sent to described server, determines in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M for described server; And, when the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.
Referring to Fig. 6, the embodiment of the present invention provides a kind of server, and it can be connected with described terminal equipment, and described server can comprise receiver module 601, the second acquisition module 602, comparing module 603 and sending module 604.
M the second data that receiver module 601 sends for receiving described terminal equipment; Wherein, M is positive integer.
The second acquisition module 602, for the N for self each first data of the first data, obtains respectively and described N N the second data that the first data are corresponding; N is not less than 0 and be not more than the integer of M.Described the first data at least comprise contact data or note data.
Comparing module 603 is for comparing described M the second data and described N the second data one by one.
If described the first data are contact data, if comparing module 603 specifically can have the second data different from corresponding the second data in described N the second data for described M the second data, definite these second different data are corresponding is the first data to be backed up; And, if M is greater than N, individual described the second data of M-N are corresponding is the first data to be backed up.
If described the first data are note data, if comparing module 603 specifically can be greater than N for M, definite M-N described the second data are corresponding is the first data to be backed up.
Sending module 604, for according to comparison result, sends to described terminal equipment by K to be backed up the second data; K is the integer that is not more than M.
Terminal equipment in Fig. 5 can also be for carrying out the data recovery.Now:
The first acquisition module 501 can be for for L each the 3rd data of the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer.
Described the 3rd data at least comprise contact data or note data.
If described the 3rd data are contact data, the first acquisition module 501 specifically can be for being processed respectively for described L each the 3rd data of the 3rd data according to checksum algorithm, obtain and described L L the second byte sequence that the 3rd data are corresponding, described the 4th data are described the second byte sequence.
If described the 3rd data are note data, the first acquisition module 501 specifically can be for respectively according to the 3rd data message generation one second identification code of described L each the 3rd data of the 3rd data, and described the 4th data are described the second identification code.Described the 3rd data message at least comprises one or more in sender information, receiving time information and locking information.
Transceiver module 502, for described L the 4th data are sent to server, determines whether need J the 3rd data of recovering except described L the 3rd data, wherein, J is not less than 0 integer for described server; And J three data corresponding with individual the 4th data of described J of the described server transmission of reception.
Described server in Fig. 6 can also be for carrying out the data recovery, now:
L the 4th data that receiver module 601 can send for receiving terminal apparatus; Wherein, L is not less than zero integer.
The second acquisition module 602 can, for the H for self each the 3rd data of the 3rd data, obtain respectively and described H H the 4th data that the 3rd data are corresponding; H is positive integer.The second acquisition module 602 can also, for the comparison result according to comparing module 603, for J described to be recovered the 4th data, obtain respectively the described J corresponding with it the 3rd data.Described the 3rd data at least comprise contact data and/or note data.
Whether comparing module 603 can be for described L the 4th data and described H the 4th data are compared one by one, to determine in described H the 3rd data, comprise and remain individual the 3rd data of J of recovering, and wherein, J is not less than 0 and be not more than the integer of H.
If described the 3rd data are contact data, if comparing module 603 specifically can have the 4th data different from the 4th data in described L the 4th data for described H the 4th data, definite these the 4th different data are corresponding is the 3rd data to be recovered; And, if H is greater than L, individual described the 4th data of H-L are corresponding is the 3rd data to be recovered.
If described the 3rd data are note data, if comparing module 603 specifically can be greater than L for H, individual described the 4th data of H-L are corresponding is the 3rd data to be recovered.
Sending module 604 can be for sending to described terminal equipment by described J the 3rd data; J is the integer that is not more than H.
Data back up method in the embodiment of the present invention is for each first data in M the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer; Described M the second data are sent to described server, for described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M; When the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.At first by data capacity, the first larger data are converted to the second data that data capacity is less, sending it to server is differentiated again, after server determines which is data to be backed up, terminal equipment is sent to server by data to be backed up again, can effectively save flow like this, save Internet resources, and less because send data, can improve transmitting efficiency.
And, data reconstruction method in the embodiment of the present invention is for each the 3rd data in L the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer; Described L the 4th data are sent to server, for described server, determine whether need J the 3rd data of recovering except described L the 3rd data, wherein, J is not less than 0 integer; Receive J three data corresponding with individual the 4th data of described J that described server sends.At first by data capacity, the 3rd larger data are converted to the 4th data that data capacity is less, sending it to server is differentiated again, when server determines which is for after recovering data, the data to be recovered that to determine again are sent to terminal equipment, so both complete data recovery procedure, can effectively save flow again, saved Internet resources, and, because it is less to send data, can improve transmitting efficiency.
The embodiment of the present invention has also comprised data back up method and the data reconstruction method of server end.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect fully.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) of computer usable program code one or more.
The present invention describes with reference to flow chart and/or the block diagram of method, equipment (system) and computer program according to the embodiment of the present invention.Should understand can be in computer program instructions realization flow figure and/or block diagram each flow process and/or the flow process in square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computer or other programmable data processing device produce for realizing the device in the function of flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction be stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded on computer or other programmable data processing device, make and carry out the sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out on computer or other programmable devices is provided for realizing the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.

Claims (36)

1. a data back up method, be applied to the terminal equipment that can be connected with server, it is characterized in that, comprises the following steps:
For each first data in M the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer;
Described M the second data are sent to described server, for described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M;
When the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.
2. the method for claim 1, is characterized in that, described the first data at least comprise contact data or note data.
3. method as claimed in claim 2, it is characterized in that, if described the first data are contact data, for each first data in M the first data, the step that obtains respectively M second data corresponding with individual the first data of described M is: according to checksum algorithm, for each first data in described M the first data, processed respectively, obtain and described M M the first byte sequence that the first data are corresponding, described the second data are described the first byte sequence.
4. method as claimed in claim 2, it is characterized in that, if described the first data are note data, for each first data in M the first data, the step that obtains respectively M second data corresponding with individual the first data of described M is: generate one first identification code according to the first data message of each the first data in described M the first data respectively, described the second data are described the first identification code.
5. method as claimed in claim 4, is characterized in that, described the first data message at least comprises one or more in sender information, receiving time information and locking information.
6. a data back up method, be applied to server, it is characterized in that, comprises the following steps:
The M that receiving terminal apparatus sends second data; Wherein, M is positive integer;
For each first data in N the first data of self, obtain respectively and described N N the second data that the first data are corresponding; N is not less than 0 and be not more than the integer of M;
Described M the second data and described N the second data are compared one by one;
According to described comparison result, K to be backed up the second data are sent to described terminal equipment; K is the integer that is not more than M.
7. method as claimed in claim 6, is characterized in that, described the first data at least comprise contact data or note data.
8. method as claimed in claim 7, it is characterized in that, if described the first data are contact data, described M the second data are compared one by one and also comprised afterwards step with described N the second data: if having the identifier of corresponding the second data in the corresponding identifier of the second data and individual the second data of described N identical in described M the second data, but the content difference that these two the second data are represented, definite these second data are corresponding is the first data to be backed up; And, if having the corresponding identifier of the second data all different from described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
9. method as claimed in claim 7, it is characterized in that, if described the first data are note data, individual the second data of described M are compared one by one and also comprised afterwards step from described N the second data: if having the corresponding identifier of the second data all different with described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
10. a data reconstruction method, be applied to the terminal equipment that can be connected with server, it is characterized in that, comprises the following steps:
For each the 3rd data in L the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer;
Described L the 4th data are sent to server, determine whether J the 3rd data that remain recovery for described server, wherein, J is not less than 0 integer;
Receive J three data corresponding with individual the 4th data of described J that described server sends.
11. method as claimed in claim 10, is characterized in that, described the 3rd data at least comprise contact data or note data.
12. method as claimed in claim 11, it is characterized in that, if described the 3rd data are contact data, for each the 3rd data in L the 3rd data, the step that obtains respectively L four data corresponding with individual the 3rd data of described L is: according to checksum algorithm, for each the 3rd data in described L the 3rd data, processed respectively, obtain and described L L the second byte sequence that the 3rd data are corresponding, described the 4th data are described the second byte sequence.
13. method as claimed in claim 11, it is characterized in that, if described the 3rd data are note data, for each the 3rd data in L the 3rd data, the step that obtains respectively L four data corresponding with individual the 3rd data of described L is: generate one second identification code according to the 3rd data message of each the 3rd data in described L the 3rd data respectively, described the 4th data are described the second identification code.
14. method as claimed in claim 13, is characterized in that, described the 3rd data message at least comprises one or more in sender information, receiving time information and locking information.
15. a data reconstruction method, be applied to server, it is characterized in that, comprises the following steps:
The L that receiving terminal apparatus sends the 4th data; Wherein, L is not less than zero integer;
For each the 3rd data in H the 3rd data of self, obtain respectively and described H H the 4th data that the 3rd data are corresponding; H is the positive integer that is not less than L;
Whether described L the 4th data and described H the 4th data are compared one by one, to determine in described H the 3rd data, comprised and remain individual the 3rd data of J of recovering, wherein, J is not less than 0 and be not more than the integer of H;
According to comparison result, for J described to be recovered the 4th data, obtain respectively the described J corresponding with it the 3rd data;
Described J the 3rd data are sent to described terminal equipment; J is the integer that is not more than H.
16. method as claimed in claim 15, is characterized in that, described the 3rd data at least comprise contact data and/or note data.
17. method as claimed in claim 16, it is characterized in that, if described the 3rd data are contact data, described L the 4th data are compared one by one and also comprised afterwards step with described H the 4th data: if having the identifier of corresponding the 4th data in the corresponding identifier of the 4th data and individual the 4th data of described L identical in described H the 4th data, but these two content differences that the 4th data are represented, definite the 4th data are corresponding is the 3rd data to be recovered; And, if having the corresponding identifier of the 4th data all different from described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
18. method as claimed in claim 16, it is characterized in that, if described the 3rd data are note data, individual the 4th data of described L are compared one by one and also comprised afterwards step from described H the 4th data: if having the corresponding identifier of the 4th data all different with described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
19. a terminal equipment, it can be connected with server, it is characterized in that, described terminal equipment comprises:
The first acquisition module, be used for for M each first data of the first data, obtain respectively and described M M the second data that the first data are corresponding, wherein, in individual the first data of described M, the data capacity of i the first data is greater than the data capacity of i the second data in described M the second data, i is not less than 1 and be not more than the integer of M, and M is positive integer;
Transceiver module, for described M the second data are sent to described server, determine in described M the first data whether include K to be backed up the first data, wherein, K is positive integer, and K is not more than M for described server; And, when the comparison result obtained from described server shows described M the first data to include K to be backed up the first data, described K the first data are sent to described server, for the described K of described server backup the first data.
20. terminal equipment as claimed in claim 19, is characterized in that, described the first data at least comprise contact data or note data.
21. terminal equipment as claimed in claim 20, it is characterized in that, if described the first data are contact data, described the first acquisition module specifically for: according to checksum algorithm, for each first data in described M the first data, processed respectively, obtain and described M M the first byte sequence that the first data are corresponding, described the second data are described the first byte sequence.
22. terminal equipment as claimed in claim 20, it is characterized in that, if described the first data are note data, described the first acquisition module specifically for: generate one first identification code according to the first data message of each the first data in described M the first data respectively, described the second data are described the first identification code.
23. terminal equipment as claimed in claim 21, is characterized in that, described the first data message at least comprises one or more in sender information, receiving time information and locking information.
24. a server, is characterized in that, comprising:
Receiver module, the M sent for receiving terminal apparatus the second data; Wherein, M is positive integer;
The second acquisition module, for the N for self each first data of the first data, obtain respectively and described N N the second data that the first data are corresponding; N is not less than 0 and be not more than the integer of M;
Comparing module, for comparing described M the second data and described N the second data one by one;
Sending module, for according to comparison result, send to described terminal equipment by K to be backed up the second data; K is the integer that is not more than M.
25. server as claimed in claim 24, is characterized in that, described the first data at least comprise contact data or note data.
26. server as claimed in claim 25, it is characterized in that, if described the first data are contact data, described comparing module specifically for: if there is the identifier of corresponding the second data in individual the second data of the corresponding identifier of the second data and described N identical in described M the second data, but the content difference that these two the second data are represented, definite these second data are corresponding is the first data to be backed up; And, if having the corresponding identifier of the second data all different from described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
27. server as claimed in claim 25, it is characterized in that, if described the first data are note data, described comparing module specifically for: if there is the corresponding identifier of the second data all different with described N the corresponding identifier of the second data in described M the second data, definite these second data are corresponding is the first data to be backed up; And, if M is greater than N, definite M-N described the second data are corresponding is the first data to be backed up.
28. a terminal equipment, it can be connected with server, it is characterized in that, described terminal equipment comprises:
The first acquisition module, be used for for L each the 3rd data of the 3rd data, obtain respectively and described L L the 4th data that the 3rd data are corresponding, wherein, in individual the 3rd data of described L, the data capacity of y the 3rd data is greater than the data capacity of y the 4th data in described L the 4th data, y is not less than 0 and be not more than the integer of L, and L is not less than 0 integer;
Transceiver module, for described L the 4th data are sent to server, determine whether J the 3rd data that remain recovery for described server, wherein, J is not less than 0 integer; And J three data corresponding with individual the 4th data of described J of the described server transmission of reception.
29. terminal equipment as claimed in claim 28, is characterized in that, described the 3rd data at least comprise contact data or note data.
30. terminal equipment as claimed in claim 29, it is characterized in that, if described the 3rd data are contact data, described the first acquisition module specifically for: according to checksum algorithm, for each the 3rd data in described L the 3rd data, processed respectively, obtain and described L L the second byte sequence that the 3rd data are corresponding, described the 4th data are described the second byte sequence.
31. terminal equipment as claimed in claim 29, it is characterized in that, if described the 3rd data are note data, described the first acquisition module specifically for: generate one second identification code according to the 3rd data message of each the 3rd data in described L the 3rd data respectively, described the 4th data are described the second identification code.
32. terminal equipment as claimed in claim 29, is characterized in that, described the 3rd data message at least comprises one or more in sender information, receiving time information and locking information.
33. a server, is characterized in that, comprising:
Receiver module, the L sent for receiving terminal apparatus the 4th data; Wherein, L is not less than zero integer;
The second acquisition module, for the H for self each the 3rd data of the 3rd data, obtain respectively and described H H the 4th data that the 3rd data are corresponding; H is the positive integer that is not less than L; And, according to comparison result, for J described to be recovered the 4th data, obtain respectively the described J corresponding with it the 3rd data;
Whether comparing module, for described L the 4th data and described H the 4th data are compared one by one, comprise and remain individual the 3rd data of J of recovering to determine in described H the 3rd data, and wherein, J is not less than 0 and be not more than the integer of H;
Sending module, for sending to described terminal equipment by described J the 3rd data; J is the integer that is not more than H.
34. server as claimed in claim 33, is characterized in that, described the 3rd data at least comprise contact data and/or note data.
35. server as claimed in claim 34, it is characterized in that, if described the 3rd data are contact data, described comparing module specifically for: if there is the identifier of corresponding the 4th data in individual the 4th data of the corresponding identifier of the 4th data and described L identical in described H the 4th data, but these two content differences that the 4th data are represented, definite the 4th data are corresponding is the 3rd data to be recovered; And, if having the corresponding identifier of the 4th data all different from described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
36. server as claimed in claim 34, it is characterized in that, if described the 3rd data are note data, described comparing module specifically for: if there is the corresponding identifier of the 4th data all different with described L the corresponding identifier of the 4th data in described H the 4th data, definite the 4th data are corresponding is the 3rd data to be recovered; And, if H is greater than L, definite H-L described the 4th data are corresponding is the 3rd data to be recovered.
CN201210158971XA 2012-05-21 2012-05-21 Method for data backup and recovery, terminal device and server Pending CN103428245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210158971XA CN103428245A (en) 2012-05-21 2012-05-21 Method for data backup and recovery, terminal device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210158971XA CN103428245A (en) 2012-05-21 2012-05-21 Method for data backup and recovery, terminal device and server

Publications (1)

Publication Number Publication Date
CN103428245A true CN103428245A (en) 2013-12-04

Family

ID=49652419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210158971XA Pending CN103428245A (en) 2012-05-21 2012-05-21 Method for data backup and recovery, terminal device and server

Country Status (1)

Country Link
CN (1) CN103428245A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786646A (en) * 2016-02-25 2016-07-20 北京金山安全软件有限公司 Data backup method and device and electronic equipment
CN108924771A (en) * 2018-05-28 2018-11-30 深圳市宝尔爱迪科技有限公司 A kind of method that terminal device short message accidentally deletes recovery
CN109873668A (en) * 2019-03-08 2019-06-11 北京星际荣耀空间科技有限公司 Data group packet method, transmission method and system based on carrier rocket

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071390A1 (en) * 2003-09-30 2005-03-31 Livevault Corporation Systems and methods for backing up data files
CN1818880A (en) * 2006-03-10 2006-08-16 四川大学 Long-distance data fast restoring method of network information system
CN1818881A (en) * 2006-03-10 2006-08-16 四川大学 Fault controlling method in long-distance data backup

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071390A1 (en) * 2003-09-30 2005-03-31 Livevault Corporation Systems and methods for backing up data files
CN1818880A (en) * 2006-03-10 2006-08-16 四川大学 Long-distance data fast restoring method of network information system
CN1818881A (en) * 2006-03-10 2006-08-16 四川大学 Fault controlling method in long-distance data backup

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786646A (en) * 2016-02-25 2016-07-20 北京金山安全软件有限公司 Data backup method and device and electronic equipment
CN105786646B (en) * 2016-02-25 2019-01-08 北京金山安全软件有限公司 Data backup method and device and electronic equipment
CN108924771A (en) * 2018-05-28 2018-11-30 深圳市宝尔爱迪科技有限公司 A kind of method that terminal device short message accidentally deletes recovery
CN109873668A (en) * 2019-03-08 2019-06-11 北京星际荣耀空间科技有限公司 Data group packet method, transmission method and system based on carrier rocket
CN109873668B (en) * 2019-03-08 2020-09-08 北京星际荣耀空间科技有限公司 Data packaging method, transmission method and system based on carrier rocket

Similar Documents

Publication Publication Date Title
CN108040108B (en) Communication switching method, device, coordination server and readable storage medium
CN107277083B (en) Data interaction processing method, device and system
CN102981627A (en) Password inputting method and password inputting device
CN103778034A (en) Cloud storage-based data backup disaster recovery method and system
CN109491681A (en) The upgrade method and device of MCU in a kind of automobile
CN102591747A (en) Data backup method and device
CN106331372B (en) Data transmission method and mobile terminal
CN103428245A (en) Method for data backup and recovery, terminal device and server
CN110515762A (en) Data reconstruction method, device, terminal device and storage medium
CN104317676A (en) Data backup disaster tolerance method
CN103716056B (en) Data compression method, uncompressing data and equipment
CN109891400A (en) Method, apparatus and storage medium based on SPI asynchronous process event
CN102063350A (en) Method, device and terminal for backing up and recovering
CN104270287A (en) Message disorder detecting method and device
CN111522645B (en) Object processing method and device, electronic equipment and computer readable storage medium
JP2009003671A (en) Emergency recovery support apparatus, emergency recovery support method, program, and emergency recovery support system
CN108427599A (en) Method, apparatus and storage medium is uniformly processed in asynchronous task
CN101971562A (en) Method, device and system for controlling automatic running process performance
CN106204031A (en) card application processing method and device
CN101674541A (en) Method for backing up mobile phone information to personal email and system thereof
CN103377099A (en) Method and device of data backup and recovery for NFC mobile terminals
CN102508783A (en) Memory recovery method for avoiding data chaos
CN108021688A (en) A kind of data processing method and device
CN113742426A (en) Data synchronization method, device, equipment, server and storage medium
WO2016086579A1 (en) Method and device for intelligently backing up and recovering network element data in network management system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20131204

RJ01 Rejection of invention patent application after publication