Congestion processing method and device, switch equipment, medium and program product
By monitoring the growth rate of the cache area occupation in the switch device and sending back-pressure frames to upstream devices, the traffic discarding problem caused by network congestion in data transmission between financial enterprise devices is solved, and the accuracy of data transmission and network performance are improved.
Patent Information
- Application Number
- CN202510163918.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-13
AI Technical Summary
When long-distance data transmission between financial enterprises such as banks in the same city, if network congestion occurs and PFC is used, some of the traffic transmitted in transit may be discarded, resulting in damage to transmission services and reducing the accuracy of data transmission and the performance of the transmission network.
By implementing a congestion processing method in the switch device, the current and historical footprint of the cache area is obtained and the current footprint growth rate is calculated. If the growth rate exceeds the historical average rate, a back-pressure frame is sent to the upstream device to pause data transmission and ensure that the buffer area has enough space to store the traffic in transit.
It effectively avoids the discarding of on-transit transmission traffic, ensures the security of transmission services between the equipment of the same city financial enterprise, and improves the accuracy of data transmission and the performance of the transmission network.
Smart Images

Figure CN119996317A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a congestion handling method, apparatus, switch equipment, medium and program product. Background Art
[0002] For the basic Remote Direct Memory Access (RDMA) network that supports end-to-end transmission, such as the RDMA network required for long-distance transmission of services between devices of financial enterprises such as banks in the same city, if network congestion occurs when the upstream device sends data to the downstream device through the switch, the transmission message will be cached in the buffer at the entrance of the switch device and wait for forwarding. The larger the buffer is, the longer the message is cached, and the low latency requirement cannot be met.
[0003] Currently, priority-based flow control (PFC) is used to avoid excessive buffer size. PFC allows the data transmission of any virtual channel in the network to be suspended individually. When the buffer consumption reaches the set PFC control threshold, the switch will be triggered to send the back pressure frame in the reverse direction to the upstream device to suspend the data transmission of the priority queue.
[0004] However, in the scenario where long-distance data transmission is performed between devices of financial enterprises such as banks in the same city, when a large amount of data is transmitted over long distances, if congestion occurs and PFC takes effect, some of the traffic being transmitted in transit may be discarded, thereby causing damage to the transmission business between the devices of financial enterprises such as banks in the same city, reducing the accuracy of data transmission and the transmission performance of the transmission network. Summary of the invention
[0005] The present application provides a congestion handling method, apparatus, switch equipment, medium and program product to solve the problem that when a large amount of data is transmitted over a long distance in the prior art, if congestion occurs and PFC takes effect, part of the traffic transmitted in transit may be discarded, thereby causing damage to the transmission business between the equipment of financial enterprises such as banks in the same city, reducing the accuracy of data transmission and the transmission performance of the transmission network.
[0006] In a first aspect, the present application provides a congestion processing method, which is applied to a switch device, and the method includes:
[0007] Obtaining the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval;
[0008] Determine a current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval;
[0009] If the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of a preset time interval is sent to the upstream device, so that the upstream device suspends sending data during the preset time interval.
[0010] In a second aspect, the present application provides a congestion processing device, which is configured in a switch device, and the device includes:
[0011] An acquisition module, used to acquire the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval;
[0012] A rate determination module, configured to determine a current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval;
[0013] The sending module is used to send a back pressure frame with a duration of a preset time interval to the upstream device if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, so that the upstream device suspends sending data during the preset time interval.
[0014] In a third aspect, the present application provides a switch device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the congestion handling method as described in any embodiment of the present application is implemented.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the congestion handling method as described in any embodiment of the present application.
[0016] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the congestion handling method as described in any embodiment of the present application.
[0017] The scheme of the present application obtains the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval; the current occupancy growth rate of the cache area is determined according to the occupied space at the current moment, the occupied space at the first historical moment and the preset time interval; if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of the preset time interval is sent to the upstream device, so that the upstream device suspends data transmission during the preset time interval. That is, the scheme of the present application, when it is determined that a large amount of data is to be sent at the current moment according to the current occupancy growth rate of the cache area and the historical occupancy growth rate at the first historical moment, sends a back pressure frame in advance to suspend the data transmission of the upstream device, so that there is space in the cache area at this time to store the in-transit transmission traffic, thereby avoiding the situation where the in-transit transmission traffic is discarded, ensuring the transmission business security between the devices of financial enterprises such as banks in the same city, and thus improving the accuracy of data transmission and the transmission performance of the transmission network. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flowchart of the congestion handling method provided by this application;
[0020] Figure 2 is another flow chart of the congestion handling method provided by the present application;
[0021] Figure 3 It is a structural schematic diagram of the congestion processing device provided by the present application;
[0022] Figure 4 It is a structural diagram of the switch device provided in this application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] Before describing the embodiments of the present application, some technical means of the present application are introduced:
[0025] RDMA technology is a network communication technology that was created to solve the delay in server-side data processing during network transmission. It allows servers or computers to directly access the memory of remote hosts, thereby reducing internal network delays in equipment of financial enterprises such as banks and improving processing efficiency.
[0026] PFC is a queue-based back pressure mechanism that prevents buffer overflow and packet loss by sending a Pause frame to notify the upstream device to suspend packet transmission. PFC allows the data transmission of any virtual channel queue in the network to be suspended individually. After PFC is triggered, the local switch triggers the PFC Pause frame of the congested queue and sends it back to the upstream device. The upstream device that receives the Pause frame will suspend the transmission of the queue message, thereby avoiding data packet loss by reducing the transmission rate of the priority queue. When the buffer occupancy is reduced to the transmission recovery threshold, a PFC release message will be sent to enable the upstream device to resend the queue message.
[0027] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0028] Figure 1 The present invention provides a flow chart of a congestion handling method, which can be executed by a congestion handling device, which can be implemented in software and / or hardware. In a specific embodiment, the device can be applied to a switch device, which can be a switch. The following embodiments will be described by taking the application of the device in a switch device as an example, referring to Figure 1 , the method may specifically include the following steps:
[0029] Step 101: Obtain the occupied space of the buffer area at the entrance of the switch device at the current moment and the occupied space at the first historical moment.
[0030] Among them, the time interval between the current moment and the first historical moment is the preset time interval.
[0031] Specifically, in data transmission, the switch has an inlet and an outlet, the inlet of the switch is connected to the upstream device, and the outlet of the switch is connected to the downstream device. A buffer is set at the inlet of the switch device. When network congestion occurs, the data sent by the upstream device to the inlet of the switch will be stored in the buffer. The occupied space of the buffer is the space occupied in the memory of the buffer. The first historical moment is a moment before the current moment, and the time interval with the current moment is a preset time interval. The occupied space of the buffer at the inlet of the switch device at the current moment and the occupied space of the buffer at the first historical moment are obtained. The acquisition of the occupied space of the buffer can be realized by a collection unit in the switch device that is pre-set, and the occupied space of the buffer is collected once every preset time interval. Therefore, the occupied space collected at the current moment is the occupied space of the buffer at the inlet of the switch device at the current moment, and the occupied space collected at the first historical moment is the occupied space of the buffer at the inlet of the switch device at the first historical moment.
[0032] Step 102, determining a current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and a preset time interval.
[0033] Specifically, according to the difference between the occupied space at the current moment and the occupied space at the first historical moment, and the preset time interval, the growth rate of the occupied space within the preset time interval can be determined.
[0034] For example, the size of the cache is 4 kilobits (kb), the occupied space at the current moment is 50% of the cache, i.e., 2 kb, the occupied space at the first historical moment is 35% of the cache, i.e., 1.4 kb, and the preset time interval is 10 microseconds (μs). Therefore, it is determined that the current occupancy growth rate of the cache is 0.06 kilobits per microsecond (kb / μs).
[0035] Optionally, after step 102, steps 21 and 22 may also be performed.
[0036] Step 21, obtaining the occupied space of the second historical moment.
[0037] The second historical moment is a moment before the first historical moment, and the time interval between the second historical moment and the first historical moment is a preset time interval.
[0038] Specifically, the occupied space of the cache area at the second historical moment is obtained. The second historical moment is a moment before the first historical moment, and the time interval between the second historical moment and the first historical moment is a preset time interval. Exemplarily, the second historical moment is a moment 10 μs before the first historical moment.
[0039] Step 22, determining the historical occupancy growth rate of the first historical moment according to the occupied space at the second historical moment, the occupied space at the first historical moment, and a preset time interval.
[0040] Specifically, according to the difference between the occupied space at the first historical moment and the occupied space at the second historical moment, and the preset time interval, the growth rate of the occupied space within the preset time interval between the second historical moment and the first historical moment can be determined. The historical occupancy growth rate at the first historical moment is calculated, which can provide a data basis for the subsequent step of determining that a large amount of data is sent at the current moment according to the current occupancy growth rate and the historical occupancy growth rate.
[0041] For example, the size of the cache area is 4kb, the occupied space at the first historical moment is 35% of the cache area, that is, the occupied space size is 1.4kb, the occupied space at the second historical moment is 30% of the cache area, that is, the occupied space size is 1.2kb, and the preset time interval is 10μs. Therefore, it is determined that the current occupancy growth rate of the cache area is 0.02kb / μs.
[0042] Optionally, before executing step 103 , step 31 may also be executed.
[0043] Step 31: If the current occupancy growth rate is less than or equal to the historical occupancy growth rate, a back pressure frame having a duration of a first preset duration is sent to the upstream device, so that the upstream device continues to send data.
[0044] Among them, the first preset duration is 0.
[0045] Specifically, if the current occupancy growth rate is less than or equal to the historical occupancy growth rate, it means that the increase rate of the occupied memory of the cache area has not increased, indicating that no congestion has occurred. At this time, a back pressure frame with a duration of 0 is sent to the upstream device to enable the upstream device to continue to send data, thereby avoiding data interruption.
[0046] Step 103: If the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of a preset time interval is sent to the upstream device, so that the upstream device suspends sending data during the preset time interval.
[0047] Specifically, if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, it means that the rate of increase of the occupied memory of the cache area is increasing, indicating that a large amount of data has been sent from the first historical moment to the current moment and congestion has occurred in the data transmission. Therefore, when it is determined through the current occupancy growth rate and the historical occupancy growth rate at the first historical moment that a large amount of data has been sent at the current moment and congestion has occurred in the data transmission, a back pressure frame with a duration of a preset time interval is sent to the upstream device so that the upstream device suspends sending data during the preset time interval. The upstream device will stop transmitting data when receiving the back pressure frame, but the upstream device will still send data during the time from the switch device sending the back pressure frame to the upstream device until the upstream device receives the back pressure frame. This part of the data is in-transit data and still requires space to store. In long-distance transmission, the data sent by the upstream device is large. If the back pressure frame is sent only when the space occupied by the cache area reaches the occupancy threshold, it may result in insufficient space in the cache area to store the above-mentioned in-transit data, thereby causing the loss of in-transit traffic. Therefore, the method of this embodiment does not need to send back pressure frames to the upstream device when the occupied space in the cache area reaches the occupancy threshold, so that the back pressure frame can be sent in advance to suspend the data transmission of the upstream device, so that there is space in the cache area to store the in-transit transmission traffic, thereby avoiding the discard of the in-transit transmission traffic and ensuring the security of transmission services between devices of financial enterprises such as banks in the same city.
[0048] The purpose of making the upstream device suspend sending data only during the preset time interval is to make the upstream device suspend sending data only after the current moment when it is determined that there is a large amount of data to be sent and congestion has occurred in the data transmission. If the occupancy growth rate of the next moment after the current moment and at the next moment separated by a preset time interval from the current moment is less than the current occupancy growth rate, it means that the data transmission has returned to normal. At this time, stop sending back pressure frames to the upstream device or send back pressure frames with a duration of 0, so that the suspension time of the upstream device ends, and the upstream device can resume data transmission at the next moment, thereby avoiding the occurrence of data interruption and improving the transmission performance of the transmission network.
[0049] Optionally, after executing step 103, step 32 may also be executed.
[0050] Step 32: If the current occupied space is greater than the preset occupied space threshold, a back pressure frame with a duration of a second preset duration is sent to the upstream device, so that the upstream device stops sending data within the second preset duration.
[0051] The second preset duration is greater than the preset time interval.
[0052] Specifically, the preset occupied space threshold is the threshold at which the space occupied in the preset buffer area reaches the threshold that causes the upstream device to stop sending data. For example, the preset occupied space threshold may be that 80% of the area of the buffer area is occupied. When the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, and the current occupied space is greater than the preset occupied space threshold, it may be because the data transmission volume is large, causing the current occupied space to exceed the preset occupied space threshold. At this time, a back pressure frame with a duration of a second preset duration greater than the preset time interval is sent to the upstream device, so that the upstream device suspends sending data within the second preset duration. Thereby increasing the transmission suspension time of the upstream device to avoid the situation where the upstream device continues to send data when there is not enough storage space in the buffer area. When the current occupancy growth rate is less than or equal to the historical occupancy growth rate at the first historical moment, and the current occupied space is greater than the preset occupied space threshold, it may be because the data transmission has returned to normal but the current occupied space still exceeds the preset occupied space threshold, and there is still not enough storage space in the buffer area. At this time, a back pressure frame with a duration of a second preset duration greater than the preset time interval is sent to the upstream device, so that the upstream device suspends sending data within the second preset duration. Thereby further avoiding the situation where the upstream device continues to send data when there is not enough storage space in the buffer area.
[0053] Optionally, the preset time interval is 10 microseconds.
[0054] Specifically, the preset time interval is 10 microseconds, that is, the occupied space is obtained every 10 microseconds, and the occupied space growth rate within 10 microseconds is determined, so that the period for determining whether the upstream device suspends sending traffic is only 10 microseconds. For the upstream device, because the time is short, after multiple determination cycles, it is only equivalent to a certain fluctuation in the data transmission of the upstream device. The data transmission network cannot even perceive the situation that the upstream device suspends sending data, thereby improving the stability of data transmission and further improving the transmission performance of the data transmission network.
[0055] The scheme of the present application obtains the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval; the current occupancy growth rate of the cache area is determined according to the occupied space at the current moment, the occupied space at the first historical moment and the preset time interval; if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of the preset time interval is sent to the upstream device, so that the upstream device suspends data transmission during the preset time interval. That is, the scheme of the present application, when it is determined that a large amount of data is to be sent at the current moment according to the current occupancy growth rate of the cache area and the historical occupancy growth rate at the first historical moment, sends a back pressure frame in advance to suspend the data transmission of the upstream device, so that there is space in the cache area at this time to store the in-transit transmission traffic, thereby avoiding the situation where the in-transit transmission traffic is discarded, ensuring the transmission business security between the devices of financial enterprises such as banks in the same city, and thus improving the accuracy of data transmission and the transmission performance of the transmission network.
[0056] Figure 2 is another flow chart of the congestion handling method provided by the present application. Figure 1 Based on the illustrated embodiment and various optional implementation schemes, the steps of setting up reserved storage space in the cache area and using the reserved storage space are described in detail. Figure 2 As shown, the method may include the following steps:
[0057] Step 201: Calculate the bandwidth-delay product according to the actual bandwidth and propagation delay of the current network.
[0058] Specifically, the bandwidth delay product (BDP) refers to the maximum amount of data required for one-way transmission in the network. The bandwidth in the network usually refers to the amount of data that can be transmitted per second. For example, the bandwidth is 10 megabits per second. The propagation delay refers to the time required for a data packet to travel from one end of the network to the other end of the network, usually in microseconds. For example, if the actual bandwidth of the current network is 10 kilobits per second and the propagation delay is 10 microseconds, the BDP is about 1 bit.
[0059] Step 202: Set reserved storage space in the buffer of the switch device.
[0060] The reserved storage space is greater than or equal to the bandwidth-delay product.
[0061] Specifically, a reserved storage space (headroom) is set in the buffer of the switch device, and the space of the reserved storage space is greater than or equal to the bandwidth-delay product to ensure that burst data can be absorbed when the network is congested, thereby reducing data loss and delay. When the space of the reserved storage space is equal to the bandwidth-delay product, the in-transit data sent by the upstream device during the time from when the switch device sends a back pressure frame to the upstream device to when the upstream device receives the back pressure frame can be stored, thereby avoiding data loss while reducing the memory of the reserved storage space, thereby reducing the space resource requirements of the reserved storage space.
[0062] Step 203: Obtain the occupied space of the buffer area at the inlet of the switch device at the current moment and the occupied space at the first historical moment.
[0063] Step 204, determining the current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and a preset time interval.
[0064] Step 205: If the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of a preset time interval is sent to the upstream device, so that the upstream device suspends sending data during the preset time interval.
[0065] Step 206: storing the data received within the preset time interval after sending the back pressure frame with a duration of the preset time interval into the reserved storage space.
[0066] Specifically, within a preset time interval after sending a back pressure frame with a duration of the preset time interval, that is, from the time when the switch device sends the back pressure frame to the upstream device to the time when the upstream device receives the back pressure frame, the data received by the switch device is stored in the reserved storage space.
[0067] The solution of the present application sets a reserved storage space in the buffer of the switch device to ensure that burst data can be absorbed when the network is congested, thereby reducing data loss and delay. And when the space of the reserved storage space is equal to the bandwidth delay product, it can store the in-transit data sent by the upstream device from the time when the switch device sends the back pressure frame to the upstream device to the time when the upstream device receives the back pressure frame, thereby avoiding data loss while reducing the memory of the reserved storage space, thereby reducing the space resource requirements of the reserved storage space.
[0068] Figure 3 is a structural diagram of a congestion processing device provided by the present application, and the device is suitable for executing the congestion processing method provided by the present application. Figure 3 As shown, the device may specifically include:
[0069] The acquisition module 301 is used to acquire the occupied space of the buffer area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval.
[0070] The rate determination module 302 is used to determine the current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval.
[0071] The sending module 303 is used to send a back pressure frame with a duration of a preset time interval to the upstream device if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, so that the upstream device suspends sending data during the preset time interval.
[0072] In one embodiment, after determining the current occupancy growth rate of the cache area based on the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval, the rate determination module 302 is also used to: obtain the occupied space at a second historical moment; wherein the second historical moment is a moment before the first historical moment, and the time interval between the second historical moment and the first historical moment is the preset time interval; determine the historical occupancy growth rate of the first historical moment based on the occupied space at the second historical moment, the occupied space at the first historical moment, and the preset time interval.
[0073] In one embodiment, the sending module 303 is also used to: if the current occupancy growth rate is less than or equal to the historical occupancy growth rate, send a back pressure frame with a duration of a first preset time period to the upstream device so that the upstream device continues to send data; wherein the first preset time period is 0.
[0074] In one embodiment, the device further includes: a reservation module, which is used to calculate the bandwidth-delay product according to the actual bandwidth and propagation delay of the current network before the acquisition module 301 acquires the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; and sets a reserved storage space in the buffer of the switch device; wherein the space of the reserved storage space is greater than or equal to the bandwidth-delay product; and the sending module 303 is used to: store the data received within the preset time interval after sending the back pressure frame with a duration of the preset time interval in the reserved storage space after the back pressure frame with a duration of the preset time interval is sent if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment to cause the upstream device to suspend sending data during the preset time interval.
[0075] In one embodiment, the sending module 303, after sending a back pressure frame with a duration of a preset time interval to the upstream device if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, so that the upstream device suspends sending data during the preset time interval, is also used to: if the current occupied space is greater than a preset occupied space threshold, send a back pressure frame with a duration of a second preset time interval to the upstream device, so that the upstream device suspends sending data within the second preset time interval; wherein the second preset time interval is greater than the preset time interval.
[0076] In one embodiment, the preset time interval is 10 microseconds.
[0077] The device of the present application obtains the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space of the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval; the current occupancy growth rate of the cache area is determined according to the occupied space at the current moment, the occupied space at the first historical moment and the preset time interval; if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of the preset time interval is sent to the upstream device, so that the upstream device suspends data transmission during the preset time interval. That is, the scheme of the present application, when it is determined that a large amount of data is to be sent at the current moment according to the current occupancy growth rate of the cache area and the historical occupancy growth rate at the first historical moment, sends a back pressure frame in advance to suspend the data transmission of the upstream device, so that there is space in the cache area at this time to store the in-transit transmission traffic, thereby avoiding the situation where the in-transit transmission traffic is discarded, ensuring the transmission business security between the equipment of banks and other financial enterprises in the same city, and thus improving the accuracy of data transmission and the transmission performance of the transmission network.
[0078] The present application also provides a switch device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the congestion handling method provided in any of the above embodiments when executing the program.
[0079] The present application also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the congestion handling method provided in any of the above embodiments is implemented.
[0080] Reference below Figure 4 , which shows a schematic structural diagram of a switch device 400 suitable for implementing the present application. Figure 4 The switch device shown is only an example and should not bring any limitation to the function and scope of use of the present application.
[0081] like Figure 4 As shown, the switch device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the switch device 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0082] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0083] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present application are executed.
[0084] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0085] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0086] The modules and / or units described in this application may be implemented in software or hardware. The modules and / or units described may also be arranged in a processor, for example, it may be described as follows: a processor includes an acquisition module, a rate determination module, and a transmission module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0087] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device performs the following operations:
[0088] Obtain the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval; determine the current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment and the preset time interval; if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, send a back pressure frame with a duration of the preset time interval to the upstream device, so that the upstream device suspends sending data during the preset time interval.
[0089] According to the technical solution of the present application, the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space of the first historical moment are obtained; wherein the time interval between the current moment and the first historical moment is a preset time interval; the current occupancy growth rate of the cache area is determined according to the occupied space at the current moment, the occupied space at the first historical moment and the preset time interval; if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of the preset time interval is sent to the upstream device, so that the upstream device suspends data transmission during the preset time interval. That is, the solution of the present application, when it is determined that a large amount of data is to be sent at the current moment according to the current occupancy growth rate of the cache area and the historical occupancy growth rate at the first historical moment, a back pressure frame is sent in advance to suspend the data transmission of the upstream device, so that there is space in the cache area at this time to store the in-transit transmission traffic, thereby avoiding the situation where the in-transit transmission traffic is discarded, ensuring the transmission business security between the devices of financial enterprises such as banks in the same city, and thus improving the accuracy of data transmission and the transmission performance of the transmission network.
[0090] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements a congestion handling method as provided in any embodiment of the present application.
[0091] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present application, and the programming language includes an object-oriented programming language, such as Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0092] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0093] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A congestion handling method, characterized in that: Applied to a switch device, the method comprises: Obtaining the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval; Determine a current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval; If the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, a back pressure frame with a duration of a preset time interval is sent to the upstream device, so that the upstream device suspends sending data during the preset time interval.
2. The method according to claim 1, characterized in that After determining the current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval, the method further includes: Obtaining the occupied space of a second historical moment; wherein the second historical moment is a moment before the first historical moment, and the time interval between the second historical moment and the first historical moment is the preset time interval; The historical occupancy growth rate at the first historical moment is determined according to the occupied space at the second historical moment, the occupied space at the first historical moment, and the preset time interval.
3. The method according to claim 1, characterized in that Before the step of sending a back pressure frame having a duration of a preset time interval to an upstream device if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, so that the upstream device suspends sending data during the preset time interval, the method further comprises: If the current occupancy growth rate is less than or equal to the historical occupancy growth rate, a back pressure frame with a duration of a first preset duration is sent to the upstream device to enable the upstream device to continue sending data; wherein the first preset duration is 0.
4. The method according to claim 1, characterized in that: Before obtaining the occupied space of the buffer area at the entrance of the switch device at the current moment and the occupied space at the first historical moment, the method further includes: Calculate the bandwidth-delay product based on the actual bandwidth of the current network and the propagation delay; A reserved storage space is set in the buffer of the switch device; wherein the space of the reserved storage space is greater than or equal to the bandwidth-delay product; If the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, after sending a back pressure frame with a duration of a preset time interval to the upstream device so that the upstream device suspends sending data during the preset time interval, the method further includes: The data received within the preset time interval after the back pressure frame with a duration of the preset time interval is sent is stored in the reserved storage space.
5. The method according to claim 1, characterized in that If the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, after sending a back pressure frame with a duration of a preset time interval to the upstream device so that the upstream device suspends sending data during the preset time interval, the method further includes: If the current occupied space is greater than a preset occupied space threshold, a back pressure frame with a duration of a second preset duration is sent to the upstream device to cause the upstream device to suspend sending data within the second preset duration; wherein the second preset duration is greater than the preset time interval.
6. The method according to any one of claims 1 to 5, characterized in that: The preset time interval is 10 microseconds.
7. A congestion handling device, characterized in that: Configured in a switch device, the device includes: An acquisition module, used to acquire the occupied space of the cache area at the entrance of the switch device at the current moment and the occupied space at the first historical moment; wherein the time interval between the current moment and the first historical moment is a preset time interval; A rate determination module, configured to determine a current occupancy growth rate of the cache area according to the occupied space at the current moment, the occupied space at the first historical moment, and the preset time interval; The sending module is used to send a back pressure frame with a duration of a preset time interval to the upstream device if the current occupancy growth rate is greater than the historical occupancy growth rate at the first historical moment, so that the upstream device suspends sending data during the preset time interval.
8. A switch device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the congestion handling method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the congestion handling method as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the congestion handling method according to any one of claims 1 to 6.