Summary of the invention
For solving the deficiency that above-mentioned prior art exists, a kind of network equipment need be provided, be used for solving public exchanging telephone network and can't carry out the communication abnormality that time synchronized caused because of network equipment.
In addition, also need provide a kind of method for synchronizing time, be used for solving public exchanging telephone network and can't carry out the communication abnormality that time synchronized caused because of network equipment.
A kind of network equipment is connected with local switch, and comprises interface main system, interface backup system, and management system.The interface main system comprises that main transceiver module is used to receive the instruction that local switch sends, and the temporal information in the interface main system is sent to interface backup system.Interface backup system comprises standby transceiver module, standby timing module and standby timing service module.Standby transceiver module is used to judge whether to receive the replacement information that management system sends, and the affirmation information that sends this instruction to local switch.The standby timing module is used to write down described standby transceiver module and receives that described temporal information sends the time of the affirmation information of instruction to described local switch to described standby transceiver module.The standby timing service module is used for starting the standby timing module according to this temporal information and carries out timing.The interface main system that management system is used for makeing mistakes replaces with interface backup system, and replacement information is sent to interface backup system.
A kind of method for synchronizing time, in the network equipment that is applied to be connected with user side and local switch, this network equipment comprises interface main system, interface backup system and management system, wherein, module when service module and analytic accounting when the interface main system also comprises main transceiver module, analytic accounting, interface backup system also comprises standby transceiver module, standby timing module and standby timing service module, this method for synchronizing time comprises: after main transceiver module received the instruction of local switch transmission, module was carried out timing when service module started analytic accounting during analytic accounting; Main transceiver module during with analytic accounting the temporal information in the module send to the standby timing service module; The standby timing service module starts the standby timing module according to this temporal information and carries out timing; During standby timing module timing overtime, standby transceiver module judges whether to receive the replacement information that management system sends; If standby transceiver module receives this replacement information, then standby transceiver module sends the affirmation information of this instruction to local switch.
Network equipment in the embodiment of the present invention and method for synchronizing time thereof, in the time of can be by standby timing module and standby timing service module and analytic accounting when service module and analytic accounting module carry out time synchronisation, can't send confirmation to local switch when preventing that the interface main system from makeing mistakes, can guarantee the communication network normal operation thus.
Embodiment
See also Fig. 1, be depicted as the applied environment schematic diagram of network equipment 20 in the embodiment of the present invention.Network equipment 20 is connected with user side 10 and local switch 30, and local switch 30 can pass through V5 interface management network equipment 20.In the present embodiment, user side 10 can be analog telephone, and network equipment 20 can be access network (Access Network, AN) equipment.
See also Fig. 2, be depicted as the module map of network equipment 20 in the embodiment of the present invention.Network equipment 20 comprises interface main system 22, interface backup system 24 and management system 26.
Module 224 when service module 222 and analytic accounting when interface main system 22 comprises main transceiver module 220, analytic accounting.
Main transceiver module 220 is used to receive the instruction that local switch 30 sends, and the temporal information in the interface main system 22 is sent to interface backup system 24.
Module 224 is used to write down main transceiver module 220 sends the affirmation information of these instructions to local switch 30 to main transceiver module 220 from the instruction that receives local switch 30 transmissions time during analytic accounting.In the present embodiment, main transceiver module 220 can not be greater than 5 seconds from the instruction that receives local switch 30 and send to the time interval that sends the affirmation information of these instructions to local switch 30.
Module 224 was carried out timing when service module 222 was used for starting analytic accounting when main transceiver module 220 receives the instruction of local switch 30 transmissions during analytic accounting.
Interface backup system 24 comprises standby transceiver module 240, standby timing module 242 and standby timing service module 244.
Standby transceiver module 240 is used to judge whether to receive the replacement information that management system 26 sends, and the affirmation information that sends this instruction to local switch 30.
Standby timing module 242 is used to be recorded in standby transceiver module 240 and receives that this temporal information sends the time of the affirmation information of this instruction to local switch 30 to standby transceiver module 240.
Standby timing service module 244 is used for starting standby timing module 242 according to this temporal information and carries out timing.
The interface main system 22 that management system 26 is used for makeing mistakes replaces with interface backup system 24, and replacement information is sent to interface backup system 24.
In the present embodiment, have only interface main system 22 in running order under the proper communication situation.When interface main system 22 was made mistakes, management system 26 was replaced interface main system 22 with interface backup system 24, and this moment, interface backup system 24 was just in running order.
Consult Fig. 3, be depicted as the flow chart of method for synchronizing time in the embodiment of the present invention.
In the present embodiment, management system 26 is detected the working condition of interface main system 22 constantly.When if interface main system 22 can not be worked because of software or hardware error occurring, management system 26 is replaced the interface main system 22 of makeing mistakes with interface backup system 24, and replacement information is sent to standby transceiver module 240.
At step S300, network equipment 20 is in holding state.
At step S302, main transceiver module 220 receives the instruction that local switch 30 sends.
In the present embodiment, the instruction of local switch 30 transmissions comprises ringing instruction and polarity inversion instruction.If have user and user side 10 to connect, local switch 30 can see through main transceiver module 220 and set up communicating to connect of calling subscriber and user side 10 to user side 10 transmission ringing instructions, and after communicating to connect foundation, send polarity inversions by main transceiver module 220 to user side 10 and instruct and begin to calculate air time between calling subscriber and the user side 10.
Enter step S304, module 224 was carried out timing when service module 222 started analytic accountings during analytic accounting, main simultaneously transceiver module 220 during with analytic accounting the temporal information in the module 224 send to standby timing service module 244.
Enter step S306, standby timing service module 244 starts standby timing module 242 according to this temporal information and carries out timing.
Enter step S308, during standby timing module 242 timing overtimes, standby transceiver module 240 judges whether to receive the replacement information that management system 26 sends.If standby transceiver module 240 is received the replacement information that management system 26 sends, then enter step S310, standby transceiver module 240 sends the affirmation information of this instruction to local switch 30.If standby transceiver module 240 is not received the replacement information that management system 26 sends, then enter step S312, main transceiver module 220 sends the affirmation information of this instruction to local switch 30.
Network equipment 20 and method for synchronizing time thereof in the embodiment of the present invention, can be by standby timing module 242 and standby timing service module 244 during with analytic accounting when service module 222 and analytic accounting module 224 carry out time synchronisation, send confirmations can't for when preventing that interface main system 22 from makeing mistakes local switch 30, guarantee the communication network normal operation thus.