CN100357901C - Method for verifying data between main device and back-up device - Google Patents
Method for verifying data between main device and back-up device Download PDFInfo
- Publication number
- CN100357901C CN100357901C CNB200510132328XA CN200510132328A CN100357901C CN 100357901 C CN100357901 C CN 100357901C CN B200510132328X A CNB200510132328X A CN B200510132328XA CN 200510132328 A CN200510132328 A CN 200510132328A CN 100357901 C CN100357901 C CN 100357901C
- Authority
- CN
- China
- Prior art keywords
- data
- alternate device
- main equipment
- user profile
- numbering
- 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.)
- Expired - Fee Related
Links
Images
Abstract
The present invention provides a method for checking data between a main device and a backup device. Data of the main device is encrypted to generate a check data package which is sent out to the backup device; after the backup device receives the check data package, data of the backup device is also encrypted through the same algorithm; the data encrypted is compared with the data sent from the main device, if the data encrypted is the same with the data sent from the main device, the data of the main device and the data of the backup device are accordant, if not, the data of the main device is associated with the data of the backup device. The preferred encryption algorithm is an MD 5 algorithm. The proposal of the present invention can quickly check the data of the main device and the backup device; thus, the checking period of the data is shortened, the consistency of the data of the main device and the backup device is effectively ensured, and the reliability of data backup is raised.
Description
Technical field
The present invention relates to the computer information technology field, the method for data check between particularly a kind of main equipment and the alternate device.
Background technology
Along with the widespread use of computer information technology, bulk information all is that the form with computer data is kept on the memory device.In order to prevent to cause loss of data owing to equipment failure, usually adopt the way of data backup, being about to data copies on the alternate device from main equipment, the raw data of main equipment lose or situation about being destroyed under, utilize the Backup Data on the alternate device that raw data is recovered out, make the system can operate as normal.
The consistance of data is the reliable and effective prerequisites of data back up method on main equipment and the alternate device.In order to guarantee the data consistency between main equipment and the alternate device, need the regular data check that carries out between main equipment and the stand-by equipment.As shown in Figure 1, data check method general in the prior art is: main equipment needs all backed up data to send on the alternate device by data channel, data that alternate device sends main equipment and the data on this equipment compare, if find the inconsistent relevant treatment of carrying out again of data.
If the backed up data amount is bigger, and the each data length that sends of main equipment is restricted, is generally less than the 2K byte, needs the long time to carry out exchanges data between main equipment and alternate device when carrying out data check.Therefore, carry out when usually selecting portfolio less when carrying out data check, this just causes between the data check interlude longer, and might be able to not effectively protect data.
Summary of the invention
In view of this, the objective of the invention is to, the method of data check between a kind of main equipment and the alternate device is proposed, can carry out data check between main equipment and the alternate device quickly, thereby shorten the data check ground cycle, guarantee data ground consistance between main equipment and the alternate device more effectively.
This method comprises the steps:
A, main equipment data are carried out hash class algorithm for encryption and are generated the verification packet, will verify packet and be sent to alternate device;
After B, alternate device are received and are verified packet, this device data is also used identical algorithm for encryption, the data that data encrypted and main equipment are sent compare, if the two identical representative master/slave data unanimity, and if the two difference with on the alternate device with main equipment on different data become the data identical with main equipment.
Before described steps A, can further include: the size that each encrypts the pairing data volume of verification packet of back generation is set.
Preferably, described cryptographic algorithm is MD5.
Preferably, described main equipment is a GGSN equipment, and described alternate device is a storage unit in GGSN equipment or the GGSN equipment; Correspondingly, the described data of verifying are user profile.
Correspondingly, encrypting the process that generates the verification packet described in the steps A is: the data that obtain after user profile is encrypted and the numbering of these user profile correspondences generate verifies packet.
Among the step B, if the data encrypted comparative result is inconsistent, described in the step B with on the alternate device with main equipment on different data become the data identical and can adopt one of following two sets of plan with main equipment:
First sets of plan:
B1, alternate device return this data user information corresponding numbering to main equipment, and these user profile on the deletion alternate device;
After B2, main equipment are received the user profile numbering, these numbering user information corresponding are sent to alternate device;
B3, alternate device store the user profile of receiving as Backup Data.
Second sets of plan:
B1, alternate device return this data user information corresponding numbering to main equipment;
After B2, main equipment were received the user profile numbering, each user profile that these numberings are corresponding was used md5 encryption respectively, the numbering generation secondary of data encrypted and this user profile is verified packet send to alternate device;
After B3, alternate device receive that secondary is verified packet, each user profile of the verification packet correspondence that comparative result on the alternate device is different is compressed with MD5 respectively, with data encrypted and the data contrast that comes autonomous device, find out this relatively different data user information corresponding numbering of comparing result, and these user profile numbering sent to main equipment, and delete the corresponding alternate device stored user information of these user profile numberings;
After B4, main equipment are received user profile numbering, return these numbering user information corresponding to alternate device, alternate device with these information stores as Backup Data.
As can be seen from the above technical solutions, after the required data process MD5 algorithm for encryption of verifying, data volume significantly reduces, and the data that need transmit have been lacked speed and also just promoted, and the expansion of user profile can not have influence on the size of encrypting the back data.Because the verification time shortens greatly, carry out data check the burden that equipment increases is significantly reduced, therefore can increase the frequency of carrying out data check, shorten the cycle of data check, to guarantee the reliability of data backup.
Description of drawings
Fig. 1 carries out the synoptic diagram of main equipment and alternate device data check for prior art;
Fig. 2 carries out the synoptic diagram of main equipment and alternate device data check for the present invention;
Fig. 3 carries out the workflow diagram of data check for the present invention;
Fig. 4 finds the process flow diagram of the inconsistent back of packet embodiment one for data check of the present invention;
Fig. 5 finds the process flow diagram of the inconsistent back of packet embodiment two for data check of the present invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the drawings and specific embodiments.
(General Packet Radio Service in the time of GPRS), need verify that this just needs invoke user information to user's identity to wireless communication user using GPRS (General Packet Radio Service).These user profile all be stored in GGSN (GPRS Gateway Support Node, customer data base GGSN) (Subscriber DataBase, SDB) in.In a single day user data among the SDB damages or loses, and will cause the user can't use gprs service, therefore must the user data among the SDB be backed up.Data backup can be to carry out between two GGSN equipment or between the different storage unit of same GGSN equipment, no matter be which kind of situation, the equipment or the storage unit of wherein preserving original user data are called as main equipment, and the equipment or the storage unit of preserving the backup user data are called as alternate device.
In order to guarantee the reliable of data backup, also need regularly to carrying out data check between main equipment and the alternate device, to guarantee the consistance of the two data.Because the data volume of user data is very huge among the SDB, need transferring large number of data when adopting prior art to carry out data check, can take the plenty of time.In addition, the data length that carries out data transmission during data check is conditional.The data length of supposing the packet that data are verified is N, and the data length of each user profile is M, and the packet of each data check carries L user's information at most, wherein L=[N ÷ M].If it is that M increases that user's the information content expands, then can cause the number of users L that carries in the packet to reduce, further increase the time of data check.
Cryptographic algorithm MD5 (Message Digest Algorithm 5) is a kind of cryptographic algorithm that is widely adopted.This algorithm is a kind of hash conversion to byte serial (Message), the byte serial of a random length is transformed into the big integer of 16 bytes.This algorithm has following characteristics: it is infeasible on calculating that two inputs of first searching obtain identical output valve, promptly has anti-collision; It two is to look for an input, and can obtain given output is infeasible on calculating, and promptly has irreversibility.Therefore, the MD5 algorithm is being widely adopted aspect network data securities such as digital signature, cryptoguard.
The present invention program introduces the MD5 algorithm for fear of a large amount of user data of transmission in the data check of GGSN equipment, except using above-mentioned two characteristics, the more important thing is such characteristic of having utilized the MD5 algorithm: regardless of the data length of importing, the data length of output is fixed as 16 bytes, so just data volume can be greatly reduced, specific practice comprises the steps: as shown in Figure 3
Step 301: the user data of main equipment carries out the MD5 compression, and the data after the compression are verified packet together with the Customs Assigned Number generation of correspondence.Wherein the effect of Customs Assigned Number is to pass through Customs Assigned Number, can know corresponding which user of integer of each 16 byte after encrypting, and the number of 16 byte integer user information corresponding after each is encrypted can be adjusted with actual needs, and the step of this adjustment was finished before data check.
Step 302: will verify packet and be sent to alternate device via data channel.
Step 303: after alternate device is received and verified packet, the user data on the alternate device is carried out the MD5 compression;
Step 304: 16 byte integer corresponding with verifying packet of 16 byte integer after will compressing compare.If comparing result is identical, execution in step 305; If the comparing result difference, execution in step 306.
Step 305: verify the data consistent that the result shows main equipment and stand-by equipment, end data is verified.
Step 306: with on the alternate device with main equipment on different data become the data identical with main equipment.
The processing procedure of step 306 has two kinds of schemes, respectively corresponding two specific embodiments:
The flow process of embodiment one comprises the steps: as shown in Figure 4
Step 3063a: alternate device stores the user profile of receiving as Backup Data.
The flow process of embodiment two comprises the steps: as shown in Figure 5
Step 3061b: alternate device returns this data user information corresponding numbering to main equipment;
Step 3062b: after main equipment was received the user profile numbering, each user profile that these numberings are corresponding was used md5 encryption respectively, the numbering generation secondary of data encrypted and this user profile is verified packet send to alternate device;
Step 3063b: after alternate device receives that secondary is verified packet, each user profile of the verification packet correspondence that comparative result on the alternate device is different is compressed with MD5 respectively, with data encrypted and the data contrast that comes autonomous device, find out this relatively different data user information corresponding numbering of comparing result, and these user profile numbering sent to main equipment, and delete the corresponding alternate device stored user information of these user profile numberings;
Step 3064b: after main equipment is received user profile numbering, return these numbering user information corresponding to alternate device, alternate device with these information stores as Backup Data.
By above invention scheme as can be seen, user profile is through after the MD5 algorithm for encryption, and data volume significantly reduces, and length all is 16 bytes after the data encryption, so the minimizing ratio of data volume and former data length have relation.Ethernet network packet length needs to send the data of 1280 bytes at every turn under the general case in 1500, with then being 16 bytes after the md5 encryption, only be 1/80 of former data length, can deposit 80 data encrypted like this in the data of same 1280 bytes.The data that need to transmit have been lacked speed and have also just been promoted, and the expansion of user profile can not have influence on the size of encrypting the back data, can save more than 60% at least on the time.Because the verification time shortens greatly, carry out data check the burden that equipment increases is significantly reduced, therefore can increase the frequency of carrying out data check, shorten the cycle of data check, to guarantee the reliability of data backup.
Another benefit of the present invention is that implementation is simple, and the MD5 algorithm application described in the invention is very universal, in a lot of equipment ready-made MD5 algoritic module is arranged all, therefore only need just transform slightly existing equipment and can realize the present invention program.Simultaneously, MD5 algorithm of the present invention can be replaced by any algorithm that extracts data summarization information, makes practicality of the present invention further strengthen.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.
Claims (8)
1, the method for data check between a kind of main equipment and the alternate device is characterized in that, comprises the steps:
A, main equipment data are carried out hash class algorithm for encryption and are generated the verification packet, will verify packet and be sent to alternate device;
After B, alternate device are received and are verified packet, this device data is also used identical algorithm for encryption, the data that data encrypted and main equipment are sent compare, if the two identical representative master/slave data unanimity, and if the two difference with on the alternate device with main equipment on different data become the data identical with main equipment.
2, method according to claim 1 is characterized in that, described cryptographic algorithm is MD5.
3, method according to claim 1 is characterized in that, before described steps A, further comprises: the size that each encrypts the pairing data volume of verification packet of back generation is set.
According to claim 1,2 or 3 described methods, it is characterized in that 4, described main equipment is a GGSN equipment, described alternate device is a storage unit in GGSN equipment or the GGSN equipment.
5, method according to claim 4 is characterized in that, the described data of verifying are user profile.
6, method according to claim 5 is characterized in that, encrypts generation verification packet described in the steps A to be: the data that obtain after user profile is encrypted and the numbering of these user profile correspondences generate the verification packet.
7, method according to claim 6 is characterized in that, described in the step B with on the alternate device with main equipment on different data become the data identical and be with main equipment:
B1, alternate device return this data user information corresponding numbering to main equipment, and these user profile on the deletion alternate device;
After B2, main equipment are received the user profile numbering, these numbering user information corresponding are sent to alternate device;
B3, alternate device store the user profile of receiving as Backup Data.
8, method according to claim 6 is characterized in that, described in the step B with on the alternate device with main equipment on different data become the data identical and be with main equipment:
B1, alternate device return this data user information corresponding numbering to main equipment;
After B2, main equipment were received the user profile numbering, each user profile that these numberings are corresponding was used md5 encryption respectively, the numbering generation secondary of data encrypted and this user profile is verified packet send to alternate device;
After B3, alternate device receive that secondary is verified packet, each user profile of the verification packet correspondence that comparative result on the alternate device is different is compressed with MD5 respectively, with data encrypted and the data contrast that comes autonomous device, find out this relatively different data user information corresponding numbering of comparing result, and these user profile numbering sent to main equipment, and delete the corresponding alternate device stored user information of these user profile numberings;
After B4, main equipment are received user profile numbering, return these numbering user information corresponding to alternate device, alternate device with these information stores as Backup Data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB200510132328XA CN100357901C (en) | 2005-12-21 | 2005-12-21 | Method for verifying data between main device and back-up device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB200510132328XA CN100357901C (en) | 2005-12-21 | 2005-12-21 | Method for verifying data between main device and back-up device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1851659A CN1851659A (en) | 2006-10-25 |
CN100357901C true CN100357901C (en) | 2007-12-26 |
Family
ID=37133138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB200510132328XA Expired - Fee Related CN100357901C (en) | 2005-12-21 | 2005-12-21 | Method for verifying data between main device and back-up device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100357901C (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192971B (en) * | 2006-11-23 | 2011-05-11 | 中兴通讯股份有限公司 | Detection method for master/slave data consistency |
CN101102315B (en) * | 2007-07-31 | 2011-05-11 | 中兴通讯股份有限公司 | Content provision method based on content verification |
CN101494658B (en) * | 2008-01-24 | 2013-04-17 | 华为技术有限公司 | Method, apparatus and system for implementing fingerprint technology |
CN104111937A (en) * | 2013-04-18 | 2014-10-22 | 中兴通讯股份有限公司 | Master database standby database and data consistency testing and repairing method and device of master database and standby database |
CN104077338B (en) * | 2013-06-25 | 2016-02-17 | 腾讯科技(深圳)有限公司 | A kind of method of data processing and device |
CN103441983A (en) * | 2013-07-11 | 2013-12-11 | 盛科网络(苏州)有限公司 | Information protection method and device based on link layer discovery protocol |
US9633227B2 (en) | 2013-07-29 | 2017-04-25 | Tencent Technology (Shenzhen) Company Limited | Method, apparatus, and system of detecting unauthorized data modification |
CN104134044B (en) * | 2013-07-29 | 2016-05-04 | 腾讯科技(深圳)有限公司 | A kind of detection method, device and system of Information Security |
CN104731792B (en) * | 2013-12-19 | 2018-09-21 | 中国银联股份有限公司 | The method and system of data base consistency(-tance) method of calibration and system, location database difference |
CN104965769A (en) * | 2014-07-28 | 2015-10-07 | 浙江大华技术股份有限公司 | System, method and apparatus for on-line detecting consistency of memory data between primary and standby servers |
CN104462568B (en) * | 2014-12-26 | 2018-07-31 | 山东中创软件商用中间件股份有限公司 | A kind of data account checking method, device and system |
CN107948011B (en) * | 2017-11-16 | 2020-07-24 | 苏州浪潮智能科技有限公司 | Method and system for verifying data consistency under network pressure |
CN111064770B (en) * | 2019-11-12 | 2021-11-05 | 国网辽宁省电力有限公司信息通信分公司 | Method and system for capturing and synchronizing data bypass of power grid system |
CN111274474A (en) * | 2020-01-16 | 2020-06-12 | 平安科技(深圳)有限公司 | Object recommendation method, electronic device and computer-readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5659614A (en) * | 1994-11-28 | 1997-08-19 | Bailey, Iii; John E. | Method and system for creating and storing a backup copy of file data stored on a computer |
US5940507A (en) * | 1997-02-11 | 1999-08-17 | Connected Corporation | Secure file archive through encryption key management |
CN1228174A (en) * | 1996-07-12 | 1999-09-08 | 格莱纳瑞电子公司 | Apparatus and methods for transmission security in computer network |
CN1341240A (en) * | 1999-12-20 | 2002-03-20 | 大日本印刷株式会社 | Distributed data archive device and system |
CN1413401A (en) * | 1999-10-29 | 2003-04-23 | 西门子公司 | Method for operating secondary computer, switching devices for flawless operation and corresponding programme |
US20040003272A1 (en) * | 2002-06-28 | 2004-01-01 | International Business Machines Corporation | Distributed autonomic backup |
CN1543617A (en) * | 2001-08-20 | 2004-11-03 | ��Ϣ���Ŀƽ�����˾ | Efficient computer file backup system and method |
CN1614566A (en) * | 2004-11-29 | 2005-05-11 | 中兴通讯股份有限公司 | Back-up restoring method for user database |
CN1642114A (en) * | 2005-01-07 | 2005-07-20 | 刘惠山 | Hand-held mobile terminal user customized information network back-up method |
-
2005
- 2005-12-21 CN CNB200510132328XA patent/CN100357901C/en not_active Expired - Fee Related
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5659614A (en) * | 1994-11-28 | 1997-08-19 | Bailey, Iii; John E. | Method and system for creating and storing a backup copy of file data stored on a computer |
CN1228174A (en) * | 1996-07-12 | 1999-09-08 | 格莱纳瑞电子公司 | Apparatus and methods for transmission security in computer network |
US5940507A (en) * | 1997-02-11 | 1999-08-17 | Connected Corporation | Secure file archive through encryption key management |
CN1413401A (en) * | 1999-10-29 | 2003-04-23 | 西门子公司 | Method for operating secondary computer, switching devices for flawless operation and corresponding programme |
CN1341240A (en) * | 1999-12-20 | 2002-03-20 | 大日本印刷株式会社 | Distributed data archive device and system |
CN1543617A (en) * | 2001-08-20 | 2004-11-03 | ��Ϣ���Ŀƽ�����˾ | Efficient computer file backup system and method |
US20040003272A1 (en) * | 2002-06-28 | 2004-01-01 | International Business Machines Corporation | Distributed autonomic backup |
CN1614566A (en) * | 2004-11-29 | 2005-05-11 | 中兴通讯股份有限公司 | Back-up restoring method for user database |
CN1642114A (en) * | 2005-01-07 | 2005-07-20 | 刘惠山 | Hand-held mobile terminal user customized information network back-up method |
Non-Patent Citations (1)
Title |
---|
磁盘文件镜像备份程序的设计与实现 王晓升,全文,吉林大学硕士学位论文 2004 * |
Also Published As
Publication number | Publication date |
---|---|
CN1851659A (en) | 2006-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100357901C (en) | Method for verifying data between main device and back-up device | |
CN109117097B (en) | Data storage method and system based on block chain | |
CN110175840B (en) | Method, client, alliance chain and system for realizing light wallet mechanism in alliance chain | |
CN101313495B (en) | Method, system and apparatus for data synchronization | |
US8984363B1 (en) | Proof of retrievability for archived files | |
JP5090066B2 (en) | Data storage device, management server, integrated circuit, data update system, home appliance, data update method, encryption method, and encryption / decryption key generation method | |
CN103116615B (en) | A kind of data index method and server based on version vector | |
CN101535845A (en) | Authenticated radio frequency identification and key distribution system therefor | |
CN101409614A (en) | Data synchronization method, system and equipment | |
CN104331346A (en) | Data protection method | |
CN104410683A (en) | Data backup method | |
CN104331345B (en) | A kind of data reconstruction method | |
CN112491989A (en) | Data transmission method, device, equipment and storage medium | |
US9231927B2 (en) | Information processing apparatus, data generation method, information processing method, and information processing system for updating and verifying software programs | |
CN109845183A (en) | For from client device to the method for cloud storage system storing data block | |
CN101771548A (en) | File synchronizing method and system | |
CN108810112A (en) | A kind of node synchronization method and device of market surpervision block catenary system | |
CN111046407A (en) | Data storage system based on block chain | |
CN100476844C (en) | Method for realizing binding function between electronic key and computer | |
CN108765230A (en) | A kind of resident's household register approaches to IM and server | |
CN105224262A (en) | Data processing method | |
CN105183402A (en) | Data storage method | |
CN108040090A (en) | A kind of system combination method of more Web | |
KR20020023663A (en) | A method of detecting write conflicts in replicated databases without memory overhead | |
CN101609492A (en) | The encipher-decipher method of embedded device and 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 | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20071226 Termination date: 20131221 |