Main and standby single board state switching method, communication equipment and single board

By locking the status of the active board before replacing the old standby board in the communication equipment, the problem of equipment reset caused by poor contact of the new standby board is solved, ensuring business continuity and user experience.

CN120729706APending Publication Date: 2025-09-30HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410369782.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-27
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

When replacing an old spare board in a communication device, if the new spare board has poor contact with the device backplane, it may cause a false reset of the board, causing the entire communication device to reset, seriously affecting the user experience.

Method used

Before replacing the old standby board, lock the active board in active state and/or the old standby board in standby state, prohibit illegal requests for the new standby board to seize the active state, and determine that the active board already exists in the communication equipment through the locked state of the active board and/or the locked state of the old standby board, so as to avoid unreasonable state switching.

Benefits of technology

This effectively prevents communication equipment from being reset due to the lack of a master board, ensuring continuous and stable service operation and optimizing user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729706A_ABST
    Figure CN120729706A_ABST
Patent Text Reader

Abstract

The invention provides a main and standby single board state switching method, communication equipment and single boards, and the method comprises the steps: locking a main single board on the communication equipment to be in a main state or locking an old standby single board to be in a standby state before the old standby single board on the communication equipment is replaced, and locking the old standby single board to be in a standby state after the old standby single board is replaced by a new standby single board. If the master single board receives a master raising request sent by the new standby single board, the master single board is forbidden to be switched to the standby state and the new standby single board is forbidden to be switched to the master state based on the locking state of the master single board or the locking state of the old standby single board, and the master raising request is used for requesting to be switched to the master state. Through the method, the problem that when the old standby single board in the communication equipment is replaced, if the new standby single board is in poor contact with the back board of the communication equipment, the reset service of the whole communication equipment is instantaneously interrupted, and the user experience is seriously influenced can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method for switching states of a master and standby boards, a communication device, and a board. Background Art

[0002] To ensure transport network reliability, communication equipment (such as routers and switches) within the network typically includes two boards (also called main control boards) responsible for controlling and managing the operation of the entire communication equipment. One board serves as the primary board and is in active mode (also called working mode), while the other serves as a backup board and is in standby mode. The backup board synchronizes data with the primary board in real time to ensure data consistency. If the primary board fails and cannot function properly, the backup board quickly replaces the primary board to handle services, ensuring continued operation of the communication equipment.

[0003] When an old standby board on a communications device fails and needs to be replaced or upgraded with a new one, to avoid disrupting network communications, the old standby board is removed on-site while the active board is operating normally, and the new one is inserted. However, if the new standby board does not make good contact with the communications equipment's backplane after insertion, it could erroneously trigger the new standby board to become active, or the active board to become standby, causing both boards to reset and resulting in a momentary interruption in the communications equipment's reset service, severely impacting the user experience. Summary of the Invention

[0004] The present application provides a method for switching the status of a master and standby boards, a communication device and a board, which can solve the problem that when replacing an old standby board in a communication device, if the new standby board has poor contact with the backplane of the communication device, the reset service of the entire communication device will be instantly interrupted, seriously affecting the user experience.

[0005] In a first aspect, a method for switching the status of a master and a standby board is provided, which can be applied to a communication device, wherein the communication device includes a master board and an old standby board. The method may specifically include the following steps: the communication device locks the master board into the master state and / or locks the old standby board into the standby state. After the old standby board is replaced with a new standby board, if the master board receives a master upgrade request sent by the new standby board, then based on the locked state of the master board and / or the locked state of the old standby board, the master board is prohibited from switching to the standby state and the new standby board is prohibited from switching to the master state, wherein the master upgrade request is used to request switching to the master state.

[0006] Because the above solution locks the active single board in the active state and / or locks the old standby single board in the standby state before replacing the old standby single board on the communication device, after the old standby single board is replaced by the new standby single board, if the active single board receives the master upgrade request sent by the new standby single board (for example, the new standby single board cannot receive the communication signal (including the information of the current active state of the active single board) sent by the active single board due to poor contact with the backplane of the communication device, and mistakenly believes that there is no single board in the active state in the communication device, and starts to perform the master upgrade operation, it will send a request to the active single board. The master board can determine that there is already a master board in the communication equipment based on the locked state of the master board and / or the locked state of the old standby board, and thus determine that the master board's master upgrade request is an unreasonable master upgrade request, which is an illegal master grab, and then prohibit the master board from switching to the standby state and prohibit the new standby board from switching to the master state. In this way, the master board can continue to process business normally and stably, effectively avoiding the situation where the communication equipment is reset due to lack of a master board and the business is interrupted instantly, thereby optimizing the user experience.

[0007] In one possible implementation, after the active single board prohibits the new standby single board from switching to the active state, the above method further includes the following steps: the active single board synchronizes the data of the active single board to the new standby single board, and when it is determined that the data synchronization is completed, unlocks the active single board from the active state and / or unlocks the old standby single board from the standby state.

[0008] By implementing the above-mentioned implementation method, when the main board determines that the new backup board has synchronized the data of the main board, it unlocks the main board from the main state and / or unlocks the old backup board from the backup state. This allows the new backup board to replace the main board to handle business in the event of a failure of the main board in the future, thereby ensuring the continued operation of the communication equipment.

[0009] In actual scenarios, if the old standby board on the communication equipment is replaced with a new standby board, or after the new standby board is reset, the new standby board is in good contact with the backplane of the communication equipment, the main board is in good contact with the backplane of the communication equipment, and the main board is normal, then the new standby board can receive the communication signal sent by the main board (including information about the current main status of the main board), and learn that there is already a main board in the communication equipment, thereby determining itself as a standby state. Afterwards, the new standby board will synchronize the data of the main board (including configuration files, software packages, patch packages, etc. on the main board), and form a master-standby relationship with the main board. However, if the master board fails during the process of synchronizing the data of the new standby board with the data of the master board, causing the data synchronization process to be interrupted, the new standby board may only receive part of or not receive any data from the master board, and because the master board fails, it can no longer send a communication signal to the new standby board to inform it of its current master status. Since the new standby board cannot receive the communication signal from the master board, it will perform a master upgrade operation and switch itself to the master status to process the business. However, since the new standby board only receives part of or not receives any data from the master board, the new standby board can only use local incomplete data to process the business, which will have an adverse impact on the business due to incomplete data.

[0010] In order to solve the above problem, in a possible implementation, after the old standby board is replaced with a new standby board, the method further includes the following steps:

[0011] If the new standby board receives a communication signal from the active board, it will determine itself as a standby board, wherein the communication signal includes the current state information of the active board;

[0012] The new standby board receives the locking information sent by the active board, where the locking information indicates that the active board has been locked into the active state and / or indicates that the old standby board has been locked into the standby state;

[0013] The new standby board starts synchronizing data with the active board;

[0014] If the new standby board has not synchronized the data of the active board and has not received a new communication signal sent by the active board, the new standby board prohibits itself from switching to the active state based on the locking information.

[0015] By implementing the above implementation method, even if the main board fails during the process of synchronizing the data of the main board with the new standby board, and can no longer send a communication signal to the new standby board to inform it of its current main status, the new standby board cannot receive the communication signal of the main board. Since the new standby board has obtained the locking information, the new standby board can determine that there is already a main board in the communication equipment based on the locking information, and prohibit itself from performing the master upgrade operation, without completing the synchronization of the data of the main board and without receiving the new communication signal sent by the main board. This avoids the new standby board from being upgraded to the main status and using local incomplete data to process services when it has only received part of or no data from the main board, thereby causing adverse effects on the business.

[0016] In a possible implementation, when the new standby board prohibits itself from switching to the active state based on the locking information, the method further includes the following steps:

[0017] The new standby board is reset;

[0018] When the new standby board determines that the number of times the new standby board has been reset reaches the threshold, the new standby board switches itself to the active state.

[0019] By implementing the above implementation method, the new standby board is automatically promoted to the master state when it is determined that the number of times the new standby board is reset reaches the threshold number. This can avoid the master board being in a faulty state all the time, causing the communication equipment to be disconnected due to lack of a master board.

[0020] In one possible implementation, after the new standby board switches itself to the master state, the above method further includes the following steps: the new standby board unlocks the master board from the master state and / or unlocks the old standby board from the standby state. In this way, in the event of a subsequent failure of the master board, the new standby board can replace the master board to handle business, so as to ensure the continued operation of the communication equipment.

[0021] In a possible implementation, locking the active board to the active state or locking the old standby board to the standby state includes:

[0022] The active single board receives the user's locking request, and based on the locking request, locks the active single board to the active state or locks the old standby single board to the standby state;

[0023] Unlocking the master board from the master state or unlocking the old standby board from the standby state includes:

[0024] The active single board receives the unlocking request from the user, and unlocks the active single board from being in the active state or unlocks the old standby single board from being in the standby state based on the unlocking request.

[0025] In a possible implementation, locking the active board to the active state or locking the old standby board to the standby state includes:

[0026] The active board records locking information, where the locking information indicates that the active board has been locked in the active state or that the old standby board has been locked in the standby state;

[0027] Unlocking the master board from the master state or unlocking the old standby board from the standby state includes:

[0028] The master board deletes the recorded lock information.

[0029] In a second aspect, a communication device is provided, the communication device comprising a primary board and an old standby board;

[0030] The master board is used to lock the master board into the master state or lock the old standby board into the standby state;

[0031] After the old standby board is replaced with a new standby board, the main board is also used to prohibit the main board from switching to the standby state and prohibit the new standby board from switching to the main state based on the locking state of the main board or the locking state of the old standby board if it receives a master upgrade request sent by the new standby board, wherein the master upgrade request is used to request switching to the main state.

[0032] In one possible implementation, after the master board prohibits the new standby board from switching to the master state, the master board is also used to synchronize the data of the master board to the new standby board. When it is determined that the data synchronization is completed, the master board is unlocked from the master state or the old standby board is unlocked from the standby state.

[0033] In a possible implementation, after the old standby board is replaced with a new standby board, the new standby board is configured to determine itself as a standby board upon receiving a communication signal sent by the active board, wherein the communication signal includes current state information of the active board;

[0034] The new standby board is further configured to receive locking information sent by the active board, wherein the locking information indicates that the active board has been locked in the active state or that the old standby board has been locked in the standby state;

[0035] The new standby board is also used to start synchronizing data of the active board;

[0036] The new standby board is further configured to prohibit itself from switching to the active state based on the locking information if the data of the active board has not been synchronized and a new communication signal sent by the active board has not been received.

[0037] In a possible implementation, when the new standby board prohibits itself from switching to the active state based on the locking information, the new standby board is further used for resetting;

[0038] The new standby board is further configured to switch itself to a master state when it is determined that the number of times the new standby board is reset reaches a threshold.

[0039] In a possible implementation, after the new standby board switches itself to the active state, the new standby board is further configured to unlock the active board from the active state or unlock the old standby board from the standby state.

[0040] In a possible implementation, the active board is configured to receive a lock request from a user, and based on the lock request, lock the active board into an active state or lock the old standby board into a standby state;

[0041] The master board is used to unlock the master board from being in the master state or unlock the old standby board from being in the standby state, including:

[0042] The active single board is used to receive the unlocking request of the user, and unlock the active single board from being in the active state or unlock the old standby single board from being in the standby state based on the unlocking request.

[0043] In a possible implementation, the active board is used to record locking information, where the locking information indicates that the active board has been locked in an active state or that the old standby board has been locked in a standby state;

[0044] The master board is used to delete the recorded locking information.

[0045] In a third aspect, a single board is provided, which is used to execute various modules of the method provided by the first aspect or any possible implementation of the first aspect, which is executed by the main single board or the new standby single board.

[0046] In a fourth aspect, a single board is provided, which is a main single board or a new standby single board in the communication equipment provided by the second aspect or any possible implementation of the second aspect.

[0047] In the fifth aspect, a single board is provided, which includes a processor and a memory, the memory being used to store instructions. When the single board is running, the processor executes the instructions to implement the method provided by the main single board or the new standby single board in the method provided in the first aspect or any possible implementation method of the first aspect.

[0048] In the sixth aspect, a readable storage medium is provided, which stores instructions. When the readable storage medium is run on a communication device, the communication device executes the method provided by the main board or the new standby board in the method provided by the first aspect or any possible implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 1 is a schematic diagram of a transport network architecture exemplarily shown in an embodiment of the present application;

[0050] Figure 2 This is a flow chart of a method for switching the state of a master and standby board provided in an embodiment of the present application;

[0051] Figure 3 This is a flow chart of a specific embodiment provided in the embodiments of the present application;

[0052] Figure 4 This is a flow chart of another method for switching the states of active and standby boards provided in an embodiment of the present application;

[0053] Figure 5 This is a flow chart of a specific embodiment provided in the embodiments of the present application;

[0054] Figure 6 This is a schematic structural diagram of a single board provided in an embodiment of the present application;

[0055] Figure 7 This is a structural diagram of another single board provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] First, an application scenario involved in an embodiment of the present application is introduced.

[0057] See also Figure 1 , Figure 1 This is a schematic diagram of a transport network architecture exemplified in an embodiment of the present application. Figure 1 As shown, the transport network includes an access layer, a convergence layer, and a core layer.

[0058] The access layer is the part that directly connects to or accesses the network for users. Its purpose is to allow user terminals to connect to the network.

[0059] The core layer is the high-speed switching backbone of the network and plays a vital role in the connectivity of the entire network. Since the main purpose of the core layer is to provide an optimized and reliable backbone transmission structure through high-speed forwarding communications, the communication equipment in the core layer has high reliability and large throughput. Typically, the core layer uses communication equipment with two single boards (also called main control boards) responsible for controlling and managing the operation of the entire communication equipment and high bandwidth. One of the two single boards on this type of communication equipment is in the main state (also called the working state) as the main single board, and the other is in the standby state as the standby single board. The standby single board will ensure data consistency with the main single board through real-time data synchronization. When the main single board fails and cannot work normally, the standby single board will quickly replace the main single board to handle business to ensure the continued operation of the communication equipment.

[0060] The aggregation layer, located between the access layer and the core layer, processes all traffic from the access layer and provides a link between the access layer and the core layer. The aggregation layer's communications equipment can also utilize high-bandwidth devices equipped with two boards responsible for controlling and managing the operation of the entire communications equipment, ensuring high reliability and throughput.

[0061] exist Figure 1 The transport network shown includes multiple communication devices. Data exchange between user terminals and the backbone network, or between user terminals, can be achieved through forwarding operations between the multiple communication devices. The communication devices may be network devices such as switches and routers. Communication devices may be directly connected, for example, via, but not limited to, Ethernet cables or optical cables.

[0062] More specifically, the communications equipment at the core layer can be provider equipment (P devices), which have powerful switching capabilities and can be used for high-speed data exchange. The communications equipment at the aggregation layer can be provider edge (PE) devices, which connect the access layer and the core layer. Data flows from the core layer enter the access layer through PE devices, and data flows from the access layer enter the core layer through PE devices. The communications equipment at the access layer can be customer edge (CE) devices, which provide access services to user terminals.

[0063] It should be understood that Figure 1 The transport network shown is merely an example and should not be considered as particularly limiting.

[0064] The above-mentioned transmission network is equipped with communication equipment with two single boards. When the old standby single board fails and needs to be replaced or upgraded to a new standby single board, the old standby single board is unplugged on site while the main single board is operating normally, and then the new standby single board is plugged in to update the standby single board.

[0065] After inserting the new spare board:

[0066] If the new standby board is in good contact with the backplane of the communication device, the new standby board will receive the first communication signal periodically sent by the main board. The first communication signal includes information about the current main status of the main board. Therefore, based on the first communication signal, the new standby board can learn that there is already a main board (i.e., the main board) in the communication device, and then determine itself as a standby board, forming a 1:1 hot standby relationship with the main board. Among them, the main status of the board means that the hardware and software on the board are both in the main status. Similarly, the standby status of the board means that the hardware and software on the board are both in the standby status. The 1:1 hot standby relationship means that the standby board is in the powered-on state and synchronizes the data of the main board (including the configuration files, software packages, patch packages, etc. on the main board) in real time, so that when the main board fails, it can quickly replace the main board to handle the business, so as to ensure the continued operation of the communication equipment.

[0067] If the new standby board is in poor contact with the backplane of the communication device, the new standby board may mistakenly believe that there is no board in the communication device in the active state due to the failure to receive the first communication signal sent by the active board, and start to perform the upgrade process. However, since the new standby board has just been started and has not yet synchronized the data of the active board, the lack of data will cause the upgrade to fail and a reset (i.e., restart) will occur. Moreover, when the new standby board starts to perform the upgrade process, it will send a master upgrade request (also known as a master upgrade instruction or a master upgrade signal) to the active board, requesting to be upgraded to the active state. If the active board receives the master upgrade request sent by the standby board, it will perform a master-to-standby downgrade operation to switch itself from the active state to the standby state. After switching itself from the active state to the standby state, the active board will actively reset. In this case, both the active board and the new standby board will be reset, and the communication device will be reset due to the lack of a board in the active state. The service will be interrupted instantly, seriously affecting the user experience.

[0068] In response to the above problems, the present application provides a method and device for switching the status of the master and standby boards, which are described in detail below in conjunction with the corresponding drawings.

[0069] See Figure 2 , Figure 2 This is a flow chart of a method for switching the state of a master and standby board provided in an embodiment of the present application, such as Figure 2 As shown, the specific steps include:

[0070] S201: Before replacing an old standby board on a communication device, the communication device locks the active board into the active state and / or locks the old standby board into the standby state.

[0071] Locking the active board in the active state means that the active board remains in the active state until it is unlocked, and any downgrades—that is, switching from active to standby—are prohibited. It should be understood that since communications equipment typically only includes two boards, locking one board in the active state also locks the other board in the standby state.

[0072] Locking the old standby board to the standby state means that the old standby board remains in the standby state until the old standby board is unlocked, and the standby-to-master operation is prohibited, that is, the old standby board is prohibited from switching from the standby state to the master state. In addition, locking the old standby board to the standby state also means that even if the old standby board is replaced with a new standby board, the new standby board will replace the old standby board and remain in the standby state, and the new standby board will also be prohibited from performing the standby-to-master operation. It is understandable that since communication equipment generally only includes two boards, locking one of the boards to the standby state means that the other board is also locked to the master state.

[0073] Specific implementations of locking the active board in the active state and / or locking the old standby board in the standby state on a communication device include, but are not limited to, the following two implementations, taking the example of locking the active board in the active state on a communication device:

[0074] Mode 1: The communication device receives a lock request (also called a lock instruction, etc.) from the user, and locks the active board to the active state based on the lock request.

[0075] The locking request may carry the identification of the master board, such as the ID of the master board or the ID of the slot where the master board is located, so that after receiving the locking request, the communication device determines the board to be locked based on the identification carried in the locking request and locks it.

[0076] The lock request can be input by the user into the communication device through a command line. Optionally, when a "Single Board Identification" input box and a "Lock" button are displayed on the display interface of the communication device, the user can input the primary single board identification in the "Single Board Identification" input box and trigger the "Lock" button. When the communication device receives the operation of the user triggering the "Lock" button, it obtains the single board identification in the "Single Board Identification" input box and processes the operation and the single board identification as a lock request carrying the primary single board identification. This application does not specifically limit the way in which the communication device receives the user's lock request.

[0077] The specific process of the communication device locking the active board into the active state based on the locking request may be: the communication device generates locking information based on the locking request and records the locking information locally, where the locking information indicates that the active board has been locked into the active state.

[0078] Furthermore, the locking information may include the identification of the main board carried in the locking request (such as the ID of the main board or the ID of the slot where the main board is located, etc.), and the subsequent communication device may determine that the board corresponding to the identification has been locked and is in the main state based on the board identification in the locking information. Optionally, the locking information may include the identification of the main board and the locking mark corresponding to the main board. The identification of the main board may be the ID of the main board or the ID of the slot where the main board is located, etc. The locking mark corresponding to the main board may be any character or character combination, such as "lock", "√", "01", etc., and subsequently, it may be determined that the board corresponding to the identification has been locked and is in the main state based on the board identification and the locking mark in the locking information. It should be understood that the forms of the locking information listed above are merely examples and should not be regarded as specific limitations.

[0079] Method 2: The active board on the communication device records the time each time it receives the second communication signal from the old standby board. It starts counting each time it receives the second communication signal from the old standby board. If it determines that the time since the last second communication signal from the standby board has exceeded a preset duration, it determines that the old standby board has failed and locks the active board in the active state. The second communication signal includes information that the old standby board is currently in the standby state. The preset duration can be customized based on actual scenarios and is not specifically limited in this application.

[0080] The communication device locks the active board to active status as follows: the communication device generates lock information and locally records the lock information, indicating that the active board has been locked to active status. For details about the lock information, see the description in Method 1.

[0081] The implementation method of locking the old standby board of the communication device into the standby state is similar to the above-mentioned method 1 and method 2 of locking the active board of the communication device into the active state. Please refer to the relevant description of method 1 and method 2. For the sake of brevity of the specification, they will not be elaborated on here.

[0082] S202: After the old standby board on the communication equipment is replaced with a new standby board, if the active board receives a master upgrade request sent by the new standby board, based on the locking status of the active board and / or the locking status of the old standby board, the active board is prohibited from switching to the standby status and the new standby board is prohibited from switching to the active status, wherein the master upgrade request is used to request switching to the active status.

[0083] It is understandable that the active single board can determine that a single board in active state already exists in the communication device based on the locked state of the active single board (i.e., active state) and / or the locked state of the old standby single board (i.e., standby state), thereby determining that the new standby single board does not need to be promoted to active state, and further determining that the promotion request sent by the new standby single board is unreasonable and constitutes illegal master seizure, and thus prohibits the new standby single board from being promoted to active state, that is, prohibits the new standby single board from switching to active state. Specifically, the active single board can send a prohibition promotion notification to the new standby single board, instructing the new standby single board to prohibit itself from switching to active state.

[0084] In addition, when the active board determines that the promotion request sent by the new standby board is unreasonable, it can also determine that the active board does not need to perform the active-standby reduction operation, and thus prohibit the active board from switching from the active state to the standby state.

[0085] Specifically, the main board can query the locking information recorded by the communication device described in S201, and determine based on the locking information that the main board has been locked in the main state and / or the old standby board has been locked in the standby state, thereby prohibiting the main board from switching to the standby state and prohibiting the new standby board from switching to the main state.

[0086] In a possible embodiment, when the active single board prohibits the new standby single board from switching to the active state, the active single board may further send a reset instruction to the new standby single board to instruct the new standby single board to reset. After the new standby single board is reset:

[0087] (1) If the new standby board is in good contact with the backplane of the communication device, the main board is normal, and the main board is in good contact with the backplane of the communication device, then the new standby board can receive the first communication signal of the main board. After receiving the first communication signal of the main board, the new standby board can determine based on the first communication signal that there is already a board in the communication device in the main state, and it does not need to switch to the main state, thereby determining that it is in the standby state. Then the new standby board can synchronize data with the main board (that is, the new standby board synchronizes the data of the main board). When the main board determines that the data synchronization is completed, it can unlock the main board from the main state and / or unlock the old standby board from the standby state, so that in the event of a failure of the main board, the new standby board can replace the main board to process the business, so as to ensure the continued operation of the communication device.

[0088] The process of data synchronization between the new standby board and the active board can be as follows: the new standby board sends a data synchronization request to the active board, requesting synchronization of the active board's data; after receiving the data synchronization request from the new standby board, the active board synchronizes the active board's data with the new standby board based on the data synchronization request. Optionally, the new standby board can also send a second communication signal to the active board, the second communication signal carrying information that the new standby board is currently in a standby state; after receiving the second communication signal, the active board learns that the new standby board is currently in a standby state based on the second communication signal, and begins to periodically and actively synchronize the active board's data with the new standby board.

[0089] (2) If the new standby board has poor contact with the backplane of the communication device, the new standby board may not receive the first communication signal from the master board, mistakenly believing that there is no master board in the communication device, and starts the master upgrade process, sending a master upgrade request to the master board, requesting it to be upgraded to the master state. After receiving the master upgrade request, the master board can determine that the master upgrade request of the new standby board is an unreasonable master upgrade request based on the locking state of the master board and / or the locking state of the old standby board, and is an illegal master grab, thereby prohibiting the master board from switching to the standby state and prohibiting the new standby board from switching to the master state. When prohibiting the new standby board from switching to the master state, the master board can again send a reset instruction to the new standby board, instructing the new standby board to reset.

[0090] It can be seen that the above scheme locks the main board into the main state and / or locks the old standby board into the standby state before replacing the old standby board on the communication equipment. Therefore, after the old standby board is replaced with the new standby board, if the main board receives the master upgrade request sent by the new standby board (for example, the new standby board cannot receive the first communication signal sent by the main board due to poor contact with the backplane of the communication equipment, and mistakenly believes that there is no main board in the communication equipment, and starts to perform the master upgrade process, and sends a master upgrade request to the main board), the main board can determine that the master upgrade request of the new standby board is an unreasonable master upgrade request based on the locking state of the main board and / or the locking state of the old standby board, and is an illegal master grabbing, thereby prohibiting the main board from switching to the standby state and prohibiting the new standby board from switching to the main state. In this way, the main board in the communication equipment can continue to process business stably and normally, thereby avoiding the situation where the communication equipment is reset due to lack of a main board and the business is interrupted instantly, thereby optimizing user experience.

[0091] For ease of understanding Figure 2 The beneficial effects of the technical solution provided by the embodiment of the present application are shown below in conjunction with a specific embodiment. Figure 2 The scheme shown is introduced in detail.

[0092] See also Figure 3 , Figure 3 This is a flow chart of a specific embodiment provided in the embodiment of the present application. It should be noted that for the convenience of description, Figure 3 In the example, board No. 9 is the main board in the communication equipment and board No. 10 is the new spare board. In actual scenarios, the identification number of the board in the communication equipment can also be other, and this application does not make specific restrictions. Figure 3 In the description, the locking request of the operation and maintenance personnel is used to lock the No. 9 single board as the main state. In the actual scenario, the locking request of the operation and maintenance personnel can also be a request for locking the old standby single board as the standby state, or a request for locking the No. 9 single board as the main state and locking the old standby single board as the standby state. This application does not make specific limitations.

[0093] First, each module in the No. 9 and No. 10 boards is introduced.

[0094] The hardware arbitration module 920 in the No. 9 single board is a module that arbitrates the active / standby status of the hardware on the No. 9 single board.

[0095] The system high availability (HA) management module 910 on board 9 manages the active / standby status of the software on board 9. Specifically, the system HA management module 910 is responsible for ensuring that the active / standby status of the software on board 9 is consistent with the hardware active / standby status determined by the hardware arbitration module 920 on board 9.

[0096] The hardware arbitration module 1020 in the No. 10 single board is a module that arbitrates the master / slave status of the hardware on the No. 10 single board.

[0097] The system high availability (HA) management module 1010 on board 10 manages the active / standby status of the software on board 10. Specifically, the system HA management module 1010 is used to maintain the active / standby status of the software on board 10 consistent with the hardware active / standby status determined by the hardware arbitration module 1020 on board 10.

[0098] like Figure 3 As shown, this specific embodiment includes the following steps:

[0099] S301: Before replacing the old standby board, the system high availability (HA) management module 910 in the No. 9 board receives and locally records locking information based on a locking request from an operation and maintenance personnel.

[0100] For lock requests and lock information, see Figure 2The description of the lock request and lock information in S201.

[0101] S302: After the operation and maintenance personnel replace the old spare board with board No. 10, board No. 10 starts up.

[0102] S303: The hardware arbitration module 1020 in the No. 10 board detects whether there is already a board in the communication device in the active state.

[0103] If the hardware arbitration module 1020 receives the first communication signal sent by the No. 9 single board, it determines based on the first communication signal that there is already a single board in the communication device in the active state; if it does not receive the first communication signal sent by the No. 9 single board, it determines that there is no single board in the communication device in the active state, wherein the first communication signal sent by the No. 9 single board carries information that the No. 9 single board is currently in the active state.

[0104] Since board 9 periodically transmits a first communication signal to another board in the communication device, informing the other board of its current active status, it can be understood that if hardware arbitration module 1020 receives the first communication signal transmitted by board 9, it indicates that the communication line between boards 10 and 9 is good. If hardware arbitration module 1020 does not receive the first communication signal transmitted by board 9, it indicates that the communication line between boards 10 and 9 is bad or disconnected. It should be noted that this embodiment mainly involves the case where the communication line between boards 10 and 9 is bad. Therefore, the specific implementation process of this embodiment is only described under the condition of a bad communication line.

[0105] It is understandable that, if the communication line between board 10 and board 9 is poor, board 10 and board 9 may sometimes communicate and sometimes fail to communicate. That is, after startup, board 10 may receive the first communication signal sent by board 9, or may not receive the first communication signal sent by board 9. It is also understandable that if board 10 does not receive the first communication signal sent by board 9, the hardware arbitration module 1020 in board 10 determines that there is no active board in the communication device, but in fact there is an active board (i.e., board 9) in the communication device. In this case, the detection result of the hardware arbitration module 1020 is incorrect.

[0106] S304: When determining that there is no board in the active state in the communication device, the hardware arbitration module 1020 arbitrates itself to be in the active state.

[0107] Depend on Figure 3 From the above, it can be seen that the hardware arbitration module 1020 determines that there is no board in the active state in the communication device. This detection result is wrong. Therefore, the hardware arbitration module 1020 arbitrates itself as the active state, which is an illegal master seizure.

[0108] S305 : The hardware arbitration module 1020 sends a master promotion request to the No. 9 single board. Correspondingly, the No. 9 single board receives the master promotion request sent by the hardware arbitration module 1020 .

[0109] The master promotion request is used to request to be promoted to the master state. The master promotion request may carry information that the hardware arbitration module 1020 is currently in the master state.

[0110] S306: The hardware arbitration module 920 in the No. 9 single board learns that the hardware arbitration module 1020 is in the active state based on the master promotion request, and performs a master-standby downgrade operation on itself.

[0111] The hardware arbitration module 920 performs a master-standby downgrade operation on itself, that is, switches itself from the master state to the standby state.

[0112] S307: The system HA management module 910 determines, based on the local locking information, that the No. 9 single board has been locked in the active state and cannot be switched from active to standby.

[0113] Based on the local locking information, the system HA management module 910 determines that the No. 9 single board is locked in the active state, and further determines that the promotion request from the No. 10 single board is an unreasonable promotion request and an illegal master grab, so the No. 9 single board is prohibited from performing the active / standby operation.

[0114] S308: The system HA management module 910 notifies the hardware arbitration module 920 to switch from the standby state back to the active state.

[0115] S309: The system HA management module 910 sends a reset instruction to the hardware arbitration module 1020, instructing the No. 10 board to reset.

[0116] S310: After the No. 10 board is reset, if the hardware arbitration module 1020 detects that there is already a board in the active state in the communication device, it arbitrates itself to the standby state.

[0117] If the hardware arbitration module 1020 detects that there is no active board in the communication device, it executes S304 to S310 again.

[0118] S311: After polling the hardware arbitration module 1020 to determine that the system HA management module 1010 in the No. 10 single board is in the standby state, it synchronizes the data of the No. 9 single board.

[0119] The system HA management module 1010 may synchronize the data of the No. 9 board by sending a data synchronization request to the No. 9 board to request synchronization of the data of the No. 9 board, or may receive data actively synchronized by the No. 9 board.

[0120] S312: When determining that data synchronization is complete, the system HA management module 910 deletes the local locking information.

[0121] The system HA management module 910 deletes the local locking information, indicating that the lock of the active board in the active state and / or the lock of the old standby board in the standby state are released.

[0122] Optionally, S312 may also be: the system HA management module 910 receives a query request from the operation and maintenance personnel, the query request is used to query whether the main board and the new standby board have completed data synchronization, and the system HA management module 910 displays the query result to the operation and maintenance personnel. Then, the system HA management module 910 may receive an unlock request input by the operation and maintenance personnel when determining that data synchronization is completed, and delete the local locking information based on the unlock request to unlock the main board from the main status and / or unlock the old standby board from the standby status.

[0123] It can be seen that Figure 3 In the illustrated embodiment, before replacing the old standby board on the communication device, the No. 9 board is locked in the active state and / or the old standby board is locked in the standby state. Therefore, after the old standby board is replaced with the No. 10 board, if the No. 9 board receives a master promotion request sent by the No. 10 board (for example, due to poor contact with the backplane of the communication device, the No. 10 board cannot receive the first communication signal (including information about the current active state of the No. 9 board) sent by the No. 9 board, and mistakenly believes that the No. 9 board does not exist and starts to perform the master promotion process, the No. 9 board can determine that the master promotion request of the No. 10 board is unreasonable based on the locked state of the No. 9 board and / or the locked state of the old standby board), the No. 9 board is prohibited from switching to the standby state and the No. 10 board is prohibited from switching to the active state. In this way, the No. 9 board in the communication device can continue to stably and normally process services, thereby avoiding the situation where the communication device is reset due to lack of a board in the active state and the service is instantly interrupted, thereby optimizing the user experience.

[0124] It can be understood that in actual scenarios, if the old standby board on the communication equipment is replaced with a new standby board, or after the new standby board is reset, the new standby board is in good contact with the backplane of the communication equipment, the main board is in good contact with the backplane of the communication equipment, and the main board is normal, then the new standby board can receive the first communication signal sent by the main board (including information about the current main status of the main board), and learn that there is already a board in the communication equipment in the main status, thereby determining itself as a standby state. Afterwards, the new standby board will synchronize the data of the main board and form a 1:1 hot standby relationship with the main board. However, if the master board fails during the process of synchronizing the data of the new standby board with the data of the master board, causing the data synchronization process to be interrupted, the new standby board may only receive part of or not receive any data from the master board, and because the master board fails, it can no longer send a communication signal to the new standby board to inform it of its current master status. Since the new standby board cannot receive the communication signal from the master board, it will perform a master upgrade operation and switch itself to the master status to process the business. However, since the new standby board only receives part of or not receives any data from the master board, the new standby board can only use local incomplete data to process the business, which will have an adverse impact on the business due to incomplete data.

[0125] In view of the above problem, in a specific embodiment of the present application, if the old standby board on the communication device is replaced with a new standby board, or after the new standby board is reset, the new standby board is in good contact with the backplane of the communication device, the main board is in good contact with the backplane of the communication device, and the main board is normal, the new standby board can execute Figure 4 The flowchart of another method for switching the state of the master and standby boards provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, the method includes the following steps:

[0126] S401: The new standby board receives a first communication signal sent by the active board, determines based on the first communication signal that a board in active state already exists in the communication device, and sets itself to standby state.

[0127] The first communication signal includes information that the active board is currently in active status.

[0128] S402: The new standby board receives the locking information sent by the active board.

[0129] The locking information indicates that the active board has been locked to the active state and / or the old standby board has been locked to the standby state.

[0130] The new standby board receives the locking information sent by the active board. This can be done by the new standby board sending a locking information acquisition request to the active board and then receiving the locking information returned by the active board based on the locking information acquisition request. This can also be done by the new standby board receiving the locking information actively sent by the active board.

[0131] S403: The new standby board synchronizes data of the active board.

[0132] The new standby board may synchronize the data of the active board by sending a data synchronization request to the active board to request synchronization of the data of the active board, or may receive data actively synchronized by the active board.

[0133] S404: During the data synchronization process, the master board fails and the new standby board cannot receive the new first communication signal from the master board. Based on the locking information and the data synchronization status, it is determined whether the upgrade operation can be performed. If it is determined that the upgrade operation can be performed, the locking information is deleted and the upgrade operation is performed. If it is determined that the upgrade operation cannot be performed, the upgrade operation is not performed.

[0134] The process of the new standby board determining whether the master operation can be performed based on the locking information and data synchronization status is as follows: the new standby board determines based on the locking information that there is already a board in the communication equipment in the master state, and then, if it is determined that data synchronization is completed, it is determined that the master operation can be performed; if it is determined that data synchronization is not completed, it is determined that the master operation cannot be performed.

[0135] The new standby board may determine whether data synchronization is completed by: determining whether a data synchronization completion notification sent by the active board is received; upon receiving the data synchronization completion notification, determining that data synchronization is completed; otherwise, determining that data synchronization is not completed.

[0136] The new standby board deletes the lock information, including deleting the local lock information and sending an unlock notification to the active board, notifying the active board to delete the lock information on the active board, thereby unlocking the active board from the active state and / or unlocking the old standby board from the standby state. It will be understood that unlocking the active board from the active state and / or unlocking the old standby board from the standby state allows the new standby board to replace the active board to handle services in the event of a subsequent failure of the active board, thereby ensuring continued operation of the communication equipment.

[0137] In one possible embodiment, the new standby board will be reset if it is determined that the upgrade operation cannot be performed. After the reset, if the main board is still in a faulty state, the new standby board will perform the upgrade process again because it cannot receive the first communication signal from the main board. In this case, the new standby board will again determine whether to perform the upgrade operation based on the locking information and data synchronization status. If it is determined that the upgrade operation cannot be performed, it will be reset again. After the second reset, if the main board is still in a faulty state, the above process will be repeated.

[0138] In this embodiment, in order to prevent the main board from being in a faulty state all the time, causing the communication equipment to be disconnected due to the lack of a main board, the new standby board can count the number of resets. When the number of resets reaches a threshold, the lock information is deleted to unlock the main board from the main state and / or unlock the old standby board from the standby state, and perform a master upgrade operation to switch itself to the main state. Optionally, the new standby board can also start timing each time it receives the first communication signal from the main board. When the timing reaches a preset time threshold and no new first communication signal is received from the main board again, the lock information is deleted to unlock the main board from the main state and / or unlock the old standby board from the standby state, and perform a master upgrade operation to switch itself to the main state. The preset time threshold can be customized according to the actual scenario, and this application does not make any specific restrictions.

[0139] It can be seen that Figure 4 In the scheme shown, even if the main single board fails during the process of synchronizing the data of the main single board with the new standby single board, and can no longer send the first communication signal to the new standby single board to inform it of its current main status, the new standby single board cannot receive the first communication signal from the main single board. Since the new standby single board can determine whether the master upgrade operation can be performed based on the locking information and data synchronization status, the new standby single board will only perform the master upgrade operation after data synchronization is completed, thereby avoiding the new standby single board being upgraded to the main status and using local incomplete data to process services when it has only received part of or no data from the main single board, thereby avoiding adverse effects on the business.

[0140] For ease of understanding Figure 4 The beneficial effects of the technical solution provided by the embodiment of the present application are shown below in conjunction with a specific embodiment. Figure 4 The scheme shown is introduced in detail.

[0141] See also Figure 5 , Figure 5 This is a flow chart of a specific embodiment provided in the embodiment of the present application. It should be noted that for the convenience of description, Figure 5In the example, board No. 9 is the main board in the communication equipment and board No. 10 is the new spare board. In actual scenarios, the identification number of the board in the communication equipment can also be other, and this application does not make specific restrictions. Figure 5 In the example above, the lock request of the operation and maintenance personnel is used to lock the No. 9 single board as the main state. In the actual scenario, the lock request of the operation and maintenance personnel can also be a request to lock the old standby single board as the standby state, or a request to lock the No. 9 single board as the main state and the old standby single board as the standby state. This application does not make specific restrictions. For the various modules in the No. 9 single board and the No. 10 single board, please refer to Figure 3 An introduction to each module.

[0142] like Figure 5 As shown, this specific embodiment includes the following steps:

[0143] S501: Before replacing the old standby board, the system HA management module 910 in the No. 9 board receives and records the locking information locally based on the locking request from the operation and maintenance personnel.

[0144] For lock requests and lock information, see Figure 2 The description of the lock request and lock information in S201.

[0145] S502: After the operation and maintenance personnel replace the old spare board with board No. 10, board No. 10 starts up.

[0146] S503: The hardware arbitration module 1020 in the No. 10 board detects whether there is already a board in the communication device in the active state.

[0147] If the hardware arbitration module 1020 receives the first communication signal sent by the No. 9 single board, it determines based on the first communication signal that there is already a single board in the communication device in the master state; otherwise, it determines that there is no single board in the communication device in the master state, wherein the first communication signal sent by the No. 9 single board carries information that the No. 9 single board is currently in the master state.

[0148] S504: When the hardware arbitration module 1020 determines that there is a board in the active state in the communication device, it arbitrates itself to the standby state.

[0149] S505 : The system HA management module 1010 in the No. 10 board sends a lock information acquisition request to the No. 9 board. Correspondingly, the No. 9 board receives the lock information acquisition request sent by the system HA management module 1010 .

[0150] Lock information acquisition request, used to obtain lock information.

[0151] S506: The system HA management module 1010 receives the locking information sent by the No. 9 single board based on the locking information acquisition request.

[0152] S507: The system HA management module 1010 synchronizes the data of the No. 9 board.

[0153] The system HA management module 1010 may synchronize the data of the No. 9 board by sending a data synchronization request to the No. 9 board to request synchronization of the data of the No. 9 board, or may receive data actively synchronized by the No. 9 board.

[0154] S508: During the data synchronization process, the No. 9 board fails, and the hardware arbitration module 1020 cannot receive the new first communication signal from the No. 9 board, and the arbitration module itself becomes the master state.

[0155] S509: The system HA management module 1010 polls the hardware arbitration module 1020 to arbitrate the information of its own master status, and determines whether the master upgrade operation can be performed based on the locking information and data synchronization status. If it is determined that the master upgrade operation can be performed, execute S510; if it is determined that the master upgrade operation cannot be performed, execute S511.

[0156] The process by which the system HA management module 1010 determines whether to perform the master upgrade operation based on the locking information and data synchronization status is as follows: the system HA management module 1010 determines that there is already a single board in the communication equipment in the master state based on the locking information, and then, if it is determined that data synchronization is completed, it is determined that the master upgrade operation can be performed; if it is determined that data synchronization is not completed, it is determined that the master upgrade operation cannot be performed.

[0157] The system HA management module 1010 may determine whether data synchronization is completed by: determining whether a data synchronization completion notification sent by board 9 is received; if so, determining that data synchronization is completed; otherwise, determining that data synchronization is not completed.

[0158] S510: The system HA management module 1010 deletes the locking information and performs the master upgrade operation.

[0159] The system HA management module 1010 deletes the locking information, including deleting the local locking information and sending an unlocking notification to the No. 9 single board to notify the No. 9 single board to delete the locking information on the No. 9 single board, so as to unlock the No. 9 single board from the active state and / or unlock the old standby single board from the standby state.

[0160] S511: The system HA management module 1010 does not perform the master upgrade operation and resets board 10.

[0161] After the No. 10 board is reset, S503 and subsequent processes are executed again. The system HA management module 1010 counts the number of resets after each reset. When it is determined that the number of resets reaches the threshold, the locking information is deleted and the master upgrade operation is performed.

[0162] It can be seen that Figure 5 In the embodiment shown, even if single board No. 9 fails during the process of synchronizing data on single board No. 9 with single board No. 10, and can no longer send the first communication signal to single board No. 10 to inform it of its current active state, single board No. 10 cannot receive the first communication signal from single board No. 9. Since single board No. 10 can determine whether to perform the master upgrade operation based on the locking information and data synchronization status, single board No. 10 will only perform the master upgrade operation after data synchronization is completed, thereby avoiding single board No. 10 from being upgraded to the active state and using local incomplete data processing services when it has only received part of or no data from single board No. 9, causing adverse effects on the business.

[0163] It is understood that in order to implement the functions in the above embodiments, the single board includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily appreciate that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in hardware or in a computer software-driven hardware manner depends on the specific application scenario and design constraints of the technical solution.

[0164] Figure 6 and Figure 7 This is a schematic diagram of the structure of the possible boards provided in this application. These boards can be used to implement the above Figures 2 to 5 The functions of the main board in the embodiments can also be realized Figures 2 to 5 These boards can also be used to achieve the above-mentioned Figures 2 to 5 The function of the new spare board in the embodiment can also be realized Figures 2 to 5 The beneficial effects of the embodiments are as follows.

[0165] like Figure 6 As shown, the board 600 includes a transceiver module 610 and a processing module 620 .

[0166] When the board 600 is used to implement the above Figures 2 to 5 In the method embodiment shown, the function of the main board is:

[0167] The processing module 620 is used to lock the single board 600 into the active state and / or lock the old standby single board into the standby state.

[0168] After the old standby board on the communication equipment to which the board 600 belongs is replaced with a new standby board, the processing module 620 is used to prohibit the board 600 from switching to the standby state and prohibit the new standby board from switching to the active state based on the locking state of the board 600 and / or the locking state of the old standby board if the transceiver module 610 receives a master upgrade request sent by the new standby board, wherein the master upgrade request is used to request switching to the active state.

[0169] In a possible embodiment, after the processing module 620 prohibits the new standby board from switching to the active state, the processing module 620 is used to synchronize the data of the board 600 to the new standby board. When it is determined that the data synchronization is completed, the board 600 is unlocked from the active state and / or the old standby board is unlocked from the standby state.

[0170] In a possible embodiment, after the old standby board is replaced with a new standby board, the transceiver module 610 is used to send locking information to the new standby board, the locking information indicating that the board 600 has been locked in the active state and / or indicating that the old standby board has been locked in the standby state.

[0171] In one possible embodiment, the transceiver module 610 is used to receive a locking request from a user, and the processing module 620 is used to lock the single board 600 as the active state and / or lock the old standby single board as the standby state based on the locking request; the transceiver module 610 is used to receive an unlocking request from a user, and the processing module 620 is used to unlock the single board 600 as the active state and / or unlock the old standby single board as the standby state based on the unlocking request.

[0172] In one possible embodiment, the processing module 620 is used to record locking information, the locking information indicating that the single board 600 has been locked in the main state and / or indicating that the old standby single board has been locked in the standby state, so as to lock the single board 600 in the main state and / or lock the old standby single board in the standby state; the processing module 620 is used to delete the recorded locking information, so as to unlock the single board 600 from the main state and / or unlock the old standby single board from the standby state.

[0173] When the board 600 is used to implement the above Figures 2 to 5 The functions of the new standby board in the method embodiment shown are:

[0174] After the old standby board on the communication device is replaced with board 600, the transceiver module 610 is used to send a master board promotion request to the master board in the communication device, and to receive a master promotion prohibition notification returned by the master board. The processing module 620 is used to prohibit itself from switching to the master state based on the master promotion prohibition notification.

[0175] In a possible embodiment, the processing module 620 is used to synchronize the data of the active board to the board 600, and when it is determined that the data synchronization is completed, unlock the active board from the active state and / or unlock the old standby board from the standby state.

[0176] In one possible embodiment, after the old standby board is replaced with board 600, the processing module 620 is used to determine the board 600 as a standby state if the transceiver module 610 receives a first communication signal sent by the active board, wherein the first communication signal includes the current state information of the active board; the transceiver module 610 is used to receive locking information sent by the active board, the locking information indicating that the active board has been locked into the active state and / or indicating that the old standby board has been locked into the standby state; the processing module 620 is used to start synchronizing the data of the active board; the processing module 620 is used to prohibit itself from switching to the active state based on the locking information if the data of the active board has not been synchronized and the transceiver module 610 has not received a new first communication signal sent by the active board.

[0177] In a possible embodiment, when the processing module 620 prohibits the single board 600 from switching to the active state based on the locking information, the processing module 620 is used to reset the single board 600, and to switch the single board 600 to the active state when it is determined that the number of times the single board 600 is reset reaches a threshold number.

[0178] In a possible embodiment, after the processing module 620 switches the board 600 to the active state, the processing module 620 is configured to unlock the active board from the active state and / or unlock the old standby board from the standby state.

[0179] Specifically, when the above-mentioned single board 600 is a main single board or a new standby single board, the specific implementation of performing various operations can refer to the above-mentioned Figures 2 to 5 The present application shown provides specific operations performed by the main board or the new standby board in the main board state switching method. For the sake of brevity of the description, they will not be elaborated here.

[0180] It should be understood that the single board 600 is only an example provided in the embodiment of the present application, and the single board 600 may have more Figure 6 The components shown may be more or fewer components, two or more components may be combined, or may be implemented with a different configuration of components.

[0181] This embodiment of the application also provides another single board 700, see Figure 7 , the single board 700 can be Figures 2 to 5 In the embodiment shown, the main board or the new standby board. Figure 7As shown, the board 700 includes a processor 710 and a communication interface 720. The processor 710 and the communication interface 720 are coupled to each other.

[0182] When the board 700 is used to implement Figures 2 to 5 When the function of the master board is used in the method embodiment, the processor 710 is used to implement the function of the processing module 620 corresponding to the master board, and the communication interface 720 is used to implement the function of the transceiver module 610 corresponding to the master board.

[0183] When the board 700 is used to implement Figures 2 to 5 When the function of the new standby board is implemented in the method embodiment, the processor 710 is used to implement the function of the processing module 620 corresponding to the new standby board, and the communication interface 720 is used to implement the function of the transceiver module 610 corresponding to the new standby board.

[0184] Processor 710 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.

[0185] The communication interface 720 may be a transceiver or an input / output interface, and may be a wired interface (e.g., an Ethernet interface, a fiber optic interface, or other types of interfaces (e.g., an InfiniBand interface)) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other boards or devices. The communication interface 720 may utilize a protocol suite based on the Transmission Control Protocol / Internet Protocol (TCP / IP), such as the Remote Function Call (RFC) protocol, the Simple Object Access Protocol (SOAP) protocol, the Simple Network Management Protocol (SNMP) protocol, the Common Object Request Broker Architecture (CORBA) protocol, and distributed protocols.

[0186] Optionally, the board 700 may further include a memory 730 for storing instructions executed by the processor 710 or storing input data required by the processor 710 to run instructions or storing data generated after the processor 710 runs instructions.

[0187] The memory 730 may include a volatile memory, such as a random access memory (RAM); the memory 730 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the memory 730 may also include a combination of the above types.

[0188] The bus 740 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 740 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 740 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 740 in the figure. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0189] The above-mentioned single board 700 is used to execute Figures 2 to 5 The steps performed by the active board or the new standby board in the active-standby board state switching method provided by the present application are specifically implemented in detail in the above method embodiment and will not be repeated here.

[0190] It should be understood that the single board 700 is only an example provided in the embodiment of the present application, and the single board 700 may have more Figure 7 The components shown may be more or fewer components, two or more components may be combined, or may be implemented with a different configuration of components.

[0191] According to the method provided in this application, this application also provides a communication device, which can be the above-mentioned Figures 2 to 5 The communication device in the embodiment can be used to implement the above Figures 2 to 5 In the method for switching the state of the master and standby boards in the embodiment, some or all of the steps executed by the communication device, or the communication device is used to implement the deployment Figure 6 The board 600 shown or deployed Figure 7 Single board 700 is shown.

[0192] According to the method provided by the present application, the present application also provides a readable storage medium, which stores instructions. When the instructions are executed by the communication device, they can implement some or all of the steps performed by the main board or the new standby board in the main-standby board status switching method recorded in the above embodiment.

[0193] According to the method provided by the present application, the present application also provides a computer program product, which includes: a program or instruction, which, when the program or instruction is run on a communication device, causes the communication device to execute Figures 2 to 5 Some or all of the steps in the method embodiment shown.

[0194] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0195] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product may include code. When the computer program product is read and executed by a computer, some or all of the steps of the rendering method described in the above method embodiments can be implemented. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium.

[0196] The steps in the method of the embodiment of the present application can be adjusted in order, combined or deleted according to actual needs; the units in the device of the embodiment of the present application can be divided, combined or deleted according to actual needs.

[0197] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for switching the state of a master and a standby board, characterized in that: Applied to a communication device, the communication device includes a primary single board and an old standby single board, the method comprising: The communication device locks the active board into active state or locks the old standby board into standby state; After the old standby board is replaced with a new standby board, if the active board receives a master upgrade request sent by the new standby board, based on the locked state of the active board or the locked state of the old standby board, the active board is prohibited from switching to the standby state and the new standby board is prohibited from switching to the active state, wherein the master upgrade request is used to request switching to the active state.

2. The method according to claim 1, characterized in that After the active single board prohibits the new standby single board from switching to the active state, the method further includes: The active board synchronizes the data of the active board with the new standby board, and when it is determined that the data synchronization is completed, unlocks the active board from being in the active state or unlocks the old standby board from being in the standby state.

3. The method according to claim 1 or 2, characterized in that After the old spare board is replaced with a new spare board, the method further includes: If the new standby board receives a communication signal sent by the active board, it determines itself as a standby board, wherein the communication signal includes current state information of the active board; The new standby board receives locking information sent by the active board, where the locking information indicates that the active board has been locked in the active state or that the old standby board has been locked in the standby state; The new standby board starts synchronizing data of the active board; If the new standby board has not synchronized the data of the active board and has not received a new communication signal sent by the active board, the new standby board prohibits itself from switching to the active state based on the locking information.

4. The method according to claim 3, characterized in that In a case where the new standby board prohibits itself from switching to the active state based on the locking information, the method further includes: The new standby board is reset; The new standby board switches itself to the active state when it is determined that the number of times the new standby board is reset reaches a threshold.

5. The method according to claim 4, characterized in that After the new standby board switches itself to the active state, the method further includes: The new standby board unlocks the active board from being in the active state or unlocks the old standby board from being in the standby state.

6. The method according to any one of claims 1 to 5, characterized in that The step of locking the active board into the active state or locking the old standby board into the standby state includes: The active single board receives a locking request from a user, and based on the locking request, locks the active single board into an active state or locks the old standby single board into a standby state; The master board unlocks the master board from being in the master state or unlocks the old standby board from being in the standby state, including: The active single board receives the unlocking request from the user, and unlocks the active single board from being in the active state or unlocks the old standby single board from being in the standby state based on the unlocking request.

7. The method according to any one of claims 1 to 6, characterized in that The step of locking the active board into the active state or locking the old standby board into the standby state includes: The active single board records locking information, where the locking information indicates that the active single board has been locked in the active state or that the old standby single board has been locked in the standby state; The master board unlocks the master board from being in the master state or unlocks the old standby board from being in the standby state, including: The master board deletes the recorded locking information.

8. A communication device, characterized in that: The communication equipment includes a main board and an old standby board; The master board is used to lock the master board into the master state or lock the old standby board into the standby state; After the old standby board is replaced with a new standby board, the main board is also used to prohibit the main board from switching to the standby state and prohibit the new standby board from switching to the main state based on the locking state of the main board or the locking state of the old standby board if it receives a master upgrade request sent by the new standby board, wherein the master upgrade request is used to request switching to the main state.

9. The communication device according to claim 8, wherein: After the active single board prohibits the new standby single board from switching to the active state, The master board is further configured to synchronize data of the master board to the new standby board, and when it is determined that the data synchronization is completed, unlock the master board from being in the master state or unlock the old standby board from being in the standby state.

10. The communication device according to claim 8 or 9, characterized in that After the old standby board is replaced by a new standby board, the new standby board is configured to determine itself as a standby board upon receiving a communication signal sent by the active board, wherein the communication signal includes current state information of the active board; The new standby board is further configured to receive locking information sent by the active board, wherein the locking information indicates that the active board has been locked in the active state or that the old standby board has been locked in the standby state; The new standby board is also used to start synchronizing data of the active board; The new standby board is further configured to prohibit itself from switching to the active state based on the locking information if the data of the active board has not been synchronized and a new communication signal sent by the active board has not been received. The communication device according to claim 10 , wherein: In a case where the new standby board prohibits itself from switching to the active state based on the locking information, the new standby board is further used for resetting; The new standby board is further configured to switch itself to a master state when it is determined that the number of times the new standby board is reset reaches a threshold.

12. The communication device according to claim 11, wherein: After the new standby board switches itself to the active state, the new standby board is further used to unlock the active board from the active state or unlock the old standby board from the standby state.

13. The communication device according to any one of claims 8 to 12, characterized in that: The master board is used to receive a locking request from a user, and based on the locking request, lock the master board into a master state or lock the old standby board into a standby state; The master board is used to unlock the master board from being in the master state or unlock the old standby board from being in the standby state, including: The active single board is used to receive the unlocking request of the user, and unlock the active single board from being in the active state or unlock the old standby single board from being in the standby state based on the unlocking request.

14. The communication device according to any one of claims 8 to 13, characterized in that: The master board is used to record locking information, where the locking information indicates that the master board has been locked in the master state or that the old standby board has been locked in the standby state; The master board is used to delete the recorded locking information.

15. A single board, characterized in that: The single board is a main single board or a new spare single board in the communication equipment according to any one of claims 8 to 14.

Citation Information

Patent Citations

  • Method for protecting main and standby states of single board and communication equipment

    CN112751753A

  • Method for preventing monolithic board from fault operation of master-slave back-up inverse circuit

    CN1719743A

  • Main standby switch control circuit and control method thereof

    CN1725660A

  • Method for negat main spare board in communication equipment

    CN1741404A