CN103199978A - Method and device for log synchronization - Google Patents

Method and device for log synchronization Download PDF

Info

Publication number
CN103199978A
CN103199978A CN2013100977939A CN201310097793A CN103199978A CN 103199978 A CN103199978 A CN 103199978A CN 2013100977939 A CN2013100977939 A CN 2013100977939A CN 201310097793 A CN201310097793 A CN 201310097793A CN 103199978 A CN103199978 A CN 103199978A
Authority
CN
China
Prior art keywords
equipment
log
daily record
instruction
auxilliary
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
CN2013100977939A
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.)
TVMining Beijing Media Technology Co Ltd
Original Assignee
TVMining Beijing Media Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TVMining Beijing Media Technology Co Ltd filed Critical TVMining Beijing Media Technology Co Ltd
Priority to CN2013100977939A priority Critical patent/CN103199978A/en
Publication of CN103199978A publication Critical patent/CN103199978A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a device for log synchronization, wherein the method and the device are used for achieving the log synchronization of a primary device and an auxiliary device. The method includes the steps that the primary device and the auxiliary device receive commands and process the commands; one of the primary device and the auxiliary device records logs according to the sequence of the received commands; and the device recording the logs enables the logs to be synchronized to the other device.

Description

A kind of method of synchronization log and device
Technical field
The present invention relates to computer and communication technical field, relate in particular to a kind of method and device of synchronization log.
Background technology
For uninterrupted service in 24 hours is provided, in the communications field, the mode that often adopts major-minor equipment to work simultaneously.For ancillary equipment, do not know to exist major-minor two service equipments, it thinks to have only an equipment that it is being served.Major-minor equipment is worked simultaneously, receives the request of ancillary equipment simultaneously and handles, but have only an equipment that result is sent to ancillary equipment.
Simultaneously, for the ease of malfunction elimination and the various information of inquiry, major-minor equipment all will carry out the daily record record to whole process.And the daily record of major-minor equipment also must be synchronously.
But simultaneously during log, may have a kind of situation: main equipment receives instruction A, and handles, simultaneously recording instruction A in daily record at major-minor equipment.Auxilliary equipment receives instruction B, and handles, simultaneously recording instruction B in daily record.During major-minor device synchronization daily record, main equipment will instruct A to send to auxilliary equipment, and auxilliary equipment will instruct A to be recorded in the daily record, and then Ji Lu daily record is BA.Same, auxilliary equipment will instruct B to send to main equipment, and main equipment will instruct B to be recorded in the daily record, and then Ji Lu daily record is AB.
This shows that the log content of major-minor equipment is identical, but order is inconsistent, still is unrealized fully synchronously.
Summary of the invention
The embodiment of the invention provides a kind of method and device of synchronization log, is used for realizing that the daily record of major-minor equipment is synchronous.
A kind of method of synchronization log may further comprise the steps: main equipment and auxilliary equipment receive instruction and handle; An equipment in main equipment and the auxilliary equipment is according to the journal daily record that receives instruction; The equipment of log is given another equipment synchronously with daily record.By an equipment records daily record in main equipment and the auxilliary equipment, give another equipment more synchronously in the present embodiment, avoided two equipment chaotic problem of order of log simultaneously.
Preferably, an equipment in main equipment and the auxilliary equipment comprises according to the step of the journal daily record that receives instruction: an equipment in main equipment and the auxilliary equipment is the instruction that receives configuration flag in order; The equipment of configuration flag is according to the journal daily record of mark.Mark by configuration in the present embodiment can embody record smoothly, and guarantee the content sequence consensus of daily record when being conducive to recover daily record.
Preferably, described method also comprises step: an equipment in main equipment and the auxilliary equipment is when fault, if this equipment is the equipment of log, then another equipment changes to the equipment of log.When the equipment fault of log, need switch to another equipment in the present embodiment, to guarantee not interrupting of daily record.
Preferably, described method also comprises step: an equipment in main equipment and the auxilliary equipment sends up-to-date mark in daily record to another equipment after fault recovery, receive the log information after up-to-date mark that another equipment sends.After the equipment fault of former log recovers, can make its new daily record synchronously in the present embodiment.
Preferably, described method also comprises step: an equipment in main equipment and the auxilliary equipment is when fault, if this equipment is the equipment of log, then after fault recovery, this equipment changes to the equipment of log.Keep same equipment in the present embodiment is the equipment of log as far as possible, after this equipment fault recovers, recovers this equipment records daily record.
A kind of equipment for synchronization log comprises:
Instruction module is used for receiving instruction and handling;
Log pattern is used for according to the journal daily record that receives instruction;
Interface module is used for giving another equipment synchronously with daily record.
Log pattern is the instruction that receives configuration flag in order; Journal daily record according to mark.
Interface module also is used for after fault recovery, sends up-to-date mark in daily record to another equipment, receives the log information after up-to-date mark that another equipment sends.
After fault recovery, log pattern continues according to the journal daily record that receives instruction.
A kind of equipment for synchronization log comprises:
Instruction module is used for receiving instruction and handling;
Interface module is used for receiving the log information that another equipment sends;
Log pattern is used for according to the log information recording daily record of receiving.
Log pattern also is used for after another equipment fault, according to the journal daily record that receives instruction.
Log pattern is the instruction that receives configuration flag in order; Journal daily record according to mark.
Interface module also is used for receiving the mark that another equipment sends, and the log information after this mark being sent to another equipment after another equipment fault recovers.
Log pattern also is used for stopping according to the journal daily record that receives instruction after another equipment fault recovers.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, perhaps understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the specification of writing, claims and accompanying drawing.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Description of drawings
Accompanying drawing is used to provide further understanding of the present invention, and constitutes the part of specification, is used from explanation the present invention with embodiments of the invention one, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the main method flow chart of synchronization log in the embodiment of the invention;
Fig. 2 is the method flow diagram of main equipment synchronization log in the embodiment of the invention;
Fig. 3 is the method flow diagram of auxilliary device synchronization daily record in the embodiment of the invention;
Fig. 4 is the structure chart that is used for first equipment of synchronization log in the embodiment of the invention;
Fig. 5 is the structure chart that is used for second equipment of synchronization log in the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein only is used for description and interpretation the present invention, and be not used in restriction the present invention.
By an equipment records daily record in main equipment and the auxilliary equipment, give another equipment more synchronously in the present embodiment, avoided two equipment chaotic problem of order of log simultaneously.
Referring to Fig. 1, the main method flow process of synchronization log is as follows in the present embodiment:
Step 101: main equipment and auxilliary equipment receive instruction and handle.
Step 102: an equipment in main equipment and the auxilliary equipment is according to the journal daily record that receives instruction.
Step 103: the equipment of log is given another equipment synchronously with daily record.
Not only guarantee the complete of content in the daily record in the present embodiment, also guaranteed the order of log content.If this daily record is the record to conference content, then this daily record can directly be used as minutes.
Preferable, in step 102, an equipment in main equipment and the auxilliary equipment comprises according to the step of the journal daily record that receives instruction: an equipment in main equipment and the auxilliary equipment is the instruction that receives configuration flag in order; The equipment of configuration flag is according to the journal daily record of mark.Mark by configuration can guarantee the order of content in the daily record to be conducive to recover in order daily record when fault recovery.
In the present embodiment, an equipment in main equipment and the auxilliary equipment is when fault, if this equipment is the equipment of log, then another equipment changes to the equipment of log.And an equipment in main equipment and the auxilliary equipment sends up-to-date mark in daily record to another equipment after fault recovery, receive the log information after up-to-date mark that another equipment sends.After fault recovery, this equipment changes to the equipment of log.
When operate as normal, be that log is that example describes in detail with the main equipment.
Referring to Fig. 2, the method flow of main equipment synchronization log is as follows in the present embodiment:
Step 201: main equipment receives instruction and handles.Main equipment receives the instruction that instruction comprises that ancillary equipment and auxilliary equipment send.
Step 202: main equipment is according to the journal daily record that receives instruction.Concrete, the instruction that main equipment receives is configuration flag in order, according to the journal daily record of mark.
Step 203: main equipment is given auxilliary equipment synchronously with daily record.
Step 204: main equipment sends up-to-date mark in the daily record to auxilliary equipment after fault recovery.
Step 205: main equipment receives the log information after up-to-date mark that auxilliary equipment sends, and upgrades local daily record.
Step 206: main equipment continues according to the journal daily record that receives instruction.
Main equipment continues log in the present embodiment after fault recovery.Certainly, can continue after fault recovery by auxilliary equipment records daily record at main equipment, the function of log is not switched to main equipment yet.
Relative with main equipment, referring to Fig. 3, the method flow of auxilliary device synchronization daily record is as follows in the present embodiment:
Step 301: auxilliary equipment receives instruction and handles.
Step 302: auxilliary equipment receives the log information that main equipment sends.
Step 303: auxilliary equipment is according to the log information recording daily record of receiving.
Step 304: after master-failure, auxilliary equipment is according to the journal daily record that receives instruction.Auxilliary equipment can know that main equipment breaks down by modes such as heartbeat detection.And the instruction that auxilliary equipment will receive is configuration flag in order, according to the journal daily record of mark.
Step 305: after master-failure was recovered, auxilliary equipment received the mark that main equipment sends.
Step 306: auxilliary equipment sends to main equipment with the log information after this mark.
Step 307: auxilliary equipment stops according to the journal daily record that receives instruction.
Understood the implementation procedure of synchronization log by above description, this process is realized that by major-minor equipment the 26S Proteasome Structure and Function to major-minor equipment is introduced below.
Referring to Fig. 4, be used for the equipment of synchronization log in the present embodiment, be used for log when the equal operate as normal of major-minor equipment, it comprises: instruction module 401, log pattern 402 and interface module 403.
Instruction module 401 is used for receiving instruction and handling.
Log pattern 402 is used for according to the journal daily record that receives instruction.Log pattern 402 is the instruction that receives configuration flag in order; Journal daily record according to mark.
Interface module 403 is used for giving another equipment synchronously with daily record.
Interface module 403 also is used for after fault recovery, sends up-to-date mark in daily record to another equipment, receives the log information after up-to-date mark that another equipment sends.
After fault recovery, log pattern 402 continues according to the journal daily record that receives instruction.
Referring to Fig. 5, be used for the equipment of synchronization log in the present embodiment, be used for when the equal operate as normal of major-minor equipment not log, it comprises: instruction module 501, interface module 502 and log pattern 503.
Instruction module 501 is used for receiving instruction and handling.
Interface module 502 is used for receiving the log information that another equipment sends.
Log pattern 503 is used for according to the log information recording daily record of receiving.
Log pattern 503 also is used for after another equipment fault, according to the journal daily record that receives instruction.Preferable, log pattern 503 is the instruction that receives configuration flag in order; Journal daily record according to mark.
Preferable, interface module 502 also is used for receiving the mark that another equipment sends, and the log information after this mark being sent to another equipment after another equipment fault recovers.
Preferable, log pattern 503 also is used for stopping according to the journal daily record that receives instruction after another equipment fault recovers.
By an equipment records daily record in main equipment and the auxilliary equipment, give another equipment more synchronously in the present embodiment, avoided two equipment chaotic problem of order of log simultaneously.And, in the process of log, for every recording configuration mark, with the order of every record of mark.Can be marked at the daily record that recovers faulty equipment after the fault recovery by this.
Those skilled in the art should understand that embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware embodiment, complete software embodiment or in conjunction with the form of the embodiment of software and hardware aspect.And the present invention can adopt the form of the computer program of implementing in one or more computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) that wherein include computer usable program code.
The present invention is that reference is described according to flow chart and/or the block diagram of method, equipment (system) and the computer program of the embodiment of the invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block diagram and/or square frame and flow chart and/or the 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 to be used for the device of the function that is implemented 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 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 that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in 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 producing computer implemented processing at computer or other programmable devices, thereby be provided for being implemented in 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 in the instruction that computer or other programmable devices are carried out.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (14)

1. the method for a synchronization log is characterized in that, may further comprise the steps:
Main equipment and auxilliary equipment receive instruction and handle;
An equipment in main equipment and the auxilliary equipment is according to the journal daily record that receives instruction;
The equipment of log is given another equipment synchronously with daily record.
2. the method for claim 1 is characterized in that, an equipment in main equipment and the auxilliary equipment comprises according to the step of the journal daily record that receives instruction:
An equipment in main equipment and the auxilliary equipment is the instruction that receives configuration flag in order;
The equipment of configuration flag is according to the journal daily record of mark.
3. the method for claim 1 is characterized in that, also comprises step:
An equipment in main equipment and the auxilliary equipment is when fault, if this equipment is the equipment of log, then another equipment changes to the equipment of log.
4. method as claimed in claim 3 is characterized in that, also comprises step:
An equipment in main equipment and the auxilliary equipment sends up-to-date mark in daily record to another equipment after fault recovery, receive the log information after up-to-date mark that another equipment sends.
5. method as claimed in claim 3 is characterized in that, also comprises step: an equipment in main equipment and the auxilliary equipment is when fault, if this equipment is the equipment of log, then after fault recovery, this equipment changes to the equipment of log.
6. an equipment that is used for synchronization log is characterized in that, comprising:
Instruction module is used for receiving instruction and handling;
Log pattern is used for according to the journal daily record that receives instruction;
Interface module is used for giving another equipment synchronously with daily record.
7. equipment as claimed in claim 6 is characterized in that, log pattern is the instruction that receives configuration flag in order; Journal daily record according to mark.
8. equipment as claimed in claim 6 is characterized in that, interface module also is used for after fault recovery, sends up-to-date mark in daily record to another equipment, receives the log information after up-to-date mark that another equipment sends.
9. equipment as claimed in claim 6 is characterized in that, after fault recovery, log pattern continues according to the journal daily record that receives instruction.
10. an equipment that is used for synchronization log is characterized in that, comprising:
Instruction module is used for receiving instruction and handling;
Interface module is used for receiving the log information that another equipment sends;
Log pattern is used for according to the log information recording daily record of receiving.
11. equipment as claimed in claim 10 is characterized in that, log pattern also is used for after another equipment fault, according to the journal daily record that receives instruction.
12. equipment as claimed in claim 11 is characterized in that, log pattern is the instruction that receives configuration flag in order; Journal daily record according to mark.
13. equipment as claimed in claim 11 is characterized in that, interface module also is used for receiving the mark that another equipment sends, and the log information after this mark being sent to another equipment after another equipment fault recovers.
14. equipment as claimed in claim 11 is characterized in that, log pattern also is used for stopping according to the journal daily record that receives instruction after another equipment fault recovers.
CN2013100977939A 2013-03-25 2013-03-25 Method and device for log synchronization Pending CN103199978A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100977939A CN103199978A (en) 2013-03-25 2013-03-25 Method and device for log synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100977939A CN103199978A (en) 2013-03-25 2013-03-25 Method and device for log synchronization

Publications (1)

Publication Number Publication Date
CN103199978A true CN103199978A (en) 2013-07-10

Family

ID=48722345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100977939A Pending CN103199978A (en) 2013-03-25 2013-03-25 Method and device for log synchronization

Country Status (1)

Country Link
CN (1) CN103199978A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426265A (en) * 2016-03-11 2017-12-01 阿里巴巴集团控股有限公司 The synchronous method and apparatus of data consistency

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489052A (en) * 2002-10-11 2004-04-14 鸿富锦精密工业(深圳)有限公司 Multi-node file syn chronizing system and method
CN102075315A (en) * 2010-11-24 2011-05-25 中兴通讯股份有限公司 Data synchronization method and device among forwarding boards
CN102891849A (en) * 2012-09-25 2013-01-23 北京星网锐捷网络技术有限公司 Service data synchronization method, data recovery method, data recovery device and network device
CN102968486A (en) * 2012-11-26 2013-03-13 国电南瑞科技股份有限公司 High-reliability file synchronization method based on log change

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489052A (en) * 2002-10-11 2004-04-14 鸿富锦精密工业(深圳)有限公司 Multi-node file syn chronizing system and method
CN102075315A (en) * 2010-11-24 2011-05-25 中兴通讯股份有限公司 Data synchronization method and device among forwarding boards
CN102891849A (en) * 2012-09-25 2013-01-23 北京星网锐捷网络技术有限公司 Service data synchronization method, data recovery method, data recovery device and network device
CN102968486A (en) * 2012-11-26 2013-03-13 国电南瑞科技股份有限公司 High-reliability file synchronization method based on log change

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426265A (en) * 2016-03-11 2017-12-01 阿里巴巴集团控股有限公司 The synchronous method and apparatus of data consistency

Similar Documents

Publication Publication Date Title
CN105159795A (en) Data synchronization method, apparatus and system
CN103886091A (en) Database synchronization method based on record marks
CN103064761B (en) A kind of method of data synchronization, equipment and system
CN107729515B (en) Data synchronization method, device and storage medium
CN102982087A (en) Method and device and data bank system for detecting data bank uniformity
CN104572355A (en) Asynchronous remote data copying method and device
CN103905220B (en) Data synchronizing processing method and system
CN103488504A (en) Method and device for loading data
CN101937378B (en) Method for carrying out back-up protection on data of storage equipment and computer system
CN102521167B (en) USB (universal serial bus) electronic information anti-disclosure memory device and method
CN103281720A (en) Method and device for switching wireless controller hot standbys, wireless controller and access system
CN103199978A (en) Method and device for log synchronization
CN103176866A (en) File permission back-up method applied in new technology file system (NTFS)
CN102736962A (en) Method and device of recovering data
CN105159944A (en) Database emergency handling method and system
CN105591801A (en) Virtual network function VNF fault processing method and VNF management equipment
CN102684928B (en) The method and apparatus of a kind of service backup and recovery
CN101022633A (en) Allocation data recovering method, system and device
CN102413154A (en) Method of data information synchronization between systems and apparatus thereof
CN105487921A (en) Task stack management method and apparatus
CN105511808A (en) Data operation method, system and related device
CN102983997A (en) Method and device for migrating master services
CN102325171A (en) Data storage method in monitoring system and system
CN112667698B (en) MongoDB data synchronization method based on converged media platform
CN101202934A (en) Device for processing internal storage data base content variety real-time informing business

Legal Events

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

Application publication date: 20130710