Switch control method and device, server and storage medium

By using complex programmable logic devices (CPLD) and multi -road relics (MUX) to monitor and switch switchs in the server, the problem that the equipment cannot communicate when there is a problem with the switch, and realize the stability and data security of the system. sex.

CN119383062AActive Publication Date: 2025-01-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411532478.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-01-28
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In the prior art, the tree topological connection method of the switch exists. If any switch has problems, all mounted PCIe devices cannot communicate with the CPU, resulting in abnormal system operation and adverse effects such as data loss.

Method used

Design a switch control method to monitor and switch the main switch and spare switch with complex programmable logic devices (CPLD) and multi -road relics (MUX) to ensure that when the main switch is wrong, it will automatically switch to the backup switching switch Instrument, ensure the normal work of the device.

Benefits of technology

Through this method, when any switch is a problem, it can ensure that the mounting equipment can work normally, improve the stability of the system, and avoid data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383062A_ABST
    Figure CN119383062A_ABST
Patent Text Reader

Abstract

The invention relates to a switch control method and device, a server and a storage medium. The method is applied to the server, the server comprises a first complex programmable logic device CPLD, a first multiplexer MUX, a first-stage main exchanger and a first-stage standby exchanger, and the first-stage main exchanger and the first-stage standby exchanger are connected with the first complex programmable logic device CPLD and the first multiplexer MUX. A first complex programmable logic device CPLD is connected with a first multiplexer MUX, and the method comprises the steps that when the first complex programmable logic device CPLD does not receive a first-level state signal sent by a first-level main switch, the first complex programmable logic device CPLD is called to send a second gating signal to the first multiplexer MUX; and calling the first multiplexer MUX to select the first-stage standby switch to work according to the second gating signal. According to the invention, when any exchanger goes wrong, the mounted equipment is not influenced and can work normally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a switch control method, device, server and storage medium. Background Art

[0002] With the development of artificial intelligence and big data, the role of servers in daily life is becoming more and more important, and the application fields are becoming wider and wider. The demand for PCIe (peripheral component interconnect express, a high-speed serial computer expansion bus standard) devices is increasing. However, the processor CPU (Central Processing Unit) can directly connect to the RP (Root Port) of the PCIe device is limited. In order to use more PCIe devices, SW (Switch) devices are required. In the existing technology, the connection method of SW is generally based on a tree topology. The defect of this connection method is that when one of the SW chips is damaged or abnormal, all the PCIe devices hanging under it cannot communicate with the CPU and cannot work normally, thereby affecting the operation of the entire system and causing data loss and other adverse effects. Summary of the invention

[0003] Based on this, it is necessary to provide a switch control method, device, server and storage medium to address the above technical problems, which can ensure the normal operation of the mounted devices when any switch has a problem.

[0004] A switch control method is applied to a server, the server includes a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch, the primary main switch and the primary backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX, and the first complex programmable logic device CPLD is connected to the first multiplexer MUX, wherein the method includes:

[0005] When the first complex programmable logic device CPLD receives the primary state signal sent by the primary main switch, the first complex programmable logic device CPLD is called to send a first selection signal to the first multiplexer MUX;

[0006] Calling the first multiplexer MUX to select the primary main switch to work according to the first selection signal;

[0007] When the first complex programmable logic device CPLD does not receive the primary state signal sent by the primary main switch, calling the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX;

[0008] The first multiplexer MUX is called to select a first-level standby switch to work according to the second selection signal.

[0009] In one embodiment, the server further includes a second complex programmable logic device CPLD, a second multiplexer MUX, a secondary main switch and a secondary backup switch and a device, the secondary main switch and the secondary backup switch are connected to the primary main switch and the primary backup switch through the first multiplexer MUX, the secondary main switch and the secondary backup switch are connected to the second complex programmable logic device CPLD and the second multiplexer MUX, the second complex programmable logic device CPLD is connected to the second multiplexer MUX, and the device is connected to the secondary main switch through the second multiplexer MUX, wherein the method further includes:

[0010] When the second complex programmable logic device CPLD receives the secondary state signal sent by the secondary main switch, the second complex programmable logic device CPLD is called to send a third selection signal to the second multiplexer MUX;

[0011] Calling the second multiplexer MUX to select the secondary main switch to work according to the third selection signal, and controlling the device to work through the secondary main switch;

[0012] When the second complex programmable logic device CPLD does not receive the secondary state signal sent by the secondary main switch, calling the second complex programmable logic device CPLD to send a fourth selection signal to the second multiplexer MUX;

[0013] calling the second multiplexer MUX to select the secondary standby switch to work according to the fourth selection signal;

[0014] The second multiplexer MUX is called to connect the device to the secondary backup switch, and the device is controlled to work through the secondary backup switch.

[0015] In one embodiment, the server further includes a processor CPU, the processor CPU includes a device root port RP, the primary main switch and the primary backup switch are both connected to the device root port RP, wherein the method further includes:

[0016] When the processor CPU is normally powered on and reset, a startup signal is sent to the primary main switch and the primary backup switch through the device root port RP;

[0017] The primary main switch and the primary backup switch are called to perform normal power-on reset according to the start signal to generate corresponding primary status signals.

[0018] In one of the embodiments, when the first complex programmable logic device CPLD receives a primary status signal sent by a primary main switch, it includes: when the first complex programmable logic device CPLD only receives a primary status signal sent by a primary main switch; and / or

[0019] When the first complex programmable logic device CPLD receives a primary status signal sent by a primary main switch, and receives a primary status signal sent by a primary backup switch.

[0020] In one embodiment, when the first complex programmable logic device CPLD does not receive the primary status signal sent by the primary main switch, the method includes:

[0021] When the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level standby switch.

[0022] In one embodiment, the first multiplexer MUX includes a switch for controlling a primary main switch and a switch for controlling a primary backup switch, wherein calling the first multiplexer MUX to select a primary main switch to work according to a first selection signal includes:

[0023] Calling the first multiplexer MUX to close the switch corresponding to the primary main switch according to the first selection signal;

[0024] The first multiplexer MUX is called to select the first-level standby switch to work according to the second selection signal, including:

[0025] The first multiplexer MUX is called to close the switch corresponding to the first-level standby switch according to the second selection signal.

[0026] In one embodiment, the method further comprises:

[0027] Calling a first complex programmable logic device CPLD to monitor the status of a primary main switch and a primary standby switch;

[0028] The first complex programmable logic device CPLD is called to send the abnormal state to the mobile terminal through the network cloud, so that the user of the mobile terminal can determine the corresponding abnormal switch according to the abnormal state and perform maintenance.

[0029] A switch control device, the device is applied to a server, the server includes a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch, the primary main switch and the primary backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX, the first complex programmable logic device CPLD is connected to the first multiplexer MUX, wherein the device includes:

[0030] A first receiving module is used for calling the first complex programmable logic device CPLD to send a first selection signal to the first multiplexer MUX when the first complex programmable logic device CPLD receives the first state signal sent by the first main switch;

[0031] A first selection module, used for calling a first multiplexer MUX to select a primary main switch to work according to a first selection signal;

[0032] The second receiving module is used for calling the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX when the first complex programmable logic device CPLD does not receive the first state signal sent by the first main switch;

[0033] The second selection module is used to call the first multiplexer MUX to select the first-level standby switch to work according to the second selection signal.

[0034] A server comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0035] When the first complex programmable logic device CPLD receives the primary state signal sent by the primary main switch, the first complex programmable logic device CPLD is called to send a first selection signal to the first multiplexer MUX;

[0036] Calling the first multiplexer MUX to select the primary main switch to work according to the first selection signal;

[0037] When the first complex programmable logic device CPLD does not receive the primary state signal sent by the primary main switch, calling the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX;

[0038] The first multiplexer MUX is called to select a first-level standby switch to work according to the second selection signal.

[0039] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0040] When the first complex programmable logic device CPLD receives the primary state signal sent by the primary main switch, the first complex programmable logic device CPLD is called to send a first selection signal to the first multiplexer MUX;

[0041] Calling the first multiplexer MUX to select the primary main switch to work according to the first selection signal;

[0042] When the first complex programmable logic device CPLD does not receive the primary state signal sent by the primary main switch, calling the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX;

[0043] The first multiplexer MUX is called to select a first-level standby switch to work according to the second selection signal.

[0044] The switch control method, device, server and storage medium described above, when the first complex programmable logic device CPLD receives a first status signal sent by a first-level main switch, the first complex programmable logic device CPLD is called to send a first selection signal to the first multiplexer MUX, and the first multiplexer MUX is called to select the first-level main switch to work according to the first selection signal; when the first complex programmable logic device CPLD does not receive the first status signal sent by the first-level main switch, the first complex programmable logic device CPLD is called to send a second selection signal to the first multiplexer MUX, and the first multiplexer MUX is called to select the first-level backup switch to work according to the second selection signal.

[0045] Therefore, a first complex programmable logic device CPLD is set to monitor the status of each switch. When there is no problem with the main switch, the first complex programmable logic device CPLD informs the first multiplexer MUX to select the main switch to work. When there is a problem with the main switch, the first complex programmable logic device CPLD informs the first multiplexer MUX to select the backup switch to work. In this way, when any switch chip is damaged or abnormal, the CPLD can control the MUX to select different switches to ensure that the mounted equipment can work normally and improve the system stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a flow chart of a switch control method in an embodiment;

[0047] Figure 2 A schematic diagram of the structure of a server in one embodiment;

[0048] Figure 3 A schematic diagram of a flow chart of a switch control method in an embodiment;

[0049] Figure 4 A schematic diagram of the structure of a server in another embodiment;

[0050] Figure 5 A schematic diagram of a flow chart of a switch control method in an embodiment;

[0051] Figure 6 is a schematic structural diagram of a first multiplexer MUX in an embodiment;

[0052] Figure 7 A schematic diagram of a flow chart of a switch control method in an embodiment;

[0053] Figure 8 A schematic diagram of the structure of a server in another embodiment;

[0054] Fig. 9 is a structural block diagram of a switch control device in one embodiment;

[0055] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] In one embodiment, Figure 1 As shown, a switch control method is provided, and the method is applied to a server as an example for explanation. The server includes a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch. The primary main switch and the primary backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX. The first complex programmable logic device CPLD is connected to the first multiplexer MUX, wherein the following steps are included:

[0058] Step 102: When the first complex programmable logic device CPLD receives a primary status signal sent by a primary main switch, the first complex programmable logic device CPLD is called to send a first selection signal to a first multiplexer MUX.

[0059] Step 104: calling the first multiplexer MUX to select a primary main switch to operate according to the first selection signal.

[0060] Among them, Figure 2 As shown, Figure 2 A schematic diagram of the structure of a server in an embodiment is shown, where the server includes a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch.

[0061] Among them, the first complex programmable logic device CPLD adopts programming technologies such as CMOS EPROM, EEPROM, flash memory and SRAM, thereby forming a high-density, high-speed and low-power programmable logic device, and the first multiplexer MUX is a device that can receive multiple input signals and synthesize a single output signal in a recoverable manner according to each input signal.

[0062] Among them, the first-level main switch and the first-level backup switch are both switches with different priorities. The main switch has a higher priority than the backup switch. The switch controls the operation of the device. If the switch works normally, it can ensure that the mounted device can work.

[0063] In one embodiment, the device mounted on the switch may be a PCIe device. PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard. A PCIe device is a device that uses PCIe.

[0064] Among them, the first-level main switch and the first-level backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX, and the first complex programmable logic device CPLD is connected to the first multiplexer MUX. Specifically, the first complex programmable logic device CPLD monitors the status of the first-level main switch and the first-level backup switch, and obtains the status signals corresponding to the first-level main switch and the first-level backup switch. When the first-level status signal sent by the first-level main switch is received, it means that there is no problem with the first-level main switch and it works normally, then the first complex programmable logic device CPLD sends a first selection signal to the first multiplexer MUX.

[0065] Furthermore, after receiving the first selection signal sent by the first complex programmable logic device CPLD, the first multiplexer MUX selects the primary main switch to work according to the first selection signal to ensure the normal operation of the mounted device.

[0066] Step 106: When the first complex programmable logic device CPLD does not receive the primary status signal sent by the primary main switch, the first complex programmable logic device CPLD is called to send a second selection signal to the first multiplexer MUX.

[0067] Step 108, calling the first multiplexer MUX to select the first-level standby switch to work according to the second selection signal.

[0068] Among them, if the first complex programmable logic device CPLD does not receive the first-level status signal sent by the first-level main switch or the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level backup switch, it means that the first-level main switch has an abnormality and cannot work normally. In order to ensure that the mounted equipment can work normally, the first complex programmable logic device CPLD sends a second selection signal to the first multiplexer MUX.

[0069] Furthermore, after the first multiplexer MUX receives the second selection signal sent by the first complex programmable logic device CPLD, it selects the first-level backup switch to work according to the second selection signal, and connects all the devices mounted on the first-level switch to the first-level backup switch to ensure that the devices can work normally without being affected in any way.

[0070] In the above switch control method, when the first complex programmable logic device CPLD receives a first-level status signal sent by a first-level main switch, the first complex programmable logic device CPLD is called to send a first selection signal to the first multiplexer MUX, and the first multiplexer MUX is called to select the first-level main switch to work according to the first selection signal; when the first complex programmable logic device CPLD does not receive the first-level status signal sent by the first-level main switch, the first complex programmable logic device CPLD is called to send a second selection signal to the first multiplexer MUX, and the first multiplexer MUX is called to select the first-level backup switch to work according to the second selection signal.

[0071] Therefore, a first complex programmable logic device CPLD is set to monitor the status of each switch. When there is no problem with the main switch, the first complex programmable logic device CPLD informs the first multiplexer MUX to select the main switch to work. When there is a problem with the main switch, the first complex programmable logic device CPLD informs the first multiplexer MUX to select the backup switch to work. In this way, when any switch chip is damaged or abnormal, the CPLD can control the MUX to select different switches to ensure that the mounted equipment can work normally and improve the system stability.

[0072] In one embodiment, Figure 3As shown, the server also includes a second complex programmable logic device CPLD, a second multiplexer MUX, a secondary main switch and a secondary backup switch and a device, the secondary main switch and the secondary backup switch are connected to the primary main switch and the primary backup switch through the first multiplexer MUX, the secondary main switch and the secondary backup switch are connected to the second complex programmable logic device CPLD and the second multiplexer MUX, the second complex programmable logic device CPLD is connected to the second multiplexer MUX, and the device is connected to the secondary main switch through the second multiplexer MUX, wherein the method further includes:

[0073] Step 302: When the second complex programmable logic device CPLD receives the secondary state signal sent by the secondary main switch, the second complex programmable logic device CPLD is called to send a third selection signal to the second multiplexer MUX.

[0074] Step 304: call the second multiplexer MUX to select the secondary main switch to work according to the third selection signal, and control the device to work through the secondary main switch.

[0075] In order to mount more devices and increase the utilization rate of devices, the switches in the server usually use a tree topology, which can mount an unlimited number of devices. Figure 4 As shown, Figure 4 A schematic diagram of the structure of a server in an embodiment is shown. Figure 2 The components shown in the server also include a second complex programmable logic device CPLD, a second multiplexer MUX, a secondary main switch and a secondary backup switch and equipment. The secondary main switch and the secondary backup switch are connected to the primary main switch and the primary backup switch through the first multiplexer MUX, the secondary main switch and the secondary backup switch are connected to the second complex programmable logic device CPLD and the second multiplexer MUX, the second complex programmable logic device CPLD is connected to the second multiplexer MUX, and the equipment is connected to the secondary main switch through the second multiplexer MUX.

[0076] Among them, a tree topology is used between the first-level main switch, the first-level backup switch and the second-level main switch and the second-level backup switch. When the first-level main switch or the first-level backup switch works normally, and the second-level main switch or the second-level backup switch works normally, the mounted multiple devices can work normally.

[0077] Specifically, the second complex programmable logic device CPLD monitors the secondary main switch and the secondary backup switch to obtain corresponding status signals. When the second complex programmable logic device CPLD receives the secondary status signal corresponding to the secondary main switch, it indicates that the secondary main switch is working normally without any abnormality. Then, a third selection signal can be sent to the second multiplexer MUX.

[0078] Furthermore, after receiving the third selection signal sent by the second complex programmable logic device CPLD, the second multiplexer MUX selects the secondary main switch to work according to the third selection signal, and controls the mounted device to work through the secondary main switch.

[0079] Step 306: When the second complex programmable logic device CPLD does not receive the secondary state signal sent by the secondary main switch, the second complex programmable logic device CPLD is called to send a fourth selection signal to the second multiplexer MUX.

[0080] Step 308: Call the second multiplexer MUX to select the secondary standby switch to work according to the fourth selection signal.

[0081] Step 310: Call the second multiplexer MUX to connect the device to the secondary backup switch, and control the device to work through the secondary backup switch.

[0082] Specifically, the second complex programmable logic device CPLD monitors the secondary main switch and the secondary backup switch to obtain corresponding status signals. When the second complex programmable logic device CPLD does not receive the secondary status signal corresponding to the secondary main switch or only receives the secondary status signal corresponding to the secondary main switch, it means that the secondary main switch is abnormal and cannot work normally. In order to ensure that the equipment can work normally, the fourth selection signal is sent to the second multiplexer MUX.

[0083] Furthermore, after the second multiplexer MUX receives the fourth selection signal sent by the second complex programmable logic device CPLD, it selects the secondary backup switch to work according to the fourth selection signal, and reconnects the device mounted on the secondary main switch to the secondary backup switch, and controls the device to work through the secondary backup switch. In this way, it can be ensured that when problems occur in the primary main switch and / or the secondary main switch, the mounted devices are still unaffected and work normally.

[0084] In one embodiment, Figure 5 As shown, the server further includes a processor CPU, the processor CPU includes a device root port RP, the primary main switch and the primary backup switch are both connected to the device root port RP, wherein the method further includes:

[0085] Step 502: When the processor CPU is normally powered on and reset, a startup signal is sent to the primary main switch and the primary backup switch through the device root port RP.

[0086] Step 504, calling the primary main switch and the primary backup switch to perform normal power-on reset according to the start signal, and generating a corresponding primary status signal.

[0087] The server also includes a processor CPU (Central Processing Unit), and the CPU includes a device root port RP (Root Port). The root port RPU communicates with the processor CPU. The root port RP is used to connect devices. The first-level main switch and the first-level backup switch are both connected to the device root port RP, that is, the first-level main switch and the first-level backup switch are connected to the same root port RP.

[0088] Specifically, the processor CPU is normally powered on and reset, starts working, and sends a startup signal to the primary main switch and the primary backup switch through the RP. The primary main switch and the primary backup switch start working according to the startup signal and generate corresponding primary status signals.

[0089] In one embodiment, when the first complex programmable logic device CPLD receives a primary status signal sent by a primary main switch, it includes: when the first complex programmable logic device CPLD only receives a primary status signal sent by a primary main switch; and / or

[0090] When the first complex programmable logic device CPLD receives a primary status signal sent by a primary main switch, and receives a primary status signal sent by a primary backup switch.

[0091] Among them, when the first complex programmable logic device CPLD receives the first-level status signal sent by the first-level main switch, it can be divided into two situations. The first is that the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level main switch, that is, the second-level backup switch may have a problem and generate a corresponding status signal. At this time, the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level main switch.

[0092] The second situation is that the first complex programmable logic device CPLD receives a first-level status signal sent by the first-level main switch and receives a first-level status signal sent by the first-level backup switch. Even if the first complex programmable logic device CPLD receives status signals sent by the first-level main switch and the first-level backup switch at the same time, it indicates that the first-level main switch is working normally.

[0093] In one embodiment, when the first complex programmable logic device CPLD does not receive the primary status signal sent by the primary main switch, it includes:

[0094] When the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level standby switch.

[0095] Among them, when the first complex programmable logic device CPLD does not receive the first-level status signal sent by the first-level main switch, it only includes one situation, that is, the first-level main switch has a problem and cannot send any status signal, that is, the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level backup switch.

[0096] In one embodiment, the first multiplexer MUX includes a switch for controlling a primary main switch and a switch for controlling a primary backup switch, wherein calling the first multiplexer MUX to select a primary main switch to work according to a first selection signal includes: calling the first multiplexer MUX to close a switch corresponding to the primary main switch according to the first selection signal;

[0097] The first multiplexer MUX is called to select the first-level standby switch to work according to the second selection signal, including:

[0098] The first multiplexer MUX is called to close the switch corresponding to the first-level standby switch according to the second selection signal.

[0099] Among them, Figure 6 As shown, Figure 6 A schematic diagram of the structure of a first multiplexer MUX in an embodiment is shown. The first multiplexer MUX includes a switch for controlling a primary main switch and a switch for controlling a primary backup switch. The corresponding switches can be controlled to close according to a selection signal to implement the operation of the corresponding primary switch.

[0100] Specifically, the first multiplexer MUX is called to select the primary main switch to work according to the first selection signal, and specifically, the first multiplexer MUX closes the switch corresponding to the primary main switch according to the first selection signal, so that the primary main switch can work normally. Similarly, the first multiplexer MUX is called to select the primary backup switch to work according to the second selection signal, and specifically, the first multiplexer MUX closes the switch corresponding to the primary backup switch according to the second selection signal, so that the primary backup switch can work normally.

[0101] In one embodiment, the second multiplexer MUX includes a switch for controlling the secondary main switch and a switch for controlling the secondary backup switch, and can control the corresponding switches to close according to the selection signal to implement the operation of the corresponding secondary switch.

[0102] In one embodiment, Figure 7 As shown, the above method also includes:

[0103] Step 702: Call the first complex programmable logic device CPLD to monitor the status of the primary main switch and the primary backup switch.

[0104] Step 704, calling the first complex programmable logic device CPLD to send the abnormal state to the mobile terminal through the network cloud, so that the user of the mobile terminal can determine the corresponding abnormal switch according to the abnormal state and perform maintenance.

[0105] Among them, the first complex programmable logic device CPLD can send the corresponding working status of the first-level main switch and the first-level backup switch to the user's mobile terminal in real time through the network cloud, and the second complex programmable logic device CPLD can also send the corresponding working status of the second-level main switch and the second-level backup switch to the user's mobile terminal through the network cloud. Maintenance personnel can monitor the status of the switch in real time on the mobile terminal without being restricted by time and location.

[0106] Specifically, the first complex programmable logic device CPLD monitors the status of the primary main switch and the primary backup switch, and sends the abnormal status to the mobile terminal through the network cloud in real time, so that the user of the mobile terminal can determine the corresponding abnormal switch according to the abnormal status and perform maintenance. The abnormal status indicates that the switch is not working or abnormal.

[0107] In one embodiment, Figure 8 As shown, Figure 8A schematic diagram of the server structure in an embodiment is shown. Taking a CPU as an example, the SWs directly interconnected with the CPU RP include SW0 and SW1, and SW0 and SW1 are connected to the same RP on the hardware link. SW0 and SW1 are interconnected through MUX0, and the status of SW0 and SW1 are connected to the CPLD through the two signals SW0_OK and SW1_OK. The CPLD monitors the status of SW in real time to see if it is working properly, and sends the status of each SW to the mobile phone through the network cloud. By default, SW0 works first and SW1 is used as a backup. When SW0 works normally, the CPLD sends a select signal to enable SW0 to work, and SW1 does not work if it is not enabled. When SW0 fails, the SW0_OK signal is lost, and the CPLD cannot read the signal, that is, it is considered that there is a problem with SW0, and the status of SW0 is sent to the mobile phone through the mobile cloud, reminding the staff of the working status of SW in real time to facilitate maintenance; at the same time, the CPLD sends a select signal to enable SW1 to work, and reads the status of SW1 and sends it to the mobile phone. SW1 takes over the work of SW0 to continue to ensure the normal operation of the system. For multiple SW chips in the later stage, SWn+1 will take over the work of SWn after SWn is damaged. Multiple SWs connect the signals to another MUX1, and the status of each SW in the later stage is sent to CPLD, which reads the status of each SW and sends it to the mobile phone. Taking SW2 as an example of the later SW, CPLD sends the select signal of SW2 to MUX1. SW2 works normally, and CPLD reads the SW2_OK status and sends it to the mobile phone. When SW2 fails, CPLD cannot read the SW2_OK signal and immediately sends the selection signal of SW3 to ensure that SW3 takes over the work of SW2. The device hardware link mounted under SW2 is connected to SW3, thereby ensuring the normal operation of all devices.

[0108] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0109] In one embodiment, Fig. 9As shown, a switch control device 900 is provided, and the above device is applied to a server, the server includes a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch, the primary main switch and the primary backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX, the first complex programmable logic device CPLD is connected to the first multiplexer MUX, and includes: a first receiving module 902, a first selecting module 904, a second receiving module 906 and a second selecting module 908, wherein:

[0110] The first receiving module 902 is used to call the first complex programmable logic device CPLD to send a first selection signal to the first multiplexer MUX when the first complex programmable logic device CPLD receives the first state signal sent by the first main switch.

[0111] The first selection module 904 is used to call the first multiplexer MUX to select a primary main switch to work according to the first selection signal.

[0112] The second receiving module 906 is used to call the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX when the first complex programmable logic device CPLD does not receive the first-level state signal sent by the first-level main switch.

[0113] The second selection module 908 is used to call the first multiplexer MUX to select a first-level standby switch to work according to the second selection signal.

[0114] In one embodiment, the server further includes a second complex programmable logic device CPLD, a second multiplexer MUX, a secondary main switch, a secondary backup switch and a device, the secondary main switch and the secondary backup switch are connected to the primary main switch and the primary backup switch through the first multiplexer MUX, the secondary main switch and the secondary backup switch are connected to the second complex programmable logic device CPLD and the second multiplexer MUX, the second complex programmable logic device CPLD is connected to the second multiplexer MUX, and the device is connected to the secondary main switch through the second multiplexer MUX, wherein the switch control device 900 receives the secondary status signal sent by the secondary main switch when the second complex programmable logic device CPLD receives the secondary status signal sent by the secondary main switch The invention relates to a method for controlling the secondary state of the secondary main switch and the secondary state signal of the secondary main switch. The method comprises the steps of: receiving a state signal from the secondary state signal, calling a second complex programmable logic device CPLD to send a third selection signal to the second multiplexer MUX, calling the second multiplexer MUX to select the secondary main switch to work according to the third selection signal, and controlling the device to work through the secondary main switch; when the second complex programmable logic device CPLD does not receive the secondary state signal sent by the secondary main switch, calling the second complex programmable logic device CPLD to send a fourth selection signal to the second multiplexer MUX, calling the second multiplexer MUX to select the secondary backup switch to work according to the fourth selection signal, calling the second multiplexer MUX to connect the device to the secondary backup switch, and controlling the device to work through the secondary backup switch.

[0115] In one embodiment, the server also includes a processor CPU, the processor CPU includes a device root port RP, and the first-level main switch and the first-level backup switch are both connected to the device root port RP. When the processor CPU is normally powered on and reset, the switch control device 900 sends a startup signal to the first-level main switch and the first-level backup switch through the device root port RP, calls the first-level main switch and the first-level backup switch to perform normal power-on reset according to the startup signal, and generates a corresponding first-level status signal.

[0116] In one embodiment, the switch control device 900 receives a first-level status signal sent by a first-level main switch when the first complex programmable logic device CPLD only receives a first-level status signal sent by a first-level main switch; and / or receives a first-level status signal sent by a first-level main switch and a first-level status signal sent by a first-level backup switch when the first complex programmable logic device CPLD receives a first-level status signal sent by a first-level main switch.

[0117] In one embodiment, the switch control device 900 receives the first complex programmable logic device CPLD only when it receives the first-level status signal sent by the first-level standby switch.

[0118] In one embodiment, the first multiplexer MUX includes a switch for controlling a primary main switch and a switch for controlling a primary backup switch. The switch control device 900 calls the first multiplexer MUX to close the switch corresponding to the primary main switch according to the first selection signal.

[0119] In one embodiment, the first multiplexer MUX includes a switch for controlling a primary main switch and a switch for controlling a primary backup switch. The switch control device 900 calls the first multiplexer MUX to close the switch corresponding to the primary backup switch according to the second selection signal.

[0120] In one embodiment, the switch control device 900 calls the first complex programmable logic device CPLD to monitor the status of the first-level main switch and the first-level backup switch, and calls the first complex programmable logic device CPLD to send the abnormal status to the mobile terminal through the network cloud, so that the user of the mobile terminal can determine the corresponding abnormal switch according to the abnormal status and perform maintenance.

[0121] For the specific definition of the switch control device, please refer to the definition of the switch control method above, which will not be repeated here. Each module in the above switch control device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0122] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the switch. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a switch control method is implemented.

[0123] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in any of the above embodiments when executing the computer program.

[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above embodiments are implemented.

[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A switch control method, the method is applied to a server, the server comprises a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch, the primary main switch and the primary backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX, the first complex programmable logic device CPLD is connected to the first multiplexer MUX, wherein: The method comprises: When the first complex programmable logic device CPLD receives the first state signal sent by the first main switch, the first complex programmable logic device CPLD is called to send a first selection signal to the first multiplexer MUX; Calling the first multiplexer MUX to select the first-level main switch to work according to the first selection signal; When the first complex programmable logic device CPLD does not receive the first-level status signal sent by the first-level main switch, calling the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX; The first multiplexer MUX is called to select the first-level standby switch to work according to the second selection signal.

2. The method according to claim 1, characterized in that The server further includes a second complex programmable logic device CPLD, a second multiplexer MUX, a secondary main switch, a secondary backup switch and a device, wherein the secondary main switch and the secondary backup switch are connected to the primary main switch and the primary backup switch through the first multiplexer MUX, the secondary main switch and the secondary backup switch are connected to the second complex programmable logic device CPLD and the second multiplexer MUX, the second complex programmable logic device CPLD is connected to the second multiplexer MUX, and the device is connected to the secondary main switch through the second multiplexer MUX, wherein the method further includes: When the second complex programmable logic device CPLD receives the secondary state signal sent by the secondary main switch, the second complex programmable logic device CPLD is called to send a third selection signal to the second multiplexer MUX; calling the second multiplexer MUX to select the secondary main switch to work according to the third selection signal, and controlling the device to work through the secondary main switch; When the second complex programmable logic device CPLD does not receive the secondary state signal sent by the secondary main switch, calling the second complex programmable logic device CPLD to send a fourth selection signal to the second multiplexer MUX; calling the second multiplexer MUX to select the secondary standby switch to work according to the fourth selection signal; The second multiplexer MUX is called to connect the device to the secondary backup switch, and the device is controlled to work through the secondary backup switch.

3. The method according to claim 1, characterized in that The server further includes a processor CPU, the processor CPU includes a device root port RP, the primary main switch and the primary backup switch are both connected to the device root port RP, wherein the method further includes: When the processor CPU is normally powered on and reset, a startup signal is sent to the primary main switch and the primary backup switch through the device root port RP; The primary main switch and the primary backup switch are called to perform normal power-on reset according to the start signal to generate corresponding primary status signals.

4. The method according to claim 1, characterized in that: When the first complex programmable logic device CPLD receives the first-level status signal sent by the first-level main switch, the method includes: When the first complex programmable logic device CPLD only receives the primary status signal sent by the primary main switch; and / or When the first complex programmable logic device CPLD receives the first-level status signal sent by the first-level main switch and receives the first-level status signal sent by the first-level backup switch.

5. The method according to claim 1, characterized in that When the first complex programmable logic device CPLD does not receive the first-level status signal sent by the first-level main switch, the method includes: When the first complex programmable logic device CPLD only receives the first-level status signal sent by the first-level backup switch.

6. The method according to claim 1, characterized in that The first multiplexer MUX includes a switch for controlling the primary main switch and a switch for controlling the primary backup switch, wherein calling the first multiplexer MUX to select the primary main switch to work according to the first selection signal includes: Calling the first multiplexer MUX to close the switch corresponding to the first-level main switch according to the first selection signal; The calling of the first multiplexer MUX to select the first-level standby switch to work according to the second selection signal includes: The first multiplexer MUX is called to close the switch corresponding to the first-level standby switch according to the second selection signal.

7. The method according to claim 1, characterized in that The method further comprises: Calling the first complex programmable logic device CPLD to monitor the status of the first-level main switch and the first-level standby switch; The first complex programmable logic device CPLD is called to send the abnormal state to the mobile terminal through the network cloud, so that the user of the mobile terminal can determine the corresponding abnormal switch according to the abnormal state and perform maintenance.

8. A switch control device, characterized in that: The device is applied to a server, the server includes a first complex programmable logic device CPLD, a first multiplexer MUX, a primary main switch and a primary backup switch, the primary main switch and the primary backup switch are connected to the first complex programmable logic device CPLD and the first multiplexer MUX, the first complex programmable logic device CPLD is connected to the first multiplexer MUX, wherein the device includes: A first receiving module, configured to call the first complex programmable logic device CPLD to send a first selection signal to the first multiplexer MUX when the first complex programmable logic device CPLD receives the first state signal sent by the first main switch; A first selection module, used for calling the first multiplexer MUX to select the first-level main switch to work according to the first selection signal; a second receiving module, configured to call the first complex programmable logic device CPLD to send a second selection signal to the first multiplexer MUX when the first complex programmable logic device CPLD does not receive the first state signal sent by the first main switch; The second selection module is used to call the first multiplexer MUX to select the first-level standby switch to work according to the second selection signal.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Triggering a redundant router master / backup status change based on switch connectivity

    CN103843286A

  • System and method for automatically repairing PCIe (Peripheral Component Interconnect Express) link fault and server

    CN116643904A

  • Fault processing method and device, equipment and storage medium

    CN117033115A

  • PCIe equipment multiplexing system in multi-node system

    CN117033281A

  • Flexible PCIe topology

    US10585833B1