CN1988400A - Master and slave converting method for communication link circuit - Google Patents

Master and slave converting method for communication link circuit Download PDF

Info

Publication number
CN1988400A
CN1988400A CN 200510132445 CN200510132445A CN1988400A CN 1988400 A CN1988400 A CN 1988400A CN 200510132445 CN200510132445 CN 200510132445 CN 200510132445 A CN200510132445 A CN 200510132445A CN 1988400 A CN1988400 A CN 1988400A
Authority
CN
China
Prior art keywords
communication
link
opposite equip
data
switching
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.)
Granted
Application number
CN 200510132445
Other languages
Chinese (zh)
Other versions
CN100505574C (en
Inventor
花茂盛
刘燕
黄守旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2005101324456A priority Critical patent/CN100505574C/en
Publication of CN1988400A publication Critical patent/CN1988400A/en
Application granted granted Critical
Publication of CN100505574C publication Critical patent/CN100505574C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

This invention discloses a master-backup conversion method for a communication links including: setting up master-backup communication channels between local and the opposite ends, each set of which includes a data link for transmitting user data and a communication link for managing data links, setting up communication ports of a physical layer, a transmission thread and a receiving thread, detecting if the communication with the opposite end device is normal, if it is faulty, the local end device enters into a waiting state, detecting the state of the opposite end device again after delaying random time till it is recovered, detecting in advance if the converted link state can meet the conversion condition, then it executes the conversion.

Description

A kind of main and standby rearranging method of communication link
Technical field
The present invention relates to a kind of main and standby rearranging method of communication link in the communication apparatus, specifically, relate to the method for the circuit redundancy backup in transport communication field.
Background technology
In communication field, to work steadily in the long term in order to guarantee communication apparatus, most systems all requires to carry out Redundancy Design in application, when wherein a part of equipment breaks down, can jump to backup units.And in circuit transport communication field, the weakest link of quality is transmission line normally, therefore need carry out Redundancy Design at transmission link.
Method commonly used at present all is to adopt two complete equipments, is set at main equipment and stand-by equipment respectively, when breaking down, switches between main equipment and stand-by equipment.For example in Chinese patent 00106113.5 " main and standby rearranging method of switch and implement device thereof ", introduced a kind of main and standby rearranging method and implement device thereof that is used for switch; And in Chinese patent 02121024.1 " realizing the method that master/slave device is switched fast in the communication equipment ", utilize the FPGA (Field Programmable Gate Array) in the communication equipment to realize by master/slave device switching; And in patent 02103929.1 " main and standby rearranging method in a kind of communication apparatus ",, realize two veneers masterslave switchover process fast with this plate with to four bar state holding wires of board status.The reverse method of this class has used the consistent method of two covers, and in the course of the work, two complete equipments will be worked simultaneously, and mutual interactive command, and under failure condition, do not consider it is equipment fault, or line fault, promptly directly are switched in the other cover system.Such design need drop into more cost, and two complete equipments need interaction data in switching, and switches also and can not finish very soon.
At patent 02159089.3 " communication channel main and standby rearranging method ", be switching of a plurality of equipment, to each communication node be provided with two PORT COM and respectively by two cover switching architectures arbitrarily a pair of set up make up between the node that communication connects one main with communication channel and a standby communication channel; The communication link management node that it need not be concentrated also need not be controlled switching equipment, though improved versatility, needs to increase master/slave device management equipment in addition, has increased cost more.
In sum, existing reverse method is confined to switching of facility level, has ignored the fact that the fault point has more present transmission line, therefore such switches design, and more loaded down with trivial details, cost is also than higher.When two device hardwares are identical, if break down simultaneously, and apply for to the other side simultaneously, after application can not get confirming, also can cancel request simultaneously, like this, two equipment always are in application, cancel, application in the circulation of cancelling, can cause the final deadlock of equipment.
There is defective in prior art, therefore awaits continuing to improve and development.
Summary of the invention
The problem that design exists of switching at proposing previously the present invention proposes between a kind of passage different in an equipment and realizes main.
Technical scheme of the present invention comprises:
A kind of main and standby rearranging method of communication link, it may further comprise the steps:
A: in two side apparatus of communications network, one end is called local terminal, the other end is called the opposite end, between local terminal and opposite end, with different ports, set up the host-standby communication passage, in every group communication passage, comprise with the transmitting user data being the data link of purpose and being the communication link of purpose with the management data link;
B: between local terminal equipment and the opposite equip., set up the physical layer communication port, and set up transmission thread and receiving thread;
Whether C: detect with the communication of opposite equip. normally, if opposite equip. breaks down and causes the communication link can't communication, local terminal equipment enters wait state; Time-delay detects the normal condition of opposite end once more after the time at random, if with normal to the end communication recovery, execution in step D if fault is not got rid of, continues wait;
D: detect self alarm status,, continue execution in step E if alarm has appearred in equipment self; Otherwise get back to step C;
E: whether the link circuit condition that detects after switching can satisfy the condition of switching in advance, if can improve following execution in step F, G; If can not improve, prolong with regard to the request of abandoning switching and to return step C after the machine time at random;
G: after opposite equip. was received switching request, also whether the link circuit condition that detects after switching in advance can satisfy the condition of switching, and can the alarm status of promptly switching the back link improve, and if any improvement, carried out following steps H;
H: opposite equip. sends the instruction that agreement is switched, and local terminal is received the affirmation that makes an explanation after this instructs, and two equipment are switched simultaneously and entered standby attitude.
Described method, wherein, among the described step G as can not improve, execution in step then:
I: opposite equip. sends the instruction that refusal is switched, and returns to normal condition;
J: local terminal receives that tear down switches, and after local terminal random delay a period of time, gets back to normal state then.
Described method, wherein, the transmission thread among the described step B comprises:
B11: transmitting terminal sends data to opposite equip., sends sign state 1 earlier;
B12: delay time 0.1 millisecond;
B13: send sign state 2;
B14: delay time 0.1 millisecond;
B15: send the valid data sign indicating number;
B16: delay time 0.1 millisecond;
B17: delay time 0.1 millisecond again, iteron step B11, circulation successively.
Described method, wherein, the receiving thread among the described step B comprises:
B21: receiving terminal detected state;
B22: delay time 0.05 millisecond;
B23: repeating step B21 totally 10 times;
B24: judge according to this result of ten times whether the opposite end instruction is normal.
Described method, wherein, the judgement of described step B24 comprises:
If 10 times there is and has only sign state 1 the inside, sign state 2 and significant digit code, then the instruction of equipment reception is effective; Have and have only sign state 1,2 of sign states are looked opposite equip. and are in normally; Receiving any other data, all to look opposite equip. be abnormal condition.
Described method, wherein, the random number seed producing method of described random delay comprises:
The time of device start; Behind the device start in the internal memory some do not have initialized data; Or the time of user's operation for the first time.
Described method, wherein, described data link and communication link are unified physically.
Described method, wherein, in the physical layer communication port between described local terminal equipment and the opposite equip., described physical layer is simple I/O mouth, E1 link, the perhaps communication modes of alternate manner.
The main and standby rearranging method of a kind of communication link provided by the present invention can be simply, fast, switch reliably, switches in an equipment, do not need mutual configuration data when switching, and easily promptly finished and switched; The hardware resource that whole reversed process relies on is few, does not need two complete equipments, does not also need external management equipment; Proposed a kind of simple and direct command interaction mode, can solve well because the equipment deadlock problem that the agreement problem causes.
Description of drawings
Fig. 1 is the topology diagram of the equipment of the inventive method;
Fig. 2 is the transmission command status transition diagram of the inventive method;
Fig. 3 is the communication link flow path switch figure of the inventive method.
Embodiment
To be described in more detail each preferred embodiment of the present invention below in conjunction with accompanying drawing.
The main and standby rearranging method of communication link of the present invention is realized by following steps, as shown in Figure 3:
Step 1: set up the system that forms by two equipment as shown in Figure 1.In the communications network, each is made up of both sides an equipment, and wherein an end is called local terminal, and an other side that connects by circuit is called the opposite end.Between local terminal and the opposite end,, set up the host-standby communication passage, in every group communication passage, comprise with the transmitting user data being the data link of purpose and being the communication link of purpose with the management data link with different ports.Data link and communication link can be unified physically.
As shown in Figure 1, the A point can be transmitted by two-way data channel 1 with carrying out the transmission of data between the B point, also can transmit by two-way data channel 2; Communication channel between equipment 1 and the equipment 2 adopts communication channel 1 or communication channel 2 to carry out communication.When communication channel adopts communication channel 1, when data channel also adopts data channel 1, be in the main attitude of using; When communication channel adopts communication channel 2, when data channel also adopts data channel 2, be in standby attitude;
Step 2: between local terminal equipment and the opposite equip., set up four communication positions earlier, the communication between apparatus for establishing 1 and the equipment 2 realizes by following substep.
No matter adopting which type of physical layer carries out, its purpose all is to guarantee that data can be delivered to opposite equip. like clockwork, adopted a kind of method that can carry out data passes with fairly simple agreement in the methods of the invention, simultaneously can guarantee that data accurately, inerrably are transferred to the other side, and whether normally can learn method, apparatus, adopted the reliable delivery that guarantees data than the more reliable measuring means of common method of calibration simultaneously.Compare with the common method means of communication, this method has following advantage: 1. accurate 2. hardware resources of data take minimum (can realize because adopt four communication positions in four I/O interface lines or the E1), and programming is fairly simple.3. reliability high 4. is when opposite equip. crashes or removes, and state promptly can upgrade.
Below be described each substep:
Substep 2.1: the physical layer communication port between apparatus for establishing 1 and the equipment 2, physical layer can be simple I/O mouths, also can be E1 link, the perhaps communication modes of alternate manner.
The inventive method is utilized 4 communication positions of PORT COM, and for example 4 of 0 time slot in the 2M communication link keep the position.The connotation that defines these 4 bit is as follows:
BIT4 BIT3 BIT2 BIT1
BIT4-BIT1: four position transmission commands and information;
Substep 2.2: set up and send thread and receiving thread; Sending thread arrives shown in the substep 2.9, as shown in Figure 2 as substep 2.3.Receiving thread arrives shown in the substep 2.13 as substep 2.10.
Transmitting terminal:
Substep 2.3: transmitting terminal sends data to opposite equip., sends earlier sign state 1, as shown in Table 0000,
Substep 2.4: delay time 0.1 millisecond.
Substep 2.5: send sign state 2, as shown in Table 1111.
Substep 2.6: delay time 0.1 millisecond.
Substep 2.7: send valid data sign indicating number M.
Substep 2.8: delay time 0.1 millisecond.
Substep 2.9: delay time 0.1 millisecond again, iteron step 2.3, circulation successively.
Receiving terminal:
Substep 2.10: receiving terminal detected state.
Substep 2.11: delay time 0.05 millisecond.
Substep 2.12: iteron step 2.10 totally 10 times.
Substep 2.13: if there is and has only sign state 1 10 the insides, sign state 2 and significant digits M, the instruction of equipment reception at this moment is effective.Have and have only sign state 1,2 of sign states are looked opposite equip. and are in normally.Receiving any other data, all to look opposite equip. be improper attitude.
The expression of significance of four communication position BIT4-BIT1 is as follows:
BIT4 BIT3 BIT2 BIT1 Connotation Valid data whether
0 0 0 0 Sign state 1 N
0 0 0 1 Sign state 2 N
0 0 1 0 Request is switched Y
0 0 1 1 Agreement is switched Y
0 1 0 0 Refusal is switched Y
0 1 0 1 Announcement is switched successfully Y
0 1 1 0 Failure is switched in announcement Y
0 1 1 1 Normality Y
1 0 0 0 Do not have N
1 0 0 1 Do not have N
1 0 1 0 Do not have N
1 0 1 1 Do not have N
1 1 0 0 Do not have N
1 1 0 1 Do not have N
1 1 1 0 Do not have N
1 1 1 1 Do not have N
Step 3: whether the method by step 2 detects with the opposite equip. communication normal.If opposite equip. breaks down and causes the communication link can't communication, that is to say and receive the improper instruction of being narrated as substep 2.10 that at this moment, local terminal equipment enters wait state; Produce random number m subsequently, detect the normal condition of opposite end after the time-delay m millisecond once more, if at this moment with to end communication recover normal, execution in step 4 if fault is not got rid of, continues to wait for.
Step 4: detect self alarm status.If alarm has appearred in equipment self, continue execution in step 5; Otherwise get back to step 3.
Step 5: whether the link circuit condition that detects after switching can satisfy the condition of switching.Whether the alarm that the back link is switched in prediction can improve, and can improve if switch the alarm of back link, then carries out following steps 6,7.Can not improve if monitor the alarm of switching the back link, just abandon the request of switching, produce random number m, return step 3 after the time-delay m millisecond.
For preventing to cause the final deadlock of equipment, after in case the inventive method equipment enters application status and goes whistle, will apply for again by random delay m millisecond next time, the generation of random number m seed may obtain by following several aspects: 1. time of device start, because the time of device start has very big difference probably usually, the possibility of Qi Donging is very little simultaneously.2. some in the internal memory do not have initialized data behind the device start.The interior existence do not have before the initialization, and the data of the inside can be regarded random number as usually.3. time of user's operation for the first time.
Method by random delay, guaranteed that the time that two equipment are applied for next time again can be not identical,, just can guarantee that the equipment of first to file has been seized initiative as long as application has had precedence, just can not enter Infinite Cyclic, thereby cause the equipment deadlock state.
Step 6: after opposite equip. was received switching request, whether the link circuit condition that detects after switching can satisfy the condition of switching.Can alarm status that switch the back link improve, and if any improvement, carries out following steps 7, otherwise execution in step 8-9.
Step 7: opposite equip. sends the instruction that agreement is switched.Local terminal makes an explanation and confirms that at this moment two equipment are switched simultaneously and entered standby attitude after receiving this instruction.
Step 8: opposite equip. sends the instruction that refusal is switched, and the opposite end returns to normal condition then.
Step 9: local terminal receives that tear down switches, and produces a random number m, and local terminal is got back to normal state then according to this random number time-delay m millisecond.
The inventive method has realized the masterslave switchover of communication apparatus link, in actual applications, when link failure appears in equipment, can in time be switched to reserve link, thereby has strengthened the ability of equipment elimination fault.And, by the solution of deadlock problem, the problem that crashes does not appear in actual applications.
Should be understood that above-mentioned description at specific embodiment is comparatively detailed, can not therefore be interpreted as the restriction to scope of patent protection of the present invention, scope of patent protection of the present invention should be as the criterion with claims.

Claims (8)

1, a kind of main and standby rearranging method of communication link, it may further comprise the steps:
A: in two side apparatus of communications network, one end is called local terminal, the other end is called the opposite end, between local terminal and opposite end, with different ports, set up the host-standby communication passage, in every group communication passage, comprise with the transmitting user data being the data link of purpose and being the communication link of purpose with the management data link;
B: between local terminal equipment and the opposite equip., set up the physical layer communication port, and set up transmission thread and receiving thread;
Whether C: detect with the communication of opposite equip. normally, if opposite equip. breaks down and causes the communication link can't communication, local terminal equipment enters wait state; Time-delay detects the normal condition of opposite end once more after the time at random, if with normal to the end communication recovery, execution in step D if fault is not got rid of, continues wait;
D: detect self alarm status,, continue execution in step E if alarm has appearred in equipment self; Otherwise get back to step C;
E: whether the link circuit condition that detects after switching can satisfy the condition of switching in advance, if can improve following execution in step F, G; If can not improve, prolong with regard to the request of abandoning switching and to return step C after the machine time at random;
G: after opposite equip. was received switching request, also whether the link circuit condition that detects after switching in advance can satisfy the condition of switching, and can the alarm status of promptly switching the back link improve, and if any improvement, carried out following steps H;
H: opposite equip. sends the instruction that agreement is switched, and local terminal is received the affirmation that makes an explanation after this instructs, and two equipment are switched simultaneously and entered standby attitude.
2, method according to claim 1 is characterized in that, among the described step G as can not improve, and execution in step then:
I: opposite equip. sends the instruction that refusal is switched, and returns to normal condition;
J: local terminal receives that tear down switches, and after local terminal random delay a period of time, gets back to normal state then.
3, method according to claim 2 is characterized in that, the transmission thread among the described step B comprises:
B11: transmitting terminal sends data to opposite equip., sends sign state 1 earlier;
B12: delay time 0.1 millisecond;
B13: send sign state 2;
B14: delay time 0.1 millisecond;
B15: send the valid data sign indicating number;
B16: delay time 0.1 millisecond;
B17: delay time 0.1 millisecond again, iteron step B11, circulation successively.
4, method according to claim 2 is characterized in that, the receiving thread among the described step B comprises:
B21: receiving terminal detected state;
B22: delay time 0.05 millisecond;
B23: repeating step B21 totally 10 times;
B24: judge according to this result of ten times whether the opposite end instruction is normal.
5, method according to claim 4 is characterized in that, the judgement of described step B24 comprises:
If 10 times there is and has only sign state 1 the inside, sign state 2 and significant digit code, then the instruction of equipment reception is effective; Have and have only sign state 1,2 of sign states are looked opposite equip. and are in normally; Receiving any other data, all to look opposite equip. be abnormal condition.
6, method according to claim 2 is characterized in that, the random number seed producing method of described random delay comprises:
The time of device start; Behind the device start in the internal memory some do not have initialized data; Or the time of user's operation for the first time.
7, method according to claim 2 is characterized in that, described data link and communication link are unified physically.
8, method according to claim 2 is characterized in that, in the physical layer communication port between described local terminal equipment and the opposite equip., described physical layer is simple I/O mouth, E1 link, the perhaps communication modes of alternate manner.
CNB2005101324456A 2005-12-23 2005-12-23 Master and slave converting method for communication link circuit Expired - Fee Related CN100505574C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101324456A CN100505574C (en) 2005-12-23 2005-12-23 Master and slave converting method for communication link circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101324456A CN100505574C (en) 2005-12-23 2005-12-23 Master and slave converting method for communication link circuit

Publications (2)

Publication Number Publication Date
CN1988400A true CN1988400A (en) 2007-06-27
CN100505574C CN100505574C (en) 2009-06-24

Family

ID=38185051

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101324456A Expired - Fee Related CN100505574C (en) 2005-12-23 2005-12-23 Master and slave converting method for communication link circuit

Country Status (1)

Country Link
CN (1) CN100505574C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931550A (en) * 2009-06-23 2010-12-29 中兴通讯股份有限公司 Method and device for synchronizing main and standby main control boards
CN102088524A (en) * 2010-08-16 2011-06-08 深圳市全球锁安防系统工程有限公司 Telephone fee-free implementation method for alarm host to reliably upload arming/disarming state
CN102843265A (en) * 2012-09-29 2012-12-26 南京国电南自轨道交通工程有限公司 Non-resetting perturbation-free hot standby double-connection method of communication protocol
CN102882590A (en) * 2011-07-15 2013-01-16 中兴通讯股份有限公司 Processing method, device and system after disappearance of fault on bidirectional working path
CN104794868A (en) * 2015-05-12 2015-07-22 深圳栅格信息技术有限公司 Auxiliary alarm collector for storage battery discharge and auxiliary alarm device and method
CN111475440A (en) * 2020-04-08 2020-07-31 北京龙鼎源科技股份有限公司 Communication control method and device based on asynchronous transmission protocol and electronic equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931550A (en) * 2009-06-23 2010-12-29 中兴通讯股份有限公司 Method and device for synchronizing main and standby main control boards
CN102088524A (en) * 2010-08-16 2011-06-08 深圳市全球锁安防系统工程有限公司 Telephone fee-free implementation method for alarm host to reliably upload arming/disarming state
CN102882590A (en) * 2011-07-15 2013-01-16 中兴通讯股份有限公司 Processing method, device and system after disappearance of fault on bidirectional working path
CN102843265A (en) * 2012-09-29 2012-12-26 南京国电南自轨道交通工程有限公司 Non-resetting perturbation-free hot standby double-connection method of communication protocol
CN102843265B (en) * 2012-09-29 2016-03-30 南京国电南自轨道交通工程有限公司 Not resetting without the hot standby dual link method of perturbation of a kind of communication protocol
CN104794868A (en) * 2015-05-12 2015-07-22 深圳栅格信息技术有限公司 Auxiliary alarm collector for storage battery discharge and auxiliary alarm device and method
CN111475440A (en) * 2020-04-08 2020-07-31 北京龙鼎源科技股份有限公司 Communication control method and device based on asynchronous transmission protocol and electronic equipment

Also Published As

Publication number Publication date
CN100505574C (en) 2009-06-24

Similar Documents

Publication Publication Date Title
CN101383689B (en) High availability communications system
CN100505574C (en) Master and slave converting method for communication link circuit
CN101001192B (en) Method, system and equipment for protecting ring network link
CN101692178B (en) Apparatus for interconnecting modules
CN100596357C (en) Data translation device and system based on ethernet and serial communication technology
CN101146014B (en) Fault-tolerant Ethernet network
US20060007927A1 (en) Transmission frame structure for control communication network of distributed control system for nuclear power plant
US20130223204A1 (en) Communication Device for a Redundantly Operable Industrial Communication Network and Method for Operating the Communication Device
CN101217424B (en) A detecting method and device of aggregated link failures
CN102394787A (en) Dual-link redundancy control method based on EPA switch
CN102106121A (en) Ring coupling nodes for high availability networks
US7099271B2 (en) System for providing fabric activity switch control in a communications system
CN103107940B (en) For the redundant gateway system of device level looped network
CN102412990B (en) Remote sensing satellite raw data recording system with centralized management and real-time transmission functions
CN102123110B (en) Data transmission method for gateway system, and gateway system
CN108259127A (en) 10,000,000,000 net IP kernel of PCIE dual redundants
CN100566277C (en) Communications network system and the method that is used to the information that transmits
CN100586101C (en) Switching between layer 2 switches as destination
CN113114551A (en) Dual-redundancy LIN bus communication device
CN100379213C (en) Ethernet redundancy switcher, redundant network system, and method for implementing redundancy switching
CN104135411A (en) Device and method of implementing multi-node communication based on RS232 interface
CN100499500C (en) Method for realizing management for multistage communication device
RU2430400C1 (en) Backup software-hadware system for automatic monitoring and control
CN102025569B (en) The far-end loopback test method of point-to-point and system and device
CN114338265B (en) Program downloading system and method based on TTP/C bus

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090624

Termination date: 20141223

EXPY Termination of patent right or utility model