Data switching method and device, equipment and storage medium

By sending a data switching request to the second network device and switching the transmission module to the third network device when the first network device detects a restart condition, the packet loss problem during the switching in the traditional technology is solved, and the stability of data transmission is improved.

CN119094326APending Publication Date: 2024-12-06JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411237126.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional forwarding node redundancy technology has problems such as packet loss during handover, which affects the stability of data transmission.

Method used

When a restart condition is detected, the first network device sends a data switching request to the second network device and starts a timer. The second network device switches the transmission module to the third network device to ensure the stability of the data connection.

Benefits of technology

By completing the data connection switching before the first network device restarts, service jitter caused by the restart is avoided, and the stability of the network connection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094326A_ABST
    Figure CN119094326A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data switching method and device, equipment and a storage medium. The method comprises: at a first network device, in response to detecting that the first network device satisfies a restart condition, sending a data switching request to a second network device connected with the first network device to instruct the second network device to switch a transmission module associated with the first network device to be associated with other network devices; in response to the sent data switching request, starting a first timer corresponding to first preset time; and executing a restart action on the first network device in response to receiving a restart confirmation of the second network device for the data switching request before the timing of the first timer expires. Therefore, service jitter during equipment switching can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to a method, apparatus, device, and storage medium for data switching. Background Art

[0002] With the continuous development of network technology, forwarding node redundancy technology is increasingly being used in current networks. Through the redundant design of forwarding nodes, data forwarding can be performed by redundant backup devices during network device unavailability. However, the current forwarding node redundancy technology still has service jitters such as packet loss during switching. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for data switching is provided. The method includes: at a first network device, in response to detecting that the first network device meets a restart condition, sending a data switching request to a second network device connected to the first network device to instruct the second network device to switch a transmission module associated with the first network device to be associated with another network device; in response to issuing the data switching request, starting a first timer corresponding to a first predetermined time; and in response to receiving a restart confirmation from the second network device for the data switching request before the first timer expires, executing a restart action on the first network device.

[0004] In a second aspect of the present disclosure, a method for data switching is provided. The method comprises: at a second network device connected to a first network device, in response to obtaining a data switching request sent by the first network device, starting a second timer corresponding to a second predetermined time, and sending a data switching instruction to at least one transmission module of the second network device, the data switching instruction being suitable for instructing a first transmission module associated with the first network device in at least one transmission module to switch to being associated with a third network device; and in response to obtaining receipt information of the first transmission module before the second timer expires, sending a restart confirmation for the data switching request to the first network device, the receipt information indicating that the connection switching of the first transmission module to the third network device is successful.

[0005] In the third aspect of the present disclosure, a device for data switching is provided. The device includes: a data switching information sending module, configured to send a data switching request to a second network device connected to the first network device in response to detecting that the first network device meets the restart condition, so as to instruct the second network device to switch the transmission module associated with the first network device to be associated with other network devices; a first timer starting module, configured to start a first timer corresponding to a first predetermined time in response to issuing a data switching request; and a restart action execution module, configured to execute a restart action on the first network device in response to receiving a restart confirmation from the second network device for the data switching request before the first timer expires.

[0006] In the fourth aspect of the present disclosure, a data switching device is provided. The device includes: a data switching instruction sending module, configured to send a data switching instruction to at least one transmission module of a second network device in response to obtaining a data switching request sent by a first network device, the data switching instruction is suitable for instructing a first transmission module associated with the first network device in at least one transmission module to switch to being associated with a third network device; a second timer starting module, configured to obtain a data switching request sent by the first network device, and start a second timer corresponding to a second predetermined time; and a restart confirmation information sending module, configured to send a restart confirmation for the data switching request to the first network device in response to obtaining the receipt information of the first transmission module before the second timer expires, the receipt information indicating that the connection switching of the first transmission module to the third network device is successful.

[0007] In a fifth aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect or the second aspect.

[0008] In a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect or the second aspect.

[0009] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0011] Figure 1A A schematic diagram showing an example scenario according to some embodiments of the present disclosure;

[0012] Figure 1B A schematic diagram showing an example scenario according to some other embodiments of the present disclosure;

[0013] Figure 2 A schematic diagram of interaction between a first network device and a second network device according to some embodiments of the present disclosure is shown;

[0014] Figure 3 A flowchart showing processing actions performed at a first network device during data switching according to some embodiments of the present disclosure is shown;

[0015] Figure 4 A flow chart showing a method for data switching according to some embodiments of the present disclosure is shown;

[0016] Figure 5 A schematic diagram showing a data switching device according to some embodiments of the present disclosure is shown;

[0017] Figure 6 A flowchart showing processing actions performed at a second network device during data switching according to some embodiments of the present disclosure;

[0018] Figure 7 A flow chart showing a method for data switching according to some embodiments of the present disclosure is shown;

[0019] Figure 8 A schematic diagram showing a data switching device according to some embodiments of the present disclosure; and

[0020] Fig. 9 A schematic block diagram of an electronic device suitable for implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0021] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0022] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0023] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0024] As briefly mentioned above, in the traditional forwarding node redundancy technology, if one of the network devices used to forward data is unavailable, the other network devices connected to the failed network device will switch the connection to the backup device that is redundant with the network device. In this way, data can be forwarded through the backup device. However, although the service will be switched from the failed device to the backup device in a short time, there will still be network problems such as packet loss, resulting in service jitter and affecting the stability of data transmission.

[0025] The embodiments of the present disclosure propose a data switching solution to solve or at least partially solve the above-mentioned problems and other potential problems existing in the traditional solution. According to various embodiments of the present disclosure, at a first network device, if the first network device detects that the first network device meets the restart condition, the first network device can send a data switching request to at least one second network device connected to the first network device and start a first timer at the same time.

[0026] After receiving the data switching request from the first network device, the second network device starts the second timer and sends a data switching instruction to at least one transmission module of the second network device. The transmission module associated with the first network device in the second network device switches the connection to the third network device and sends a receipt message to the second network device. After the second network device obtains the receipt message of the first transmission module before the second timer expires, it sends a restart confirmation to the first network device.

[0027] After receiving the restart confirmation sent by the second network device before the first timer expires, the first network device performs the restart action. At this time, since the second network device has switched the data connection with the first network device to the third network device, the restart of the first network device will not affect the continuous transmission of data, thereby improving the stability of the network connection.

[0028] Figure 1A A schematic diagram of an example scenario 100 according to some embodiments of the present disclosure is shown. As shown in FIG1 , in the example scenario 100, two second network devices 120-1 and 120-2 (collectively or individually referred to as second network devices 120) are connected to the first network device 110. Data can be transmitted between a pair of second network devices 120 and a first network device. For example, data can be transmitted from the second network device 120-1 to the second network device 120-2 via the first network device 110, and data can also be transmitted from the second network device 120-2 to the second network device 120-1 via the first network device 110. Each second network device 120 also includes at least one transmission module 121 connected to the first network device 110. In addition, a third network device 130 is arranged between the two second network devices 120-1 and 120-2. The third network device 130 is connected to the two second network devices 120-1 and 120-2, respectively.

[0029] The third network device 130 can be used as a redundant device for the first network device 110. If the first network device 110 is abnormal and is about to be unavailable (for example, it is about to shut down or restart), the first network device 110 can send data switching requests to the two second network devices 120-1 and 120-2 respectively. After receiving the data switching request, the two second network devices 120-1 and 120-2 switch the transmission module connected to the first network device 110 to the third network 130. In this way, the network task loaded by the first network device 110 can be switched to the third network device 130 before the first network device 110 is unavailable. The business jitter caused by performing the switch after the first network device 110 is unavailable is avoided.

[0030] How the first network device and the second network device perform connection switching will be described in detail below.

[0031] Figure 1BA schematic diagram of an example scenario 100 according to some other embodiments of the present disclosure is shown. In some other embodiments, there may be one or more second network devices 120 connected to the first network device 110, such as second network devices 120-1, 120-2, ..., 120-N (collectively or individually referred to as second network devices 120). The first network device 110 may send a data switching request to these second network devices 120 at the same time. Additionally or arbitrarily, a third network device that is redundant to the first network device 110 may also be provided with multiple, such as third network devices 130-1, 130-2, ..., 130-M (collectively or individually referred to as third network devices 130). When the second network device 120 switches to the third network device 130, it may be connected to the third network device with the highest priority according to the priorities preset for the multiple third network devices 130.

[0032] Figure 2 FIG. 1 shows a schematic diagram of interaction between a first network device 110 and a second network device 120 according to some embodiments of the present disclosure. Figure 2 As shown, if the first network device 110 detects that the restart condition (210) is met, the first network device 110 can send (220) a data switching request to one or more second network devices 120 connected to the first network device 110. While sending the data switching request to the second network device 120, the first network device 110 is also adapted to start (230) a first timer for timing. After receiving the data switching request, the second network device 120 starts (240) the second timer, and at least one transmission module 121 connected to the first network device 110 sends (250) a switching instruction. After receiving the switching instruction, the first transmission module 121 switches (260) the connection with the first network device 110 to the connection with the third network device 130130. After completing the switching to the third network device 130, the first transmission module 121 sends (270) a receipt message indicating that the connection switching is completed to the second network device 120. After receiving the acknowledgement information within the second predetermined time of the second timer, the second network device 120 sends (280) a restart confirmation for the data switching request to the first network device 110. The first network device 110 receives the restart confirmation within the first predetermined time of the first timer and performs (290) a restart action.

[0033] During this process, the first transmission module 121 can complete the switching of the data connection before the first network device 110 is restarted, thereby improving the stability of data transmission and reducing the service jitter caused by the restart of the first network device 110 .

[0034] Figure 3A flowchart of a processing action 300 performed at the first network device 110 during data switching according to some embodiments of the present disclosure is shown. It should be understood that the action 300 may also include other additional blocks not shown and / or may omit one (or some) of the blocks shown, and the scope of the present disclosure is not limited in this respect.

[0035] like Figure 3 As shown, at block 310, the first network device 110 detects that a restart condition is satisfied. In some embodiments, the restart condition may include an electrical signal error of an electrical component of the first network device 110 exceeding a predetermined error threshold. For example, a voltage of a first electrical component of the first network device 110 exceeds a predetermined voltage threshold. For another example, a current of a second electrical component of the first network device 110 exceeds a predetermined current threshold.

[0036] In some embodiments, the restart condition may also include that the resource utilization of the electrical component of the first network device 110 reaches a predetermined restart threshold. For example, the resource utilization of the third electrical component (such as a central processing unit or memory, etc.) of the first network device 110 reaches the restart threshold of the resource utilization. For example, the operating time of the fourth electrical component (such as a central processing unit or memory, etc.) of the first network device 110 reaches the time threshold. For example, the operating temperature of the fifth electrical component (such as a central processing unit or memory, etc.) of the first network device 110 reaches the temperature threshold.

[0037] In some embodiments, the restart condition may further include that the first network device 110 receives a manual restart request instructing to restart the first network device 110. For example, a user sends a restart instruction to the first network device 110.

[0038] In box 320, the first network device 110 sends a data switching request to the second network device 120, and starts a first timer. In some embodiments, the first network device 110 can send a data switching request to the second network device 120 connected to the first network device 110 based on the second layer protocol and the third layer protocol. For example, the first network device 110 can send a data request to the second network device 120 based on the link layer discovery protocol (Link Layer Discovery Protocol, LLDP). In some embodiments, the data switching request can include type information, length information and content information of the data. In addition, the content information of the data can also include at least one defined protocol information for service forwarding, such as Border Gateway Protocol (Border Gateway Protocol, BGP), Open Shortest Path First (Open Shortest Path First, OSPF), Label Distribution Protocol (Label Distribution Protocol, LDP), etc. In this way, the data switching request can be matched with multiple types of network devices at the same time. Thereby improving the efficiency of the first network device 110 sending a data switching request to at least one second network device 120.

[0039] In some embodiments, the message format of the data switching request may include the following components.

[0040] TLV Type TLV data part length TLV data part 1100101(7 bits) Empty(9bits) Empty (0 to 511 bytes)

[0041] The first network device 110 is also adapted to control the start of a first timer while sending a data switching request. The first timer has a first preset time built in. The first preset time may be, for example, 0.5s, 0.8s, 1s, etc. When the first preset time is reached in the first timer, the timer may send a prompt to the first network device 110.

[0042] Since the service forwarding of the network device is an action of the processing chip (such as an ASIC chip), the internal table entries of the network device are not lost, and the forwarding can still be performed normally. Therefore, when the device triggers the restart threshold, the service forwarding will not be affected within the predetermined timer time. In box 330, the first network device 110 will perform a judgment based on the timing of the first timer. Specifically, if the timing of the first timer does not exceed the first predetermined time, box 340 is executed.

[0043] In block 340 , the first network device 110 cyclically waits for the second network device 120 to return a restart confirmation. Until the first network device 110 obtains the restart confirmation returned by the second network device 120, in block 350 , the first network device 110 performs a restart action.

[0044] Returning to block 330, in block 330, if the timing of the first timer reaches or exceeds the first predetermined time, execute block 350. In block 350, the first network device 110 performs a restart action. For example, if within the first timer interval, the first network device 110 receives LLDP restart confirmation messages from all LLDP-enabled ports, the restart action is performed, otherwise if the timer times out, the first network device 110 directly performs a restart action.

[0045] Thus, the first network device 110 can wait for the second network device 120 to switch data before the third network device 130 within the first predetermined time, so as to avoid service jitter caused by the restart of the first network device 110. If the first timer expires before the expiration of the first timer (that is, the timing of the first timer reaches or exceeds the first predetermined time), the first network device 110 will directly execute the restart, thereby protecting the first network device 110 and preventing the first network device 110 from working too long in an abnormal state and causing damage.

[0046] Figure 4 A flow chart of a method 400 for data switching according to some embodiments of the present disclosure is shown. The method 400 may be implemented by the first network device 110. It should be understood that the method 400 may also include other additional blocks not shown and / or may omit one (or some) of the blocks shown, and the scope of the present disclosure is not limited in this respect.

[0047] In box 410, in response to detecting that the first network device 110 meets the restart condition, the first network device 110 sends a data switching request to the second network device 120 connected to the first network device 110 to instruct the second network device 120 to switch the transmission module associated with the first network device 110 to be associated with other network devices.

[0048] In block 420 , the first network device 110 starts a first timer corresponding to a first predetermined time in response to issuing the data switching request.

[0049] In block 430 , in response to receiving a restart confirmation of the data switching request from the second network device 120 before the first timer expires, the first network device 110 performs a restart action on the first network device 110 .

[0050] In some embodiments, in response to the expiration of the first timer, the first network device 110 performs a restart action on the first network device 110 .

[0051] Figure 5 A schematic diagram of a data switching device 500 according to some embodiments of the present disclosure is shown. Figure 5As shown, the apparatus 500 includes a data switching information sending module 410, which is configured to send a data switching request to a second network device 120 connected to the first network device 110 in response to detecting that the first network device 110 meets the restart condition, so as to instruct the second network device 120 to switch the transmission module associated with the first network device 110 to be associated with other network devices.

[0052] The first timer starting module 420 starts a first timer corresponding to a first predetermined time in response to issuing a data switching request.

[0053] The restart action execution module 430 executes a restart action on the first network device 110 in response to receiving a restart confirmation of the second network device 120 for the data switching request before the first timer expires.

[0054] In some embodiments, the restart action execution module 430 is further configured to execute a restart action on the first network device 110 in response to expiration of the first timer.

[0055] Figure 6 A flowchart of a processing action 600 performed at the second network device 120 during data switching according to some embodiments of the present disclosure is shown. It should be understood that the action 600 may also include other additional blocks not shown and / or may omit one (or some) of the blocks shown, and the scope of the present disclosure is not limited in this respect.

[0056] like Figure 6 As shown, in block 610, the second network device 120 receives a data switching request from the first network device 110. In some embodiments, the data switching request received by the second network device 120 is a data request based on a layer 1 protocol or a layer 3 protocol. For example, the data request may be data information based on a link layer discovery protocol (LLDP).

[0057] In box 620, the second network device 120 sends a data switching instruction to at least one transmission module, and the second network device 120 starts a second timer. In some embodiments, the second network device 120 can send a data switching instruction to all transmission modules, and after the transmission module receives the data switching instruction, only the first transmission module 121 related to the first network device 110 can act according to the data switching instruction and switch the connection with the first network device 110 to the connection with the third network device 130. For example, on the second network device 120 side, the LLDP module sends a path switching notification to all defined forwarding protocol modules, and carries the port information for receiving LLDP, and starts the timer. The forwarding protocol module determines whether the forwarding exit involves the port notified by LLDP. If not, it returns a confirmation message to LLDP. If it does, it performs an exit switch and returns a confirmation message after the switch is completed.

[0058] In this way, the first transmission module 121 in the second network device 120 connected to the first network device 110 can act faster. In some other embodiments, the second network device 120 can also only send the data switching instruction to the first module connected to the first network device 110.

[0059] In some embodiments, a second predetermined time is preset in the second timer. When the second timer reaches or exceeds the second predetermined time, the second timer can send relevant prompt information to the second network device 120. In some embodiments, the second predetermined time can be 0.4s, 0.6s, 0.8s, 0.9s, etc. In some embodiments, the second predetermined time can be shorter than the first predetermined time, so that the first network device 110 can perform a restart action after all second network devices 120 are switched.

[0060] In block 630, the second network device 120 performs a judgment based on a comparison between the timing of the second timer and the second predetermined time. If the timing of the second timer does not exceed the second predetermined time, block 640 is executed. In block 640, the module of the second network device 120 loops and waits for the transmission module to return the receipt information. After the second network device 120 obtains all the transmission modules to return the receipt information, in block 650, the second network device 120 returns a restart confirmation to the first network device 110.

[0061] Returning to block 630 , in block 630 , if the timing of the second timer reaches or exceeds the second predetermined time, block 650 is executed. In block 650 , the second network device 120 returns a restart confirmation to the first network device 110 .

[0062] In some embodiments, the message format of the restart confirmation includes the following components.

[0063] TLV Type TLV data part length TLV data part 1100110(7 bits) Empty(9bits) Empty (0 to 511 bytes)

[0064] In some embodiments, if the second timer reaches or exceeds the second predetermined time, and the second network device 120 does not receive the receipt information of all transmission modules, the second network device 120 ends the task and stops returning the restart confirmation to the first network device 110 .

[0065] In some embodiments, after the first network device 110 is completely restarted, the second network device may switch back to connecting to the first network device 110 .

[0066] In current networks, restarts are often triggered by hardware or software failures of devices, causing service jitter. According to the embodiments of the present disclosure, before a device restarts, adjacent devices are informed to switch services away in an appropriate manner, and then the local end performs the restart operation, which ensures that no packet loss occurs when a single device restarts.

[0067] Figure 7 1 is a flowchart of a method 700 for data switching according to some embodiments of the present disclosure. The method 700 may be implemented by the second network device 120. It should be understood that the method 700 may also include other additional blocks not shown and / or may omit one (or some) of the blocks shown, and the scope of the present disclosure is not limited in this respect.

[0068] In box 710, in response to obtaining the data switching request sent by the first network device 110, the second network device 120 starts a second timer corresponding to the second predetermined time, and sends a data switching instruction to at least one transmission module of the second network device 120, where the data switching instruction is suitable for instructing the first transmission module 121 associated with the first network device 110 in the at least one transmission module to switch to being associated with the third network device 130.

[0069] In box 720, in response to obtaining the receipt information of the first transmission module 121 before the expiration of the second timer, the second network device 120 sends a restart confirmation for the data switching request to the first network device 110, and the receipt information indicates that the connection switching of the first transmission module 121 to the third network device 130 is successful.

[0070] In some embodiments, the second network device 120 further sends a restart confirmation to the first network device 110 in response to the expiration of the second timer.

[0071] Figure 8 A schematic diagram of a data switching device 800 according to some embodiments of the present disclosure is shown. Figure 8As shown, the device 800 includes a data switching instruction sending module 810, which is configured to send a data switching instruction to at least one transmission module of the second network device 120 in response to obtaining a data switching request sent by the first network device 110, and the data switching instruction is suitable for instructing the first transmission module 121 associated with the first network device 110 in at least one transmission module to switch to being associated with the third network device 130.

[0072] The second timer starting module 820 is configured to obtain the data switching request sent by the first network device 110 and start a second timer corresponding to the second predetermined time.

[0073] The restart confirmation information sending module 830 is configured to send a restart confirmation for the data switching request to the first network device 110 in response to obtaining the receipt information of the first transmission module 110 before the expiration of the second timer, and the receipt information indicates that the connection switching of the first transmission module 121 to the third network device 130 is successful.

[0074] In some embodiments, the restart confirmation information sending module 830 is further configured to send a restart confirmation to the first network device 110 in response to the expiration of the second timer.

[0075] Fig. 9 Schematic block diagram of an electronic device suitable for implementing an embodiment of the present disclosure is shown. Fig. 9 As shown, according to an electronic device provided by the present disclosure, the electronic device 900 may be the first network device 110, the second network device 120 or other appropriate devices mentioned above. The electronic device 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 902 or computer program instructions loaded from a storage unit to a random access memory (RAM) 903. In RAM 903, various programs and data required for device operation can also be stored. CPU 901, ROM 902 and RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0076] A number of components in the device are connected to the I / O interface 905, including: an input unit 906, such as a touch screen, buttons, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0077] The various processes and processing described above, such as the processes mentioned above, can be performed by the processing unit 901. For example, in some embodiments, the processes 410, 420, 430 and 710, 720, 730 can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on the device via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the CPU 901, one or more actions of the processes 410, 420, 430 and 710, 720, 730 described above can be performed.

[0078] Embodiments of the present disclosure relate to methods, electronic devices, and / or computer program products. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0079] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0080] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0081] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0082] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0083] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0084] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0085] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0086] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A data switching method, comprising: At the first network device, in response to detecting that the first network device meets the restart condition, sending a data switching request to a second network device connected to the first network device to instruct the second network device to switch the transmission module associated with the first network device to be associated with another network device; In response to issuing the data switching request, starting a first timer corresponding to a first predetermined time; and In response to receiving a restart confirmation from the second network device for the data switching request before the first timer expires, a restart action is performed on the first network device.

2. The method according to claim 1, further comprising: In response to the expiration of the first timer, the restart action on the first network device is performed.

3. The method according to claim 1, wherein sending the data switching request to the second network device connected to the first network device among the plurality of network devices comprises: The data switching request is sent to the second network device connected to the first network device based on a layer 2 protocol or a layer 3 protocol.

4. The method according to claim 1, wherein sending the data switching request to the second network device connected to the first network device among the plurality of network devices comprises: The data switching request is sent to the second network device connected to the first network device based on the Link Layer Discovery Protocol (LLDP). 5 . The method according to claim 1 , wherein the data switching request comprises type information, length information and content information, and the content information comprises at least one defined protocol information.

6. The method according to claim 1, wherein the restart condition comprises at least one of the following: an electrical signal error of the electrical component of the first network device exceeds a predetermined error threshold, The resource utilization rate of the electrical component of the first network device reaches a restart threshold value, A restart request for the first network device is received.

7. A data switching method, comprising: At a second network device connected to the first network device, in response to obtaining a data switching request sent by the first network device, starting a second timer corresponding to a second predetermined time, and Sending a data switching instruction to at least one transmission module of the second network device, wherein the data switching instruction is adapted to instruct a first transmission module associated with the first network device among the at least one transmission module to switch to being associated with a third network device; as well as In response to obtaining receipt information of the first transmission module before the second timer expires, a restart confirmation for the data switching request is sent to the first network device, and the receipt information indicates that the connection switching of the first transmission module to the third network device is successful.

8. The method according to claim 7, further comprising: In response to the second timer expiring, the restart confirmation is sent to the first network device.

9. The method according to claim 7, wherein the second predetermined time of the second timer of the second network device is less than a first predetermined time of a first timer started at the first network device, and the first timer is started by the first network device after sending the data switching request.

10. The method according to claim 7, wherein the data switching request is a data request based on a layer 2 protocol or a layer 3 protocol.

11. The method according to claim 7, wherein sending the restart confirmation information to the first network device comprises: The restart confirmation is sent to the first network device based on Link Layer Discovery Protocol (LLDP).

12. A data switching device, comprising: a data switching information sending module, configured to, in response to detecting that the first network device meets a restart condition, send a data switching request to a second network device connected to the first network device, so as to instruct the second network device to switch the transmission module associated with the first network device to be associated with another network device; A first timer starting module, configured to start a first timer corresponding to a first predetermined time in response to issuing the data switching request; and The restart action execution module is configured to execute a restart action on the first network device in response to receiving a restart confirmation from the second network device for the data switching request before the first timer expires.

13. A data switching device, comprising: a data switching instruction sending module, configured to send a data switching instruction to at least one transmission module of the second network device in response to obtaining a data switching request sent by the first network device, wherein the data switching instruction is suitable for instructing a first transmission module associated with the first network device among the at least one transmission module to switch to being associated with a third network device; A second timer starting module is configured to obtain the data switching request sent by the first network device and start a second timer corresponding to a second predetermined time; and A restart confirmation information sending module is configured to send a restart confirmation for the data switching request to the first network device in response to obtaining the receipt information of the first transmission module before the expiration of the second timer, wherein the receipt information indicates that the connection switching of the first transmission module to the third network device is successful.

14. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 6, 7 to 11.

15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 6 and 7 to 11.