CN107547301A - A kind of master/slave device switching method and device - Google Patents

A kind of master/slave device switching method and device Download PDF

Info

Publication number
CN107547301A
CN107547301A CN201710475379.5A CN201710475379A CN107547301A CN 107547301 A CN107547301 A CN 107547301A CN 201710475379 A CN201710475379 A CN 201710475379A CN 107547301 A CN107547301 A CN 107547301A
Authority
CN
China
Prior art keywords
equipment
probe messages
response message
duration
sent
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
CN201710475379.5A
Other languages
Chinese (zh)
Other versions
CN107547301B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201710475379.5A priority Critical patent/CN107547301B/en
Publication of CN107547301A publication Critical patent/CN107547301A/en
Application granted granted Critical
Publication of CN107547301B publication Critical patent/CN107547301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present application provides a kind of master/slave device switching method and device, and applied to the first equipment, the first equipment is standby equipment, and method includes:The first probe messages are sent to the second equipment;Second equipment is main equipment;If sending in the peak response duration after the first probe messages and not receiving the first response message that the second equipment is fed back according to the first probe messages, the first equipment is switched into main equipment;If send in the peak response duration after the first probe messages and receive the first response message, and send in the scheduled duration after the first probe messages and do not receive the first response message, and/or first the resource utilization of the second equipment that includes of response message be more than resource threshold, first equipment is switched into main equipment, and send the first handover request to the second equipment, so that the second equipment is switched into standby equipment, scheduled duration is less than peak response duration.Using the embodiment of the present application, Network treatment effeciency is improved.

Description

A kind of master/slave device switching method and device
Technical field
The application is related to communication technical field, more particularly to a kind of master/slave device switching method and device.
Background technology
In order to ensure the availability of network, in network design often frequently with the Two-node Cluster Deployment of active/standby mode, as shown in Figure 1 Networking, including equipment 100 and equipment 200, wherein, equipment 100 is main equipment, and equipment 200 is standby equipment.
Now, equipment 100 is responsible for the inspection to the flow from opposite equip. (equipment for including user side equipment, network side) Survey, the Network such as forwarding, when equipment 100 monitors link failure between opposite equip. and equipment 100 or monitors equipment 100 or the interface of opposite equip. when being UP/DOWN states, equipment 100 itself will switch to standby equipment, and be sent to equipment 200 Handover request;Itself is switched to main equipment by equipment 200 according to handover request, realizes master/slave device switching, now, equipment 200 It is responsible for the Networks such as detection to the flow from opposite equip., forwarding.
In the prior art, it is necessary to which main equipment monitors whether the UP/DOWN states that link failure or interface be present, if deposited , then carry out master/slave device switching.In this case, if main equipment processing Network is excessive, but main equipment does not monitor chain The UP/DOWN states of road failure or interface, now without master/slave device switching, this will cause Network treatment effeciency relatively low The problem of.
The content of the invention
The purpose of the embodiment of the present application is to provide a kind of master/slave device switching method and device, to improve at Network Manage efficiency.Concrete technical scheme is as follows:
On the one hand, the embodiment of the present application discloses a kind of master/slave device switching method, applied to the first equipment, described first Equipment is standby equipment, and methods described includes:
The first probe messages are sent to the second equipment;Second equipment is main equipment;
If send in the peak response duration after first probe messages and do not receive second equipment according to First response message of the first probe messages feedback, main equipment is switched to by first equipment;
When receiving first response message in the peak response duration after sending first probe messages, If send in the scheduled duration after first probe messages and do not receive first response message, and/or first sound Answer the resource utilization for second equipment that message includes to be more than resource threshold, first equipment switched into main equipment, And the first handover request is sent to second equipment, first handover request is used to indicate to switch to second equipment Standby equipment;
Wherein, the scheduled duration is less than the peak response duration.
Two aspects, the embodiment of the present application disclose a kind of master/slave device switching device, applied to the first equipment, described first Equipment is standby equipment, and described device includes:
First transmitting element, for sending the first probe messages to the second equipment;Second equipment is main equipment;
First switch unit, if described for not received in the peak response duration after transmission first probe messages The first response message that second equipment is fed back according to first probe messages, first equipment is switched into main equipment;
Second switch unit, for receiving institute in peak response duration after first probe messages are sent When stating the first response message, the first response report is not received in the scheduled duration after first probe messages if sending Text, and/or the resource utilization of second equipment that first response message includes are more than resource threshold, by described first Equipment switches to main equipment, and sends the first handover request to second equipment, and first handover request is used for instruction will Second equipment switches to standby equipment;
Wherein, the scheduled duration is less than the peak response duration.
Three aspects, the embodiment of the present application disclose a kind of electronic equipment, including processor and machinable medium, institute Stating that machinable medium is stored with can be described by the machine-executable instruction of the computing device, the processor Machine-executable instruction promotes:Realize above-mentioned master/slave device switching method step.
Four aspects, the embodiment of the present application disclose a kind of machinable medium, are stored with machine-executable instruction, When being called and performed by processor, the machine-executable instruction promotes the processor:Realize the active and standby of preceding claim Device switching method step.
In the embodiment of the present application, the first equipment as standby equipment sends the first detection to the second equipment as main equipment Message, fed back if sending and not receiving the second equipment in the peak response duration after the first probe messages according to the first probe messages The first response message, it is determined that failure of the second equipment itself, the first equipment is switched into main equipment, by the first equipment handle net Network business;When receiving the first response message in the peak response duration after sending the first probe messages, visited if sending first Observe and predict and do not receive the first response message in the scheduled duration after text, and/or the money of the second equipment that the first response message includes Source utilization rate is more than resource threshold, it is determined that and the processing Network of the second equipment is excessive, and the first equipment is switched into main equipment, and The first handover request is sent to the second equipment, wherein, scheduled duration is less than peak response duration;So, the second equipment is according to One handover request, the second equipment is switched into standby equipment.In this manner it is possible to the first equipment lacked by processing Network handles net Network business, improve Network treatment effeciency.Certainly, any product or method for implementing the application must be not necessarily required to simultaneously Reach all the above advantage.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of application, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the networking schematic diagram of the Two-node Cluster Deployment of active/standby mode;
Fig. 2 is the first schematic flow sheet for the master/slave device switching method that the embodiment of the present application provides;
Fig. 3 is second of schematic flow sheet of the master/slave device switching method that the embodiment of the present application provides;
Fig. 4 is the third schematic flow sheet for the master/slave device switching method that the embodiment of the present application provides;
Fig. 5 is the 4th kind of schematic flow sheet of the master/slave device switching method that the embodiment of the present application provides;
Fig. 6 is the 5th kind of schematic flow sheet of the master/slave device switching method that the embodiment of the present application provides;
Fig. 7 is a kind of structural representation for the master/slave device switching device that the embodiment of the present application provides;
Fig. 8 is a kind of structural representation for the electronic equipment that the embodiment of the present application provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete Site preparation describes, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on Embodiment in the application, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of the application protection.
At present, using in the networking of the Two-node Cluster Deployment of active/standby mode, main equipment monitors Link State in real time and monitoring connects Mouthful state, when monitoring link failure between opposite equip. and main equipment or monitor the interface of main equipment or opposite equip. For UP/DOWN states when, itself will just switch to standby equipment, and handover request is sent to former standby equipment;Former standby equipment receives After handover request, itself is switched into main equipment, realizes master/slave device switching.
This master/slave device switching mode, if main equipment processing Network is excessive, but main equipment does not monitor link event The UP/DOWN states of barrier or interface, now without master/slave device switching, this will cause Network treatment effeciency is relatively low to ask Topic.
Based under the above situation, the embodiment of the present application provides a kind of master/slave device switching method and device, to improve net Network business processing efficiency.
With reference to figure 2, Fig. 2 is the first schematic flow sheet for the master/slave device switching method that the embodiment of the present application provides, should For the first equipment, first equipment is standby equipment, and this method includes:
S201:The first probe messages are sent to the second equipment;Second equipment is main equipment;
In the embodiment of the present application, probe messages are used for the state for detecting opposite equip., for example, detection opposite equip. is in itself No failure, detect the resource utilizations such as cpu busy percentage, the memory usage of opposite equip..
In addition, the first response report that can the first equipment be fed back according to receive the second equipment according to the first probe messages Text, it can be determined that have the second equipment in itself whether failure.For example, after it have sent the first probe messages, if having received second First response message of equipment feedback, it is determined that the second equipment does not have failure in itself;If the of the second equipment feedback is not received One response message, it is determined that failure of the second equipment itself.
In one embodiment of the application, in order to avoid the first equipment the second equipment to be received feedback such as continue first Response message, influence the first equipment operating efficiency, a timer D1 can be set in the first equipment, timer D1 when A length of peak response duration, after it have sent the first probe messages to the second equipment, start timer D1, when timer D1 surpasses When after the first equipment do not receive the first response message always, it is, in the peak response after sending the first probe messages Do not receive the first response message of the second equipment feedback in long always, then can determine failure of the second equipment itself, it is not necessary to again Etc. the first response message of the second equipment to be received feedback.
In one embodiment of the application, send the first detection to the second equipment every a default cycle duration and report Text, with guarantee to determine in time the second equipment in itself whether the resource utilization situation of failure and the second equipment.
S202:The second equipment is not received in the peak response duration after the first probe messages according to the first detection if sending First response message of message feedback, main equipment is switched to by the first equipment;
In one embodiment of the application, in order to avoid causing the first equipment sending out because of the accidentalia in network environment Send and do not receive the first response message that the second equipment is fed back in the peak response duration after the first probe messages, the first equipment is every The first probe messages are sent to the second equipment every cycle duration, if continuously transmitting the maximum after the first probe messages of predetermined number Do not receive the first response message in response time, then can determine it is not because the accidentalia in network environment causes first Equipment does not receive the first response message of the second equipment feedback in the peak response duration after sending the first probe messages, really Failure of fixed second equipment itself, main equipment is switched to by the first equipment, and Network is handled by the first equipment.
For example, cycle duration is 30 seconds, predetermined number is 3, and a length of 25s during peak response, the first equipment was every 30 seconds First probe messages are sent to the second equipment;
10:00:A probe messages P1 is have sent when 00, if 10:00:The spy of the second equipment transmission is received when 12 Observe and predict response message A1 corresponding to literary P1,10:00:12-10:00:The 00=12 seconds<25 seconds, determine the second equipment in itself without event Barrier;
10:00:30 have sent a probe messages P2, if 10:00:30 to 10:00:Do not connect in 55 this 25 second time Receive response message A2 corresponding to the probe messages P2 of the second equipment transmission, it is accumulative to continuously transmit after 1 probe messages at 25 seconds Do not receive inside the second equipment feedback response message, 1<3;
10:01:00 have sent a probe messages P3, if 10:01:00 to 10:01:Do not connect in 25 this 25 second time Receive response message A3 corresponding to the probe messages P3 of the second equipment transmission, it is accumulative to continuously transmit after 2 probe messages at 25 seconds Do not receive inside the second equipment feedback response message, 2<3;
10:01:30 have sent a probe messages P4, if 10:01:30 to 10:01:Do not connect in 55 this 25 second time Receive response message A4 corresponding to the probe messages P4 of the second equipment transmission, it is accumulative to continuously transmit after 3 probe messages at 25 seconds Do not receive response message A4, the 3=3 of the second equipment feedback inside, can now determine failure of the second equipment itself, first is set It is standby itself to switch to main equipment, the interruption of Network when efficiently avoid main equipment failure itself.
In one embodiment of the application, equipment failure itself include hanging equipment it is dead, in order to avoid equipment from hang death situation State is recovered, and two equipment as main equipment processing Network, cause Network to cause confusion simultaneously, are sending the first detection In the case of not receiving the first response message in peak response duration after message, it is, determining that the second equipment is originally die In the case of barrier, after the first equipment is switched into main equipment, the first handover request is sent to the second equipment;Wherein, first Handover request is used to indicate the second equipment switching to standby equipment.So, if the second equipment recovers normal, it is possible to according to first Handover request itself will switch to standby equipment.
S203:The first response message is received in the peak response duration after the first probe messages if sending, sends first Do not receive the first response message in scheduled duration after probe messages, and/or the second equipment for including of the first response message Resource utilization is more than resource threshold, then the first equipment is switched into main equipment;
Wherein, scheduled duration is a time threshold, and scheduled duration is less than peak response duration.
In one embodiment of the application, MIB (Management Information Base, management letter can be passed through Cease storehouse) read cpu busy percentage, the resource utilization such as memory usage, can also by call network configuration interface (such as Netconf interfaces) read the resource utilizations such as cpu busy percentage, memory usage.
In the embodiment of the present application, the first response report is received in the peak response duration after sending the first probe messages In the case of text, the first response message is not received in the scheduled duration after the first probe messages if sending, and/or the first response report The resource utilization for the second equipment that text includes is more than resource threshold, then can determine the second equipment non-failure, but second in itself Equipment handles the less efficient of Network, carries out master/slave device switching, the first equipment is switched into main equipment, by the first equipment Handle Network.
It should be noted that in the embodiment of the present application, can only consider one in two factors of scheduled duration and resource threshold It is individual, it is determined whether to need to carry out master/slave device switching.If do not received for example, sending in the scheduled duration after the first probe messages First response message, master/slave device switching is carried out, the first equipment is switched into main equipment;Or if the first response message includes The resource utilization of the second equipment be more than resource threshold, carry out master/slave device switching, the first equipment switched into main equipment.
Furthermore it is also possible to consider two factors of scheduled duration and resource threshold, it is determined whether need to carry out active and standby set It is standby to switch.First response message is not received in the scheduled duration after the first probe messages for example, sending, and the first response The resource utilization for the second equipment that message includes is more than resource threshold, and the first equipment just is switched into main equipment.
In addition, it is noted that resource threshold includes cpu busy percentage threshold value, memory usage threshold value etc., led , can be under conditions of one of resource threshold be met with regard to carrying out master/slave device switching during standby device switching, can also be full Master/slave device switching is just carried out under conditions of all resource thresholds of foot, the embodiment of the present application is to this without limiting.
S204:The first handover request is sent to the second equipment.
Wherein, the first handover request is used to indicate the second equipment switching to standby equipment.So, the second equipment can root Standby equipment itself will be switched to according to the first handover request, realizes master/slave device switching.
In one embodiment of the application, the first equipment is being switched into main equipment, sending first to the second equipment cuts After changing message, the second equipment itself will switch to standby equipment according to the first handover request, and now master/slave device switching terminates, as Second device periodically of standby equipment sends probe messages to the first equipment as main equipment;First equipment receives basis The probe messages received are to the second equipment feedback response message;The utilization of resources carried in the response message that second equipment receives Rate carries out master/slave device switching, and the first equipment that specific processing procedure may be referred to shown in Fig. 2 is led when being used as standby equipment The process of standby device switching.
In practical application, the performance of the main equipment processing Network of initial deployment is handled better than the standby equipment of initial deployment The performance of Network, Network can be handled in order to ensure to handle the equipment of the better performances of Network, in the application Another embodiment in, the first equipment is being switched into main equipment, to the second equipment send the first handover request after, first sets It is standby to receive the second response message if sending in the scheduled duration after the second probe messages to second the second probe messages of equipment, And/or second the resource utilization of the second equipment that includes of response message be not more than resource threshold, it is determined that the second equipment is recovered Normally, the first equipment is switched into standby equipment again, and the second handover request is sent to the second equipment, second handover request is used The second equipment is switched into main equipment in instruction.So, the second equipment can switches to itself according to the second handover request Main equipment, and then Network is handled by the second equipment again.
Using above-described embodiment, the first equipment as standby equipment sends the first detection to the second equipment as main equipment Message, fed back if sending and not receiving the second equipment in the peak response duration after the first probe messages according to the first probe messages The first response message, it is determined that failure of the second equipment itself, the first equipment is switched into main equipment, by the first equipment handle net Network business;When receiving the first response message in the peak response duration after sending the first probe messages, visited if sending first Observe and predict and do not receive the first response message in the scheduled duration after text, and/or the money of the second equipment that the first response message includes Source utilization rate is more than resource threshold, it is determined that and the processing Network of the second equipment is excessive, and the first equipment is switched into main equipment, and The first handover request is sent to the second equipment, wherein, scheduled duration is less than peak response duration;So, the second equipment is according to One handover request, the second equipment is switched into standby equipment.In this manner it is possible to the first equipment lacked by processing Network handles net Network business, improve Network treatment effeciency.
In one embodiment of the application, if only considering scheduled duration, with reference to figure 3, Fig. 3 provides for the embodiment of the present application Master/slave device switching method second of schematic flow sheet, applied to the first equipment, this method includes:
S301:The first probe messages are sent to the second equipment;Second equipment is main equipment;
S301 is identical with the step S201 of embodiment illustrated in fig. 2, and here is omitted.
S302:The second equipment is not received in the peak response duration after the first probe messages according to the first detection if sending First response message of message feedback, main equipment is switched to by the first equipment;
S302 is identical with the step S202 of embodiment illustrated in fig. 2, and here is omitted.
S303:The first response message is received if sending in the peak response duration after the first probe messages, is sending the The first response message is not received in scheduled duration after one probe messages, the first equipment is switched into main equipment;
If receiving the first response message in the scheduled duration after sending the first probe messages, it can determine that second sets Standby non-failure itself, and the efficiency of the second equipment processing Network is higher, it is not necessary to carry out master/slave device switching;If sending the The first response message, but the peak response after the first probe messages are sent are not received in scheduled duration after one probe messages The first response message is received in duration, then can determine the second equipment non-failure in itself, but the processing Network of the second equipment It is less efficient, carry out master/slave device switching, the first equipment is switched into main equipment, by the first equipment handle Network, with Ensure that Network can be quickly processed.
In one embodiment of the application, for the ease of determine send the first probe messages after scheduled duration in whether Receive the first response message, a timer D2 can be set in the first equipment, timer D2 when it is a length of predetermined when It is long, after it have sent the first probe messages to the second equipment, start timer D2, if just receiving the after timer D2 time-out One response message, then it can determine not receiving the first response message in the scheduled duration after sending the first probe messages;If The first response message is received before timer D2 time-out, then can be determined in the scheduled duration after sending the first probe messages It has received the first response message.
In another embodiment of the application, for the ease of determining to be in the scheduled duration after the first probe messages of transmission It is no to receive the first response message, the transmission for sending the first probe messages can also be recorded after the first probe messages are sent Time, after the first response message of the second equipment feedback is received, record receives the reception time of the first response message, calculates Receive the time and send the difference of time, if the absolute value of the difference is more than scheduled duration, it is determined that send the first detection report The first response message is not received in scheduled duration after text;If the absolute value of the difference is not more than scheduled duration, it is determined that Send and the first response message is received in the scheduled duration after the first probe messages.
In one embodiment of the application, in order to avoid causing the first equipment sending out because of the accidentalia in network environment The first response message that the second equipment feedback is received in the peak response duration after the first probe messages is sent, but is sending first The first response message is not received in scheduled duration after probe messages, the first equipment is sent every cycle duration to the second equipment First probe messages, the first sound is received if continuously transmitting in the peak response duration after the first probe messages of predetermined number Answer message, but do not receive the first response message in scheduled duration, then can determine be not because in network environment it is accidental because Element cause send the first probe messages after scheduled duration in do not receive the first response message, determine that the second equipment does not have in itself Failure, but the less efficient of Network is handled, master/slave device switching is carried out, the first equipment is switched into main equipment.
S304:The first handover request is sent to the second equipment.
Wherein, the first handover request is used to indicate the second equipment switching to standby equipment.So, the second equipment can root Standby equipment itself will be switched to according to the first handover request, realizes master/slave device switching.
In one embodiment of the application, in order to mitigate the burden of the first equipment and the second equipment, it can be set first It is active and standby with reference to shown in figure 4 by taking two level time threshold and cycle duration as an example for the multistage time threshold of middle setting and cycle duration The third schematic flow sheet of device switching method, based on Fig. 3,
S301 can be:Every period 1 duration the first probe messages are sent to the second equipment;
In this case, S303 can include:
S3031:The first response message is received if sending in the peak response duration after the first probe messages, is sending the The first response message is not received in the first scheduled duration after one probe messages, then every second round duration to the second equipment Send the first probe messages;
Here, second round duration is less than period 1 duration, and the first scheduled duration is time threshold.
First equipment first with the duration larger period 1 when a length of time interval detect the state of the second equipment, when sending out Send when not receiving the first response message in the first scheduled duration after the first probe messages, then with duration less second round Shi Changwei time intervals detect the second equipment state, effectively reduce the first equipment and the second equipment processing probe messages and The quantity of response message, alleviate the burden of the first equipment and the second equipment.
In one embodiment of the application, in order to avoid causing to send the first detection because of the accidentalia in network environment The first response message is not received in the first scheduled duration after message, the first equipment is every period 1 duration to the second equipment The first probe messages are sent, are not all received in the first scheduled duration after the first probe messages of predetermined number if continuously transmitting First response message, it is determined that be not because the accidentalia in network environment causes first after the first probe messages of transmission to make a reservation for The first response message is not received in duration, now, in order to quickly and accurately determine the state of the second equipment, every second round Duration sends the first probe messages to the second equipment.
S3032:The first response message is not received if sending in the second scheduled duration after the first probe messages, by the One equipment switches to main equipment.
Here, the second scheduled duration is less than the first scheduled duration, and the second scheduled duration is also time threshold.
In one embodiment of the application, in order to avoid causing to send the first detection because of the accidentalia in network environment The first response message is not received in the second scheduled duration after message, the first equipment is every second round duration to the second equipment The first probe messages are sent, are not all received in the second scheduled duration after the first probe messages of predetermined number if continuously transmitting First response message, it is determined that be not because the accidentalia in network environment causes second after the first probe messages of transmission to make a reservation for The first response message is not received in duration, at this point it is possible to determine that the second equipment is busy, handles the less efficient of Network, In order to ensure the treatment effeciency of Network, the first equipment is switched into main equipment.
Using above-described embodiment, the first equipment to the second equipment after the first probe messages are sent, if being visited sending first Observe and predict and the first response message is received in the peak response duration after text, but in the scheduled duration after sending the first probe messages The first response message is not received, then illustrates the less efficient of current second equipment processing Network, the first equipment is switched For main equipment, the first handover request is sent to the second equipment, indicates the second equipment switching to standby equipment, ensure that can be quick Processing Network, improve the treatment effeciency of Network.
In one embodiment of the application, if only considering resource threshold, with reference to figure 5, Fig. 5 provides for the embodiment of the present application Master/slave device switching method the 4th kind of schematic flow sheet, applied to the first equipment, this method includes:
S501:The first probe messages are sent to the second equipment;Second equipment is main equipment;
S501 is identical with the step S201 of embodiment illustrated in fig. 2, and here is omitted.
S502:The second equipment is not received in the peak response duration after the first probe messages according to the first detection if sending First response message of message feedback, main equipment is switched to by the first equipment;
Wherein, the first response message includes the resource utilization of the second equipment, and resource utilization includes:It is cpu busy percentage, interior Deposit utilization rate etc..
S502 is identical with the step S202 of embodiment illustrated in fig. 2, and here is omitted.
S503:If sending and the first response message being received in the peak response duration after the first probe messages, the first response The resource utilization for the second equipment that message includes is more than resource threshold, then the first equipment is switched into main equipment;
If receive the first response message, the first response message in the peak response duration after sending the first probe messages Including the resource utilization of the second equipment be not more than resource threshold, then can determine the second equipment non-failure in itself, second sets The efficiency of standby processing Network is higher, it is not necessary to carries out master/slave device switching;If the maximum after the first probe messages are sent is rung Answer duration is inscribed to receive the first response message, but the resource utilization of the second equipment that the first response message includes is more than resource threshold Value, then the second equipment non-failure in itself can be determined, but the processing Network of the second equipment is less efficient, in order to ensure network Business can be quickly processed, and carry out master/slave device switching, the first equipment is switched into main equipment, and net is handled by the first equipment Network business.
In one embodiment of the application, in order to avoid causing the first response message because of the accidentalia in network environment Including the resource utilization of the second equipment be more than resource threshold, the first equipment sends first every cycle duration to the second equipment Probe messages, if the resource utilization for the second equipment that the first response message of continuous predetermined number includes is all higher than resource threshold Value, it is determined that be not because the accidentalia in network environment causes the resource utilization for the second equipment that the first response message includes More than resource threshold, it is determined that be not because the accidentalia in network environment causes the second equipment that the first response message includes Resource utilization is more than resource threshold, the less efficient of the second equipment processing Network is determined, based on the switching of the first equipment Equipment.
S504:The first handover request is sent to the second equipment.
Wherein, the first handover request is used to indicate the second equipment switching to standby equipment.So, the second equipment can root Standby equipment itself will be switched to according to the first handover request, realizes master/slave device switching.
In one embodiment of the application, in order to mitigate the burden of the first equipment and the second equipment, it can be set first Standby middle setting many class resources threshold value and cycle duration, it is active and standby with reference to shown in figure 6 by taking two level resource threshold and cycle duration as an example 5th kind of schematic flow sheet of device switching method, based on Fig. 5,
S501 can be:Every period 1 duration the first probe messages are sent to the second equipment;
In this case, S503 can include:
S5031:If sending and the first response message being received in the peak response duration after the first probe messages, the first response The resource utilization for the second equipment that message includes is more than first resource threshold value, then is sent out every second round duration to the second equipment Send the first probe messages;
Here, second round duration is less than period 1 duration.
A length of time interval detects the state of the second equipment when first equipment elder generation is with the duration larger period 1, when first When the resource utilization for the second equipment that response message includes is more than first resource threshold value, then during second round less with duration A length of time interval detects the state of the second equipment, in the case where ensureing the quick state for determining the second equipment, effectively reduces The quantity of the probe messages and response message of first equipment and the processing of the second equipment, alleviate the first equipment and second equipment Burden.
In one embodiment of the application, in order to avoid causing the first response message because of the accidentalia in network environment Including the resource utilization of the second equipment be more than first resource threshold value, the first equipment is every period 1 duration to the second equipment The first probe messages are sent, if the resource utilization for the second equipment that the first response message of continuous predetermined number includes is all higher than First resource threshold value, it is determined that be not because the accidentalia in network environment causes the second equipment that the first response message includes Resource utilization is more than first resource threshold value, now, for the accurate quick state for determining the second equipment, when second round It is long to send the first probe messages to the second equipment.
S5032:If sending and the first response message being received in the peak response duration after the first probe messages, the first response The resource utilization for the second equipment that message includes is more than Secondary resource threshold value, then the first equipment is switched into main equipment.
Here, Secondary resource threshold value is more than first resource threshold value.
In one embodiment of the application, in order to avoid causing the first response message because of the accidentalia in network environment Including the resource utilization of the second equipment be more than Secondary resource threshold value, the first equipment is every second round duration to the second equipment The first probe messages are sent, if continuously transmitting the resource utilization for the second equipment that the first response message of predetermined number includes all More than Secondary resource threshold value, it is determined that be not because the accidentalia in network environment causes the first response message includes second to set Standby resource utilization is more than Secondary resource threshold value, the less efficient of the second equipment processing Network is determined, by the first equipment Switch to main equipment.
Using above-described embodiment, the first equipment to the second equipment after the first probe messages are sent, if being visited sending first Observe and predict and the first response message is received in the peak response duration after text, the resource profit for the second equipment that the first response message includes It is more than resource threshold with rate, then illustrates the less efficient of current second equipment processing Network, based on the switching of the first equipment Equipment, the first handover request is sent to the second equipment, indicate the second equipment switching to standby equipment, ensure that quickly to locate Network is managed, improves the treatment effeciency of Network.
By taking networking shown in Fig. 1 as an example, comprehensive explanation Fig. 2-embodiment illustrated in fig. 6.
Assuming that:Equipment 100 is main equipment, and equipment 200 is standby equipment, a length of 25 seconds during peak response, period 1 duration For 30 seconds, a length of 10 seconds during second round, predetermined number was 3, and first resource threshold value is 60%, and Secondary resource threshold value is 70%, the first scheduled duration is 10 seconds, and the second scheduled duration is 20 seconds;
1st, equipment 200 sent probe messages every 30 seconds to equipment 100;
The 2nd, if equipment 200 does not receive equipment 100 according to probe messages in 25 seconds after continuously transmitting 3 detection reports The response message of feedback, it is determined that itself is switched to main equipment by the failure of equipment 100 itself, equipment 200;
Master/slave device switching when being so achieved that main equipment failure itself, avoid Network interruption.
The 3rd, if it is anti-according to probe messages to receive equipment 100 in 25 seconds after continuously transmitting 3 probe messages for equipment 200 The response message of feedback, but response message corresponding to the probe messages not received in 10 seconds after sending probe messages, and/or The resource utilization for the equipment 100 that response message corresponding to the probe messages received includes be more than 60%, then every 10 seconds to Equipment 100 sends probe messages;
Afterwards, if equipment 200 receives equipment 100 in 25 seconds after continuously transmitting 3 probe messages and reported according to detection The response message of text feedback, but response message corresponding to the probe messages not received in 20 seconds after sending probe messages, And/or the resource utilization of equipment 100 that response message corresponding to the probe messages received includes is more than 70%, it is determined that sets Standby 100 handle the less efficient of Network, and equipment 200 itself will switch to main equipment, and sends switching to equipment 100 and disappear Breath, instruction equipment 100 itself will switch to standby equipment;
So, the burden of master/slave device is reduced, and ensure that and can quickly handle Network.
4th, equipment 200 itself will switch to main equipment, and after sending handover request to equipment 100, equipment 100 is as standby Equipment sends probe messages to equipment 200, when equipment 100 determines that the failure of equipment 200 itself or equipment 200 handle Network When less efficient, master/slave device switching is carried out, itself is switched to main equipment by equipment 100;
Or, equipment 200 itself will switch to main equipment, and after sending handover request to equipment 100, equipment 200 continues Probe messages are sent to equipment 100, it is determined that receiving the basis of equipment 100 in 25 seconds after continuously transmitting 3 probe messages The response message of probe messages feedback, meanwhile, corresponding to the probe messages not received in 10 seconds after sending probe messages Response message, and/or the resource utilization of equipment 100 that response message corresponding to the probe messages received includes are not more than 70%, it is determined that equipment 100 recovers normal, and equipment 200 itself will switch to main equipment, and send handover request to equipment 100, Itself is switched to main equipment by instruction equipment 100.
This way it is ensured that it can quickly handle Network.
Corresponding with embodiment of the method, the embodiment of the present application additionally provides a kind of master/slave device switching device.
With reference to figure 7, Fig. 7 is a kind of structural representation for the master/slave device switching device that the embodiment of the present application provides, and is applied In the first equipment, the first equipment is standby equipment, and the device includes:
First transmitting element 701, for sending the first probe messages to the second equipment;Second equipment is main equipment;
First switch unit 702, if for not receiving second in the peak response duration after the first probe messages of transmission The first response message that equipment is fed back according to the first probe messages, the first equipment is switched into main equipment;
Second switch unit 703, for receiving the first sound in peak response duration after the first probe messages are sent When answering message, the first response message is not received in the scheduled duration after the first probe messages if sending, and/or the first response report The resource utilization for the second equipment that text includes is more than resource threshold, and the first equipment switched into main equipment, and to the second equipment The first handover request is sent, the first handover request is used to indicate the second equipment switching to standby equipment;
Wherein, scheduled duration is less than peak response duration.
In one embodiment of the application, the first transmitting element 701, specifically it can be used for every cycle duration to second Equipment sends the first probe messages;
First switch unit 702, if specifically can be used for continuously transmitting the maximum after the first probe messages of predetermined number Do not receive the first response message that the second equipment is fed back according to the first probe messages in response time, the first equipment is switched For main equipment.
In one embodiment of the application, the first switch unit 702, it can be also used for switching by first equipment After main equipment, the first handover request is sent to second equipment;First handover request is used to indicate described the Two equipment switch to standby equipment.
In one embodiment of the application, the first transmitting element 701, specifically it can be used for every cycle duration to second Equipment sends the first probe messages;
Second switch unit 703, if specifically can be used for continuously transmitting predetermined after the first probe messages of predetermined number Do not receive the first response message in duration, and/or the second equipment for including of the first response message of continuous predetermined number Resource utilization is all higher than resource threshold, and the first equipment is switched into main equipment.
In one embodiment of the application, the first transmitting element 701, specifically can be used for every period 1 duration to Second equipment sends the first probe messages;
Second switch unit 703, specifically can be used for:
If send in the first scheduled duration after the first probe messages and do not receive the first response message, and/or the first sound Answer the resource utilization for the second equipment that message includes to be more than first resource threshold value, sent out every second round duration to the second equipment Send the first probe messages;Second round duration is less than period 1 duration;
If send in the second scheduled duration after the first probe messages and do not receive the first response message, and/or the first sound Answer the resource utilization for the second equipment that message includes to be more than Secondary resource threshold value, then the first equipment is switched into main equipment;The Two scheduled durations are less than the first scheduled duration, and Secondary resource threshold value is more than first resource threshold value.
In one embodiment of the application, above-mentioned master/slave device switching device can also include:
Second transmitting element (not shown in Fig. 7), for the second equipment send the first handover request after, to second Equipment sends the second probe messages;
3rd switch unit (not shown in Fig. 7), if for being received in the scheduled duration after the second probe messages of transmission Second response message, and the resource utilization of the second equipment that the second response message includes is not more than resource threshold, and first is set It is standby to switch to standby equipment;The second handover request is sent to the second equipment;Second handover request is used to indicate to switch the second equipment For main equipment.
Using above-described embodiment, the first equipment as standby equipment sends the first detection to the second equipment as main equipment Message, fed back if sending and not receiving the second equipment in the peak response duration after the first probe messages according to the first probe messages The first response message, it is determined that failure of the second equipment itself, the first equipment is switched into main equipment, by the first equipment handle net Network business;When receiving the first response message in the peak response duration after sending the first probe messages, visited if sending first Observe and predict and do not receive the first response message in the scheduled duration after text, and/or the money of the second equipment that the first response message includes Source utilization rate is more than resource threshold, it is determined that and the processing Network of the second equipment is excessive, and the first equipment is switched into main equipment, and The first handover request is sent to the second equipment, wherein, scheduled duration is less than peak response duration;So, the second equipment is according to One handover request, the second equipment is switched into standby equipment.In this manner it is possible to the first equipment lacked by processing Network handles net Network business, improve Network treatment effeciency.
The embodiment of the present application additionally provides a kind of electronic equipment, as shown in figure 8, including processor 801 and machine readable depositing Storage media 802, machinable medium 802 are stored with the machine-executable instruction that can be performed by processor 801.
In addition, as shown in figure 8, electronic equipment can also include:Communication interface 803 and communication bus 804;Wherein, handle Device 801, machinable medium 802, communication interface 803 complete mutual communication, communication interface by communication bus 804 803 communications being used between above-mentioned electronic equipment and other equipment.
Processor 801 is promoted to realize following steps by machine-executable instruction:
The first probe messages are sent to the second equipment;First equipment is standby equipment, and the second equipment is main equipment;
If send in the peak response duration after the first probe messages and do not receive the second equipment according to the first probe messages First response message of feedback, main equipment is switched to by the first equipment;
When receiving the first response message in the peak response duration after sending the first probe messages, visited if sending first Observe and predict and do not receive the first response message in the scheduled duration after text, and/or the money of the second equipment that the first response message includes Source utilization rate is more than resource threshold, and the first equipment switched into main equipment, and sends the first handover request to the second equipment, and first Handover request is used to indicate the second equipment switching to standby equipment;
Wherein, scheduled duration is less than peak response duration.
In one embodiment of the application, to the second equipment send the first probe messages the step of, including:
Every cycle duration the first probe messages are sent to the second equipment;
If send in the peak response duration after the first probe messages and do not receive the second equipment according to the first probe messages First response message of feedback, the step of the first equipment is switched into main equipment, including:
If continuously transmit in the peak response duration after the first probe messages of predetermined number and do not receive the second equipment The first response message fed back according to the first probe messages, main equipment is switched to by the first equipment.
In one embodiment of the application, processor 801 is promoted that following step can also be realized by machine-executable instruction Suddenly:
If send in the peak response duration after the first probe messages and do not receive the second equipment according to the first probe messages First response message of feedback, after the first equipment is switched into main equipment, the first handover request is sent to the second equipment;The One handover request is used to indicate the second equipment switching to standby equipment.
In one embodiment of the application, to the second equipment send the first probe messages the step of, including:
Every cycle duration the first probe messages are sent to the second equipment;
If send and do not receive the first response message in the scheduled duration after the first probe messages, and/or the first response report The resource utilization for the second equipment that text includes is more than resource threshold, the step of the first equipment is switched into main equipment, including:
If continuously transmitting in the scheduled duration after the first probe messages of predetermined number and not receiving the first response message, And/or the resource utilization of the second equipment that the first response message of continuous predetermined number includes is all higher than resource threshold, by the One equipment switches to main equipment.
In one embodiment of the application, to the second equipment send the first probe messages the step of, including:
Every period 1 duration the first probe messages are sent to the second equipment;
If send and do not receive the first response message in the scheduled duration after the first probe messages, and/or the first response report The resource utilization for the second equipment that text includes is more than resource threshold, the step of the first equipment is switched into main equipment, including:
If send in the first scheduled duration after the first probe messages and do not receive the first response message, and/or the first sound Answer the resource utilization for the second equipment that message includes to be more than first resource threshold value, sent out every second round duration to the second equipment Send the first probe messages;Second round duration is less than period 1 duration;
If send in the second scheduled duration after the first probe messages and do not receive the first response message, and/or the first sound Answer the resource utilization for the second equipment that message includes to be more than Secondary resource threshold value, then the first equipment is switched into main equipment;The Two scheduled durations are less than the first scheduled duration, and Secondary resource threshold value is more than first resource threshold value.
In one embodiment of the application, processor 801 is promoted that following step can also be realized by machine-executable instruction Suddenly:
After the first handover request is sent to the second equipment, the second probe messages are sent to the second equipment;
If send in the scheduled duration after the second probe messages and receive the second response message, and the second response message includes The resource utilization of the second equipment be not more than resource threshold, the first equipment is switched into standby equipment;
The second handover request is sent to the second equipment;Second handover request is used to indicate to set based on the switching of the second equipment It is standby.
Using above-described embodiment, the first equipment is standby equipment, and the second equipment is main equipment, is set to second as main equipment Preparation send the first probe messages, and the second equipment is not received in the peak response duration after the first probe messages according to the if sending First response message of one probe messages feedback, it is determined that failure of the second equipment itself, the first equipment is switched into main equipment, by First equipment handles Network;The first response message is received in peak response duration after the first probe messages are sent When, the first response message is not received if sending in the scheduled duration after the first probe messages, and/or the first response message includes The resource utilization of the second equipment be more than resource threshold, it is determined that the processing Network of the second equipment is excessive, by the first equipment Main equipment is switched to, and the first handover request is sent to the second equipment, wherein, scheduled duration is less than peak response duration;So, Second equipment is switched to standby equipment by the second equipment according to the first handover request.In this manner it is possible to lacked by processing Network First equipment handles Network, improves Network treatment effeciency.
The communication bus 804 that above-mentioned electronic equipment is mentioned can be PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, EISA) bus etc..The communication bus 804 can be divided into address bus, data/address bus, Controlling bus etc..For ease of representing, only represented in Fig. 8 with a thick line, it is not intended that an only bus or a type Bus.
Machinable medium 802 can include RAM (Random Access Memory, random access memory), NVM (Non-Volatile Memory, nonvolatile memory), for example, at least a magnetic disk storage can also be included.Machine Readable storage medium storing program for executing can also be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor 801 can be general processor, including CPU (Central Processing Unit, centre Manage device), NP (Network Processor, network processing unit) etc.;It can also be DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit, it is special Integrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other are programmable Logical device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the present application additionally provides a kind of machinable medium, and the machinable medium is stored with machine Executable instruction, when being called and being performed by processor, machine-executable instruction promotes processor to realize following method and step:
The first probe messages are sent to the second equipment;First equipment is standby equipment, and the second equipment is main equipment;
If send in the peak response duration after the first probe messages and do not receive the second equipment according to the first probe messages First response message of feedback, main equipment is switched to by the first equipment;
When receiving the first response message in the peak response duration after sending the first probe messages, visited if sending first Observe and predict and do not receive the first response message in the scheduled duration after text, and/or the money of the second equipment that the first response message includes Source utilization rate is more than resource threshold, and the first equipment switched into main equipment, and sends the first handover request to the second equipment, and first Handover request is used to indicate the second equipment switching to standby equipment;
Wherein, scheduled duration is less than peak response duration.
In one embodiment of the application, to the second equipment send the first probe messages the step of, including:
Every cycle duration the first probe messages are sent to the second equipment;
If send in the peak response duration after the first probe messages and do not receive the second equipment according to the first probe messages First response message of feedback, the step of the first equipment is switched into main equipment, including:
If continuously transmit in the peak response duration after the first probe messages of predetermined number and do not receive the second equipment The first response message fed back according to the first probe messages, main equipment is switched to by the first equipment.
In one embodiment of the application, machine-executable instruction promotes processor to realize following steps:
If send in the peak response duration after the first probe messages and do not receive the second equipment according to the first probe messages First response message of feedback, after the first equipment is switched into main equipment, the first handover request is sent to the second equipment;The One handover request is used to indicate the second equipment switching to standby equipment.
In one embodiment of the application, to the second equipment send the first probe messages the step of, including:
Every cycle duration the first probe messages are sent to the second equipment;
If send and do not receive the first response message in the scheduled duration after the first probe messages, and/or the first response report The resource utilization for the second equipment that text includes is more than resource threshold, the step of the first equipment is switched into main equipment, including:
If continuously transmitting in the scheduled duration after the first probe messages of predetermined number and not receiving the first response message, And/or the resource utilization of the second equipment that the first response message of continuous predetermined number includes is all higher than resource threshold, by the One equipment switches to main equipment.
In one embodiment of the application, to the second equipment send the first probe messages the step of, including:
Every period 1 duration the first probe messages are sent to the second equipment;
If send and do not receive the first response message in the scheduled duration after the first probe messages, and/or the first response report The resource utilization for the second equipment that text includes is more than resource threshold, the step of the first equipment is switched into main equipment, including:
If send in the first scheduled duration after the first probe messages and do not receive the first response message, and/or the first sound Answer the resource utilization for the second equipment that message includes to be more than first resource threshold value, sent out every second round duration to the second equipment Send the first probe messages;Second round duration is less than period 1 duration;
If send in the second scheduled duration after the first probe messages and do not receive the first response message, and/or the first sound Answer the resource utilization for the second equipment that message includes to be more than Secondary resource threshold value, then the first equipment is switched into main equipment;The Two scheduled durations are less than the first scheduled duration, and Secondary resource threshold value is more than first resource threshold value.
In one embodiment of the application, machine-executable instruction promotes processor to realize following steps:
After the first handover request is sent to the second equipment, the second probe messages are sent to the second equipment;
If send in the scheduled duration after the second probe messages and receive the second response message, and the second response message includes The resource utilization of the second equipment be not more than resource threshold, the first equipment is switched into standby equipment;
The second handover request is sent to the second equipment;Second handover request is used to indicate to set based on the switching of the second equipment It is standby.
Using above-described embodiment, the first equipment is standby equipment, and the second equipment is main equipment, is set to second as main equipment Preparation send the first probe messages, and the second equipment is not received in the peak response duration after the first probe messages according to the if sending First response message of one probe messages feedback, it is determined that failure of the second equipment itself, the first equipment is switched into main equipment, by First equipment handles Network;The first response message is received in peak response duration after the first probe messages are sent When, the first response message is not received if sending in the scheduled duration after the first probe messages, and/or the first response message includes The resource utilization of the second equipment be more than resource threshold, it is determined that the processing Network of the second equipment is excessive, by the first equipment Main equipment is switched to, and the first handover request is sent to the second equipment, wherein, scheduled duration is less than peak response duration;So, Second equipment is switched to standby equipment by the second equipment according to the first handover request.In this manner it is possible to lacked by processing Network First equipment handles Network, improves Network treatment effeciency.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Other identical element also be present in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for device, For electronic equipment, machinable medium embodiment, because it is substantially similar to embodiment of the method, so the comparison of description Simply, the relevent part can refer to the partial explaination of embodiments of method.
The preferred embodiment of the application is the foregoing is only, is not intended to limit the protection domain of the application.It is all Any modification, equivalent substitution and improvements made within spirit herein and principle etc., it is all contained in the protection domain of the application It is interior.

Claims (14)

1. a kind of master/slave device switching method, it is characterised in that applied to the first equipment, first equipment is for equipment, institute The method of stating includes:
The first probe messages are sent to the second equipment;Second equipment is main equipment;
If send in the peak response duration after first probe messages and do not receive second equipment according to described first First response message of probe messages feedback, main equipment is switched to by first equipment;
When receiving first response message in the peak response duration after sending first probe messages, if hair Send and do not receive first response message in the scheduled duration after first probe messages, and/or the first response report The resource utilization for second equipment that text includes is more than resource threshold, and first equipment switched into main equipment, and to Second equipment sends the first handover request, and first handover request is used to indicate second equipment switching to standby set It is standby;
Wherein, the scheduled duration is less than the peak response duration.
2. according to the method for claim 1, it is characterised in that the step that the first probe messages are sent to the second equipment Suddenly, including:
Every cycle duration the first probe messages are sent to the second equipment;
If second equipment is not received according in the peak response duration after transmission first probe messages First response message of the first probe messages feedback, the step of first equipment is switched into main equipment, including:
If continuously transmit described in not received in the peak response duration after predetermined number first probe messages First response message that second equipment is fed back according to first probe messages, by first equipment switching based on set It is standby.
3. according to the method for claim 1, it is characterised in that if send the peak response after first probe messages The first response message that second equipment is fed back according to first probe messages is not received in long, is set by described first After main equipment is switched to, methods described also includes:
The first handover request is sent to second equipment;First handover request is used to indicate to switch second equipment For standby equipment.
4. according to the method for claim 1, it is characterised in that the step that the first probe messages are sent to the second equipment Suddenly, including:
Every cycle duration the first probe messages are sent to the second equipment;
If send and do not receive first response message in the scheduled duration after first probe messages, and/or described the The resource utilization for second equipment that one response message includes is more than resource threshold, by first equipment switching based on set Standby step, including:
First response is not received in the scheduled duration after predetermined number first probe messages if continuously transmitting Message, and/or continuously the resource utilization for second equipment that predetermined number first response message includes is all higher than Resource threshold, first equipment is switched into main equipment.
5. according to the method for claim 1, it is characterised in that the step that the first probe messages are sent to the second equipment Suddenly, including:
Every period 1 duration the first probe messages are sent to the second equipment;
If send and do not receive first response message in the scheduled duration after first probe messages, and/or described the The resource utilization for second equipment that one response message includes is more than resource threshold, by first equipment switching based on set Standby step, including:
If send in the first scheduled duration after first probe messages and do not receive first response message, and/or institute The resource utilization for stating second equipment that the first response message includes is more than first resource threshold value, every second round duration First probe messages are sent to second equipment;The second round duration is less than the period 1 duration;
If send in the second scheduled duration after first probe messages and do not receive first response message, and/or institute The resource utilization for stating second equipment that the first response message includes is more than Secondary resource threshold value, then by first equipment Switch to main equipment;Second scheduled duration is less than first scheduled duration, and the Secondary resource threshold value is more than described the One resource threshold.
6. according to the method for claim 1, it is characterised in that sending first handover request to second equipment Afterwards, methods described also includes:
The second probe messages are sent to the second equipment;
If send in the scheduled duration after second probe messages and receive second response message, and described second The resource utilization for second equipment that response message includes is not more than resource threshold, and first equipment is switched into standby set It is standby;
The second handover request is sent to second equipment;Second handover request is used to indicate to switch second equipment For main equipment.
7. a kind of master/slave device switching device, it is characterised in that applied to the first equipment, first equipment is for equipment, institute Stating device includes:
First transmitting element, for sending the first probe messages to the second equipment;Second equipment is main equipment;
First switch unit, if for not receiving described second in the peak response duration after transmission first probe messages The first response message that equipment is fed back according to first probe messages, first equipment is switched into main equipment;
Second switch unit, for receiving described in peak response duration after first probe messages are sent During one response message, first response message is not received in the scheduled duration after first probe messages if sending, and/ Or the resource utilization of second equipment that first response message includes is more than resource threshold, and first equipment is cut It is changed to main equipment, and the first handover request is sent to second equipment, first handover request is used to indicating by described the Two equipment switch to standby equipment;
Wherein, the scheduled duration is less than the peak response duration.
8. device according to claim 7, it is characterised in that
First transmitting element, specifically for sending the first probe messages to the second equipment every cycle duration;
First switch unit, if specifically for continuously transmitting the maximum after predetermined number first probe messages Do not receive first response message that second equipment is fed back according to first probe messages in response time, will First equipment switches to main equipment.
9. device according to claim 7, it is characterised in that
First switch unit, it is additionally operable to after first equipment is switched into main equipment, the is sent to second equipment One handover request;First handover request is used to indicate second equipment switching to standby equipment.
10. device according to claim 7, it is characterised in that
First transmitting element, specifically for sending the first probe messages to the second equipment every cycle duration;
Second switch unit, if specifically for continuously transmitting the scheduled duration after predetermined number first probe messages Do not receive first response message inside, and/or continuous predetermined number first response message include described the The resource utilization of two equipment is all higher than resource threshold, and first equipment is switched into main equipment.
11. device according to claim 7, it is characterised in that
First transmitting element, specifically for sending the first probe messages to the second equipment every period 1 duration;
Second switch unit, is specifically used for:
If send in the first scheduled duration after first probe messages and do not receive first response message, and/or institute The resource utilization for stating second equipment that the first response message includes is more than first resource threshold value, every second round duration First probe messages are sent to second equipment;The second round duration is less than the period 1 duration;
If send in the second scheduled duration after first probe messages and do not receive first response message, and/or institute The resource utilization for stating second equipment that the first response message includes is more than Secondary resource threshold value, then by first equipment Switch to main equipment;Second scheduled duration is less than first scheduled duration, and the Secondary resource threshold value is more than described the One resource threshold.
12. device according to claim 7, it is characterised in that described device also includes:
Second transmitting element, for after first handover request is sent to second equipment, being sent to the second equipment Second probe messages;
3rd switch unit, if for receiving second sound in the scheduled duration after transmission second probe messages Answer message, and the resource utilization of second equipment that second response message includes is not more than resource threshold, will described in First equipment switches to standby equipment;The second handover request is sent to second equipment;Second handover request is used to indicate Second equipment is switched into main equipment.
13. a kind of electronic equipment, it is characterised in that including processor and machinable medium, the machine readable storage Media storage has can be by the machine-executable instruction of the computing device, and the processor is by the machine-executable instruction Promote:Realize any described method and steps of claim 1-6.
A kind of 14. machinable medium, it is characterised in that be stored with machine-executable instruction, by processor call and During execution, the machine-executable instruction promotes the processor:Realize any described method and steps of claim 1-6.
CN201710475379.5A 2017-06-21 2017-06-21 Method and device for switching main and standby equipment Active CN107547301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710475379.5A CN107547301B (en) 2017-06-21 2017-06-21 Method and device for switching main and standby equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710475379.5A CN107547301B (en) 2017-06-21 2017-06-21 Method and device for switching main and standby equipment

Publications (2)

Publication Number Publication Date
CN107547301A true CN107547301A (en) 2018-01-05
CN107547301B CN107547301B (en) 2021-07-30

Family

ID=60970907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710475379.5A Active CN107547301B (en) 2017-06-21 2017-06-21 Method and device for switching main and standby equipment

Country Status (1)

Country Link
CN (1) CN107547301B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756555A (en) * 2018-11-13 2019-05-14 北京码牛科技有限公司 Big data processing method and processing device based on Internet of Things
CN111371592A (en) * 2020-02-21 2020-07-03 无锡华云数据技术服务有限公司 Node switching method, device, equipment and storage medium
CN111953561A (en) * 2020-07-28 2020-11-17 锐捷网络股份有限公司 Method and device for inhibiting VRRP oscillation
CN113917869A (en) * 2021-10-08 2022-01-11 江西清华泰豪三波电机有限公司 Generator set control method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102257759A (en) * 2011-04-25 2011-11-23 华为技术有限公司 Master-standby switching method, system control unit and communication system
CN103916226A (en) * 2012-12-31 2014-07-09 北京大唐高鸿软件技术有限公司 Redundant backup method based on embedded equipment
CN105337815A (en) * 2015-12-15 2016-02-17 北京奇虎科技有限公司 Testing method and device for master-slave switching time
CN105515901A (en) * 2015-11-27 2016-04-20 努比亚技术有限公司 Message processing apparatus and method
CN106789246A (en) * 2016-12-22 2017-05-31 广西防城港核电有限公司 The changing method and device of a kind of active/standby server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102257759A (en) * 2011-04-25 2011-11-23 华为技术有限公司 Master-standby switching method, system control unit and communication system
CN103916226A (en) * 2012-12-31 2014-07-09 北京大唐高鸿软件技术有限公司 Redundant backup method based on embedded equipment
CN105515901A (en) * 2015-11-27 2016-04-20 努比亚技术有限公司 Message processing apparatus and method
CN105337815A (en) * 2015-12-15 2016-02-17 北京奇虎科技有限公司 Testing method and device for master-slave switching time
CN106789246A (en) * 2016-12-22 2017-05-31 广西防城港核电有限公司 The changing method and device of a kind of active/standby server

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756555A (en) * 2018-11-13 2019-05-14 北京码牛科技有限公司 Big data processing method and processing device based on Internet of Things
CN111371592A (en) * 2020-02-21 2020-07-03 无锡华云数据技术服务有限公司 Node switching method, device, equipment and storage medium
CN111371592B (en) * 2020-02-21 2023-09-19 无锡华云数据技术服务有限公司 Node switching method, device, equipment and storage medium
CN111953561A (en) * 2020-07-28 2020-11-17 锐捷网络股份有限公司 Method and device for inhibiting VRRP oscillation
CN111953561B (en) * 2020-07-28 2022-12-13 锐捷网络股份有限公司 Method and device for inhibiting VRRP oscillation
CN113917869A (en) * 2021-10-08 2022-01-11 江西清华泰豪三波电机有限公司 Generator set control method and system

Also Published As

Publication number Publication date
CN107547301B (en) 2021-07-30

Similar Documents

Publication Publication Date Title
CN103209439B (en) The method of a kind of data traffic monitoring, device and equipment
CN107547301A (en) A kind of master/slave device switching method and device
CN101873616B (en) Mobile terminal self-check method and system and mobile terminal
US9853906B2 (en) Network prioritization based on node-level attributes
CN104486100B (en) Fault treating apparatus and method
US10122618B2 (en) Path switching method and device
CN106789264A (en) The method and apparatus that a kind of link aggregation group passage is switched fast
CN103152210A (en) Method for repairing spanning tree protocol (STP) forwarding state abnormalities and stacking equipment
CN108206764A (en) Configuration method, server and the computer-readable medium of configuring information of network appliance
CN104283780A (en) Method and device for establishing data transmission route
CN108540356B (en) Processing method and processing apparatus
CN105530115A (en) Method and device for realizing operation management and maintenance function
CN109379246A (en) A kind of detection method and device of memory
CN110753002B (en) Traffic scheduling method and device
CN109327383A (en) A kind of fault handling method and equipment
CN107948000B (en) Method, device and system for switching main channel and standby channel
US11477098B2 (en) Identification of candidate problem network entities
CN108718398A (en) Code stream transmission method, device and the conference facility of video conferencing system
CN109286584A (en) Fragmentation and reassembly method, device and equipment in a kind of multiple nucleus system
CN104813640B (en) A kind of Sink node method for routing and node device
US11606282B2 (en) Method and device for detecting network reliability
JP2017517981A (en) Method for switching monitoring frequency channel number by access terminal and access terminal
CN108171265A (en) A kind of label preparation method, device and electronic equipment
CN101984586A (en) Method and device for monitoring multiple links
CN104158681A (en) Method and device for processing region controller failure in SDN (software defined network)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant