CN107547281B - Main/standby competition method, device and application equipment - Google Patents

Main/standby competition method, device and application equipment Download PDF

Info

Publication number
CN107547281B
CN107547281B CN201710837810.6A CN201710837810A CN107547281B CN 107547281 B CN107547281 B CN 107547281B CN 201710837810 A CN201710837810 A CN 201710837810A CN 107547281 B CN107547281 B CN 107547281B
Authority
CN
China
Prior art keywords
board
board card
main control
card
determining
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.)
Active
Application number
CN201710837810.6A
Other languages
Chinese (zh)
Other versions
CN107547281A (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.)
Beijing Baizhuo Network Technology Co ltd
Tongding Interconnection Information Co Ltd
Original Assignee
Beijing Baizhuo Network Technology Co ltd
Tongding Interconnection Information 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 Beijing Baizhuo Network Technology Co ltd, Tongding Interconnection Information Co Ltd filed Critical Beijing Baizhuo Network Technology Co ltd
Priority to CN201710837810.6A priority Critical patent/CN107547281B/en
Priority to PCT/CN2017/117119 priority patent/WO2019052069A1/en
Publication of CN107547281A publication Critical patent/CN107547281A/en
Application granted granted Critical
Publication of CN107547281B publication Critical patent/CN107547281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/4013Management of data rate on the bus
    • H04L12/40136Nodes adapting their rate to the physical link properties

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)
  • Structure Of Telephone Exchanges (AREA)

Abstract

The invention provides a main/standby competition method, a device and application equipment, wherein the method comprises the following steps: determining a priority rule according to the slot position information of the board card, the function type of the board card, the slot position information of other on-line board cards and the function types of the other on-line board cards, and determining the delay time of the board card starting detection according to the priority rule; detecting whether a main master control service message exists according to the delay time; if the main master control service role does not exist, determining that the board card role is the main master control service role, and sending main master control service information; and if so, connecting the main control service information and determining the role of the board card as the standby main control service role. The invention upgrades the double-master control scheme into the multi-master control scheme, improves the reliability of the system and reduces the dependence degree of the machine frame type equipment on the double-master control scheme.

Description

Main/standby competition method, device and application equipment
Technical Field
The invention relates to the technical field of communication, in particular to a main/standby competition method, a device and application equipment.
Background
In the existing communication equipment, especially in a frame type communication equipment, in order to stably operate a system, two main control boards are often required to undertake equipment management work, one main control board undertakes a main control role of the equipment, and the other main control board undertakes a standby main control role of the equipment. Taking a frame-type communication device as an example, referring to fig. 1, the communication device 1.1 has two main control boards 1.2 and 1.3, two switch boards 1.4 and 1.5, and N service boards 1.6, 1.7. In the communication device 1.1, two main control boards 1.2 and 1.3 are connected to two switch boards 1.4 and 1.5 and N service boards 1.6 and 1.7. The two main control boards 1.2, 1.3 determine their respective board roles as the main control board and the standby control board through the main-standby competition mechanism in the communication device 1.1, and the selected main control board realizes the overall management control of the whole frame type communication device 1.1.
In the prior art, with reference to fig. 1 and 2, a basic flow of a master/slave contention mechanism applied to a common frame-type communication device 1.1 includes a master/slave contention flow in a system start phase, and specific steps thereof include a master/slave contention flow in a system start phase
Step 201, two main control board cards 1.2 and 1.3 are mutually communicated;
step 202, the two main control board cards 1.2 and 1.3 respectively send main and standby competition messages carrying board card information to each other;
step 203, the two main control board cards 1.2 and 1.3 respectively receive competition messages of the opposite side;
step 204, after the two main control board cards 1.2 and 1.3 receive the competition message of the opposite side, preliminarily determining the board card role as the main control board card or the standby main control board card according to the main/standby competition message of the opposite side;
step 205, the two main control board cards 1.2 and 1.3 respectively send response messages carrying the board card roles of the two main control board cards to each other;
step 206, the two main control board cards 1.2 and 1.3 respectively receive the response message of the other side;
step 207, the two main control boards 1.2 and 1.3 respectively determine whether the board roles of the opposite side conflict with the board roles of the two main control boards, if so, the two main control boards compete again, if not, the main-standby competition is completed, the finally selected main control board 1.2 or 1.3 bearing the main control roles realizes the management control of other boards 1.2, 1.3, 1.4, 1.5, 1.6,1.7, 1.
Analyzing the prior art, referring to fig. 1 and 2, it is easy to find that the existing frame-type device 1.1 mostly adopts a dual-master control scheme, and the operation of the master-slave competition mechanism completely depends on the master control board cards 1.2 and 1.3, if both the two master control board cards 1.2 and 1.3 are failed or pulled out, the whole frame-type device 1.1 cannot operate in the master-slave-free state, and the system reliability is reduced accordingly. Moreover, if the number of slots of the frame-type device 1.1 is small, for example, if there are only six slots, the design that the frame-type device 1.1 relies on the dual-master-control board card to operate the master-slave competition mechanism may occupy too many slots of the frame, so that the number of other plug-in cards is limited, and thus, the service requirements cannot be met.
In addition, the main/standby competition mechanism relies on the two main control boards 1.2 and 1.3 to establish communication connection and send competition messages to each other, if the main control boards 1.2 and 1.3 are plugged or unplugged, or the time interval between the start of the two main control boards 1.2 and 1.3 is too long due to reasons such as hardware differences, the time for establishing communication connection between the two corresponding main control boards 1.2 and 1.3 becomes very long, and at this time, the start time of the system is slowed down by the operation of the whole main/standby competition mechanism.
Disclosure of Invention
The invention aims to overcome the defects of excessive dependence on double main controls, low system reliability, waste of double main control board cards to slot positions, overlong equipment starting time caused by complicated main and standby competition mechanisms and the like of the conventional frame type equipment, and provides a competition method with main and standby control right competition and a communication device thereof.
In order to achieve the purpose, the technical scheme of the invention is as follows:
according to an aspect of the present invention, there is provided a master-slave competition method, including the steps of:
step 1, determining a priority rule according to slot position information of a local board card, the function type of the local board card, slot position information of other online board cards and the function type of the other online board cards, and determining delay time for starting detection of the local board card according to the priority rule, wherein the local board card and the other online board cards are inserted in corresponding slot positions of a middle board, the boards are in communication connection, the local board card and the other online board cards have control functions, and the function types comprise a master control board card, a switching board card and a service board card;
step 2, detecting whether a main control service information exists according to the delay time, wherein the main control service information reflects whether a main control service role exists;
step 3, when detecting that the main master control service information does not exist, determining the role of the local card as the main master control service role, and sending the main master control service information;
and 4, when detecting that one main control service information exists, connecting the main control service information and determining the board card role as the standby main control service role.
Preferably, after determining that the role of the board card is the standby main control service role in the step 4, the method further includes: sending a connection request to the board card which plays the role of the main master control service; after sending the information of the main master service in step 3, the method further includes: and receiving and processing a connection request sent by the board playing the role of the standby main control service.
Preferably, after the step 4, the method further comprises:
and 5, monitoring whether the main control service normally operates by the board card serving as the standby main control service role, if so, continuing monitoring, and if not, returning to the step 1 to perform the main/standby competition process again.
Preferably, in the step 1, a priority rule is determined according to the slot position information of the board card, the function type of the board card, the slot position information of other online boards, and the function types of other online boards, and the specific method for determining the delay time of the board card start detection according to the priority rule is as follows:
step 1.1, determining the slot position serial number of the local board card, the function type of the local board card, the slot position serial numbers of other online board cards and the function types of the other online board cards;
step 1.2, determining a priority sequence according to the descending order or ascending order of the slot position serial number of the local board card and the slot position serial numbers of other online board cards and the function types of the local board card and other online board cards;
and step 1.3, determining the delay time of the board card according to a rule that the higher the priority is, the shorter the delay time is.
Preferably, the specific method for determining the slot numbers of the local board card and the slot numbers of the other online board cards in step 1.1 is as follows:
and the slot serial numbers of the board card and other on-line board cards are represented by a group of high and low levels on the middle board.
Preferably, the specific method for determining a priority order according to the descending order or ascending order of the slot numbers of the local board card and the slot numbers of the other online board cards in step 1.2 and the function types of the local board card and the other online board cards may be:
step 1.21, determining an external priority order according to the function types of the board card and other on-line board cards;
step 1.22, determining an internal priority sequence of the board cards with the same function type according to descending or ascending sequence of the slot position serial numbers of the board cards;
and step 1.23, comprehensively determining the final priority order of the board card and other on-line board cards according to the external priority order and the internal priority order.
According to another aspect of the present invention, there is provided a master/slave competition device, including:
the delay determining unit is used for determining a priority rule according to the slot position information of the board card, the function type of the board card, the slot position information of other on-line board cards and the function type of the other on-line board cards, and determining the delay time for starting detection of the board card according to the priority rule, wherein the board card and the other on-line board cards are inserted into corresponding slot positions of a middle board and are in communication connection among the board cards, the board cards and the other on-line board cards have control functions, and the function types comprise a main control board card, a switching board card and a service board card;
the detection unit is used for detecting whether main control service information exists according to the delay time, and the main control service information reflects whether a main control service role exists or not;
the main role determining unit is used for determining the card role of the local card as a main control service role and sending main control service information when detecting that the main control service information does not exist;
and the standby role determining unit is used for connecting the main control service information when detecting that one main control service information exists, and determining the role of the board card as the standby main control service role.
Preferably, the active/standby competition device further includes:
and the monitoring unit is used for monitoring whether the main control service normally operates or not by the board card which plays the role of the standby main control service, if so, continuing monitoring, and otherwise, restarting the main/standby competition process.
Preferably, the standby role determination unit is further configured to: sending a connection request to the board card which plays the role of the main master control service; the primary role determination unit is further configured to: and receiving and processing a connection request sent by the board playing the role of the standby main control service.
Preferably, the delay determining unit specifically includes:
the first determining unit is used for determining the slot position serial number of the local board card, the function type of the local board card, the slot position serial numbers of other online board cards and the function types of the other online board cards;
the second determining unit is used for determining a priority sequence according to the descending order or ascending order of the slot position serial number of the local board card and the slot position serial numbers of other online board cards and the function types of the local board card and other online board cards;
and the third determining unit is used for determining the delay time of the board card according to the rule that the higher the priority is, the shorter the delay time is.
Preferably, the first determining unit is specifically configured to:
and the slot serial numbers of the board card and other on-line board cards are represented by a group of high and low levels on the middle board.
Preferably, the second determining unit is specifically configured to:
determining an external priority order according to the function types of the board card and other on-line board cards;
determining an internal priority sequence of the board cards with the same function type according to descending or ascending sequence of the slot position serial numbers;
and comprehensively determining the final priority order of the board card and other on-line board cards according to the external priority order and the internal priority order.
According to another aspect of the present invention, an application apparatus of a main/standby competition device is provided, which includes:
the main control board card, the exchange board card and the service board card are all provided with independent control functions and are all plugged in a middle board, a switch switching device SW is arranged in the exchange board card, the main control board card, the exchange board card and the service board card realize communication connection and establish an inter-board information channel through the switch switching device SW, and the main and standby competition device is used for providing device support for main and standby competition among the main control board card, the exchange board card and the service board card.
The invention has the following advantages and beneficial effects:
firstly, when the board card bearing the main master control role is in failure or the board card bearing the main master control role is pulled out, the main and standby competition programs can be automatically re-operated, the competition priority is recalculated, and then the detection delay time of each competition board card is dynamically optimized, so that the system can be efficiently operated.
And secondly, each board card, including the main control board card, the exchange board card, the service board card and the like, can operate as a main control role, and the traditional double-main-control scheme is upgraded into a multi-main-control scheme, so that the reliability of the system is improved, and the dependence degree of the machine frame type equipment on the double-main-control scheme is reduced.
When the multi-slot machine frame type equipment is designed, the design method for reducing the main control slot position can be utilized to reduce the size of the machine frame, the design difficulty is reduced, the performance of the equipment can be improved by designing more service board cards, and the market competitiveness of the equipment is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a component structure of a frame-type communication device in the prior art;
fig. 2 is a flowchart of a main-standby competition method in a frame communication device in the prior art;
FIG. 3 is a flowchart illustrating a master/slave competition method according to the present invention;
FIG. 4 is a block diagram of the structure of the main/standby competition device according to the present invention;
fig. 5 is a schematic diagram of a component structure of a frame-type communication device according to an embodiment of the present invention, in which the active/standby competition device is applied.
Detailed Description
The following detailed description of embodiments of the invention is made with reference to the accompanying drawings.
Fig. 3 is a flowchart of the active/standby competition method of the present invention, and as shown in fig. 3, the active/standby competition method includes:
step 301, determining a priority rule according to the slot position information of the board card, the function type of the board card, the slot position information of other online board cards and the function type of the other online board cards, and determining the delay time for starting detection of the board card according to the priority rule, wherein the board card and the other online board cards are all plugged in corresponding slot positions of a middle board, the boards are in communication connection, the board cards and the other online board cards have control functions, and the function types include a master control board card, a switching board card and a service board card.
The board cards comprise a main control board card, a switching board card, a service board card and the like, and the main control board card, the switching board card, the service board card and the like are all spliced together through a middle board, namely, all the board cards are spliced in a slot position of the middle board; communication connection is established between the board cards, and the communication connection can be established between the board cards in various ways.
The switch switching device SW is composed of an intelligent ASIC chip with a control function and an exchange function, the chip is provided with a plurality of interfaces, each interface in the plurality of interfaces can be configured into a channel with any other interface, an inter-board information channel between the board cards can be established by using the switch switching device SW, the communication connection of the board cards is realized, and the two-to-two interconnection of the board cards is realized. It should be noted that the inter-board information channel established by the device SW may be an ethernet-based information channel.
In addition, the inter-board information channel between the boards may be formed by dedicated signal lines connected through a midplane.
The method for determining the delay time comprises the following steps:
a. determining the position sequence number of a card slot of each board card and the function realized by each board card;
each board card can obtain a board slot position information and other on-line board card slot position information through the middle board, the board slot position information is information provided by the middle board to each board card, and the information reflects the slot position into which each board card is inserted, in the embodiment, the board slot position information provided by the middle board is represented by a group of high and low level signals, for example, 001 represents that the board slot position is 2 slots, and 011 represents that the board slot position is 4 slots; the slot position information of other on-line board cards is obtained by utilizing the orthogonal insertion of each board card on the middle plate to cause the signal change of a group of high and low levels on the middle plate, the group of signals indicate whether the board card is inserted into each slot position and the slot position information of each card, and the board acquires the level signals to judge the slot position information of other on-line board cards. For example, 001 indicates that a board is inserted into the 2 slot position, and 011 indicates that a board is inserted into the 4 slot position. The function of determining each board card to implement may be, for example, determining whether each board card belongs to a master board card or a switch board card, or determining whether each board card belongs to another service board card, or the like.
b. Determining the priority sequence of each board card according to the descending sequence or ascending sequence of the slot position serial numbers of each board card and the function type realized by each board card;
in this step, the priority of each board card can be determined according to the descending order or ascending order of the slot position serial numbers of each board card and the function realized by each board card. For example, the priority order of each board card is determined according to a rule that the slot serial number is in a descending order, that is, the smaller the slot serial number is, the higher the board card priority is, the priority of the master control board card is greater than that of the switch board card, the priority of the switch board card is greater than that of the service board card, and the like. It should be noted that, the priority is determined by comprehensively considering the slot serial numbers of the board cards and the functions of the board cards, and the specific corresponding rule may be specifically determined according to the actual situation, which is not limited by the present invention. For example, an external priority order may be initially arranged according to the principle that the priority of the master control board card is greater than that of the switch board card, and the priority of the switch board card is greater than that of the service board card, then the board cards with the same function, such as a plurality of service board cards, are arranged in descending order or ascending order according to the slot serial number to determine an internal priority order, and finally the final priority order is determined according to the external priority order and the internal priority order. The priority level corresponding to each board card function can also be changed according to actual conditions, for example, when the master control board card needs to be used for deep packet analysis, the priority rule can be modified to be that the priority of the switch board card is greater than that of the master control board card at the moment, and the like.
c. And determining the delay time of the board card starting detection according to a rule that the higher the priority is, the shorter the delay time is.
After the priorities of the boards are determined, the delay time of each board is determined according to a rule that the higher the priority is, the shorter the delay time is, so that the board with the higher priority has greater initiative and possibility to take the role of the main master control service. The specific implementation manner may be that priority levels are set to 0 level, 1 level, 2 level, and so on in order from high to low, where 0 level represents the highest priority level, and the delay time of each board card is calculated by using timeout ═ priority × 1000 ms. Of course, the present invention may also set the rule for determining the delay time to be shorter as the priority level is lower, and is not limited to the specific embodiment of the present invention.
Step 302, detecting whether there is a main control service information according to the delay time, wherein the main control service information reflects whether there is a main control service role.
If priority level priority is set to 0 level, 1 level, 2 level, etc. in sequence from high to low, where the 0 level represents the highest priority level, and the delay time of each board card is calculated by timeout 1000ms, the board card with the 0 level priority level delays 0ms to start detecting whether there is one primary main control service information, the board card with the 1 level priority level delays 1000ms to start detecting whether there is one primary main control service information, and the board card with the 2 level priority level delays 2000ms to start detecting whether there is one primary main control service information.
Step 303, when detecting that there is no main control service information, determining that the card role is the main control service role, and sending a main control service information.
Each board card respectively delays corresponding delay time according to priority rules and then starts to detect whether a main control service message exists, wherein the main control service message reflects whether a main control service role exists currently, namely when the main control service role exists, the main control service message can be detected, otherwise, when the main control service role does not exist, the main control service message cannot be detected. When a board card detects that the main control service information does not exist, the board card indicates that the main control service role does not exist currently, at the moment, the detection board card determines the detection board card as the main control service role, and sends main control service information to inform other board cards that the main control service role is in place.
And step 304, when detecting that one main master control service information exists, connecting the main master control service information and determining the board card role as the standby master control service role.
The method comprises the steps that each board card detects whether main control service information exists or not according to priority rules, when the board card detects that one main control service information exists, the existing main control service role is in place, the board card determines the existing main control service role as a standby main control service role, a connection request is sent to the board card which plays the main control service role, the board card which plays the main control service role receives the connection request, the board card which plays the standby main control service role is allowed to be connected, and the board card which plays the standby main control service role monitors the behavior of the board card which plays the main control service role in real time through the main control service information.
As a preferred embodiment, after the step 304, the method further includes:
step 305, the board card functioning as the standby main control service monitors whether the main control service operates normally, if so, the monitoring is continued, and if not, the process returns to step 301 to perform the main/standby competition process again.
In the step of competing master/slave control right, the master/slave competing priority and the master/slave master control service are introduced, so that the board card with the master control capability can detect the master/slave master control service in a shorter time, and after the detection is overtime, the board card exits the detection state more quickly, starts the master/slave master control service and determines the role of the board as the master/slave. And other board cards with the main control capability can ensure that the main control service is detected within the detection timeout time, and after the detection is finished, the board quickly exits the detection state, is connected to the main control service and determines that the board is the standby main control, and after the condition that the main control service is disconnected is monitored, the main and standby competition mechanism is restarted, the detection timeout time is recalculated, and the system is operated efficiently.
Fig. 4 is a block diagram of a structure of a main/standby competition device according to the present invention, and as shown in fig. 4, the main/standby competition device includes:
a delay determining unit 410, configured to determine a priority rule according to slot position information of a local board card, a function type of the local board card, slot position information of other online board cards, and a function type of the other online board cards, and determine a delay time for starting detection of the local board card according to the priority rule, where the local board card and the other online board cards are all plugged in corresponding slot positions of a middle board, and are in communication connection between the board cards, the board cards and the other online board cards all have a control function, and the function types include a master control board card, a switch board card, and a service board card;
the board cards comprise a main control board card, a switching board card, a service board card and the like, and the main control board card, the switching board card, the service board card and the like are all spliced together through a middle board, namely, all the board cards are spliced in a slot position of the middle board; communication connection is established between the board cards, and the communication connection can be established between the board cards in various ways.
The switch switching device SW is composed of an intelligent ASIC chip with a control function and an exchange function, the chip is provided with a plurality of interfaces, each interface in the plurality of interfaces can be configured into a channel with any other interface, an inter-board information channel between the board cards can be established by using the switch switching device SW, the communication connection of the board cards is realized, and the two-to-two interconnection of the board cards is realized. It should be noted that the inter-board information channel established by the device SW may be an ethernet-based information channel.
In addition, the inter-board information channel between the boards may be formed by dedicated signal lines connected through a midplane.
The delay time determination unit 410 further includes:
the first determining unit 411 is configured to determine a slot position serial number of the local board, a function type to which the local board belongs, slot position serial numbers of other online boards, and function types to which the other online boards belong;
each board card can obtain a board slot position information and other on-line board card slot position information through the middle board, the board slot position information is information provided by the middle board to each board card, and the information reflects the slot position into which each board card is inserted, in the embodiment, the board slot position information provided by the middle board is represented by a group of high and low level signals, for example, 001 represents that the board slot position is 2 slots, and 011 represents that the board slot position is 4 slots; the slot position information of other on-line board cards is obtained by utilizing the orthogonal insertion of each board card on the middle plate to cause the signal change of a group of high and low levels on the middle plate, the group of signals indicate whether the board card is inserted into each slot position and the slot position information of each card, and the board acquires the level signals to judge the slot position information of other on-line board cards. For example, 001 indicates that a board is inserted into the 2 slot position, and 011 indicates that a board is inserted into the 4 slot position. The function of determining each board card to implement may be, for example, determining whether each board card belongs to a master board card or a switch board card, or determining whether each board card belongs to another service board card, or the like.
A second determining unit 412, configured to determine a priority order according to a descending order or an ascending order of the slot numbers of the local board card and the slot numbers of the other online board cards, and the function types of the local board card and the other online board cards;
in the module, the priority of each board card can be determined according to the descending order or ascending order of the slot position serial numbers of each board card and the function realized by each board card. For example, the priority order of each board card is determined according to a rule that the slot serial number is in a descending order, that is, the smaller the slot serial number is, the higher the board card priority is, the priority of the master control board card is greater than that of the switch board card, the priority of the switch board card is greater than that of the service board card, and the like. It should be noted that, the priority is determined by comprehensively considering the slot serial numbers of the board cards and the functions of the board cards, and the specific corresponding rule may be specifically determined according to the actual situation, which is not limited by the present invention. For example, an external priority order may be initially arranged according to the principle that the priority of the master control board card is greater than that of the switch board card, and the priority of the switch board card is greater than that of the service board card, then the board cards with the same function, such as a plurality of service board cards, are arranged in descending order or ascending order according to the slot serial number to determine an internal priority order, and finally the final priority order is determined according to the external priority order and the internal priority order. The priority level corresponding to each board card function can also be changed according to actual conditions, for example, when the master control board card needs to be used for deep packet analysis, the priority rule can be modified to be that the priority of the switch board card is greater than that of the master control board card at the moment, and the like.
A third determining unit 413, configured to determine the delay time of the local board according to a rule that the higher the priority is, the shorter the delay time is.
After the priority of each board card is determined, the delay time of each board card is determined according to the rule that the higher the priority is, the shorter the delay time is, so that the board card with the higher priority has greater initiative and possibility to take the role of the main master control service. The specific implementation manner may be that priority levels are set to 0 level, 1 level, 2 level, and so on in order from high to low, where 0 level represents the highest priority level, and the delay time of each board card is calculated by using timeout ═ priority × 1000 ms. Of course, the present invention may also set the rule for determining the delay time to be shorter as the priority level is lower, and is not limited to the specific embodiment of the present invention.
A detecting unit 420, configured to detect whether there is a primary master service information according to the delay time, where the primary master service information reflects whether there is a primary master service role;
if priority level priority is set to 0 level, 1 level, 2 level, etc. in sequence from high to low, where the 0 level represents the highest priority level, and the delay time of each board card is calculated by timeout 1000ms, the board card with the 0 level priority level delays 0ms to start detecting whether there is one primary main control service information, the board card with the 1 level priority level delays 1000ms to start detecting whether there is one primary main control service information, and the board card with the 2 level priority level delays 2000ms to start detecting whether there is one primary main control service information.
The active role determination unit 430 is configured to determine that the card role of the local card is the active main control service role when detecting that there is no active main control service information, and send one active main control service information.
Each board card respectively delays corresponding delay time according to priority rules and then starts to detect whether a main control service message exists, wherein the main control service message reflects whether a main control service role exists currently, namely when the main control service role exists, the main control service message can be detected, otherwise, when the main control service role does not exist, the main control service message cannot be detected. When a board card detects that the main control service information does not exist, the board card indicates that the main control service role does not exist currently, at the moment, the detection board card determines the detection board card as the main control service role, and sends main control service information to inform other board cards that the main control service role is in place.
The standby role determination unit 440 is configured to, when it is detected that there is one active main control service information, connect the active main control service information, and determine that the board role is a standby main control service role.
The method comprises the steps that each board card detects whether main control service information exists or not according to priority rules, when the board card detects that one main control service information exists, the existing main control service role is in place, the board card determines the existing main control service role as a standby main control service role, a connection request is sent to the board card which plays the main control service role, the board card which plays the main control service role receives the connection request, the board card which plays the standby main control service role is allowed to be connected, and the board card which plays the standby main control service role monitors the behavior of the board card which plays the main control service role in real time through the main control service information.
As a preferred embodiment, the active/standby competition device further includes:
a monitoring unit 450, configured to monitor, by the board card serving as the standby main control service, whether the main control service operates normally, if so, continuing the monitoring, and if not, performing the main/standby competition process again.
Fig. 5 is a schematic structural diagram of a specific embodiment of a frame-type communication device to which the active/standby competition device is applied, and as shown in fig. 5, in this embodiment, the frame-type communication device 5.1 includes two main control boards 5.2 and 5.3, two switch boards 5.4 and 5.5, and a plurality of service boards 5.6, 5.7. The two main control board cards, the two switch board cards and the plurality of service board cards are all provided with independent control units, and by means of the control units, each main control board card, each switch board card and each service board card can take the main control card role of the frame type communication equipment 5.1. As an illustration, in this embodiment, the machine-frame communication device 5.1 may also be configured such that the two main control boards and the two switch boards have independent control units, and each of the main control boards and the switch boards can assume the role of the main control card of the machine-frame communication device 5.1 by means of the control units.
In this embodiment, the machine-frame-type communication device 5.1 may also only have two switch boards and a plurality of service boards, where the switch boards and the plurality of service boards both have independent control units, and with the help of the control units, each switch board and each service board can assume the role of the main master control card of the machine-frame-type device 5.1.
In this embodiment, frame-type communication device 5.1 executes a master-slave control right competition step, and through the master-slave control right competition step, it can be determined which board card of the board cards capable of assuming the role of master control card really becomes the master control board card of frame-type communication device 5.1, and the master control board card realizes management control of whole frame-type communication device 5.1.
In the present exemplary embodiment, the switching cards 5.4, 5.5 each have a switching device SW.
In the frame communication device 5.1, there is also a midplane through which the devices SW of the two switch boards 5.4, 5.5 are connected to the two master control boards 5.2, 5.3, respectively, the devices SW of each switch board 5.4, 5.5 are connected to the N service boards 5.6, 5.7.
With the means SW of the two switching cards 5.4, 5.5, the following connection capabilities can also be achieved:
in the 1 st type, a main control board card 5.2 is respectively connected to a main control board card 5.3, two exchange board cards 5.4, 5.5 and N service board cards 5.6,5.7, ·,5. N;
in the 2 nd type, the main control board card 5.3 is respectively connected to the main control board card 5.2, the two switch board cards 5.4 and 5.5 and the N service board cards 5.6,5.7, ·,5. N;
the 3 rd type, the switching board card 5.4 is respectively connected to the two main control board cards 5.2 and 5.3, the switching board card 5.5 and the N service board cards 5.6,5.7, ·,5. N;
in the 4 th type, the switching board card 5.5 is respectively connected to the two main control board cards 5.2 and 5.3, the switching board card 5.4 and the N service board cards 5.6,5.7, ·,5. N;
in the 5 th type, any service board is connected to two main control boards 5.2 and 5.3, two switch boards 5.4 and 5.5 and other N-1 service boards respectively.
The 5 th connection capability may be applied to each service board 5.6, 5.7.
In this embodiment, the main control boards 5.2 and 5.3 and the switch boards 5.4 and 5.5 are all designed as boards having a role of a main control board that can be assumed by the control unit, and each board can acquire one own board slot position information and one other on-line board slot position information through the middle board.
The following description takes a subrack communications device 5.1 with two master cards 5.2, 5.3, two switch cards 5.4, 5.5 and 12 service cards as an example:
the frame-type communication device 5.1 is configured with two main control boards and two switch boards having independent control units, and each main control board and switch board can assume the role of the main control card of the frame-type communication device 5.1 by means of the control units.
In this embodiment, with the aid of the devices SW on the switch boards 5.4 and 5.5, the main control boards 5.2 and 5.3 and the switch boards 5.4 and 5.5 can detect whether there is a main control board by using the inter-board information channels between the boards in the process of the main and standby competition. And therefore, which board card of the main control board cards 5.2 and 5.3 and the switch board cards 5.4 and 5.5 is finally determined to be used as the main control board card, so that the main control service is provided, and the management control is implemented on the whole frame type communication equipment 5.1.
In the present description, all boards are orthogonally plugged into the midplane, and the inter-board channels are connected based on the devices SW of the two switch boards 5.4, 5.5, wherein both master control boards 5.2, 5.3 and both switch boards 5.4, 5.5 have a master control capability.
The device SW connects the main control board 5.2 to the main control board 5.3, the switch boards 5.4, 5.5 and 12 service boards, respectively.
The means SW also connect the master control board 5.3 to the master control board 5.2, the switch boards 5.4, 5.5 and 12 service boards, respectively.
The means SW also connect the switch board 5.4 to the master control boards 5.2, 5.3, the switch board 5.5 and 12 service boards, respectively.
The device SW also connects the switch board 5.5 to two master control boards 5.2, 5.3, a switch board 5.4 and 12 service boards, respectively.
In this description, the main control board 5.2 is a slot 15, the main control board 5.3 is a slot 16, the switch board 5.4 is a slot 13, the switch board 5.5 is a slot 14, and the 12 service boards are sequentially slot 1 to slot 12.
According to the scheme, the following two main/standby competition conditions are introduced:
the first method comprises the following steps: if two main control boards 5.2, 5.3 and two switch boards 5.4, 5.5 are both inserted into the device 5.1 and normally work, after the device is started, the four boards will execute the competition of the main/standby control right, which includes the following steps:
1) after the system is started, the four board cards run main and standby competition;
2) any one of the four board cards passes through the middle board, and own board slot position information is obtained through the board slot position information;
3) any one of the four board cards is informed of the information of the other three online board cards with the master control capability inserted into the equipment 5.1 through the middle plate and the slot position information of the online board cards with the master control capability in other slot positions;
4) any one board card of the four board cards calculates own main-standby competition priority of the board card according to the principle that the priority of the main control board card 5.2 and 5.3 is greater than that of the exchange board cards 5.4 and 5.5, the priority of the exchange board cards 5.4 and 5.5 is greater than that of the service board cards, and the lower the slot position number is, the higher the priority is;
at this time, for example, the priority of the main control board 5.2 is set to 0, the priority of the main control board 5.3 is set to 1, the priority of the switch board.4 is set to 2, and the priority of the switch board 5.5 is set to 3, that is, the priority of the main control board 5.2 is greater than that of the main control board 5.3 and the priority of the switch board 5.4 is greater than that of the switch board 5.5;
5) any one of the four board cards calculates a detection overtime time according to the principle that the detection delay time is shorter according to the higher priority,
such as: calculating the detection delay time according to the formula timeout 1000 priority: the master control board 5.2 is 0 millisecond, the master control board 5.3 is 1000 milliseconds, the switch board 5.4 is 2000 milliseconds, and the switch board 5.5 is 3000 milliseconds;
6) the four board cards are respectively connected with the main master control service information according to respective detection delay time;
at this time: the main control board 5.2 starts the detection task of the main control service through the inter-board channel to connect the information of the main control service because the detection timeout time is shortest, and at this time, the information of the main control service reflects that the main control board does not exist, and the main control board 5.2 executes the step 10);
because the detection delay time of the main control board 5.3 and the switch boards 5.4, 5.5 is slightly longer, when the main control service information is connected through the inter-board channel, the main control service information which reflects that the main control board is in place and is given by the control board 5.2 is detected, and step 7) is executed.
7) The main control board card 5.3 and the exchange board cards 5.4 and 5.5 determine the own role of the board as the standby main control;
8) the main control board card 5.3 and the exchange board cards 5.4 and 5.5 are connected with the main control service information;
9) and when the main control service information reflects that the main control board card does not normally operate, the main control board card 5.3 and the switching board cards 5.4 and 5.5 return to execute the step 3), and a new round of main/standby control right competition step is started.
10) The main control board card 5.2 determines that the role of the board is the main control role;
11) the main control board 5.2 outputs the main control service information reflecting the in-place of the main control board through the inter-board information channel.
And the second method comprises the following steps: if the main control boards 5.2, 5.3 are not inserted into the plug-in device 5.1, the switch boards 5.4, 5.5 are already inserted into the communication device 5.1, and under the condition of normal operation, after the power is turned on, the two switch boards 5.4, 5.5 will execute the competition of the main/standby control right, which includes the following steps:
1) after the system is started, the two exchange board cards 5.4 and 5.5 run the main and standby competition;
2) any one of the exchange board cards 5.4 and 5.5 obtains own board slot position information through the middle board and the own board slot position information according to the board slot position information;
3) any one of the switching board cards 5.4 and 5.5 obtains the information only inserted by the switching board cards 5.4 and 5.5 through the middle plate and the slot position information of the online board cards with the master control capability of other slot positions;
4) any one of the two switching board cards 5.4 and 5.5 calculates own main/standby competition priority of the board card according to the principle that the priority of the main control board card 5.2 and 5.3 is greater than that of the switching board cards 5.4 and 5.5, the priority of the switching board cards 5.4 and 5.5 is greater than that of the service board cards, and the lower the slot number is, the higher the priority is;
at this time, for example, the priority of the switch board 4 is set to 0, and the priority of the switch board 5 is set to 1, that is, the priority of the switch board 4 is greater than the priority of the switch board 5;
5) any one of the two switch boards 5.4, 5.5 will calculate a probing delay time according to the principle that the higher the priority is, the shorter the probing delay time is,
such as: calculating the detection timeout time according to the formula timeout 1000: wherein, the board changing card 5.4 is 0 millisecond, and the board changing card 5.5 is 1000 millisecond;
6) the switching board cards 5.4 and 5.5 are respectively connected with the main master control service information according to respective detection timeout time;
at this time: the switching board 5.4 starts the detection task of the main control service through the inter-board channel to connect the information of the main control service because the detection timeout time is shortest, and the switching board 5.4 executes the step 10 at this time, wherein the information of the main control service reflects that the main control board does not exist;
because the detection timeout time of the switch board 5.5 is slightly longer, when the master main control service information is connected through the inter-board channel, the master main control service information which reflects that the master main control board is in place and is provided by the switch board 5.4 is detected, and step 7 is executed)
Step 7), the exchange board card 5.5 determines the own role of the board as a standby master control;
step 8), the exchange board card 5.5 is connected with the main master control service information;
and 9) when the main control service information reflects that the main control board card does not normally operate, the exchange board card 5.5 returns to execute the step 3), and a new round of main/standby control right competition step is started.
10) The exchange board card 5.4 determines that the role of the board is the main master control role;
11) the switching board card 5.4 outputs the main control service information reflecting the in-place of the main control board card through the inter-board information channel.
By applying the invention, the starting time of the system can be effectively shortened, and the operating efficiency of the system is improved. Especially, the reliability of the system is improved by the multi-master control scheme, the dependence degree of the frame type equipment on the double-master control scheme is reduced, the size of the frame can be reduced by a design method for reducing master control slot positions when the multi-slot machine frame type equipment is designed, the design difficulty is reduced, the performance of the equipment can be improved by designing more service board cards, and further the market competitiveness of the equipment is improved.
The above examples are merely representative of preferred embodiments of the present invention, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A master-slave competition method is characterized by comprising the following steps:
step 1, determining a priority rule according to slot position information of a local board card, the function type of the local board card, slot position information of other online board cards and the function type of the other online board cards, and determining delay time for starting detection of the local board card according to the priority rule, wherein the local board card and the other online board cards are inserted in corresponding slot positions of a middle board, the boards are in communication connection, the local board card and the other online board cards have control functions, and the function types comprise a master control board card, a switching board card and a service board card;
step 2, detecting whether a main control service information exists according to the delay time, wherein the main control service information reflects whether a main control service role exists;
step 3, when detecting that the main master control service information does not exist, determining the role of the local card as the main master control service role, and sending the main master control service information;
step 4, when detecting that one main master control service information exists, connecting the main master control service information and determining the board card role as a standby master control service role;
and 5, monitoring whether the board serving as the main control service role normally operates by the board serving as the standby main control service role, if so, continuing monitoring, and if not, returning to the step 1 to perform the main/standby competition process again.
2. The active-standby competition method according to claim 1, wherein after determining that the board card role is the standby main control service role in step 4, the method further comprises: sending a connection request to a board card serving as the main master control service role; after sending the information of the main master service in step 3, the method further includes: and receiving and processing a connection request sent by the board playing the role of the standby main control service.
3. The active-standby competition method according to claim 1, wherein in step 1, a priority rule is determined according to slot position information of the local board card, a function type of the local board card, slot position information of other online boards, and function types of the other online boards, and a specific method for determining the delay time of the local board card start detection according to the priority rule is as follows:
step 1.1, determining the slot position serial number of the local board card, the function type of the local board card, the slot position serial numbers of other online board cards and the function types of the other online board cards;
step 1.2, determining a priority sequence according to the descending order or ascending order of the slot position serial number of the local board card and the slot position serial numbers of other online board cards and the function types of the local board card and other online board cards;
and step 1.3, determining the delay time of the board card according to a rule that the higher the priority is, the shorter the delay time is.
4. The active-standby competition method according to claim 3, wherein the specific method for determining the slot numbers of the local board card and the slot numbers of the other online boards in step 1.1 is as follows:
and the slot serial numbers of the board card and other on-line board cards are represented by a group of high and low levels on the middle board.
5. The active-standby competition method according to claim 3, wherein in step 1.2, the specific method for determining a priority order according to the descending order or ascending order of the slot numbers of the local board card and the slot numbers of the other online board cards and the function types of the local board card and the other online board cards may be:
step 1.21, determining an external priority order according to the function types of the board card and other on-line board cards;
step 1.22, determining an internal priority sequence of the board cards with the same function type according to descending or ascending sequence of the slot position serial numbers of the board cards;
and step 1.23, comprehensively determining the final priority order of the board card and other on-line board cards according to the external priority order and the internal priority order.
6. A master/slave competition device, comprising:
the delay determining unit is used for determining a priority rule according to the slot position information of the board card, the function type of the board card, the slot position information of other on-line board cards and the function type of the other on-line board cards, and determining the delay time for starting detection of the board card according to the priority rule, wherein the board card and the other on-line board cards are inserted into corresponding slot positions of a middle board and are in communication connection among the board cards, the board cards and the other on-line board cards have control functions, and the function types comprise a main control board card, a switching board card and a service board card;
the detection unit is used for detecting whether main control service information exists according to the delay time, and the main control service information reflects whether a main control service role exists or not;
the main role determining unit is used for determining the card role of the local card as a main control service role and sending main control service information when detecting that the main control service information does not exist;
the standby role determining unit is used for connecting the main control service information when detecting that one main control service information exists and determining the role of the board card as a standby main control service role;
and the monitoring unit is used for monitoring whether the board playing the main control service role normally runs or not by the board playing the main control service role, if so, continuing monitoring, and otherwise, restarting the main/standby competition process.
7. The active-standby competition device of claim 6, wherein the standby role determination unit is further configured to: sending a connection request to a board card serving as the main master control service role; the primary role determination unit is further configured to: and receiving and processing a connection request sent by the board playing the role of the standby main control service.
8. The active-standby competition device according to claim 6, wherein the delay determining unit specifically includes:
the first determining unit is used for determining the slot position serial number of the local board card, the function type of the local board card, the slot position serial numbers of other online board cards and the function types of the other online board cards;
the second determining unit is used for determining a priority sequence according to the descending order or ascending order of the slot position serial number of the local board card and the slot position serial numbers of other online board cards and the function types of the local board card and other online board cards;
and the third determining unit is used for determining the delay time of the board card according to the rule that the higher the priority is, the shorter the delay time is.
9. The active-standby competition device according to claim 8, wherein the first determining unit is specifically configured to:
and the slot serial numbers of the board card and other on-line board cards are represented by a group of high and low levels on the middle board.
10. The active-standby competition device according to claim 8, wherein the second determining unit is specifically configured to:
determining an external priority order according to the function types of the board card and other on-line board cards;
determining an internal priority sequence of the board cards with the same function type according to descending or ascending sequence of the slot position serial numbers;
and comprehensively determining the final priority order of the board card and other on-line board cards according to the external priority order and the internal priority order.
11. An application device of a main and standby competition device, which comprises a main control board card, a switch board card and a service board card, and is characterized by further comprising the main and standby competition device according to any one of claims 6 to 10, wherein the main control board card, the switch board card and the service board card have independent control functions and are all plugged in a middle board, a switch switching device SW is arranged in the switch board card, the main control board card, the switch board card and the service board card realize communication connection and establish an inter-board information channel through the switch switching device SW, and the main and standby competition device is used for providing device support for main and standby competition among the main control board card, the switch board card and the service board card.
CN201710837810.6A 2017-09-18 2017-09-18 Main/standby competition method, device and application equipment Active CN107547281B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710837810.6A CN107547281B (en) 2017-09-18 2017-09-18 Main/standby competition method, device and application equipment
PCT/CN2017/117119 WO2019052069A1 (en) 2017-09-18 2017-12-19 Master/standby contention method and device, and application equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710837810.6A CN107547281B (en) 2017-09-18 2017-09-18 Main/standby competition method, device and application equipment

Publications (2)

Publication Number Publication Date
CN107547281A CN107547281A (en) 2018-01-05
CN107547281B true CN107547281B (en) 2020-07-24

Family

ID=60963207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710837810.6A Active CN107547281B (en) 2017-09-18 2017-09-18 Main/standby competition method, device and application equipment

Country Status (2)

Country Link
CN (1) CN107547281B (en)
WO (1) WO2019052069A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600122A (en) * 2018-03-28 2018-09-28 北京百度网讯科技有限公司 Frame-type switch webmaster cause for gossip shows method and device
CN109302359A (en) * 2018-11-27 2019-02-01 迈普通信技术股份有限公司 A kind of network equipment, link converting method and device
CN111007753B (en) * 2019-10-25 2021-07-06 苏州浪潮智能科技有限公司 Main/standby arbitration method and device for double controllers
CN110780589A (en) * 2019-11-08 2020-02-11 航天柏克(广东)科技有限公司 Contention generation method of host
CN111314180B (en) * 2020-02-27 2022-02-18 深圳震有科技股份有限公司 Ethernet link test method, terminal and storage medium
CN112666910A (en) * 2020-12-28 2021-04-16 浙江中控技术股份有限公司 Scheduling system
CN115001963B (en) * 2022-05-05 2024-01-05 武汉光迅信息技术有限公司 Information configuration method and device based on multi-configuration storage communication equipment
CN115834358A (en) * 2022-11-24 2023-03-21 中盈优创资讯科技有限公司 Method and device for automatically switching main board and standby board of equipment main control board card
CN117434824B (en) * 2023-12-20 2024-04-09 天津航空机电有限公司 Redundant control board power-on main and standby determination method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060068306A (en) * 2004-12-16 2006-06-21 삼성전자주식회사 Apparatus and method for controlling redundancy board
CN101447858B (en) * 2008-01-17 2012-01-11 中兴通讯股份有限公司 Method for realizing synchronous switching of virtual router redundancy protocol in dual-machine hot backup system
CN101242310B (en) * 2008-03-21 2010-09-08 北京佳讯飞鸿电气股份有限公司 A master-slave switching method for communication interface board
CN101834748A (en) * 2009-03-12 2010-09-15 中兴通讯股份有限公司 Method and device for main and standby competition
CN101938417A (en) * 2010-09-01 2011-01-05 中兴通讯股份有限公司 Method for realizing configuration of main and auxiliary board cards as well as board cards
CN102291303B (en) * 2011-08-12 2014-07-23 大唐移动通信设备有限公司 Single board and method for determining primary and standby states for the same
CN106598888B (en) * 2016-12-22 2019-07-12 广东威创视讯科技股份有限公司 A kind of more board communication systems and method using RS485 agreement

Also Published As

Publication number Publication date
WO2019052069A1 (en) 2019-03-21
CN107547281A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107547281B (en) Main/standby competition method, device and application equipment
KR101570175B1 (en) Pcie switch-based server system, switching method and device
CN110830276B (en) EtherCAT communication system and method based on cold redundancy mechanism
CN111767244A (en) Dual-redundancy computer equipment based on domestic Loongson platform
CN102724093A (en) Advanced telecommunications computing architecture (ATCA) machine frame and intelligent platform management bus (IPMB) connection method thereof
KR101185971B1 (en) Communication system, test device, communication device, communication method, and test method
CN106230622A (en) A kind of cluster implementation method and device
CN101291201A (en) Heart beat information transmission system and method
CN212541329U (en) Dual-redundancy computer equipment based on domestic Loongson platform
CN210324188U (en) Integrated circuit bus IIC master-slave competition automatic switching equipment and system thereof
CN111427259A (en) Frame slot type main/standby switching method, intelligent device and storage medium
CN116137603A (en) Link fault detection method and device, storage medium and electronic device
CN102983997A (en) Method and device for migrating master services
CN107612801B (en) CAN bus dynamic networking method
CN116027705A (en) Main-standby switching and data synchronizing system and method for programmable controller
CN103326897A (en) Distributed computing environment general monitoring device and failure detection method
CN111211927B (en) Resource synchronization method and device
CN109586978B (en) Bus topology network ad hoc network method
CN103001789B (en) Clock switch method and device
CN107643990B (en) Communication device with configurable architecture
JP2010136038A (en) Transmitter, and method for switching system in redundant configuration
JP2008054028A (en) Control information transmission system
CN110690998B (en) Master-slave equipment management method based on BMC
CN110442094B (en) Distributed system arbitration method and device
JP2000040013A (en) Method for detecting line abnormality for duplex communication system

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