Active / standby high-speed signal circuit switching method, device, equipment, and storage medium

By receiving status indication information and pre-setting ACL table processing rules, the line packet loss and fault point problems caused by MUX/DEMUX devices are solved, and the stability of the main and standby high-speed signal circuits and the real-time response speed are improved.

CN115733811BActive Publication Date: 2025-09-26FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110997780.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2025-09-26
Estimated Expiration
2041-08-27

AI Technical Summary

Technical Problem

In existing methods for switching between active and standby high-speed signal circuits, adding external MUX/DEMUX devices results in packet loss and increases circuit failure points, impacting reliability and equipment costs.

Method used

By receiving status indication information, determining the master and backup information of the primary and backup systems, obtaining the preset ACL table, and forwarding data packets according to the preset packet processing flow rules, reducing hardware dependence and avoiding packet loss.

Benefits of technology

It improves the stability and real-time response speed of signal circuit switching, avoids data packet loss during switching, and reduces equipment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733811B_ABST
    Figure CN115733811B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, computer equipment and computer-readable storage medium for switching a primary-backup high-speed signal circuit. The method comprises receiving status indication information and determining the primary-backup information of a primary system and a backup system according to the status indication information; determining whether the current primary system is to be switched with the current backup system according to the primary-backup information of the primary system and the backup system; obtaining a preset ACL table if it is determined that the current primary system is to be switched with the current backup system, wherein the preset ACL table includes preset upstream packet processing flow rules and preset downstream packet processing flow rules; receiving a first data packet sent by the primary system or the backup system according to the preset downstream packet processing flow rules, and forwarding a second data packet sent by a preset SWITCH device to the primary system or the backup system according to the preset upstream packet processing flow rules. In the case of reducing hardware, not only the stability and real-time response speed are improved, but also packet loss caused by switching is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and apparatus for switching a primary-backup high-speed signal circuit, a computer device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of information technology, customers have higher and higher requirements for communication quality. They require that when a node in the network fails, it can continue to operate completely and stably. Therefore, dual-homing active-standby switching is very necessary. However, the existing active-standby high-speed signal circuit switching is as follows: Figure 1 As shown in the figure, this is achieved by adding a MUX / DEMUX device outside the switching chip. Due to the switching characteristics of the device, when switching, the high-speed SERDES signal from the MUX direction needs to renegotiate with the MUX / DEMUX device to establish a connection, which may cause line packet loss. The additional MUX / DEMUX device not only increases the circuit failure points, affects reliability, but also increases equipment cost. Summary of the Invention

[0003] The main purpose of this application is to provide a method, device, computer equipment and computer-readable storage medium for switching between primary and backup high-speed signal circuits, aiming to solve the technical problem that adding MUX / DEMUX devices to the outside of the existing switching chip not only causes line packet loss, but also increases circuit failure points, affects reliability, and increases equipment costs.

[0004] In a first aspect, the present application provides a method for switching between a primary and a backup high-speed signal circuit, the method comprising the following steps:

[0005] receiving status indication information, and determining master and backup information of the master system and the backup system according to the status indication information;

[0006] Determining whether the current primary system should be switched with the current backup system according to the primary and backup information of the primary and backup systems;

[0007] If it is determined that the current primary system and the current backup system are switched, obtaining a preset ACL table, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset downlink packet processing flow rule;

[0008] receiving a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule;

[0009] The second data packet sent by the preset SWITCH device is forwarded to the primary system or the backup system according to the preset uplink direction packet processing flow rule.

[0010] Preferably, the master / slave information includes a master state and a backup state, and determining the master / slave information of the master system and the backup system according to the state indication information includes:

[0011] Reading the flag information carried in the status indication information, wherein the flag information includes a main status flag and a standby status flag;

[0012] If the state information is marked as a main state, determining whether the main system is in the main state or the standby state;

[0013] If the state information is a standby state flag, it is determined that the standby system is in the master state or the standby state.

[0014] Preferably, the determining whether the current primary system should be switched with the current backup system according to the primary and backup information of the primary and backup systems includes:

[0015] If the current master system is in the master state and it is determined that the master system is in the standby state, then determining to switch between the current master system and the current standby system;

[0016] If the current standby system is in the standby state, it is determined that the standby system is in the master state, and then it is determined that the current master system and the current standby system are switched.

[0017] Preferably, the receiving, according to the preset downlink packet processing flow rule, the first data packet sent by the primary system or the backup system includes:

[0018] If it is determined that the primary system is in the primary state after the switching, the first port or the second port receives the first data packet sent by the primary system through the preset downlink packet processing flow rule;

[0019] If it is determined that the standby system is in the master state after the switchover, the preset downlink packet processing flow rule is used to enable the first port or the second port to receive the first data packet sent by the standby system.

[0020] Preferably, before receiving the status indication information, the method further includes:

[0021] When the preset SWITCH device is detected to be initialized, the ACL table is configured according to the preset uplink direction packet processing flow rule and the preset downlink direction packet processing flow rule to generate a configured preset ACL table;

[0022] The preset downlink packet processing flow rule includes determining whether the first port or the second port receives the first data packet if the primary system is in the primary state, or determining whether the first port or the second port receives the first data packet if the backup system is in the primary state;

[0023] The uplink packet processing flow rule includes that if the main system is in the main state, the main system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port, or the uplink packet processing flow rule includes that if the backup system is in the main state, the backup system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port.

[0024] Preferably, after determining that the primary system and the backup system are switched, the method further includes:

[0025] interrupting the current process of receiving and sending data packets by the primary system or the backup system, generating a switching process, and determining the priority of the switching process;

[0026] Based on the priority of the switching process, give priority to the switching process;

[0027] By processing the switching process, a preset ACL table is obtained, wherein the preset ACL table includes preset uplink packet processing flow rules and preset downlink packet processing flow rules.

[0028] Preferably, the receiving status indication information includes: receiving, via the CPU, status indication information sent by the primary system and / or the backup system.

[0029] In a second aspect, the present application further provides a primary / standby high-speed signal circuit switching device, the primary / standby high-speed signal circuit switching device comprising:

[0030] A first determining module is configured to receive status indication information and determine master and backup information of the master system and the backup system according to the status indication information;

[0031] A second determining module is used to determine whether the current primary system is to be switched with the current backup system according to the primary and backup information of the primary and backup systems;

[0032] an acquisition module, configured to acquire a preset ACL table if it is determined that the current primary system and the current standby system are switched, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset uplink packet processing flow rule;

[0033] A receiving module, configured to receive a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule;

[0034] The sending module is used to forward the second data packet sent by the preset SWITCH device to the primary system or the backup system according to the preset uplink direction packet processing flow rule.

[0035] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the master-slave high-speed signal circuit switching method as described above are implemented.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the above-mentioned primary-standby high-speed signal circuit switching method are implemented.

[0037] The present application provides a method, apparatus, computer equipment, and computer-readable storage medium for switching a primary-backup high-speed signal circuit. The method receives status indication information and, based on the status indication information, determines the primary-backup information of a primary system and a backup system; determines, based on the primary-backup information of the primary system and the backup system, whether the current primary system is switching with the current backup system; if it is determined that the current primary system is switching with the current backup system, obtains a preset ACL table, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset uplink packet processing flow rule; receives a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule; and forwards a second data packet sent by a preset SWITCH device to the primary system or the backup system according to the preset uplink packet processing flow rule. While reducing hardware, the method not only improves stability and real-time response speed, but also avoids packet loss during switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0039] Figure 1 A schematic diagram of a master-slave switching circuit in the prior art provided by this application;

[0040] Figure 2 A flowchart of a method for switching between active and standby high-speed signal circuits provided in one embodiment of the present application;

[0041] Figure 3 A schematic diagram of a master-slave switching circuit provided in one embodiment of the present application;

[0042] Figure 4 A flowchart of another method for switching between active and standby high-speed signal circuits provided in one embodiment of the present application;

[0043] Figure 5 A schematic block diagram of a primary / standby high-speed signal circuit switching device provided in one embodiment of the present application;

[0044] Figure 6 This is a schematic block diagram of the structure of a computer device involved in one embodiment of the present application.

[0045] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0047] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0048] The present invention provides a method, apparatus, computer device, and computer-readable storage medium for switching between active and standby high-speed signal circuits. The method can be applied to a computer device, such as a laptop computer or desktop computer.

[0049] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0050] Please refer to Figure 2 , Figure 2 A flowchart of a method for switching between active and standby high-speed signal circuits provided in an embodiment of the present application is provided.

[0051] like Figure 2 As shown, the method includes steps S101 to S105.

[0052] Step S101: Receive status indication information, and determine master and backup information of a master system and a backup system according to the status indication information.

[0053] Exemplarily, status indication information sent by a receiving system side is received, and the status indication information includes status indication information of a primary system and status indication information of a backup system. For example, the status indication information of the primary system includes primary presence indication information of the primary system, and the status indication information of the backup system includes backup presence indication information of the backup system. After receiving the status indication information sent by the system side, primary and backup information of the primary and backup systems are determined based on the status information, wherein the primary and backup information includes the primary state and the backup state.

[0054] Specifically, receiving the status indication information includes receiving, through the CPU, the status indication information sent by the primary system and / or the backup system.

[0055] Exemplary, such as Figure 3 As shown, the main presence indication signal and the standby presence indication signal on the system side are connected to the CPU in advance, respectively. Through the main presence indication signal and the standby presence indication signal on the system side, the CPU receives the main system or standby system status indication information on the system side.

[0056] Specifically, read the mark information carried in the status indication information, wherein the mark information includes a main status mark and a backup status mark; if the status information is a main status mark, determine whether the main system is in the main status or the backup status; if the status information is a backup status mark, determine whether the backup system is in the main status or the backup status.

[0057] Exemplarily, upon receiving real-time status information, the marking information carried in the status indication information is read, wherein the marking information includes a primary status mark and a backup status mark, which may be marked in color, text, or other marking methods. When the status information obtained is the primary status mark, the primary system is determined to be in the primary state or the backup state. For example, the status information is pre-configured so that when the primary status mark is obtained, the primary system is determined to be in the primary state, or when the primary status mark is obtained, the primary system is determined to be in the backup state. When the status information obtained is the backup status mark, the backup system is determined to be in the primary state or the backup state. For example, the status information is pre-configured so that when the backup status mark is obtained, the backup system is determined to be in the primary state, or when the backup status mark is obtained, the backup system is determined to be in the backup state. There is only one primary state and one backup state in the primary and backup systems. For example, when the primary system is in the primary state, the backup system is in the backup state; or when the backup system is in the primary state, the primary system is in the backup state.

[0058] Step S102: Determine whether the current primary system should be switched with the current backup system based on the primary and backup information of the primary and backup systems.

[0059] Exemplarily, obtain the master-slave information of the main system, the master-slave information of the backup system, the master-slave information of the current main system, and the master-slave information of the current backup system, compare the master-slave information of the main system with the master-slave information of the current main system, and determine whether the current main system is switched with the current backup system; or compare the master-slave information of the backup system with the master-slave information of the current backup system to determine whether the current device is switched with the current backup system. For example, when the master-slave information of the main system is consistent with the master-slave information of the current main system, it is determined that the current main system is switched with the current backup system; or, when the master-slave information of the backup system is consistent with the master-slave information of the current backup system, it is determined that the current main system is switched with the current backup system. Figure 3 As shown, the CPU and the SWITCH device are connected through a PCIE interface. After receiving the status indication information, the CPU determines whether the current main system and the current backup system are switched based on the status indication information.

[0060] Specifically, the first data packet sent by the main system or the backup system is received according to the preset downlink packet processing flow rules, including: if the current main system is in the main state, determining that the main system is in the backup state, and then determining that the current main system and the current backup system are switched; if the current backup system is in the backup state, determining that the backup system is in the main state, and then determining that the current main system and the current backup system are switched.

[0061] Exemplarily, the master / slave information includes the master status of the master system. If the master system is determined to be the master / slave and the current master system is found to be in the standby status, then a switchover between the current master system and the current standby system is determined. The master / slave information includes the standby status of the standby system. If the standby system is determined to be the master / slave and the current standby system is found to be in the standby status, then a switchover between the current master system and the current standby system is determined.

[0062] Step S103: If it is determined that the current primary system and the current backup system are switched, a preset ACL table is obtained, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset upstream packet processing flow rule.

[0063] Exemplarily, when it is determined that the current primary system and the current backup system are switched, a switching request is generated, and a preset ACL table is obtained through the switching request, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset upstream packet processing flow rule.

[0064] Step S104: Receive a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule.

[0065] Exemplarily, when a preset downlink packet processing flow rule in a preset ACL table is obtained, the first data packet sent by the primary system or the backup system is received through the preset downlink packet processing flow rule. For example, when it is determined that the primary system after switching is in the primary state, the primary system sends the first data packet through the first port, the backup system sends the first data packet through the second port, the first data packet sent by the primary system through the first port is received, and the first data packet sent by the backup system through the second port is discarded; or, when it is determined that the backup system after switching is in the primary state, the backup system sends the first data packet through the first port, the primary system sends the first data packet through the second port, the first data packet sent by the backup system through the first port is received, and the first data packet sent by the primary system through the second port is discarded.

[0066] Specifically, the receiving of the first data packet sent by the main system or the backup system according to the preset downstream packet processing flow rule includes: if it is determined that the main system is in the main state after the switching, the preset downstream packet processing flow rule is used to enable the first port or the second port to receive the first data packet sent by the main system; if it is determined that the backup system is in the main state after the switching, the preset downstream packet processing flow rule is used to enable the first port or the second port to receive the first data packet sent by the backup system.

[0067] Exemplarily, when it is determined that the main system is in the main state after the switch, by presetting the downlink packet processing flow rules, the first port corresponding to the main system receives the first data packet sent by the first port, and discards the first data packet sent by the second port corresponding to the backup system; or, the second port corresponding to the main system receives the first data packet sent by the second port, and discards the first data packet sent by the first port corresponding to the backup system.

[0068] Step S105: forwarding the second data packet sent by the preset SWITCH device to the primary system or the backup system according to the preset uplink packet processing flow rule.

[0069] Exemplarily, when the main system is determined to be in the main state, the second data sent by the preset SWITCH device is forwarded to the main system through the first port or the second port through the preset uplink packet processing flow rule; or, when the backup system is determined to be in the main state, the second data sent by the preset SWITCH device is forwarded to the backup system through the first port or the second port through the preset uplink packet processing flow rule.

[0070] Specifically, before the receiving status indication information, it also includes: when detecting that the preset SWITCH device is initialized, configuring the ACL table according to the preset uplink packet processing flow rule and the preset downlink packet processing flow rule to generate a configured preset ACL table; wherein the preset downlink packet processing flow rule includes if the main system is in the main state, then determining that the first port or the second port receives the first data packet, or if the standby system is in the main state, then determining that the first port or the second port receives the first data packet; the uplink packet processing flow rule includes if the main system is in the main state, then the main system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port, or the uplink packet processing flow rule includes if the standby system is in the main state, then the standby system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port.

[0071] For demonstration purposes, when the preset SWITCH device is detected to be initialized, the ACL table is configured through the preset uplink packet processing flow rules and the preset downlink packet processing flow rules to generate the configured preset ACL table. The SWITCH device has multiple external access interfaces, flexible and fast ACL table entry control, and diversified packet processing rules, such as Figure 3 As shown, the PCIE interface is connected to the external CPU interface. For example, the CPU starts running, and after setting its own operating parameters and configuring the external communication interface and interrupt interface parameters, it starts initializing the SWITCH device. The preset downlink packet processing flow rule includes: when the main system is in the main state, the first port allows the reception of packets and can forward processing, and the second port discards all packets received; when the main system is in the standby state, the first port discards all packets received, and the second port allows the reception of packets and can forward processing. For example, when the main system is in the main state, the C1 port allows the reception of packets and can forward processing, and the C2 port discards all packets received; when the main system is in the standby state, the C1 port discards all packets received, and the C2 port allows the reception of packets and can forward processing. The preset uplink packet processing flow rule includes: if the main system is in the main state, determining whether the first port or the second port receives the first data packet, or if the standby system is in the main state, determining whether the first port or the second port receives the first data packet. For example, after the CPU initializes the SWITCH device, it configures the SWITCH device to flood the second data packet to the upstream aggregation ports, namely, the C1 port and the C2 port. When the master system is in the master state, the second data packet is received through the C1 port corresponding to the master system, or, the second data packet is received through the C2 port corresponding to the master system; or, when the standby system is in the master state, the second data packet is received through the C1 port corresponding to the standby system, or, the second data packet is received through the C2 port corresponding to the standby system.

[0072] In an embodiment of the present application, by presetting the downlink packet processing flow rules and the uplink packet processing flow rules, the first data packet sent by the main system or the backup system after the switching is received, and the second data packet is sent to the main system and the backup system. While reducing the hardware, not only the stability and real-time response speed are improved, but also the packet loss caused by the switching is avoided.

[0073] Please refer to Figure 4 , Figure 4 A flowchart of another method for switching between active and standby high-speed signal circuits is provided for an embodiment of the present application.

[0074] like Figure 4 As shown, the process includes steps S201 to S203.

[0075] Step S201: interrupt the current process of the primary system or the backup system receiving and sending data packets, generate a switching process, and determine the priority of the switching process.

[0076] Exemplarily, when it is determined that the current primary system and the backup system need to be switched, a switching request is generated, and the process of the current primary system or backup system receiving and sending data packets is interrupted through the switching request. A switching process is generated through the switching request, and the priority of the switching process is determined, wherein the data includes a first data packet and a second data packet, and the method of interrupting the process of the current primary system or backup system receiving and sending data packets includes interrupting the primary system or backup system from sending the first data packet and interrupting the primary system or backup system from receiving the second data packet. The interrupt method includes, after an interrupt pin in the CPU detects the switching request, searching a preset interrupt vector table and interrupting the process of the current primary system or backup system receiving and sending data packets through the preset interrupt vector table.

[0077] Determine the priority of the switching process, obtain all currently generated processes, sort all the processes, determine the processing order of each process by sorting, mark the switching process as the first order, and give priority to the switching process; or, unlock other current processes to lock the switching process, and give priority to the switching process by locking the switching process.

[0078] Step S202: Based on the priority of the switching process, the switching process is processed preferentially.

[0079] Exemplarily, the priority of the switching process is determined so that the switching process is processed first.

[0080] Step S203: Acquire a preset ACL table by processing the switching process, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset upstream packet processing flow rule.

[0081] Exemplarily, after processing the switching process, a preset ACL table is obtained, wherein the preset ACL table includes a preset upstream packet processing flow rule and a preset upstream packet processing flow rule. The first data packet sent by the main system or the backup system is received through the preset downstream packet processing flow rule. For example, when it is determined that the main system after switching is in the main state, the main system sends the first data packet through the first port, the backup system sends the first data packet through the second port, the first data packet sent by the main system through the first port is received, and the first data packet sent by the backup system through the second port is discarded; or, when it is determined that the backup system after switching is in the main state, the backup system sends the first data packet through the first port, the main system sends the first data packet through the second port, the first data packet sent by the backup system through the first port is received, and the first data packet sent by the main system through the second port is discarded.

[0082] Specifically, the receiving of the first data packet sent by the main system or the backup system according to the preset downstream packet processing flow rule includes: if it is determined that the main system is in the main state after the switching, the preset downstream packet processing flow rule is used to enable the first port or the second port to receive the first data packet sent by the main system; if it is determined that the backup system is in the main state after the switching, the preset downstream packet processing flow rule is used to enable the first port or the second port to receive the first data packet sent by the backup system.

[0083] When it is determined that the main system is in the main state after the switch, by presetting the downlink packet processing flow rules, the first port corresponding to the main system receives the first data packet sent by the first port, and discards the first data packet sent by the second port corresponding to the backup system; or, the second port corresponding to the main system receives the first data packet sent by the second port, and discards the first data packet sent by the first port corresponding to the backup system.

[0084] When the main system is determined to be in the main state, the second data sent by the preset SWITCH device is forwarded to the main system through the first port or the second port through the preset uplink packet processing flow rule; or, when the backup system is determined to be in the main state, the second data sent by the preset SWITCH device is forwarded to the backup system through the first port or the second port through the preset uplink packet processing flow rule.

[0085] In an embodiment of the present application, a switching process is generated through the process of receiving and sending data packets by the current primary system or backup system, and the priority of the switching process is determined to give priority to the switching process, obtain the preset ACL table to complete the switching process, reduce the processing time of the switching process, and thus avoid the problem of packet loss during the switching process.

[0086] Please refer to Figure 5 , Figure 5A schematic block diagram of a primary-standby high-speed signal circuit switching device provided in an embodiment of the present application.

[0087] like Figure 5 As shown, the active / standby high-speed signal circuit switching device 400 includes: a first determining module 401 , a second determining module 402 , an acquiring module 403 , a receiving module 404 , and a sending module 405 .

[0088] A first determining module 401 is configured to receive status indication information and determine master and backup information of a master system and a backup system according to the status indication information;

[0089] A second determining module 402 is configured to determine whether the current primary system should be switched with the current backup system according to the primary and backup information of the primary and backup systems;

[0090] The acquisition module 403 is configured to acquire a preset ACL table if it is determined that the current primary system and the current backup system are switched, wherein the preset ACL table includes preset uplink packet processing flow rules and preset downlink packet processing flow rules;

[0091] The receiving module 404 is configured to receive a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule;

[0092] The sending module 405 is configured to forward the second data packet sent by the preset SWITCH device to the primary system or the backup system according to a preset uplink packet processing flow rule.

[0093] The first determining module 401 is further configured to:

[0094] Reading the flag information carried in the status indication information, wherein the flag information includes a main status flag and a standby status flag;

[0095] If the state information is marked as a main state, determining whether the main system is in the main state or the backup state;

[0096] If the state information is a standby state flag, determine whether the standby system is in the master state or the standby state. The second determining module 402 is further configured to:

[0097] If the current master system is in the master state and it is determined that the master system is in the standby state, then determining to switch between the current master system and the current standby system;

[0098] If the current standby system is in the standby state, it is determined that the standby system is in the master state, and then it is determined that the current master system and the current standby system are switched.

[0099] The receiving module 404 is further configured to:

[0100] If it is determined that the primary system is in the primary state after the switching, the first port or the second port receives the first data packet sent by the primary system according to the preset downlink packet processing flow rule;

[0101] If it is determined that the backup system is in the master state after the switch, the first port or the second port receives the first data packet sent by the backup system through the preset downlink packet processing flow rule.

[0102] When initialization of the preset SWITCH device is detected, the ACL table is configured according to the preset uplink direction packet processing flow rule and the preset downlink direction packet processing flow rule to generate a configured preset ACL table;

[0103] The preset downlink packet processing flow rule includes determining whether the first port or the second port receives the first data packet if the primary system is in the primary state, or determining whether the first port or the second port receives the first data packet if the backup system is in the primary state;

[0104] The uplink packet processing flow rule includes that if the main system is in the main state, the main system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port, or the uplink packet processing flow rule includes that if the backup system is in the main state, the backup system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port.

[0105] The main and standby high-speed signal circuit switching device is also used for:

[0106] interrupting the current process of receiving and sending data packets by the primary system or the backup system, generating a switching process, and determining the priority of the switching process;

[0107] Based on the priority of the switching process, give priority to the switching process;

[0108] By processing the switching process, the preset SWITCH device obtains the preset uplink packet processing flow rule and the preset downlink packet processing flow rule according to the preset ACL table.

[0109] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned master-slave high-speed signal circuit switching method embodiment, and will not be repeated here.

[0110] The apparatus provided in the above embodiment can be implemented in the form of a computer program. The computer program can be used in Figure 6Runs on the computer equipment shown.

[0111] See also Figure 6 , Figure 6 This is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a terminal.

[0112] like Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0113] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can enable the processor to execute any one of the main and standby high-speed signal circuit switching methods.

[0114] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0115] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any one of the main and standby high-speed signal circuit switching methods.

[0116] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6 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 shown in the figure, or combine certain components, or have a different component arrangement.

[0117] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0118] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:

[0119] receiving status indication information, and determining master and backup information of the master system and the backup system according to the status indication information;

[0120] Determining whether the current primary system should be switched with the current backup system according to the primary and backup information of the primary and backup systems;

[0121] If it is determined that the current primary system and the current backup system are switched, obtaining a preset ACL table, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset downlink packet processing flow rule;

[0122] receiving a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule;

[0123] The second data packet sent by the preset SWITCH device is forwarded to the primary system or the backup system according to the preset uplink direction packet processing flow rule.

[0124] In one embodiment, the processor master / slave information includes a master state and a standby state, and is characterized in that, when determining the master / slave information of the master system and the standby system according to the state indication information, it is used to implement:

[0125] Reading the flag information carried in the status indication information, wherein the flag information includes a main status flag and a standby status flag;

[0126] If the state information is marked as a main state, determining whether the main system is in the main state or the backup state;

[0127] If the state information is a standby state flag, it is determined that the standby system is in a master state or a standby state.

[0128] In one embodiment, when the processor determines, based on the master / slave information of the master system and the backup system, whether the current master system is to be switched with the current backup system, the processor is configured to implement:

[0129] If the current master system is in the master state and it is determined that the master system is in the standby state, then determining to switch between the current master system and the current standby system;

[0130] If the current standby system is in the standby state, it is determined that the standby system is in the master state, and then it is determined that the current master system and the current standby system are switched.

[0131] In one embodiment, when the processor receives the first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule, it is configured to implement:

[0132] If it is determined that the primary system is in the primary state after the switching, the first port or the second port receives the first data packet sent by the primary system through the preset downlink packet processing flow rule;

[0133] If it is determined that the standby system is in the master state after the switchover, the preset downlink packet processing flow rule is used to enable the first port or the second port to receive the first data packet sent by the standby system.

[0134] In one embodiment, the processor is configured to implement, before receiving the status indication information:

[0135] When the preset SWITCH device is detected to be initialized, the ACL table is configured according to the preset uplink direction packet processing flow rule and the preset downlink direction packet processing flow rule to generate a configured preset ACL table;

[0136] The preset downlink packet processing flow rule includes determining whether the first port or the second port receives the first data packet if the primary system is in the primary state, or determining whether the first port or the second port receives the first data packet if the backup system is in the primary state;

[0137] The uplink packet processing flow rule includes that if the main system is in the main state, the main system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port, or the uplink packet processing flow rule includes that if the backup system is in the main state, the backup system receives the second data packet forwarded by the preset SWITCH device through the first port or the second port.

[0138] In one embodiment, if the processor determines that the primary system and the backup system are switched, the processor is configured to implement:

[0139] interrupting the current process of receiving and sending data packets by the primary system or the backup system, generating a switching process, and determining the priority of the switching process;

[0140] Based on the priority of the switching process, give priority to the switching process;

[0141] By processing the switching process, a preset ACL table is obtained, wherein the preset ACL table includes preset uplink packet processing flow rules and preset downlink packet processing flow rules.

[0142] In one embodiment, when the processor receives the status indication information, it is used to implement: receiving the status indication information sent by the primary system and / or the backup system through the CPU.

[0143] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the master-slave high-speed signal circuit switching method of the present application.

[0144] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a flash memory card, etc., equipped on the computer device.

[0145] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0146] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for switching between active and standby high-speed signal circuits, characterized in that: include: receiving status indication information, and determining master and backup information of the master system and the backup system according to the status indication information; Determining whether the current primary system should be switched with the current backup system according to the primary and backup information of the primary and backup systems; If it is determined that the current primary system and the current backup system are switched, obtaining a preset ACL table, wherein the preset ACL table includes a preset uplink packet processing flow rule and a preset downlink packet processing flow rule; receiving a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule; Forwarding a second data packet sent by a preset SWITCH device to the primary system or the backup system according to the preset uplink packet processing flow rule, wherein the SWITCH device with a dynamic flow control function can dynamically control the data packet forwarding path according to the preset ACL table and the CPU dynamically configures ACL rules through the PCIE interface to achieve rapid switching of the primary and backup states; Before the receiving status indication information, the method further includes: When the preset SWITCH device is detected to be initialized, the ACL table is configured according to the preset uplink direction packet processing flow rule and the preset downlink direction packet processing flow rule to generate a configured preset ACL table; The preset downlink packet processing flow rule includes determining that the first port receives the first data packet if the primary system is in the primary state, or determining that the second port receives the first data packet if the backup system is in the primary state; The preset uplink packet processing flow rule includes that if the main system is in the main state, the main system receives the second data packet forwarded by the preset SWITCH device through the first port, or the uplink packet processing flow rule includes that if the backup system is in the main state, the backup system receives the second data packet forwarded by the preset SWITCH device through the second port.

2. The method for switching between a primary and a backup high-speed signal circuit according to claim 1, wherein: in, The master-slave information includes a master state and a standby state; determining the master-slave information of the master system and the standby system according to the state indication information includes: Reading the flag information carried in the status indication information, wherein the flag information includes a main status flag and a standby status flag; If the mark information is a master state mark, determining that the master system is in the master state or the backup system is in the master state; If the mark information is a standby state mark, it is determined that the primary system is in the standby state or the standby system is in the standby state.

3. The method for switching between a primary and a backup high-speed signal circuit according to claim 2, wherein: The determining, based on the master / slave information of the master system and the backup system, whether the current master system should be switched with the current backup system includes: If the current master system is in the master state and it is determined that the master system is in the standby state, then it is determined that the current master system and the current standby system are switched; If the current standby system is in the standby state, it is determined that the standby system is in the master state, and then it is determined that the current master system and the current standby system are switched.

4. The method for switching between active and standby high-speed signal circuits according to claim 1, wherein: The receiving, according to the preset downlink packet processing flow rule, a first data packet sent by the primary system or the backup system includes: If it is determined that the main system is in the main state after the switching, the first port receives the first data packet sent by the main system through the preset downlink packet processing flow rules; If it is determined that the standby system is in the master state after the switchover, the preset downlink packet processing flow rule is used to enable the second port to receive the first data packet sent by the standby system.

5. The method for switching between active and standby high-speed signal circuits according to claim 1, wherein: After determining that the primary system and the backup system are switched, the method further includes: interrupting the current process of receiving and sending data packets by the primary system or the backup system, generating a switching process, and determining the priority of the switching process; Based on the priority of the switching process, give priority to the switching process; By processing the switching process, a preset ACL table is obtained, wherein the preset ACL table includes preset uplink packet processing flow rules and preset downlink packet processing flow rules.

6. The method for switching between active and standby high-speed signal circuits according to claim 1, wherein: The receiving status indication information includes: receiving, through the CPU, status indication information sent by the primary system and / or the backup system.

7. A main / standby high-speed signal circuit switching device, characterized in that: The main and standby high-speed signal circuit switching device includes: A first determining module is configured to receive status indication information and determine master and backup information of the master system and the backup system according to the status indication information; A second determining module is used to determine whether the current primary system is to be switched with the current backup system according to the primary and backup information of the primary and backup systems; an acquisition module, configured to acquire a preset ACL table if it is determined that the current primary system and the current backup system are switched, wherein the preset ACL table includes preset uplink packet processing flow rules and preset downlink packet processing flow rules; A receiving module, configured to receive a first data packet sent by the primary system or the backup system according to the preset downlink packet processing flow rule; a sending module, configured to forward a second data packet sent by a preset SWITCH device to the primary system or the backup system according to the preset uplink packet processing flow rule, wherein the SWITCH device with a dynamic flow control function can dynamically control the data packet forwarding path according to the preset ACL table and the CPU can dynamically configure ACL rules through the PCIE interface to achieve rapid switching of the primary and backup states; Before the receiving status indication information, the method further includes: When initialization of the preset SWITCH device is detected, the ACL table is configured according to the preset uplink direction packet processing flow rule and the preset downlink direction packet processing flow rule to generate a configured preset ACL table; The preset downlink packet processing flow rule includes determining that the first port receives the first data packet if the primary system is in the primary state, or determining that the second port receives the first data packet if the backup system is in the primary state; The preset uplink packet processing flow rule includes that if the main system is in the main state, the main system receives the second data packet forwarded by the preset SWITCH device through the first port, or the uplink packet processing flow rule includes that if the backup system is in the main state, the backup system receives the second data packet forwarded by the preset SWITCH device through the second port.

8. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the active-standby high-speed signal circuit switching method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the active / standby high-speed signal circuit switching method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for rapid active-standby switching in network equipment

    CN101710865A