A data forwarding method, apparatus, device, and storage medium

By evaluating the forwarding performance characteristics of the backup switching module, the target backup module is selected, which solves the data forwarding delay problem caused by the switching module failure and ensures the efficient operation of the data forwarding system.

CN115733810BActive Publication Date: 2025-10-10北京东土军悦科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211274782.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2025-10-10
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

In the prior art, when a switch module fails, a replacement switch module is directly selected without considering its data forwarding capability, resulting in data forwarding delay and poor system performance.

Method used

By determining the operating status of the target switching module, the backup switching module with the best forwarding performance characteristics is selected for data forwarding, including evaluation of factors such as priority, response time and transmission rate.

Benefits of technology

This achieves reliable data forwarding when a switch module fails, reduces data forwarding delay, and ensures the performance of the data forwarding system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733810B_ABST
    Figure CN115733810B_ABST
Patent Text Reader

Abstract

The application discloses a data forwarding method, device and equipment and a storage medium. The method comprises the following steps: receiving a data packet to be forwarded; determining the running state of a target switching module; wherein the target switching module is a switching module used for forwarding the data packet and determined in advance according to a port address; when it is determined that the target switching module does not meet the forwarding condition based on the running state, determining the forwarding performance characteristics of a backup switching module to be selected, and determining a target backup switching module from the backup switching module to be selected according to the forwarding performance characteristics; wherein the backup switching module to be selected is a switching module in the switching module group except the target switching module; and triggering the target backup switching module to forward the data packet to be forwarded. The above technical solution can quickly determine the backup switching module capable of forwarding the data packet when the target switching module fails, realize reliable forwarding of the data packet, reduce the delay of data forwarding, and ensure the performance of the entire data forwarding system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of network communication, and in particular, to a data forwarding method, device, equipment and storage medium. BACKGROUND

[0002] Switch is a kind of network device for signal or data forwarding. In some cases, part of the switch may be unavailable, for example, each switch is negotiating a virtual address outside, in this case, the virtual address of the module group is unavailable, and the external device cannot communicate with any switch in the module group, which will cause data transmission failure and data packet forwarding interruption.

[0003] In the related art, when a switch for forwarding data determined in advance fails, the next or any non-failed switch is directly selected to forward data. However, this method does not consider the data forwarding capability of the switch for replacement, often causing delay in data forwarding, resulting in low performance of the entire data forwarding system. SUMMARY

[0004] The present application provides a data forwarding method, device, equipment and storage medium to improve the reliability of data forwarding and ensure the performance of the entire data forwarding system.

[0005] In a first aspect, the embodiments of the present application provide a data forwarding method, which comprises:

[0006] receiving a data packet to be forwarded;

[0007] determining the running state of a target switch; wherein the target switch is a switch for forwarding the data packet determined in advance according to the port address;

[0008] when it is determined that the target switch does not meet the forwarding condition based on the running state, determining the forwarding performance characteristics of a standby switch to be selected, and determining a target standby switch from the standby switch to be selected according to the forwarding performance characteristics; wherein the standby switch to be selected is a switch in the switch module except the target switch;

[0009] triggering the target standby switch to forward the data packet to be forwarded.

[0010] In an optional embodiment, the forwarding performance characteristics include priority.

[0011] The method of determining the forwarding performance characteristics of the standby switch to be selected and determining the target standby switch from the standby switch to be selected according to the forwarding performance characteristics comprises:

[0012] Determine the priority of each candidate backup switch module;

[0013] The candidate backup switching module with the highest priority is determined as the target backup switching module.

[0014] In an optional embodiment, determining the priority of each candidate backup switching module includes:

[0015] Obtain the transmission rate, packet forwarding rate, and backplane bandwidth of each candidate backup switching module;

[0016] Determine the performance index value of each candidate backup switching module according to at least one of the transmission rate, packet forwarding rate and backplane bandwidth;

[0017] The priority of each candidate backup switching module is determined according to the ranking of the performance indicator values.

[0018] In an optional embodiment, the forwarding performance characteristics include responsiveness time;

[0019] The determining of the forwarding performance characteristics of the candidate backup switching modules and determining the target backup switching module from the candidate backup switching modules according to the forwarding performance characteristics includes:

[0020] Obtaining a response time of each candidate backup switching module; wherein the response time is determined based on at least one of the number of packets to be forwarded and the transmission rate of the candidate backup switching module;

[0021] A target backup switching module is determined from the candidate backup switching modules according to the available response time.

[0022] In an optional embodiment, there are multiple data packets to be forwarded;

[0023] The determining of a target backup switching module from the candidate backup switching modules according to the forwarding performance characteristics includes:

[0024] Determining a first number of the data packets to be forwarded;

[0025] Determining target backup switching modules corresponding to the first number from the candidate backup switching modules according to the forwarding performance characteristics;

[0026] The triggering the target backup switching module to forward the data packet to be forwarded includes:

[0027] The target backup switching module is triggered to forward each data packet to be forwarded respectively.

[0028] In an optional embodiment, triggering the target backup switching module to forward the data packet to be forwarded includes:

[0029] Determine the priority of each data packet to be forwarded;

[0030] According to the priority of each data packet to be forwarded, the target backup switching module is triggered to forward the corresponding data packets to be forwarded one by one.

[0031] In an optional embodiment, the method further includes:

[0032] Determining a second number of the backup switching modules to be selected;

[0033] Slicing the data packet to be forwarded according to the second number to obtain a plurality of data slices; wherein each data slice carries a corresponding slice order;

[0034] The selected backup switching module is triggered to forward the multiple data slices respectively, so that the receiving end splices the multiple data slices according to the fragmentation order to obtain the data packet to be forwarded.

[0035] In a second aspect, an embodiment of the present invention provides a data forwarding device, the device comprising:

[0036] A data packet receiving module, configured to receive data packets to be forwarded;

[0037] An operation status determination module, configured to determine the operation status of a target switching module; wherein the target switching module is a switching module for forwarding data packets that is predetermined based on a port address;

[0038] a backup module determining module, configured to, when it is determined based on the operating status that the target switching module does not meet the forwarding condition, determine the forwarding performance characteristics of the candidate backup switching module, and determine the target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; wherein the candidate backup switching module is a switching module in the switching module other than the target switching module;

[0039] The forwarding module is used to trigger the target backup switching module to forward the data packet to be forwarded.

[0040] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the aforementioned method when executing the computer program.

[0041] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the steps of the aforementioned method when executed.

[0042] The technical solution of an embodiment of the present invention determines the operating status of a target switching module upon receiving a data packet to be forwarded. If a failure of the target switching module is determined based on the operating status, a target backup switching module is determined from among the candidate backup switching modules based on the forwarding performance characteristics of the candidate backup switching modules, thereby triggering the target backup switching module to forward the data packet to be forwarded. When a failure of the target switching module occurs, a backup switching module capable of forwarding the data packet is quickly determined, enabling reliable data packet forwarding, reducing data forwarding latency, and ensuring the performance of the entire data forwarding system.

[0043] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 is a flow chart of a data forwarding method provided according to an embodiment of the present invention;

[0046] Figure 2 This is a schematic diagram of an application scenario of a data forwarding method provided by an embodiment of the present invention;

[0047] Figure 3 It is a structural diagram of a data forwarding device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0049] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0050] In one embodiment, Figure 1 As shown, a data forwarding method is provided. The method can be applied to electronic devices such as laptop computers, desktop computers, workstations, servers, and mainframe computers. The electronic device can be pre-configured with a switching module group, and the system in the electronic device can be referred to as a data forwarding system. The switching module group can be a module group consisting of at least two switching modules, and the switching modules are cascaded via a network cable. The switching module can refer to a network device used for signal or data forwarding, such as a switch, a switching chip, or a switching board. By combining at least two switching modules into a switching module group, the number of ports used for data exchange can be expanded. This embodiment does not limit the type of network cable connecting the switching modules, and can be, for example, a twisted pair cable, a coaxial cable, or an optical cable.

[0051] The method comprises:

[0052] S101, receiving a data packet to be forwarded;

[0053] The data packets may refer to block-type transmission data, which are transmitted along different paths in one or more networks and reassembled at the destination. Furthermore, the data packets to be forwarded are data packets sent by the sender for forwarding to the receiver.

[0054] S102, determining the operating state of a target switching module; wherein the target switching module is a switching module for forwarding data packets that is predetermined based on a port address;

[0055] The port address may refer to a unique address code or port number assigned to each port in a microcomputer system. Further, the port address corresponding to the data packet to be forwarded is determined to obtain a target switching module.

[0056] Furthermore, if the port of the switch module corresponding to the port address is not faulty, the switch module corresponding to the port address will be used as the target switch module; if the port of the switch module corresponding to the port address is faulty, the target backup switch module will be determined from the candidate backup switch modules to replace the target switch module.

[0057] The target switching module's operating status includes whether it is faulty. If the target switching module experiences a power outage or hardware failure, the corresponding gateway will also fail, and the target switching module will be considered faulty. In this case, the target switching module does not meet forwarding conditions and cannot forward the packet.

[0058] Optionally, when the electronic device receives a data packet to be forwarded from any sending end, it establishes a connection with the target switching module and transmits the data packet to be forwarded to the target switching module. When the target switching module fails, the electronic device transmits the data packet to be forwarded to the target backup switching module.

[0059] S103, when it is determined based on the operating status that the target switching module does not meet the forwarding conditions, determine the forwarding performance characteristics of the candidate backup switching module, and determine the target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; wherein the candidate backup switching module is a switching module in the switching module other than the target switching module.

[0060] The forwarding performance characteristics are the performance characteristics of the candidate backup switching module in forwarding data packets, and may include load capacities such as response time and forwarding rate. The response time indicates how long it takes the candidate backup switching module to begin forwarding data packets; the forwarding rate indicates how long it takes the candidate backup switching module to complete forwarding data packets. The forwarding rate can be determined based on the performance indicators of the candidate backup switching module.

[0061] The other switching modules in the switching module except the target switching module are used as candidate backup switching modules. When the target switching module fails, at least one candidate backup switching module is used to replace the target switching module to forward the data packet to be forwarded.

[0062] Optionally, determining a target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics includes: determining a first backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; when the first backup switching module does not meet the forwarding conditions, determining a second backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; and if the second backup switching module meets the forwarding conditions, determining the second backup switching module as the target backup switching module. By traversing the candidate backup switching modules one by one to determine a reliable target backup switching module, reliable forwarding of data packets is achieved.

[0063] S104: Trigger the target backup switching module to forward the data packet to be forwarded.

[0064] Optionally, after determining the target backup switching module, the target backup switching module is used to replace the target switching module to forward the data packet to be forwarded. While ensuring reliable forwarding of the data packet, it is also forwarded through a high-performance backup switching module to ensure the forwarding efficiency of the data packet.

[0065] Optionally, there may be multiple target backup switching modules; triggering the target backup switching module to forward the data packet to be forwarded includes: determining the number of the target backup switching modules; fragmenting the data packet to be forwarded according to the number of the target backup switching modules to obtain multiple data slices; wherein each data slice carries a corresponding fragmentation sequence; triggering the target backup switching module to forward the multiple data slices respectively, so that the receiving end splices the multiple data slices according to the fragmentation sequence to obtain the data packet to be forwarded.

[0066] In the above embodiment, upon receiving a data packet to be forwarded, the operating status of the target switching module is determined. If the target switching module is determined to be faulty based on the operating status, a target backup switching module is determined from among the candidate backup switching modules based on the forwarding performance characteristics of the candidate backup switching modules, thereby triggering the target backup switching module to forward the data packet to be forwarded. When the target switching module fails, a backup switching module capable of forwarding the data packet is quickly determined, enabling reliable data packet forwarding, reducing data forwarding latency, and ensuring the performance of the entire data forwarding system.

[0067] In one embodiment, the forwarding performance characteristics include a priority; determining the forwarding performance characteristics of the candidate backup switching module and determining the target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics includes: determining the priority of each candidate backup switching module; and determining the candidate backup switching module with the highest priority as the target backup switching module.

[0068] Optionally, determining the priority of each candidate backup switching module includes: obtaining a transmission rate, packet forwarding rate, and backplane bandwidth of each candidate backup switching module; determining a performance indicator value of each candidate backup switching module based on at least one of the transmission rate, packet forwarding rate, and backplane bandwidth; and determining the priority of each candidate backup switching module based on a ranking of the performance indicator values. The performance indicator value may represent the forwarding rate of each candidate backup switching module.

[0069] The transmission rate is the rate at which the switch module forwards data packets. Packet forwarding rate, also known as forwarding rate or throughput, refers to the number of data packets that pass through a unit of time without packet loss. Backplane bandwidth is the maximum amount of data that can be handled between the switch module's interface processor or interface card and the data bus. Backplane bandwidth determines the switch module's data processing capabilities; higher backplane bandwidth indicates greater data processing capabilities.

[0070] Optionally, the performance index value of the candidate backup switching module can be determined based on at least one of the transmission rate, packet forwarding rate, and backplane bandwidth. Further, a weighted sum of the transmission rate, packet forwarding rate, and backplane bandwidth can be calculated and used as the performance index value.

[0071] Optionally, the performance index values ​​may be sorted by size, and the priority of the candidate backup switch module with the highest performance index value may be determined as the highest priority.

[0072] Furthermore, a priority is preset for each backup switching module based on the performance indicators of each switching module. When the target switching module fails, a preferred switching module is selected from the backup switching modules based on the preset priority to forward data packets; wherein the performance indicators include transmission rate, transmission medium, packet forwarding rate, port description, backplane bandwidth, etc.

[0073] This embodiment predetermines the priority of each candidate backup switching module, so that the target backup switching module can be quickly located, thereby achieving rapid forwarding of data packets.

[0074] In one embodiment, the forwarding performance characteristics include a response time; determining the forwarding performance characteristics of the candidate backup switching module and determining the target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics includes: obtaining the response time of each candidate backup switching module; wherein the response time is determined based on at least one of the number of data packets to be forwarded and the transmission rate of the candidate backup switching module; and determining the target backup switching module from the candidate backup switching modules based on the response time.

[0075] Optionally, the number of packets to be forwarded is negatively correlated with the available response time, while the transmission rate is positively correlated with the available response time. Furthermore, the product of the transmission rate and the first coefficient can be divided by the product of the number of packets to be forwarded and the second coefficient, and the available response time of the corresponding backup switching module to be selected can be determined based on the calculated quotient.

[0076] Optionally, the data packets to be forwarded and the transmission rate of each candidate backup switching module are calculated to determine the preferred switching module, such as determining the candidate backup switching module with a small data packet to be forwarded or a short forwarding time as the target backup switching module.

[0077] In this embodiment, the target backup switching module is determined based on the response time, so that the target backup switching module with the fastest response can be determined, and the fast forwarding of the data packets to be forwarded can be realized.

[0078] In one embodiment, the data packets to be forwarded are multiple; the target backup switching module is determined from the backup switching modules according to the forwarding performance characteristics, including: determining the first number of the data packets to be forwarded; determining the target backup switching module corresponding to the first number from the backup switching modules according to the forwarding performance characteristics; and triggering the target backup switching module to forward the data packets to be forwarded, including: triggering the target backup switching module to forward each data packet to be forwarded respectively.

[0079] It should be noted that the data packets to be forwarded can be data packets corresponding to the target switching modules that have failed, that is, if a data packet corresponds to a target switching module that has not failed, it can not be included in the data packets to be forwarded in this embodiment, and can be directly forwarded by the corresponding target switching module. Therefore, the plurality of data packets to be forwarded indicates that a plurality of target switching modules have failed at the same time, and a plurality of target backup switching modules need to be determined to forward the data packets to be forwarded.

[0080] When a plurality of data packets to be forwarded need to be forwarded at the same time, triggering a plurality of target backup switching modules to forward the data packets to be forwarded can ensure the smooth forwarding of the plurality of data packets.

[0081] Further, according to the number of data packets and the preset priority / forwarding performance characteristics of the backup switching modules, the optimal switching modules corresponding to the number are selected from the backup switching modules, and the data packets are forwarded respectively.

[0082] In this embodiment, when a plurality of data packets to be forwarded exist, a corresponding number of backup switching modules are determined, so that the reliable forwarding of the data packets can be ensured, and the efficiency of data forwarding can be ensured.

[0083] Optionally, the target backup switching module can perform parallel forwarding on the data packets to be forwarded.

[0084] In addition to the parallel forwarding mode, the serial forwarding mode can also be implemented. Specifically, in one embodiment, the target backup switching module is triggered to forward the data packets to be forwarded, including: determining the priority of each data packet to be forwarded; and triggering the target backup switching module to forward the corresponding data packet to be forwarded one by one according to the priority of each data packet to be forwarded.

[0085] Optionally, according to the priority order of each data packet, the selected target backup switching module is triggered to forward in sequence.

[0086] By forwarding the data packets to be forwarded one by one, reliable forwarding of the data packets can be ensured without occupying too many backup switching modules.

[0087] In one embodiment, it also includes: determining a second number of the backup switching modules to be selected; fragmenting the data packet to be forwarded according to the second number to obtain multiple data slices; wherein each data slice carries a corresponding fragmentation order; triggering the backup switching modules to be selected to forward the multiple data slices respectively, so that the receiving end splices the multiple data slices according to the fragmentation order to obtain the data packet to be forwarded.

[0088] In this embodiment, the standby backup switching module is directly used to forward the data packet to be forwarded.

[0089] Optionally, the data packet can be fragmented evenly or unevenly. The uneven fragmentation can be implemented by: 1) obtaining the pre-set data forwarding threshold for each candidate backup switching module (the threshold for different candidate backup switching modules may be different), and adaptively fragmenting the data packet according to the data forwarding threshold; 2) determining the current data forwarding volume of each candidate backup switching module and its remaining data forwarding volume, and adaptively fragmenting the data packet according to the remaining data forwarding volume of each candidate backup switching module. Through uneven fragmentation, the currently available candidate backup switching modules can be utilized to the greatest extent possible.

[0090] Optionally, this embodiment can also be implemented in combination with the forwarding performance characteristics of the candidate backup switching modules. For example, sharding is adaptively performed according to the remaining data forwarding volume and forwarding performance characteristics of each candidate backup switching module, and the candidate backup switching modules with good forwarding performance characteristics are given priority. At this time, some of the candidate backup switching modules may not be selected, and the data slices are forwarded through the selected candidate backup switching modules.

[0091] Furthermore, the data is fragmented according to the number of backup switching modules to be selected, and the equally divided data fragments are forwarded by each backup switching module to be selected. The receiving end integrates the data fragments according to the labels on the data fragments (such as the fragmentation order).

[0092] In this embodiment, by fragmenting the data packet, the data packet can be distributed to multiple backup switching modules to forward the data packet, thereby achieving rapid forwarding of the data packet.

[0093] Figure 2 This is an application scenario of a data forwarding method provided by an embodiment of the present invention. Figure 2As shown, this application scenario includes a transmitter 210, a data forwarding system 220, and a receiver 230. The data forwarding system 220 is configured with a switching module group, which includes a target switching module 221 and two candidate backup switching modules 222. It should be noted that in actual application scenarios, the number of candidate backup switching modules may be greater or less.

[0094] Specifically, a transmitting end may refer to a network device for transmitting data packets, and may transmit the data packets to a switching module group in a data forwarding system. This embodiment does not limit the type of transmitting end; for example, the transmitting end may be a digital computer of various forms, such as a laptop computer, a desktop computer, a workstation, a server, a mainframe computer, and other suitable computers. In some embodiments, the transmitting end may transmit data packets to the data forwarding system, which then forwards the data packets to a corresponding receiving end.

[0095] The receiving end may refer to a network device for receiving data packets. This embodiment does not limit the type of the receiving end, as long as it can receive data packets. For example, it may be various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, mainframe computers, and other suitable computers.

[0096] When a target switching module fails, the data forwarding system determines a target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics of the candidate backup switching modules to replace the target switching module in forwarding the data packet to be forwarded.

[0097] Optionally, when receiving a data packet to be forwarded, the data forwarding system determines the operating status of the target switching module. If the target switching module is determined to be faulty based on the operating status, the data forwarding system determines a target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics of the candidate backup switching modules, thereby triggering the target backup switching module to forward the data packet to be forwarded. When the target switching module fails, the data forwarding system quickly determines a backup switching module capable of forwarding the data packet, thereby achieving reliable data packet forwarding, reducing data forwarding latency, and ensuring the performance of the entire data forwarding system.

[0098] Figure 3 FIG. 3 is a structural diagram of a data forwarding device 300 provided in an embodiment of the present invention. Figure 3 As shown, the device includes:

[0099] The data packet receiving module 301 is used to receive data packets to be forwarded;

[0100] The operation state determination module 302 is used to determine the operation state of the target switching module; wherein the target switching module is a switching module for forwarding data packets determined in advance according to the port address;

[0101] a backup module determination module 303 configured to, when it is determined based on the operating status that the target switching module does not meet the forwarding condition, determine the forwarding performance characteristics of a candidate backup switching module and determine a target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; wherein the candidate backup switching module is a switching module in the switching module other than the target switching module;

[0102] The forwarding module 304 is configured to trigger the target backup switching module to forward the data packet to be forwarded.

[0103] In this embodiment, when receiving a data packet to be forwarded, the operating status of the target switching module is determined. If the target switching module is determined to be faulty based on the operating status, a target backup switching module is determined from among the candidate backup switching modules based on their forwarding performance characteristics, triggering the target backup switching module to forward the data packet to be forwarded. When the target switching module fails, a backup switching module capable of forwarding the data packet is quickly determined, enabling reliable data packet forwarding, reducing data forwarding latency, and ensuring the performance of the entire data forwarding system.

[0104] In one embodiment, the forwarding performance characteristics include priority;

[0105] The backup module determination module includes:

[0106] A first priority determination submodule, configured to determine the priority of each candidate backup switching module;

[0107] The first backup module determining submodule is configured to determine the candidate backup switching module with the highest priority as the target backup switching module.

[0108] In one embodiment, the first priority determination submodule includes:

[0109] A parameter acquisition unit, used to acquire the transmission rate, packet forwarding rate and backplane bandwidth of each candidate backup switching module;

[0110] An indicator value determining unit, configured to determine a performance indicator value of each candidate backup switching module according to at least one of a transmission rate, a packet forwarding rate, and a backplane bandwidth;

[0111] The priority determination unit is configured to determine the priority of each candidate backup switching module according to the ranking of the performance indicator values.

[0112] In one embodiment, the forwarding performance characteristic includes a response time;

[0113] The backup module determination module includes:

[0114] The time acquisition submodule is configured to acquire a response time of each candidate backup switching module, wherein the response time is determined according to at least one of a number of to-be-forwarded data packets and a transmission rate of the candidate backup switching module.

[0115] The second backup module determination submodule is configured to determine a target backup switching module from the candidate backup switching modules according to the response time.

[0116] In an embodiment, the to-be-forwarded data packets are a plurality of data packets.

[0117] The backup module determination module comprises:

[0118] The number determination submodule is configured to determine a first number of the to-be-forwarded data packets.

[0119] The third backup module determination submodule is configured to determine a target backup switching module corresponding to the first number from the candidate backup switching modules according to the forwarding performance characteristics.

[0120] The forwarding module is further configured to trigger the target backup switching module to forward each to-be-forwarded data packet respectively.

[0121] In an embodiment, the forwarding module comprises:

[0122] The second priority determination submodule is configured to determine a priority of each to-be-forwarded data packet.

[0123] The forwarding submodule is configured to trigger the target backup switching module to forward each to-be-forwarded data packet according to the priority of each to-be-forwarded data packet.

[0124] In an embodiment, the data forwarding device further comprises:

[0125] The number determination module is configured to determine a second number of the candidate backup switching modules.

[0126] The data slicing module is configured to slice the to-be-forwarded data packets according to the second number to obtain a plurality of data slices, wherein each data slice carries a corresponding slicing order.

[0127] The data slice forwarding module is configured to trigger the candidate backup switching modules to forward the plurality of data slices respectively, so that a receiving end splices the plurality of data slices according to the slicing order to obtain the to-be-forwarded data packets.

[0128] The data forwarding device provided by the embodiments of the present application and the data forwarding method provided by any of the above embodiments belong to the same inventive concept, and have corresponding functions and beneficial effects.

[0129] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0130] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0131] In some embodiments, the data forwarding method can be implemented as a computer instruction, which is tangibly contained in a computer-readable storage medium. In some embodiments, part or all of the computer instructions can be loaded and / or installed on the switch module group via ROM and / or communication unit. When the computer instructions are loaded into RAM and executed by the processor, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform the data forwarding method by any other appropriate means (e.g., by means of firmware).

[0132] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer instructions that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] The computer instructions for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer instructions are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer instructions may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0134] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store computer instructions for use by or in combination with an instruction execution system, device or equipment. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0135] To provide interaction with a user, the systems and techniques described herein can be implemented on a switching module group having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the switching module group. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0136] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0137] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data forwarding method, characterized in that: The method comprises: Receive data packets to be forwarded; Determining the operating state of a target switching module; wherein the target switching module is a switching module for forwarding data packets that is predetermined based on a port address; When it is determined based on the operating state that the target switching module does not meet the forwarding condition, determining the forwarding performance characteristics of the candidate backup switching module, and determining the target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; wherein the candidate backup switching module is a switching module in the switching module other than the target switching module; Triggering the target backup switching module to forward the data packet to be forwarded; The forwarding performance characteristics include a response time; determining the forwarding performance characteristics of the candidate backup switching modules and determining a target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics includes: Obtaining a response time of each candidate backup switching module; wherein the response time is the quotient of the product of the transmission rate of the candidate backup switching module and the first coefficient, divided by the product of the number of packets to be forwarded and the second coefficient; determining a target backup switching module from the candidate backup switching modules based on the response time; Also includes: Determining a second number of the backup switching modules to be selected; Slicing the data packet to be forwarded according to the second number to obtain a plurality of data slices; wherein each data slice carries a corresponding slice order; Triggering the selected backup switching module to forward the multiple data slices respectively, so that the receiving end splices the multiple data slices according to the fragmentation order to obtain the data packet to be forwarded; The data packets to be forwarded are unevenly fragmented, including: obtaining a data forwarding threshold value pre-set by each backup switching module to be selected, and fragmenting the data packets to be forwarded according to the data forwarding threshold value, or determining the remaining data forwarding amount of each backup switching module to be selected, and fragmenting the data packets to be forwarded according to the remaining data forwarding amount of each backup switching module to be selected.

2. The method according to claim 1, characterized in that The forwarding performance characteristics include priority; The determining of the forwarding performance characteristics of the candidate backup switching modules and determining the target backup switching module from the candidate backup switching modules according to the forwarding performance characteristics includes: Determine the priority of each candidate backup switch module; The candidate backup switching module with the highest priority is determined as the target backup switching module.

3. The method according to claim 2, characterized in that Determining the priority of each candidate backup switching module includes: Obtain the transmission rate, packet forwarding rate, and backplane bandwidth of each candidate backup switching module; Determine the performance index value of each candidate backup switching module according to at least one of the transmission rate, packet forwarding rate and backplane bandwidth; The priority of each candidate backup switching module is determined according to the ranking of the performance indicator values.

4. The method according to any one of claims 1 to 3, characterized in that There are multiple data packets to be forwarded; The determining of a target backup switching module from the candidate backup switching modules according to the forwarding performance characteristics includes: Determining a first number of the data packets to be forwarded; Determine, from the candidate backup switching modules, target backup switching modules corresponding to the first quantity according to the forwarding performance characteristics; The triggering the target backup switching module to forward the data packet to be forwarded includes: The target backup switching module is triggered to forward each data packet to be forwarded respectively.

5. The method according to any one of claims 1 to 3, characterized in that There are multiple data packets to be forwarded; Determine the priority of each data packet to be forwarded; According to the priority of each data packet to be forwarded, the target backup switching module is triggered to forward the corresponding data packets to be forwarded one by one.

6. A data forwarding device, characterized in that: The device comprises: A data packet receiving module, configured to receive data packets to be forwarded; An operation status determination module, configured to determine the operation status of a target switching module; wherein the target switching module is a switching module for forwarding data packets that is predetermined based on a port address; a backup module determining module, configured to, when it is determined based on the operating status that the target switching module does not meet the forwarding condition, determine the forwarding performance characteristics of the candidate backup switching module, and determine the target backup switching module from the candidate backup switching modules based on the forwarding performance characteristics; wherein the candidate backup switching module is a switching module in the switching module other than the target switching module; A forwarding module, configured to trigger the target backup switching module to forward the data packet to be forwarded; The forwarding performance characteristic includes a response time; the backup module determination module includes: A time acquisition submodule, configured to acquire the available response time of each candidate backup switching module; wherein the available response time is the quotient of the product of the transmission rate of the candidate backup switching module and the first coefficient, divided by the product of the number of packets to be forwarded and the second coefficient; A second backup module determination submodule, configured to determine a target backup switching module from among the candidate backup switching modules according to the available response time; Also includes: A quantity determination module, configured to determine a second quantity of the backup switching modules to be selected; a data fragmentation module, configured to fragment the data packet to be forwarded according to the second number to obtain a plurality of data fragments; wherein each data fragment carries a corresponding fragmentation order; a data slice forwarding module, configured to trigger the selected backup switching module to respectively forward the multiple data slices, so that the receiving end splices the multiple data slices according to the fragmentation order to obtain the data packet to be forwarded; The data packets to be forwarded are unevenly fragmented, including: obtaining a data forwarding threshold value pre-set by each backup switching module to be selected, and fragmenting the data packets to be forwarded according to the data forwarding threshold value, or determining the remaining data forwarding amount of each backup switching module to be selected, and fragmenting the data packets to be forwarded according to the remaining data forwarding amount of each backup switching module to be selected.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the steps of the method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Multicast switching method and device, network equipment and storage medium

    CN111901133A