Flow control method, electronic device, storage medium and program product
By obtaining the number of undisconnected links in the data center network and controlling the traffic transmission rate, the traffic congestion caused by link failure is solved and bandwidth utilization is improved.
Patent Information
- Application Number
- CN202510621128.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-07-18
AI Technical Summary
In data center networks, due to link failure, the switch is asymmetric, causing traffic congestion.
When partial links between the backbone layer core switch and the leaf layer receiving switch are disconnected, the number of undisconnected links is obtained, and the traffic transmission rate is controlled according to the number of links between the sending switch and the core switch to avoid traffic congestion.
It effectively avoids congestion during traffic transmission and improves bandwidth utilization.
Smart Images

Figure CN120342965A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of data center networks, and particularly relates to a traffic control method, an electronic device, a storage medium, and a program product. Background Art
[0002] With the development of intelligent computing technology, more and more research shows that the capabilities of artificial intelligence (AI) training will emerge only when it reaches a certain scale. Driven by the expansion law and emerging capabilities of large AI models, the parameter scale of large AI models is getting larger and larger. There have already been multiple trillion-parameter models in the industry, and a hundred-trillion-parameter model is also expected to emerge in the near future.
[0003] Large-scale intelligent computing clusters require high-performance data center networks to ensure the communication efficiency, data throughput, and computing power performance of the entire intelligent computing cluster among intelligent computing nodes. This poses new challenges to data center networks. When link failures such as optical module failures, switch port failures, or fiber optic link disconnections occur in the data center network, it will result in an asymmetric situation of the uplink and downlink of the switch, thereby causing traffic congestion problems at the switch egress port. Summary of the Invention
[0004] Embodiments of this application provide a traffic control method, an electronic device, a storage medium, and a program product, which can solve the problem of traffic congestion during traffic transmission.
[0005] In a first aspect, embodiments of this application provide a traffic control method, which includes: when a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer is disconnected, obtaining a first quantity of the non-disconnected links between the core switch and the receiving switch; controlling the traffic transmission rate between the sending switch and the core switch according to a second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity, and the traffic sent by the sending switch is transmitted to the receiving switch through the core switch.
[0006] In a second aspect, embodiments of this application provide a traffic control device, which includes: an obtaining module, configured to obtain a first quantity of the non-disconnected links between the core switch and the receiving switch when a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer is disconnected; a transmission module, configured to control the traffic transmission rate between the sending switch and the core switch according to a second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity, and the traffic sent by the sending switch is transmitted to the receiving switch through the core switch.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor. When the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instructions are stored. When the program or instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to execute the steps of the method described in the first aspect.
[0010] In the embodiment of the present application, when a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer is disconnected, the first number of the non-disconnected links between the core switch and the receiving switch is obtained; according to the second number of the links between the core switch and the sending switch in the leaf layer and the first number, the traffic transmission rate between the sending switch and the core switch is controlled. The traffic sent by the sending switch is transmitted to the receiving switch through the core switch, and the traffic transmission rate between the sending switch and the core switch can be controlled when there is no partial link between the core switch and the receiving switch, avoiding traffic congestion during the traffic transmission process and improving the bandwidth utilization rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a flowchart of a traffic control method provided by an embodiment of the present application; Figure 2 is a schematic diagram of a Spine-Leaf structure provided by an embodiment of the present application; Figure 3 is a schematic diagram of traffic control provided by an embodiment of the present application; Figure 4 is a schematic diagram of the structure of a traffic control device provided by an embodiment of the present application; Figure 5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0012] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
[0013] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.
[0014] Next, in conjunction with the accompanying drawings, a traffic control method, an electronic device, a storage medium, and a program product provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0015] Figure 1 A traffic control method provided by an embodiment of the present application is shown. The method includes the following steps: Step S102: When a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer is disconnected, obtain the first quantity of the non-disconnected links between the core switch and the receiving switch.
[0016] The embodiment of the present application is applied to a data network center with a Spine-Leaf architecture. The Spine-Leaf architecture is a data center network topology composed of two switching layers, Spine and Leaf. The Leaf layer consists of switches that aggregate traffic from servers and are directly connected to the Spine or the network core. The Spine switches interconnect all Leaf switches in a full-mesh topology. When link failures such as optical module failures, switch port failures, or fiber optic link disconnections occur in the data network center with a Spine-Leaf architecture, it will cause a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer to be disconnected. In the embodiment of the present application, when a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer is disconnected, the first quantity of the non-disconnected links between the core switch and the receiving switch can be obtained.
[0017] In one implementation, obtaining the first quantity of the non-disconnected links between the core switch and the receiving switch includes: setting the core switch and the receiving switch as a load sharing group; setting a unique number for each link in the load sharing group; and obtaining the first quantity according to the unique number.
[0018] In the embodiments of the present application, each switch in the leaf layer (Leaf) of the data center network and its BGP neighbor can be set as the same load sharing group first. In the data center network, each switch in the leaf layer is connected to the switch in the backbone layer (Spine) through the BGP protocol. Each switch in the Leaf layer belongs to a "load sharing group" (which can be understood as a set composed of multiple links) on the Spine, that is, the switch on the Spine and the switch on the leaf are BGP neighbors to each other. BGP (Border Gateway Protocol) is a path vector routing protocol used to exchange routing information between different autonomous systems (AS). It is the basic protocol for the core routing of the current Internet and is responsible for coordinating the selection of traffic transmission paths between various networks in the global Internet.
[0019] Since in a traffic transmission process, the switches in the leaf layer can be divided into receiving switches for receiving traffic and sending switches for sending traffic, in the traffic transmission process, the core switch in the backbone layer (Spine) and the sending switch for sending traffic can be set as the same load sharing group. The core switch and the receiving switch for receiving traffic are set as the same load sharing group.
[0020] In the same load sharing group, a unique number can be automatically assigned to each BGP neighbor member (link) in the normal state (UP). The number value can range from 1 to the total number N of links in the normal state in the load sharing group, as follows Figure 2 As shown, the core switch Spine1 in the Spine layer forms a load sharing group with Leaf1, Leaf2, and Leaf3 in the Leaf layer respectively. Spine2 can also form a load sharing group with Leaf1, Leaf2, and Leaf3 in the Leaf layer respectively. Each load group has 2 links numbered 1 and 2. Among them, Leaf1 can be a sending switch and Leaf2 can be a receiving switch.
[0021] For the traffic transmission process where traffic is transmitted from the sending switch to the receiving switch, relative to the core switch, the next-hop path of the route comes from the same load-sharing group. At this time, if some links between the core switch and the receiving switch are disconnected, that is, when the existing member neighbors of the load-sharing group are disconnected, the first quantity of the non-disconnected links between the core switch and the receiving switch can be obtained according to the link numbers in the load-sharing group.
[0022] Step S104: Control the traffic transmission rate between the sending switch and the core switch according to the second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity.
[0023] In the embodiment of the present application, the traffic sent by the sending switch is transmitted to the receiving switch through the core switch. Therefore, the embodiment of the present application can obtain the second quantity of the links between the core switch and the sending switch in the leaf layer, and then control the traffic transmission rate between the sending switch and the core switch according to the above first quantity and the second quantity. In the embodiment of the present application, the links between the sending switch and the core switch are all in a normal state.
[0024] In one implementation manner, the controlling the traffic transmission rate between the sending switch and the core switch according to the second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity includes: when the second quantity is greater than the first quantity, obtain the ratio between the second quantity and the first quantity, and reduce the traffic transmission rate between the sending switch and the core switch.
[0025] After obtaining the first quantity of the non-disconnected links between the core switch and the receiving switch and the second quantity of the links between the core switch and the sending switch in the leaf layer, the first quantity and the second quantity can be compared. If the second quantity is greater than the first quantity, it means that the number of normal links between the core switch and the sending switch is more than the number of links between the core switch and the receiving switch. Since there are some links disconnected between the core switch and the receiving switch, if the traffic transmission rate between the sending switch and the core switch is not reduced at this time, traffic congestion will occur when the core switch forwards the traffic to the receiving switch.
[0026] Therefore, in the embodiment of the present application, if it is determined that the second quantity of the links between the core switch and the sending switch is greater than the first quantity of the non-disconnected links between the core switch and the receiving switch, the traffic transmission rate between the sending switch and the core switch can be reduced according to the ratio between the second quantity and the first quantity, so that the traffic is transmitted from the sending switch to the core switch.
[0027] For exampleFigure 3 As shown, the traffic flows out from the sending switch Leaf1, is forwarded by the core switch Spine1 to the receiving switch Leaf2. At this time, the number of links between the sending switch Leaf1 and the core switch Spine1 is 2, and the number of links between the core switch Spine1 and the receiving switch Leaf2 is also two. However, since one link between the core switch Spine1 and the receiving switch Leaf2 is disconnected, the first number of the non-disconnected links between the core switch Spine1 and the receiving switch Leaf2 is 1. Then, at this time, the routing ratio of the traffic going to the receiving switch Leaf2 through the core switch Spine1 can be reduced, that is, the traffic transmission rate between the sending switch Leaf1 and the core switch Spine1 can be reduced. The traffic transmission rate between the sending switch Leaf1 and the core switch Spine1 can be reduced to 1 / 2 of the initial rate according to the ratio of the second number to the first number.
[0028] The traffic control method provided by the embodiments of the present application, when some links between the core switch in the backbone layer and the receiving switch in the leaf layer are disconnected, obtains the first number of the non-disconnected links between the core switch and the receiving switch; controls the traffic transmission rate between the sending switch and the core switch according to the second number and the first number of the links between the core switch and the sending switch in the leaf layer. The traffic sent by the sending switch is transmitted to the receiving switch through the core switch, and can combine the number of the non-disconnected links between the core switch and the sending switch and the receiving switch respectively to control the traffic transmission rate, intelligently share the proportional traffic to different switch devices, prevent the egress traffic congestion of the switch devices, and improve the utilization rate of the bandwidth.
[0029] In one implementation, the controlling the traffic transmission rate between the sending switch and the core switch according to the second number and the first number of the links between the core switch and the sending switch in the leaf layer includes: when the second number is less than or equal to the first number, controlling the traffic transmission rate between the sending switch and the core switch to remain unchanged.
[0030] In the embodiments of the present application, when some links between the core switch and the receiving switch are disconnected, if it is obtained that the second number of the links between the core switch and the sending switch is less than or equal to the first number of the non-disconnected links between the core switch and the receiving switch, it means that after the traffic sent by the sending switch reaches the core switch, there are still enough links to forward the traffic to the receiving switch. At this time, the core switch will not have traffic congestion either. Therefore, the traffic transmission rate between the sending switch and the core switch can be controlled to remain unchanged to ensure the stable transmission of the traffic.
[0031] In one implementation, reducing the traffic transmission rate between the sending switch and the core switch includes: controlling the core switch to send a low-priority route to the sending switch to control the sending switch to reduce the traffic transmission rate between it and the core switch.
[0032] In the embodiment of the present application, when a part of the link between the core switch and the receiving switch is disconnected, if the second number of links between the core switch and the sending switch obtained is greater than the first number of non-disconnected links between the core switch and the receiving switch, the core switch can be controlled to send a low-priority route to the sending switch to inform the sending switch to reduce the traffic transmission rate between it and the core switch. The low-priority route can be a route with a lower local pref value, or a route with a higher med attribute value or other implementation manners. In this way, the traffic transmission rate can be controlled by combining the number of non-disconnected links between the core switch and the sending switch and the receiving switch respectively, and the proportional traffic can be intelligently shared to different switch devices, preventing the egress traffic congestion of the switch devices and improving the utilization rate of the bandwidth.
[0033] In one implementation, keeping the traffic transmission rate between the sending switch and the core switch unchanged includes: controlling the core switch to send a normal route to the sending switch to control the traffic transmission rate between the sending switch and the core switch to remain unchanged.
[0034] In the embodiment of the present application, when a part of the link between the core switch and the receiving switch is disconnected, if the second number of links between the core switch and the sending switch obtained is less than or equal to the first number of non-disconnected links between the core switch and the receiving switch, the core switch can be controlled to send a normal route to the sending switch to inform the sending switch to keep the traffic transmission rate between it and the core switch unchanged and ensure the stable traffic transmission.
[0035] In one implementation, after obtaining the first number of non-disconnected links between the core switch and the receiving switch, it further includes: controlling the traffic transmission rate between the sending switch and other core switches in the backbone layer except the core switch to remain unchanged.
[0036] In the embodiment of the present application, the sending switch can also transmit the traffic to the receiving switch through other core switches in the backbone layer except the core switch, such as Figure 3As shown in the figure, the sending switch Leaf1 can also transmit traffic to the receiving switch Leaf2 through another core switch Spine2. Therefore, when the traffic transmission rate between the sending switch and the core switch is reduced, since the traffic transmission link of Leaf1-Spine2-Leaf2 is not affected, the traffic transmission rate of the traffic transmission link of Leaf1-Spine2-Leaf2 does not need to be changed. Figure 3 As shown in the figure, the ratio of the traffic transmission rate between the sending switch Leaf1 and the core switch Spine1 to the traffic transmission rate between the sending switch Leaf1 and the other core switch Spine2 is 1:2. In this way, it is ensured that there will be no traffic congestion on the Leaf1-Spine2-Leaf2 link, and the traffic transmission efficiency between the switch and other core switches is also guaranteed.
[0037] In the embodiments of the present application, Figure 3 As shown in the figure, when one link (part of the link) between Spine1 and Leaf2 is disconnected, Spine1 notifies Leaf1 of the low-priority route, allowing Leaf1 to share the traffic to the server connected to Leaf2 with Spine1 and Spine2 in a 1:2 ratio, so that the traffic egress from Spine1 to Leaf2 will not be congested. In the event of a link failure between a Leaf switch and a Spine switch, the overall bandwidth utilization of traffic from Leaf1 to Leaf2 via Spine1 / Spine2 is increased from 1 / 2 to 3 / 4, and this effect increases as the number of Spine switches increases (from 3 / 6 to 5 / 6 when there are 3 Spine switches; from 4 / 8 to 7 / 8 when there are 4 Spine switches, and so on).
[0038] It should be noted that the flow control method provided in the embodiment of the present application can be executed by a flow control device or a control module in the flow control device for executing the flow control method. In the embodiment of the present application, the flow control device provided in the embodiment of the present application is described by taking the flow control method executed by the flow control device as an example.
[0039] Figure 4 Schematic diagram of the structure of the flow control device according to the embodiment of the present application. Figure 4 As shown, the flow control device 400 includes: an acquisition module 410 and a transmission module 420 .
[0040] An obtaining module 410 is configured to obtain a first quantity of the non-disconnected links between the core switch in the backbone layer and the receiving switch in the leaf layer when a part of the links between the core switch and the receiving switch are disconnected; a transmitting module 420 is configured to control a traffic transmission rate between the transmitting switch and the core switch according to a second quantity of the links between the core switch and the transmitting switch in the leaf layer and the first quantity, and the traffic sent by the transmitting switch is transmitted to the receiving switch through the core switch.
[0041] In one implementation manner, the transmitting module 420 is configured to, when the second quantity is greater than the first quantity, obtain a ratio between the second quantity and the first quantity, and reduce the traffic transmission rate between the transmitting switch and the core switch.
[0042] In one implementation manner, the transmitting module 420 is configured to, when the second quantity is less than or equal to the first quantity, control the traffic transmission rate between the transmitting switch and the core switch to remain unchanged.
[0043] In one implementation manner, the transmitting module 420 is configured to control the core switch to send a low-priority route to the transmitting switch to control the transmitting switch to reduce the traffic transmission rate between the transmitting switch and the core switch.
[0044] In one implementation manner, the obtaining module 410 is configured to set the core switch and the receiving switch as a load sharing group; set a unique number for each link in the load sharing group; and obtain the first quantity according to the unique number.
[0045] In one implementation manner, the transmitting module 420 is configured to control the core switch to send a normal route to the transmitting switch to control the traffic transmission rate between the transmitting switch and the core switch to remain unchanged.
[0046] In one implementation manner, the transmitting module 420 is configured to control the traffic transmission rate between the transmitting switch and other core switches except the core switch in the backbone layer to remain unchanged.
[0047] The traffic control device in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0048] The traffic control device in the embodiments of the present application can be a device with an operating system. The operating system can be the Android operating system, the iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0049] The traffic control device provided in the embodiments of the present application can implement Figures 1 to 3 each process implemented by the method embodiments. To avoid repetition, it will not be elaborated here.
[0050] As Figure 5 shown, another embodiment of the present application provides an electronic device 500, including a processor 501 and a memory 502. A program or instruction that can run on the processor 501 is stored on the memory 502. When the program or instruction is executed by the processor 501, it realizes: when a part of the link between the core switch in the backbone layer and the receiving switch in the leaf layer is disconnected, obtaining a first number of the non-disconnected links between the core switch and the receiving switch; controlling a traffic transmission rate between the sending switch and the core switch according to a second number of the links between the core switch and the sending switch in the leaf layer and the first number, and the traffic sent by the sending switch is transmitted to the receiving switch through the core switch.
[0051] In one implementation, when the second number is greater than the first number, obtaining a ratio between the second number and the first number, and reducing the traffic transmission rate between the sending switch and the core switch.
[0052] In one implementation, when the second quantity is less than or equal to the first quantity, the traffic transmission rate between the sending switch and the core switch is controlled to remain unchanged.
[0053] In one implementation, the core switch is controlled to send a low-priority route to the sending switch to control the sending switch to reduce the traffic transmission rate between the sending switch and the core switch.
[0054] In one implementation, the core switch and the receiving switch are set as a load-sharing group; a unique number is set for each link in the load-sharing group; and the first quantity is obtained according to the unique number.
[0055] In one implementation, the core switch is controlled to send a normal route to the sending switch to control the traffic transmission rate between the sending switch and the core switch to remain unchanged.
[0056] In one implementation, after obtaining the first quantity of the non-disconnected links between the core switch and the receiving switch, the traffic transmission rate between the sending switch and other core switches in the backbone layer except the core switch is controlled to remain unchanged.
[0057] For the specific implementation steps, reference may be made to the steps of the above-mentioned traffic control method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described here.
[0058] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices other than terminals.
[0059] The above electronic device structure does not limit the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. For example, the input unit may include a Graphics Processing Unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes at least one of a touch panel and other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described here in detail.
[0060] The memory can be used to store software programs and various data. The memory mainly includes a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area can store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory can include volatile memory or non-volatile memory, or the memory can include both volatile and non-volatile memory. Among them, the non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a SynchLink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM).
[0061] The processor can include one or more processing units; optionally, the processor integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor either.
[0062] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, it realizes each process of the above embodiment of the traffic control method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0063] Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as ROM, RAM, a magnetic disk, or an optical disc, etc.
[0064] The embodiment of the present application further provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer is enabled to execute each process of the embodiment of the above-mentioned traffic control method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0065] It should be noted that in this document, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0066] Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for enabling a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0067] The embodiments of the present application have been described above with reference to the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them fall within the protection scope of the present application.
Claims
1. A flow control method, characterized in that, Including: When a part of the links between the core switch in the backbone layer and the receiving switch in the leaf layer are disconnected, obtaining a first quantity of the non-disconnected links between the core switch and the receiving switch; Controlling a traffic transmission rate between the sending switch and the core switch according to a second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity, and the traffic sent by the sending switch is transmitted to the receiving switch through the core switch.
2. The method according to claim 1, wherein The controlling the traffic transmission rate between the sending switch and the core switch according to the second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity includes: When the second quantity is greater than the first quantity, obtaining a ratio between the second quantity and the first quantity, and reducing the traffic transmission rate between the sending switch and the core switch.
3. The method according to claim 1, wherein The controlling the traffic transmission rate between the sending switch and the core switch according to the second quantity of the links between the core switch and the sending switch in the leaf layer and the first quantity includes: When the second quantity is less than or equal to the first quantity, controlling the traffic transmission rate between the sending switch and the core switch to remain unchanged.
4. The method according to claim 2, wherein The reducing the traffic transmission rate between the sending switch and the core switch includes: Controlling the core switch to send a low-priority route to the sending switch to control the sending switch to reduce the traffic transmission rate between the sending switch and the core switch.
5. The method according to claim 1, wherein The obtaining the first quantity of the non-disconnected links between the core switch and the receiving switch includes: Setting the core switch and the receiving switch as a load-sharing group; Setting a unique number for each link in the load-sharing group; Obtaining the first quantity according to the unique number.
6. The method according to claim 3, wherein The controlling the traffic transmission rate between the sending switch and the core switch to remain unchanged includes: Controlling the core switch to send a normal route to the sending switch to control the traffic transmission rate between the sending switch and the core switch to remain unchanged.
7. The method according to claim 1, wherein After the obtaining the first quantity of the non-disconnected links between the core switch and the receiving switch, further including: Controlling the traffic transmission rate between the sending switch and other core switches in the backbone layer except the core switch to remain unchanged.
8. An electronic device, characterized in that, Including a processor, a memory, and a program or instruction stored on the memory and executable on the processor, and when the program or instruction is executed by the processor, implementing the steps of the traffic control method according to any one of claims 1-7.
9. A readable storage medium, characterized in that, A program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, implementing the steps of the traffic control method according to any one of claims 1-7.
10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the steps of the traffic control method according to any one of claims 1-7.