Box type network equipment and hot standby method

By adopting a dual CPU architecture in the cassette network device, the role switching of the master-slave CPU and the reconstruction of the communication channel is solved, and the problem of the cassette network device not being able to operate normally in the case of CPU failure in the existing technology is solved, reducing the equipment cost and Improves the reliability of the system.

CN119484436APending Publication Date: 2025-02-18MAIPU COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411601536.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Existing box network devices cannot operate normally when the CPU fails, resulting in service interruption, and the cost of implementing hot standby solutions through distributed network devices is high.

Method used

A box-type network device adopting a dual CPU architecture establishes a communication connection between the two CPUs, and elects the main CPU and the slave CPU. The main CPU establishes a communication channel with the switching chip. The slave CPU switches to the new main CPU when an abnormality occurs in the main CPU. , and establish a communication channel with the switching chip.

Benefits of technology

It realizes the hot standby function of the box network equipment, while reducing equipment costs, ensuring business continuity and stability, and improving system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484436A_ABST
    Figure CN119484436A_ABST
Patent Text Reader

Abstract

The invention provides a box type network device and a hot standby method, the box type network device comprises two CPUs and a switch chip, the two CPUs establish communication connection, and a master CPU and a slave CPU are generated through election; the main CPU is used for establishing a communication channel with the switching chip and performing normal communication; and the slave CPU is used for switching to a new master CPU when detecting that the master CPU works abnormally, and establishing a communication channel between the slave CPU and the switch chip. According to the invention, a double-CPU single-exchange chip architecture is adopted, and compared with a hot standby scheme realized through distributed network equipment in the prior art, additional CPUs and distributed machine frames are reduced, so that the cost is saved. When the slave CPU detects that the master CPU is abnormal, role switching is automatically carried out to take over the switching chip, so that an efficient hot standby function is realized, and normal operation of services is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network communications, and in particular to a box-type network device and a hot standby method. Background Art

[0002] In current application scenarios such as data centers, users often choose box-type network devices for networking based on network service requirements. Figure 1 The structure of the current box-type network equipment is shown, which consists of a CPU and a switch chip, and the CPU and the switch chip are connected through a PCIE channel. Figure 1 In the box-type network device shown, once the CPU running the system software fails, the entire device may become abnormal and unable to operate normally. Therefore, it is very important for users who pursue high reliability of network services to have a hot standby function for box-type network devices to ensure business continuity.

[0003] Figure 2 A schematic diagram of a system that implements hot standby through distributed network devices is shown. The system uses a master MPU (Main Processing Unit, i.e., main control board), a slave MPU and an LPU (Line Processing Unit, i.e., service board). The master MPU and the slave MPU are both equipped with a CPU, and the LPU is equipped with a CPU and a switching chip. The master MPU and the slave MPU are connected to the LPU through an IPU channel, and the CPU in the LPU is connected to the switching chip through a PCIE channel. It can be seen that this solution of implementing hot standby function through distributed network devices significantly increases the equipment cost.

[0004] Therefore, how to provide a box-type network device that has a hot standby function and can save equipment costs is a technical problem that needs to be solved. Summary of the invention

[0005] In view of this, one of the purposes of the present invention is to provide a box-type network device and a hot standby method, so as to enable the box-type network device to have a hot standby function while reducing the device cost. The present invention can be implemented as follows:

[0006] In a first aspect, the present invention provides a box-type network device, comprising two CPUs and a switching chip; a communication connection is established between the two CPUs, and a master CPU and a slave CPU are generated by election; the master CPU is used to establish a communication channel with the switching chip and perform normal communication; the slave CPU is used to switch to a new master CPU and establish a communication channel with the switching chip when an abnormal operation of the master CPU is detected.

[0007] In an optional implementation, both CPUs are provided with virtual switching units; the master CPU is further used to synchronize the operation instructions to the slave CPU before issuing the operation instructions to the switching chip; and operate the switching chip after receiving a success message from the slave CPU that the operation instructions are executed on the virtual switching unit of the CPU.

[0008] In an optional implementation, both CPUs are provided with control units; the slave CPU is further used to disconnect the communication channel between the control unit of the CPU and the virtual switching unit of the CPU after switching to the new master CPU.

[0009] In an optional implementation manner, the slave CPU is further configured to establish a communication channel between the control unit of the CPU and the virtual switching unit of the CPU when the master CPU operates normally.

[0010] In an optional implementation manner, both CPUs are further provided with a channel management unit; the channel management unit is used to complete the establishment of the communication channel.

[0011] In an optional implementation, both CPUs are further provided with an application unit; the application unit is used to generate an operation instruction and issue the operation instruction through the control unit.

[0012] In a second aspect, the present invention provides a hot standby method, which is applied to a box-type network device, wherein the box-type network device includes two CPUs and a switching chip; the method includes: establishing a communication connection between the two CPUs, and generating a master CPU and a slave CPU by electing; the master CPU establishes a communication channel with the switching chip and performs normal communication; when the slave CPU detects that the master CPU is working abnormally, it switches to a new master CPU and establishes a communication channel with the switching chip.

[0013] In an optional implementation, both CPUs are provided with virtual switching units; the method further includes: before the master CPU issues an operation instruction to the switching chip, the master CPU first synchronizes the operation instruction to the slave CPU; after receiving a success message from the slave CPU that the operation instruction is executed on the virtual switching unit of the CPU, the master CPU operates the switching chip.

[0014] In an optional implementation, both CPUs are provided with control units; after the slave CPU is switched to the new master CPU, the communication channel between the control unit of the CPU and the virtual switching unit of the CPU is disconnected.

[0015] In an optional implementation, when the master CPU operates normally, the slave CPU establishes a communication channel between the control unit of the CPU and the virtual switching unit of the CPU.

[0016] The embodiment of the present invention provides a box-type network device and hot standby method, which adopts a dual CPU architecture, specifically composed of two CPUs and a switching chip. Compared with the hot standby solution implemented by distributed network devices in the prior art, it reduces the additional CPU and distributed machine frame, thereby saving costs. In addition, when the slave CPU detects that the master CPU is abnormal, it will automatically switch roles to take over the switching chip, ensuring that the network device's services continue to run stably, and realizing an efficient hot standby function. In general, the present invention can not only reduce the overall deployment cost, but also improve the reliability of the system and ensure the normal operation of the services.

[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 The structure of current box-type network equipment is shown;

[0020] Figure 2 A schematic diagram of a system that implements hot standby through distributed network devices is shown;

[0021] Figure 3 A structural block diagram of a box-type network device provided by an embodiment of the present invention;

[0022] Figure 4 The switching process of the master and slave CPUs of the box-type network device provided by the embodiment of the present invention;

[0023] Figure 5 One of another structural schematic diagrams of a box-type network device provided by an embodiment of the present invention;

[0024] Figure 6 Another structural schematic diagram of a box-type network device provided by an embodiment of the present invention is shown in FIG2;

[0025] Figure 7 A third schematic diagram of another structure of a box-type network device provided by an embodiment of the present invention;

[0026] Figure 8 A fourth schematic diagram of another structure of the box-type network device provided by the present invention;

[0027] Fig. 9 A schematic flow chart of a hot standby method provided for the implementation of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0029] First, relevant terms in the embodiments of the present invention are introduced.

[0030] 1. Box-type network equipment: CPU, switching chip and other devices are designed in a box-type device.

[0031] 2. CPU (Central Processing Unit), central processing unit, the core component of electronic equipment, used to interpret computer instructions and process data in computer software.

[0032] 3. Switching chip: The core component of network communication equipment, it is an integrated circuit that realizes data exchange. It is mainly used in switches, routers and other equipment in communication networks. Its main functions include receiving, storing, forwarding and filtering data packets to realize communication between different network nodes.

[0033] 4. PCIE (Peripheral Component Interconnect Express): A high-speed serial computer expansion bus standard, which belongs to high-speed serial point-to-point dual-channel high-bandwidth transmission, such as data transmission between CPU and switching chip.

[0034] 5. IPU (Inter-Process Unit): In distributed network devices, it realizes the communication between the boards in the chassis, such as data communication between the main control board and the business board.

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0036] Considering that the cost of the existing hot standby implementation scheme of box-type network devices is relatively high, based on this, an embodiment of the present invention provides a box-type network device, including two CPUs and a switching chip, a communication connection is established between the two CPUs, and a master CPU and a slave CPU are generated by election. For ease of understanding, please refer to Figure 3 , Figure 3 The structural block diagram of a box-type network device provided by an embodiment of the present invention, wherein the box-type network device 00 can be, but is not limited to, a router, a switch, etc.

[0037] exist Figure 3 In FIG. 1 , the master CPU 10 and the slave CPU 11 are determined by election. The connection line between the master CPU 10 and the slave CPU 11 represents the IPU channel. A PCIE channel is established between the master CPU 10 and the switch chip 20, and a dotted line is used between the slave CPU 11 and the switch chip 20, indicating that the communication channel has not yet been established.

[0038] In one embodiment of the present invention, the communication channel may be a high-speed bus communication channel. Such a high-speed bus may be, but is not limited to, a PCIE bus, that is, a PCIE channel is a type of communication channel, and the present invention does not impose any specific limitation thereto.

[0039] The main CPU 10 is used to establish a communication channel with the switching chip 20 and perform normal communication; the slave CPU 11 is used to switch to a new main CPU and establish a communication channel with the switching chip 20 when an abnormal operation of the main CPU 10 is detected.

[0040] To understand the above functions more intuitively, please refer to Figure 4 , Figure 4 The switching process of the master and slave CPUs of the box-type network device provided by the embodiment of the present invention. When the original master CPU works normally, it is responsible for establishing a communication channel with the switching chip 20, while at this time, no communication channel is established between the original slave CPU and the switching chip 20. Once the original master CPU works abnormally, the original slave CPU will automatically switch its role and become the new master CPU. Then, the new master CPU starts to establish a communication channel with the switching chip 20 and takes over the control of the switching chip 20. At the same time, the original master CPU becomes the new slave CPU and no longer establishes a communication channel with the switching chip 20.

[0041] By designing the above-mentioned switching mechanism, the embodiment of the present invention can ensure that when the main CPU of the box-type network device fails, the role switching and the reconstruction of the communication channel can be performed quickly and seamlessly, thereby ensuring the continuity and stability of the box-type network device.

[0042] An embodiment of the present invention provides a box-type network device equipped with dual CPUs and a switching chip to achieve hot standby. Figure 2 The hot standby solution implemented by the distributed network device shown in the figure has the following advantages: First, the box-type network device provided by the embodiment of the present invention is composed of two CPUs and a switching chip. Figure 2 Compared with the distributed network devices in the system, the system reduces the extra CPU and distributed chassis, thus saving costs. In addition, when the slave CPU detects an abnormality in the master CPU, it will automatically switch roles to take over the switching chip to ensure the continuous and stable operation of the network equipment business, and realize efficient hot standby function. This design can not only reduce the overall deployment cost, but also improve the reliability of the system and ensure the normal operation of the business.

[0043] In one embodiment of the present invention, in order to establish a communication channel, the two CPUs in the embodiment of the present invention are further integrated with a channel management unit, which is responsible for completing the establishment of a communication channel between the original main CPU or the new main CPU and the switch chip.

[0044] For easier understanding, see Figure 5 , Figure 5 Another structural diagram of a box-type network device provided by an embodiment of the present invention is one of the following. Figure 5 In the embodiment, the main CPU 10 is provided with a channel management unit 0, and the slave CPU 11 is provided with a channel management unit 1. When the main CPU 10 operates normally, the main CPU 10 establishes a communication channel with the switch chip 20 through its built-in channel management unit 0. If the main CPU 10 fails, the slave CPU 11 automatically switches to a new main CPU, and then establishes a communication channel with the switch chip 20 through the channel management unit 1. Through this embodiment, the present invention can ensure that when the main CPU fails, the communication channel of the box-type network device can be quickly and seamlessly switched, thereby ensuring the continuous and stable operation of the box-type network device.

[0045] In one embodiment of the present invention, the two CPUs not only integrate a channel management unit, but also configure a control unit, and the "communication channel" mentioned above refers to the communication path between the control unit and the switching chip. In an optional implementation, the control unit in the embodiment of the present invention can be implemented in the form of SDK (Software Development Kit, software development kit) but is not limited to it.

[0046] To understand the function of the control unit, please refer to Figure 6. Figure 6 Another structural diagram of the box-type network device provided by the embodiment of the present invention is shown in Figure 2. In this embodiment, the main CPU 10 is configured with a control unit 0, and the slave CPU 11 is configured with a control unit 1.

[0047] When the master CPU 10 is working normally, the master CPU 10 uses its channel management unit 0 to establish a communication channel between the control unit 0 and the switch chip 20. If the master CPU 10 fails, the slave CPU 11 will automatically switch to become the new master CPU and establish a communication channel between the control unit 1 and the switch chip 20 through its channel management unit 1.

[0048] Through this implementation, the present invention ensures that when a main CPU fails, the communication channel can be switched quickly and seamlessly, thereby not only improving the reliability of the system, but also significantly improving the efficiency and flexibility of fault recovery.

[0049] In one embodiment of the present invention, both the original master CPU and the new master CPU can realize efficient operation of the switching chip through the control unit. In the process of operating the switching chip through the control unit, in order to ensure that the data on the master CPU and the slave CPU remain consistent during the process of the master CPU operating the switching chip, the two CPUs in the embodiment of the present invention are also specially designed with a virtual switching unit.

[0050] For easier understanding, see Figure 7 , Figure 7 Another structural diagram of a box-type network device provided by an embodiment of the present invention is a third one. In the embodiment of the present invention, a virtual switching unit 0 is set in the main CPU 10, and a virtual switching unit 1 is set in the slave CPU 11. The main CPU 10 can send an operation instruction to the switching chip 20 through the control unit 0, and the slave CPU 11 sends an operation instruction to the virtual switching unit 1 through the control unit 1.

[0051] By introducing a virtual switching unit, the embodiment of the present invention can ensure that only the master CPU can perform actual operations on the switching chip at the same time, and maintain data consistency between the master and slave CPUs, thereby avoiding operation conflicts on the switching chip.

[0052] In one embodiment of the present invention, when the master CPU is working normally, the slave CPU is further used to establish a communication channel between the control unit of the CPU and the virtual switching unit of the CPU before operating the virtual switching unit. When the master CPU is working abnormally, the slave CPU is further used to disconnect the communication channel between the control unit of the CPU and the virtual switching unit of the CPU after switching to the new master CPU.

[0053] For example, see Figure 7 Before operating the virtual switching unit 1, the slave CPU 11 may first establish a communication channel with the virtual switching unit 1 through the channel management unit 1. When the master CPU 10 has a working abnormality, the slave CPU 11 not only needs to establish a communication channel between the control unit 1 and the actual switching chip 20, but also needs to disconnect the communication channel between the control unit 1 and the virtual switching unit 1.

[0054] That is, according to the embodiment of the present invention, only the control unit of the master CPU is allowed to establish a connection with the switch chip through the channel management unit and perform operations. In contrast, the control unit of the slave CPU is not allowed to directly establish a connection with the switch chip through the channel management unit and perform operations. This design ensures that the data of the control units on the master CPU and the slave CPU can be kept consistent in any case, thereby avoiding abnormal situations that may occur during business operations.

[0055] In one embodiment of the present invention, the main CPU 10 is also used to synchronize the operation instructions to the slave CPU 11 before issuing the operation instructions to the switching chip 20; after receiving the success message of executing the operation instructions on the virtual switching unit of the CPU fed back from the slave CPU 11, the switching chip 20 is operated.

[0056] It is worth noting that when the slave CPU 11 receives the operation instruction sent by the master CPU 10, it will synchronously perform the corresponding operation on the virtual switching unit 1, and will not perform the actual operation on the switching chip. On the contrary, the virtual switching unit 1 will return an operation success message after confirming that it has received the operation instruction. This design simplifies the processing flow and ensures that the system can respond quickly in any case, maintaining data consistency and business continuity.

[0057] To understand this process more intuitively, please continue to refer to Figure 7 When the master CPU 10 is working normally, before operating the switch chip 20, the master CPU 10 will first instruct the slave CPU 11 to operate the virtual switch unit 1 on the CPU, that is, execute step ① to synchronize the operation instruction of the master CPU 10. After receiving the operation instruction, the slave CPU 11 executes step ② to issue the operation instruction to the virtual switch unit 1 through the control unit 1. After successfully operating the virtual switch unit 1, the slave CPU 11 executes step ③ to feedback the operation success message to the master CPU 10. After receiving the message, the master CPU 10 executes step ④ to issue the operation instruction to the switch chip 20 to complete the operation of the switch chip 20.

[0058] In one embodiment of the present invention, a corresponding application unit (i.e., a protocol module, such as a routing protocol, an ARP protocol, etc.) can also be developed according to the functions provided by the control unit to improve the convenience and flexibility of the switch chip operation. Therefore, in the embodiment of the present invention, both CPUs are also provided with an application unit, which can be used to generate an operation instruction and issue the operation instruction through the control unit.

[0059] To understand the above embodiments more intuitively, please refer to Figure 8 , Figure 8 Another structural schematic diagram of the box-type network device provided by the present invention is shown in Figure 4. In this embodiment, the application unit 0 is deployed on the main CPU 10, and the application unit 1 is deployed on the slave CPU 11. When the main CPU 10 works normally, the application unit 0 generates an operation instruction, and uses the control unit 0 as an intermediary to indirectly operate the switch chip 20. If the main CPU 10 fails, after the slave CPU 11 is switched to a new main CPU, the application unit 1 generates an operation instruction, and indirectly operates the switch chip 20 through the control unit 1, thereby ensuring that the box-type network device can maintain normal operation and operation under any circumstances.

[0060] The above structural design not only simplifies the interaction process between the user and the box-type network device, but also makes the operation of the switching chip more intuitive and user-friendly.

[0061] In summary of the above embodiments, the box-type network device provided by the present invention is configured with two CPUs and a switching chip. Under this structural design, in order to realize the hot standby function of the dual CPUs, the embodiment of the present invention introduces two key modules, the channel management unit and the virtual switching chip. The channel management unit can quickly establish a connection between the switching chip and the new main CPU when the master-slave role is switched, ensuring the seamless transition and high efficiency of the system. At the same time, the design of the virtual switching unit ensures that only the main CPU can operate the switching chip at the same time. This mechanism can prevent operational conflicts on the switching chip and data inconsistency problems on the control unit. Through these implementation methods, the embodiment of the present invention significantly reduces the overall deployment cost, improves the fault tolerance and business continuity of the network equipment, and ensures the normal operation of the business.

[0062] based on Figures 3 to 8 With the same inventive concept, the embodiment of the present invention also provides a hot standby method, which can be applied to the box-type network device 00 in any of the above embodiments, see Fig. 9 , Fig. 9 A schematic flow chart of a hot standby method provided for the implementation of the present invention, the method comprising:

[0063] S401, establishing a communication connection between two CPUs, and generating a master CPU and a slave CPU by election;

[0064] S402, the main CPU establishes a communication channel with the switching chip and performs normal communication;

[0065] S403: When the slave CPU detects that the master CPU is operating abnormally, it switches to a new master CPU and establishes a communication channel with the switch chip.

[0066] In the embodiment of the present invention, the implementation method of establishing a communication channel with the switching chip can be referred to Figures 3 to 8 The corresponding implementation contents will not be repeated here.

[0067] In an optional implementation, the hot standby method provided by an embodiment of the present invention also includes: before the master CPU issues an operation instruction to the switching chip, it first synchronizes the operation instruction to the slave CPU; after receiving a success message from the slave CPU that the operation instruction is executed on the virtual switching unit of the CPU, it operates the switching chip.

[0068] In an optional implementation manner, the hot standby method provided by the embodiment of the present invention further includes: after the slave CPU is switched to the new master CPU, disconnecting the communication channel between the control unit of the CPU and the virtual switching unit of the CPU.

[0069] In an optional implementation manner, the hot standby method provided in the embodiment of the present invention further includes: when the master CPU works normally, the slave CPU establishes a communication channel between the control unit of the CPU and the virtual switching unit of the CPU.

[0070] In an optional implementation manner, the hot standby method provided in the embodiment of the present invention further includes: after the slave CPU is switched to the new master CPU, disconnecting the communication channel between the control unit of the local card and the virtual switching chip of the local card.

[0071] In order to understand the hot standby method under the dual CPU architecture of the box-type network device 00 provided by the embodiment of the present invention as a whole, the embodiment of the present invention can also be combined with Figures 3 to 8 , the communication channel is the PEIC channel, and the overall introduction is given through the following steps:

[0072] Step 1: After the system starts, the master CPU 10 and the slave CPU 11 are elected. Subsequently, the channel management unit 0 of the master CPU 10 establishes a PCIE channel between the control unit 0 and the switch chip 20 to provide a necessary path for data transmission and device control.

[0073] Step 2: The channel management unit 1 of the slave CPU 11 establishes a PCIE channel between the control unit 1 and the virtual switching unit 1, which provides a basis for the monitoring and proxy operations of the slave CPU 11.

[0074] Step 3: When the main CPU 10 is working normally, the application unit 0 of the main CPU 10 synchronizes the operation instruction to the virtual switching unit 1 of the slave CPU 11 through the control unit 1 through the application unit 1 of the slave CPU 11 through the control unit 1 before operating the switching chip 20. After receiving the operation instruction, the virtual switching unit 1 directly returns the operation success message to the application unit 1 through the control unit 1. Then, after the application unit 0 receives the success message of executing the operation instruction on the virtual switching unit 1 from the slave CPU 11, it sends the operation instruction to the switching chip 20 through the control unit 0 to directly operate the hardware. This step ensures the consistency of the control unit data on the dual CPUs, thereby ensuring the stability and reliability of the system.

[0075] Step 4: When the slave CPU 11 detects that the master CPU 10 is working abnormally, it will automatically switch to the new master CPU for hot standby. At this time, the channel management unit 1 will disconnect the PCIE channel between the control unit 1 and the virtual switching unit 1, and establish a new PCIE channel between the control unit 1 and the switching chip 20. Thanks to the data consistency operation in step 3, after this role switching, the business can continue to run seamlessly, ensuring the continuity of the system and the uninterrupted business.

[0076] In summary of the above embodiments, the hot standby method provided by the present invention integrates two key components, the channel management unit and the virtual switching unit, inside the dual CPU, so as to quickly establish a connection between the switching chip and the new main CPU when the master-slave role is switched. This design not only speeds up the switching process, but also improves the response speed and reliability of the system. In addition, the introduction of the virtual switching unit ensures that at any time, only the main CPU can perform actual operations on the switching chip. This mechanism effectively avoids possible conflicts and data inconsistencies, thereby ensuring the continuity and stability of the business process and ensuring the normal operation of the business.

[0077] Based on the above embodiments, an embodiment of the present invention further provides a storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the hot standby method provided in the above embodiments.

[0078] Based on the above embodiments, an embodiment of the present invention further provides a computer program. When the computer program is run on a computer, the computer executes the hot standby method provided in the above embodiments.

[0079] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by instructions. These instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0080] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0082] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A box-type network device, characterized in that: It includes two CPUs and a switching chip; a communication connection is established between the two CPUs, and a master CPU and a slave CPU are generated through election; The main CPU is used to establish a communication channel with the switching chip and perform normal communication; The slave CPU is used to switch to a new master CPU and establish a communication channel with the switching chip when it is detected that the master CPU is working abnormally.

2. The box-type network device according to claim 1, characterized in that: Both CPUs are equipped with virtual switching units; The master CPU is also used to synchronize the operation instruction to the slave CPU before issuing the operation instruction to the switching chip; and operate the switching chip after receiving the success message fed back by the slave CPU for executing the operation instruction on the virtual switching unit of the CPU.

3. The box-type network device according to claim 1 or 2, characterized in that: Both CPUs are provided with a control unit; The slave CPU is also used to disconnect the communication channel between the control unit of the CPU and the virtual switching unit of the CPU after switching to the new master CPU.

4. The box-type network device according to claim 3, characterized in that: The slave CPU is also used to establish a communication channel between the control unit of the CPU and the virtual switching unit of the CPU when the master CPU works normally.

5. The box-type network device according to claim 1 or 2, characterized in that: Both CPUs are also provided with a channel management unit; the channel management unit is used to complete the establishment of the communication channel.

6. The box-type network device according to claim 3, characterized in that: Both CPUs are also provided with an application unit; the application unit is used to generate operation instructions and issue the operation instructions through the control unit.

7. A hot standby method, characterized in that: Applied to a box-type network device, the box-type network device includes two CPUs and a switching chip; the method includes: A communication connection is established between the two CPUs, and the master CPU and the slave CPU are generated through election; The main CPU establishes a communication channel with the switching chip and performs normal communication; When the slave CPU detects that the master CPU is working abnormally, it switches to a new master CPU and establishes a communication channel with the switching chip.

8. The hot standby method according to claim 7, characterized in that: Both CPUs are provided with virtual switching units; the method further comprises: Before issuing an operation instruction to the switching chip, the master CPU first synchronizes the operation instruction to the slave CPU; after receiving a successful message from the slave CPU that the operation instruction is executed on the virtual switching unit of the CPU, the master CPU operates the switching chip.

9. The hot standby method according to claim 7 or 8, characterized in that: Both CPUs are provided with a control unit; After the slave CPU is switched to the new master CPU, the communication channel between the control unit of the CPU and the virtual switching unit of the CPU is disconnected.

10. The hot standby method according to claim 9, characterized in that: When the master CPU works normally, the slave CPU establishes a communication channel between the control unit of the CPU and the virtual switching unit of the CPU.