Data caching processing method and device, electronic equipment, storage medium and product

By establishing a virtual queue cache area at the entrance and exit of the data forwarding device, dynamically adjusting capacity and performing stream type classification, the problems of congestion and packet loss of data forwarding devices in the RoCE network are solved, and data transmission efficiency and network performance are improved.

CN119561921APending Publication Date: 2025-03-04CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411621575.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the RoCE network, data forwarding devices are prone to congestion and packet loss problems during the forwarding of streaming data, resulting in low data transmission efficiency and increased network latency.

Method used

By establishing a virtual queue cache area at the data entrance and exit of the data forwarding device, dynamically adjust the capacity of the virtual queue to expand and reduce capacity according to the occupancy rate, and classify and cache based on data priority and flow type to avoid mutual interference between data of different stream types.

Benefits of technology

It improves resource utilization, avoids packet loss, ensures smooth transmission of data packets, improves data transmission efficiency, and reduces network delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561921A_ABST
    Figure CN119561921A_ABST
Patent Text Reader

Abstract

The invention provides a data caching processing method and device, electronic equipment, a storage medium and a product, and relates to the technical field of communication. A first virtual queue cache region is established at a data entry of the data forwarding equipment and used for caching data flowing into the data forwarding equipment, and the occupancy rate of each first virtual queue in the first virtual queue cache region is obtained; under the condition that the occupancy rate of the first virtual queue is smaller than a first occupancy threshold value, carrying out capacity reduction processing on the first virtual queue; under the condition that the occupancy rate of the first virtual queue is greater than a second occupancy threshold value, carrying out capacity expansion processing on the first virtual queue; wherein the second occupancy threshold value is greater than the first occupancy threshold value. According to the method and the device, the first virtual queue cache region is established at the entrance of the data forwarding equipment, the streaming data are cached, and the first virtual queue is expanded and shrunk according to the occupancy rate of the first virtual queue, so that the utilization rate of resources is improved, data packet loss can be avoided, and smooth transmission of the data packet is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of large AI models and high-performance storage and computing, high-performance networks based on RoCE have become an important standard and requirement for major companies to build physical infrastructure. In RoCE networks, network cards with bandwidths above 100Gbps and data forwarding devices (such as switches) above 400Gbps are usually used to meet the needs of high-speed data transmission.

[0003] However, in the process of streaming data forwarding, data forwarding equipment is prone to congestion and packet loss, which will lead to inefficient data transmission and increase network latency. Therefore, optimizing network performance and reducing data loss and congestion have become the key to improving overall system performance.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides a data cache processing method, device, electronic device, storage medium and product, which improve data transmission efficiency, reduce network delay and reduce data packet loss at least to a certain extent.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a data cache processing method is provided, which is applied to a data forwarding device, wherein a first virtual queue cache area is established at a data entry of the data forwarding device, wherein the first virtual queue cache area includes a plurality of first virtual queues, and comprises: obtaining the occupancy rate of each of the first virtual queues in the first virtual queue cache area; when the occupancy rate of the first virtual queue is less than a first occupancy threshold, performing a capacity reduction process on the first virtual queue; when the occupancy rate of the first virtual queue is greater than a second occupancy threshold, performing a capacity expansion process on the first virtual queue; wherein the second occupancy threshold is greater than the first occupancy threshold.

[0008] In some embodiments, when the occupancy rate of the first virtual queue is greater than a second occupancy threshold, the first virtual queue is expanded, including: when the occupancy rate of the first virtual queue is greater than the second occupancy threshold, obtaining the spare memory of the first virtual queue buffer area; if the spare memory of the first virtual queue buffer area is greater than the first capacity value, expanding the first virtual queue; if the spare memory of the first virtual queue buffer area is less than or equal to the first capacity value, allocating the spare memory to each first virtual queue.

[0009] In some embodiments, the method further includes: when the occupancy rate of the first virtual queue buffer area is greater than a priority flow control PFC threshold, sending a PFC pause frame to an upstream device.

[0010] In some embodiments, the first virtual queue includes multiple flow type areas; wherein, before obtaining the occupancy rate of each of the first virtual queues in the first virtual queue buffer area, the method further includes: obtaining flow data sent by an upstream device, the flow data including at least one data packet; based on data priority and flow type, classifying the data packets, and caching the classified data packets into the flow type area of ​​the corresponding first virtual queue.

[0011] In some embodiments, a second virtual queue buffer area is established at the data outlet of the data forwarding device, the second virtual queue buffer area includes multiple second virtual queues, and the second virtual queue includes multiple flow type areas; the method also includes: receiving flow data output by the data forwarding device, the flow data includes at least one data packet; based on data priority and flow type, classifying the data packets, and caching the classified data packets into the flow type area of ​​the corresponding second virtual queue.

[0012] In some embodiments, the method further includes: in response to a PFC pause frame sent by a downstream node, pausing the second virtual queue from sending data.

[0013] In some embodiments, the method also includes: obtaining the occupancy rate of each second virtual queue in the second virtual queue buffer area; when the occupancy rate of the second virtual queue is less than a third occupancy threshold, shrinking the second virtual queue; when the occupancy rate of the second virtual queue is greater than a fourth occupancy threshold, expanding the second virtual queue; wherein the fourth occupancy threshold is greater than the third occupancy threshold.

[0014] In some embodiments, when the occupancy rate of the second virtual queue is greater than a fourth occupancy threshold, the second virtual queue is expanded, including: when the occupancy rate of the second virtual queue is greater than the fourth occupancy threshold, obtaining the spare memory of the second virtual queue buffer area; if the spare memory of the second virtual queue buffer area is greater than the second capacity value, expanding the second virtual queue; if the spare memory of the second virtual queue buffer area is less than or equal to the second capacity value, allocating the spare memory to each second virtual queue.

[0015] In some embodiments, the method further comprises: when the occupancy rate of the second virtual queue buffer area is greater than the explicit congestion notification (ECN) watermark, performing ECN marking on the data packet according to the occupancy rate of each second virtual queue.

[0016] According to another aspect of the present disclosure, a data cache processing device is also provided, which is applied to a data forwarding device, and a first virtual queue cache area is established at the data entrance of the data forwarding device, wherein the first virtual queue cache area includes multiple first virtual queues, including: an acquisition module, used to obtain the occupancy rate of each of the first virtual queues in the first virtual queue cache area; a capacity reduction module, used to reduce the capacity of the first virtual queue when the occupancy rate of the first virtual queue is less than a first occupancy threshold; and an expansion module, used to expand the capacity of the first virtual queue when the occupancy rate of the first virtual queue is greater than a second occupancy threshold; wherein the second occupancy threshold is greater than the first occupancy threshold.

[0017] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned data cache processing methods by executing the executable instructions.

[0018] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data cache processing method described in any one of the above is implemented.

[0019] According to another aspect of the present disclosure, a computer program product is provided, including: a computer program or instructions, wherein when the computer program or instructions are executed by a processor, any one of the above data cache processing methods is implemented.

[0020] In the disclosed embodiment, a first virtual queue buffer is established at the data inlet of the data forwarding device, which is used to buffer the data flowing into the data forwarding device, and obtain the occupancy rate of each first virtual queue in the first virtual queue buffer; when the occupancy rate of the first virtual queue is less than the first occupancy threshold, the first virtual queue is reduced in capacity; when the occupancy rate of the first virtual queue is greater than the second occupancy threshold, the first virtual queue is expanded in capacity; wherein the second occupancy threshold is greater than the first occupancy threshold. The disclosed embodiment improves the utilization rate of resources by establishing a first virtual queue buffer at the inlet of the data forwarding device, caching the flow data, and expanding and shrinking the first virtual queue according to the occupancy rate of the first virtual queue, and can also avoid data packet loss and ensure smooth transmission of data packets. Therefore, data transmission efficiency is improved and network delay is reduced.

[0021] Furthermore, when the occupancy rate of the first virtual queue is greater than the PFC threshold, a PFC pause frame is sent to an upstream device of the data forwarding device, so that the upstream device pauses sending data packets to the first virtual queue, thereby further reducing congestion.

[0022] Furthermore, a second virtual queue buffer is established at the data outlet of the data forwarding device, and the second virtual queue is expanded or reduced according to the occupancy of the second virtual queue, so as to further improve resource utilization and avoid data packet loss.

[0023] Furthermore, partitioning each virtual queue according to data priority and flow type can avoid mutual interference between data of different flow types and can effectively avoid the victim flow phenomenon caused by mixed caching.

[0024] Furthermore, ECN marking is performed according to the occupancy rates of different second virtual queues, thereby realizing ECN marking based on different flow classifications, reducing the speed in time, and reducing network delay.

[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0027] Figure 1 A schematic diagram showing the structure of a data cache processing system in an embodiment of the present disclosure.

[0028] Figure 2 A flow chart of a data cache processing method according to an embodiment of the present disclosure is shown.

[0029] Figure 3 A schematic diagram of a first virtual queue buffer area and a second virtual queue buffer area in an embodiment of the present disclosure is shown.

[0030] Figure 4 A schematic diagram showing a first virtual queue buffer area and a second virtual queue buffer area in another embodiment of the present disclosure is shown.

[0031] Figure 5 A flow chart of switch data processing in an embodiment of the present disclosure is shown.

[0032] Figure 6 A flow chart of a data cache processing method in an embodiment of the present disclosure is shown.

[0033] Figure 7 A flow chart of a data cache processing method in another embodiment of the present disclosure is shown.

[0034] Figure 8A schematic diagram of a data cache processing device in an embodiment of the present disclosure is shown.

[0035] Fig. 9 A schematic diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0036] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0037] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0038] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows.

[0039] RDMA (Remote Direct Memory Access) is a technology developed to solve the delay of server-side data processing during network transmission.

[0040] RoCE (RDMA over Converged Ethernet) is an Ethernet-based remote direct memory access technology that allows high-performance data transmission and communication on Ethernet.

[0041] Priority Flow Control (PFC) is a technology that provides priority-based flow control on a hop-by-hop basis.

[0042] ECN (Explicit Congestion Notification) is a network congestion relief technology. When congestion is detected on a network device, the network device sends a message carrying a congestion marker to the receiving server, notifying the sending server to reduce the rate at which messages are sent, thereby alleviating congestion.

[0043] CLOS is a network architecture that uses a combination of multi-level switches to achieve high redundancy and scalability through hierarchical connections.

[0044] PFC threshold is a cache water level of a PFC application. When it exceeds the limit, flow control is triggered and the transmission of related priority traffic is suspended.

[0045] ECN waterline is a cache water level of ECN application. When it exceeds the limit, it marks the congestion signal in the IP packet header to notify the source end of the network status, prompting it to adjust the sending rate and optimize traffic control.

[0046] Cache, a temporary data storage technology, optimizes read and write operations, increases processing speed, and enhances system efficiency.

[0047] Virtual queues, a storage technology, group data, balance loads, speed up processing, and improve network device throughput.

[0048] Scaling is a technology that dynamically adjusts resources, increases or decreases resources based on load, optimizes costs, and ensures application performance.

[0049] Small Stream refers to a relatively small amount of transmitted data, such as instant messages, simple request responses, etc.

[0050] Large Stream refers to a large amount of data being transmitted, such as video streaming, backup data, or large file transfer.

[0051] Data forwarding equipment refers to hardware or software components used to receive, process and forward data packets in a communication network. For example, data forwarding equipment can be switches, gateways, routers and other devices.

[0052] With the continuous development of large AI models and high-performance storage and computing, high-performance networks based on RoCE have become the actual standard and requirement for major companies to build physical infrastructure. In RoCE networks, network cards with bandwidths above 100Gbps (gigabits per second) and data forwarding devices above 400Gbps are usually used. Load balancing and congestion control algorithms need to be used in RoCE networks to improve network bandwidth utilization and maintain lower latency.

[0053] The inventors have found that in the process of forwarding stream data, data forwarding equipment is prone to congestion and packet loss problems, which will lead to inefficient data transmission and increased network delay. In addition, the inventors also found that although congestion control can avoid congestion and load sharing can improve network utilization, the mixed cache of large and small flows on the data forwarding device (such as a switch) side will cause mutual interference. The interaction between delay-sensitive small flows and bandwidth-sensitive large flows will more frequently lead to the generation of congestion signals. Congestion control algorithms based on network load signals will be disturbed by this phenomenon, resulting in more aggressive control of flow rate, resulting in victim flows and unfairness, and ultimately leading to increased latency and reduced bandwidth utilization.

[0054] Based on this, the present disclosure provides a data cache processing method, which can be applied to high-performance networks, intelligent computing centers, data centers and cloud computing scenarios. For example, the present disclosure can be applied to the RDMA network base of supercomputing centers and data centers, and can also be applied to cloud service providers such as Tianyi Cloud, which can effectively improve the utilization rate of network resources, improve computing power through the network, and avoid mixing of large and small flows in the network. For another example, the present disclosure can be applied to network devices with large network delays and service timeouts. The present disclosure does not limit the specific scenarios in which the present disclosure is applied. The present disclosure establishes a first virtual queue buffer area at the entrance of a data forwarding device, caches the flow data, and expands and shrinks the first virtual queue according to the occupancy rate of the first virtual queue, thereby improving the utilization rate of resources, avoiding data packet loss, and ensuring smooth transmission of data packets. Therefore, data transmission efficiency is improved and network delay is reduced. When the occupancy rate of the first virtual queue is greater than the PFC threshold, a PFC pause frame is sent to the upstream device of the data forwarding device, so that the upstream device pauses sending data packets to the first virtual queue, thereby further reducing congestion. A second virtual queue buffer is established at the data outlet of the data forwarding device, and the second virtual queue is expanded or reduced according to the occupancy of the second virtual queue, so as to further improve the utilization of resources and avoid data packet loss. Each virtual queue is partitioned according to data priority and flow type, so as to avoid mutual interference between data of different flow types and effectively avoid the victim flow phenomenon caused by mixed cache. ECN marking is performed according to the occupancy rate of different second virtual queues, so as to realize ECN marking based on different flow classifications, reduce the speed in time and reduce network delay.

[0055] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0056] like Figure 1 As shown, the system architecture includes a data sending end 101, a data forwarding device 102 and a data receiving end 103; wherein the data sending end 101, the data forwarding device 102 and the data receiving end 103 are connected via a network.

[0057] The network can be a wired network or a wireless network.

[0058] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocols. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies. Exemplary, Figure 1 The various data forwarding devices 102 are connected via optical fibers or copper wires.

[0059] Optionally, the data transmitting end 101 is a device for sending data. For example, the data transmitting end 101 may be a terminal device or a network card. The terminal device may also be referred to as UE (User Equipment). In a specific implementation, the terminal device may be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a personal digital assistant (Personal Digital Assistant, PDA), a mobile Internet device (Mobile Internet Device, MID), a wearable device (Wearable Device) or a vehicle-mounted device, etc. It should be noted that the specific type of the terminal device is not limited in the embodiments of the present invention.

[0060] Optionally, the data receiving end 103 is a device for receiving data. The data receiving end 103 is not limited in the embodiments of the present disclosure as to what kind of device it is. For example, the data receiving end 103 may also be a terminal device or a server. The server 103 may be a server that provides various services, such as a background management server that provides support for devices operated by users using terminal devices. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device.

[0061] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0062] Those skilled in the art will know that Figure 1 The number of data sending ends, data forwarding devices and data receiving ends in the embodiment is only for illustration, and any number of data sending ends, data forwarding devices and data receiving ends may be provided according to actual needs. The embodiments of the present disclosure are not limited to this.

[0063] Under the above system architecture, a data cache processing method is provided in an embodiment of the present disclosure, and the method can be executed by any electronic device with computing and processing capabilities.

[0064] In some embodiments, the data cache processing method provided in the embodiments of the present disclosure can be executed by the data sending end of the above system architecture; in other embodiments, the data cache processing method provided in the embodiments of the present disclosure can be executed by the data receiving end in the above system architecture; in other embodiments, the data cache processing method provided in the embodiments of the present disclosure can be implemented by the data sending end and the data receiving end in the above system architecture through interaction. In other embodiments, the data cache processing method provided in the embodiments of the present disclosure can be executed by other electronic devices.

[0065] Figure 2 A flow chart of a data cache processing method according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown, it is applied to a data forwarding device, a first virtual queue buffer area is established at the data entrance of the data forwarding device, and the first virtual queue buffer area includes multiple first virtual queues. The data cache processing method provided in the embodiment of the present disclosure may include the following steps.

[0066] S202: Obtain the occupancy rate of each first virtual queue in the first virtual queue buffer area.

[0067] In the embodiment of the present disclosure, the first virtual queue buffer includes a plurality of first virtual queues for storing data packets of different priorities. Figure 2 As shown, the inbound direction is the first virtual queue buffer area, and the first virtual queue buffer area includes 8 first virtual queues, which are divided into 8 first virtual queues (PG0, PG1, PG2, PG3, PG4, PG5, PG6 and PG7) according to priority, and each first virtual queue includes three areas (Port Guaranteed, Port Shared, Port Headroom), wherein the Port Headroom area is used to ensure the minimum resources allocated to a specific task, the Port Shared area is a resource area that can be dynamically shared by multiple tasks, and the Port Guaranteed area is an additional resource reserved for dealing with burst traffic.

[0068] In the disclosed embodiment, the occupancy rate of the first virtual queue may be a ratio of the amount of data cached in the first virtual queue to the total amount of data that can be cached in the first virtual queue (also called the first virtual queue load).

[0069] S204: When the occupancy rate of the first virtual queue is less than the first occupancy threshold, shrink the first virtual queue.

[0070] In the embodiment of the present disclosure, there is no limitation on the specific value of the first occupancy threshold, and it can be set according to the actual application scenario and specific application experience. For example, the first occupancy threshold can be any value between 0 and 0.2. and Any value in .

[0071] In the disclosed embodiment, when the occupancy rate of the first virtual queue is less than the first occupancy threshold, the first virtual queue needs to be reduced in capacity, and the reduced memory is provided to other first virtual queues to be expanded, thereby improving resource utilization.

[0072] Exemplarily, when the occupancy rate of the first virtual queue is less than When , shorten the length of the first virtual queue to the original length That is to say, half of the cache space of the first virtual queue is released.

[0073] S206: When the occupancy rate of the first virtual queue is greater than a second occupancy threshold, expand the capacity of the first virtual queue, wherein the second occupancy threshold is greater than the first occupancy threshold.

[0074] In the embodiment of the present disclosure, there is no limitation on the specific value of the second occupancy threshold, and it can be set according to the actual application scenario and specific application experience. For example, the second occupancy threshold is any value greater than 0.3. or

[0075] The disclosed embodiment establishes a first virtual queue buffer area at the entrance of the data forwarding device to cache the flow data, and expands and shrinks the first virtual queue according to the occupancy rate of the first virtual queue, thereby improving the utilization rate of resources, avoiding data packet loss, and ensuring smooth transmission of data packets. Therefore, data transmission efficiency is improved and network delay is reduced.

[0076] It should be noted that the acquisition, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations, and various types of data such as personal identity data, operation data, behavioral data, etc. related to individuals, customers, and groups obtained in the embodiments of this disclosure have all been authorized.

[0077] The present disclosure is further described below through several exemplary embodiments.

[0078] In an exemplary embodiment, when the occupancy rate of the first virtual queue is greater than the second occupancy threshold, the first virtual queue is expanded, which may include the following steps A1 to A3.

[0079] Step A1: when the occupancy rate of the first virtual queue is greater than the second occupancy threshold, obtain the spare memory of the first virtual queue buffer area.

[0080] In the disclosed embodiment, the standby memory is a memory for the first virtual queue buffer area to expand the cache space, and it is determined whether the occupancy of the first virtual queue is greater than the second occupancy threshold, if so, it indicates that the first virtual queue needs to be expanded. Then it is determined whether the standby memory is sufficient.

[0081] Step A2: If the spare memory of the first virtual queue buffer area is greater than the first capacity value, the first virtual queue is expanded.

[0082] In the embodiment of the present disclosure, there is no limitation on the first capacity value, and it can be set according to the actual application scenario and specific application experience. For example, the first capacity value can be the current length of the first virtual queue. or

[0083] In the disclosed embodiment, there is no limitation on the expansion size of the first virtual queue, as long as it is a value that can ensure that the expanded first virtual queue can quickly cache data packets and quickly transmit data packets.

[0084] Step A3: if the spare memory of the first virtual queue buffer area is less than or equal to the first capacity value, the spare memory is allocated to each first virtual queue.

[0085] In the disclosed embodiment, if the spare memory of the first virtual queue buffer is less than or equal to the first capacity value, it means that the remaining spare memory is small. In order to allow the first virtual queue buffer to transmit data faster, the spare memory can be allocated to each first virtual queue in proportion.

[0086] Exemplarily, the spare memory is allocated according to the occupancy rate of the first virtual queue. The larger the occupancy rate of the first virtual queue is, the larger the spare memory allocated is, thereby improving the utilization rate of resources and ensuring the faster transmission of data. For example, the occupancy rates of each first virtual queue are normalized, and the spare memory is allocated according to the result of the normalization process so that the first virtual queue is expanded according to the allocated memory.

[0087] The disclosed embodiment improves resource utilization by allocating expanded memory to the first virtual queue according to the condition of the spare memory, and can also avoid data packet loss and ensure smooth transmission of data packets, thereby improving data transmission efficiency and reducing network delay.

[0088] In another exemplary embodiment, the method provided by the embodiment of the present disclosure may further include: when the occupancy rate of the first virtual queue buffer area is greater than the priority flow control PFC threshold, sending a PFC pause frame to the upstream device.

[0089] In the embodiment of the present disclosure, the upstream device is a device that sends data to the data forwarding device. The embodiment of the present disclosure does not limit what kind of device the upstream device is. For example, the upstream device is a switch.

[0090] In one embodiment, when the occupancy rate of the first virtual queue buffer area is greater than the PFC threshold, the virtual queue with full load in the data export direction of the data forwarding device (such as the second virtual queue described below) is checked, and a PFC pause frame is sent to the virtual queue in the export direction of the upstream device corresponding to the virtual queue, so that the upstream device pauses sending data to the first virtual queue (corresponding to the full-load virtual queue), so as to relieve the pressure of sending data at the data export of the data forwarding device, and solve the problem of packet loss caused by data congestion.

[0091] In another embodiment, each first virtual queue in the first virtual queue buffer area may correspond to a PFC threshold. When the occupancy rate of the first virtual queue is greater than the corresponding PFC threshold, it indicates that the data outlet of the data forwarding device sends data slowly. At this time, a PFC pause frame is sent to the upstream device so that the upstream device that sends data to the first virtual queue pauses sending data to the first virtual queue, so as to relieve the pressure of sending data at the data outlet of the data forwarding device, thereby solving the problem of packet loss caused by data congestion.

[0092] The disclosed embodiment sends a PFC pause frame to the upstream device to pause the upstream device from sending data to the first virtual queue, thereby alleviating the pressure on the data forwarding device to send data at the data outlet, thereby solving the problem of packet loss caused by data congestion.

[0093] In yet another embodiment, the first virtual queue may include multiple flow type areas; wherein, before obtaining the occupancy rate of each first virtual queue in the first virtual queue buffer area, the method may further include: obtaining flow data sent by an upstream device, the flow data including at least one data packet; based on data priority and flow type, classifying the data packets, and caching the classified data packets into the flow type area of ​​the corresponding first virtual queue.

[0094] In the embodiment of the present disclosure, partitioning the first virtual queue can avoid mutual interference between data packets cached in the flow type area.

[0095] In the embodiment of the present disclosure, data priority is used to indicate the level of data priority processing. Figure 3 As shown, the data is divided into 8 priorities according to the data priority, each priority corresponds to a first virtual queue, and then each first virtual queue is partitioned according to the flow type, and the partitions cache data of different flow types.

[0096] For example, Figure 4 As shown, each first virtual queue includes two flow type areas, and the two flow type areas are used to cache small flow data and large flow data respectively.

[0097] The disclosed embodiments isolate large and small flows to reduce the impact of the mixing of large and small flows on network latency and bandwidth utilization.

[0098] In order to further isolate the flow data, a buffer area (called a second virtual queue buffer area) is also added to the data egress of the data forwarding device. The present disclosure is described below through several exemplary embodiments.

[0099] In an exemplary embodiment, a second virtual queue buffer area is established at the data outlet of the data forwarding device, the second virtual queue buffer area may include multiple second virtual queues, and the second virtual queue includes multiple flow type areas; the method provided by the present disclosure may also include: receiving flow data output by the data forwarding device, the flow data includes at least one data packet; based on data priority and flow type, classifying the data packets, and caching the classified data packets into the flow type area of ​​the corresponding second virtual queue.

[0100] In the embodiment of the present disclosure, the second virtual queue buffer area may include a plurality of second virtual queues that are partitioned and buffered according to priority. Figure 3As shown, the second virtual queue buffer includes 8 second virtual queues, which are divided into 8 second virtual queues (PG0, PG1, PG2, PG3, PG4, PG5, PG6 and PG7) according to priority.

[0101] In the embodiment of the present disclosure, data priority is used to indicate the level of data priority processing. Figure 4 As shown, the data is divided into 8 priorities according to the data priority, each priority corresponds to a second virtual queue, and then each second virtual queue is partitioned according to the flow type, and the partitions cache data of different flow types.

[0102] For example, Figure 4 As shown, each second virtual queue includes two flow type areas, and the two flow type areas are used to cache small flow data and large flow data respectively.

[0103] The disclosed embodiments isolate large and small flows to reduce the impact of the mixing of large and small flows on network latency and bandwidth utilization.

[0104] In another exemplary embodiment, the method provided by the embodiment of the present disclosure may further include: in response to a PFC pause frame sent by a downstream node, pausing the second virtual queue to send data.

[0105] In the embodiment of the present disclosure, the downstream node is a device that receives data sent by the data forwarding device. The embodiment of the present disclosure does not limit what kind of device the downstream node is.

[0106] In the disclosed embodiment, after receiving a PFC pause frame sent by a downstream node, the second virtual queue corresponding to the PFC pause frame is searched, and the data packets cached in the second virtual queue are paused from being sent to the data forwarding device, thereby alleviating congestion of the data forwarding device and avoiding the loss of data packets.

[0107] In another exemplary embodiment, the method provided in the embodiment of the present disclosure may further include the following steps B1 to B3:

[0108] Step B1, obtaining the occupancy rate of each second virtual queue in the second virtual queue buffer area.

[0109] In the embodiment of the present disclosure, the second virtual queue buffer includes a plurality of second virtual queues for storing data packets of different priorities.

[0110] In the disclosed embodiment, the occupancy rate of the second virtual queue may be a ratio of the amount of data cached in the second virtual queue to the total amount of data cacheable in the second virtual queue (also referred to as the second virtual queue load).

[0111] Step B2: When the occupancy rate of the second virtual queue is less than a third occupancy threshold, the second virtual queue is reduced in capacity.

[0112] In the embodiment of the present disclosure, there is no limitation on the specific value of the third occupancy threshold, and it can be set according to the actual application scenario and specific application experience. For example, the third occupancy threshold can be any value between 0 and 0.2. and Any value in .

[0113] In the disclosed embodiment, when the occupancy rate of the second virtual queue is less than the third occupancy threshold, the second virtual queue needs to be reduced in capacity, and the reduced memory is provided to other second virtual queues to be expanded, thereby improving resource utilization.

[0114] Exemplarily, when the occupancy rate of the second virtual queue is less than When the length of the second virtual queue is shortened to the original length That is to say, half of the cache space of the second virtual queue is released.

[0115] Step B3: when the occupancy rate of the second virtual queue is greater than a fourth occupancy threshold, expand the capacity of the second virtual queue; wherein the fourth occupancy threshold is greater than the third occupancy threshold.

[0116] In the embodiment of the present disclosure, there is no limitation on the specific value of the fourth occupancy threshold, and it can be set according to the actual application scenario and specific application experience. For example, the fourth occupancy threshold is any value greater than 0.3. For example, the fourth occupancy threshold is 1 / 3 or 1 / 2.

[0117] The disclosed embodiment establishes a second virtual queue buffer area at the exit of the data forwarding device to cache the flow data, and expands or shrinks the second virtual queue according to the occupancy rate of the second virtual queue, thereby improving the utilization rate of resources, avoiding data packet loss, and ensuring smooth transmission of data packets. Therefore, data transmission efficiency is improved and network delay is reduced.

[0118] In another exemplary embodiment, when the occupancy rate of the second virtual queue is greater than the fourth occupancy threshold, the second virtual queue is expanded, which may include: when the occupancy rate of the second virtual queue is greater than the fourth occupancy threshold, obtaining the spare memory of the second virtual queue buffer area; if the spare memory of the second virtual queue buffer area is greater than the second capacity value, expanding the second virtual queue; if the spare memory of the second virtual queue buffer area is less than or equal to the second capacity value, allocating the spare memory to each second virtual queue.

[0119] The method for expanding the capacity of the second virtual queue is similar to the method for expanding the capacity of the first virtual queue, and will not be described in detail here.

[0120] The disclosed embodiment improves resource utilization by allocating expanded memory to the second virtual queue according to the condition of the spare memory, and can also avoid data packet loss and ensure smooth transmission of data packets, thereby improving data transmission efficiency and reducing network delay.

[0121] In another exemplary embodiment, the method provided by the embodiment of the present disclosure may further include: when the occupancy rate of the second virtual queue buffer area is greater than the explicit congestion notification ECN watermark, performing ECN marking on the data packet according to the occupancy rate of each second virtual queue.

[0122] In the disclosed embodiment, after the final data receiving end receives the ECN-marked data packet, the data receiving end sends an instruction to suspend data transmission to the data sending end, thereby preventing more data from entering the data forwarding device, thereby avoiding congestion and reducing network delay.

[0123] Exemplarily, the occupancy rate of each second virtual queue in the second virtual queue buffer is calculated, and the ECN marking rate of different second virtual queues is calculated through the occupancy rate of each second virtual queue, and the second virtual queue is marked when sending data packets. The data receiving end is notified of the current network status, so as to adjust the sending rate and avoid congestion.

[0124] Exemplarily, it is determined whether the occupancy rate of the second virtual queue buffer is greater than the ECN waterline, if greater, the second virtual queue length ratio is calculated, and the ECN marking rate of the second virtual queue is calculated according to the length ratio of the second virtual queue. ECN marking is performed when the second virtual queue sends a data packet.

[0125] The present invention compares the virtual queue lengths and, when the cache load triggers the ENC waterline, performs ECN marking of data packets according to the virtual queue length ratio; performs congestion control on different types of flows according to the load conditions to avoid the victim flow phenomenon caused by mixed cache.

[0126] It should be noted that the ECN marking rate refers to the ratio of data packets marked by the data switching device according to the congestion situation when sending data, which is usually used to regulate traffic.

[0127] In summary, in order to achieve the isolation of large and small flows, and thus reduce the impact of large and small flow mixing on network latency and bandwidth utilization. The present disclosure adopts a virtual queue caching mechanism based on flow type, as shown in the attached Figure 4 Specifically, virtual queue caches for different traffic types are established in both the inbound and outbound directions of data to isolate the flow data. At the same time, the virtual queues in the inbound and outbound directions can dynamically adjust the queue length according to the real-time traffic of large and small flows to ensure that the cache space is fully utilized. In this way, data latency is effectively reduced and network bandwidth utilization is improved.

[0128] The present disclosure is described below by taking a switch as an example of a data forwarding device. The present disclosure can be applied to a CLOS network architecture and an RDMA network, and switches are directly connected using optical fibers or copper wires for normal communication.

[0129] like Figure 5 As shown, the switch has the ability to receive, classify and send data in the inbound direction, and can use the first virtual queue to cache data, and actively adjust the length of the first virtual queue according to the load (the occupancy rate of the first virtual queue), and send a PFC pause frame when the load of the first virtual queue exceeds the PFC threshold.

[0130] The switch has the ability to receive, classify and send data in the outbound direction. It can also use virtual queues to cache data and actively adjust the length of the second virtual queue according to the load (occupancy rate of the second virtual queue). When the load of the second virtual queue exceeds the ECN waterline, the data packet is ECN marked according to the ratio of the second virtual queue length.

[0131] It should be noted that when the outbound direction of the switch is congested, the congestion will be fed back to the inbound direction, thereby sending PFC pause frames to the upstream device (node) to solve the congestion problem. In addition, the switch can also identify the flow type and isolate and cache it to solve the problem of mutual interference caused by mixed caching of large and small flows.

[0132] In one embodiment, Figure 6 A flow chart of a data cache processing method according to an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the data cache processing method may include the following S601 to S611.

[0133] S601, receiving flow data. For example, the switch receives a data packet from an upstream switch or a network card.

[0134] S602, flow type identification. Exemplarily, based on data priority and flow type, the data packet is identified, and the identified data packet is cached in the flow type area of ​​the corresponding first virtual queue.

[0135] S603, the data packet is cached in the corresponding first virtual queue, and waits for polling to send data to the outbound direction of the switch.

[0136] S604, calculating the occupancy rate of the first virtual queue. It should be noted that the embodiment of the present disclosure can determine the load of the virtual queue at a regular interval.

[0137] S605, determine whether the occupancy rate of the first virtual queue exceeds 1 / 3. If so, execute S606. If not, execute S607.

[0138] S606, determine whether the spare memory is greater than 1 / 3. It should be noted that 1 / 3 is 1 / 3 of the total memory. If greater, execute S608, if less than or equal to, execute S609.

[0139] S607, determine whether the occupancy rate of the first virtual queue is less than 1 / 6, if so, execute S608.

[0140] S608, adjust the length of the first virtual queue. Exemplarily, when the occupancy rate of the first virtual queue is less than 1 / 6, perform a capacity reduction process to shorten the length of the first virtual queue to 1 / 2 of the original length. When the load exceeds 1 / 3 of the length of the first virtual queue, check whether there is enough allocable buffer space (spare memory). If there is enough buffer space, allocate a buffer space of 1 / 2 of the original length to the first virtual queue.

[0141] S609, dividing the remaining spare memory according to the ratio. Exemplarily, according to the remaining allocatable cache space, directly allocating the cache space to all first virtual queues according to a specific ratio (such as evenly allocating).

[0142] S610, determining whether the occupancy rate of the first virtual queue buffer area is greater than a PFC threshold, if so, executing S611.

[0143] S611, sending a PFC pause frame to an upstream device. Exemplarily, determining whether the second virtual queue in the outbound direction is full, determining the type of congested flow according to the load state of the second virtual queue in the outbound direction, and sending a PFC pause frame to the congested flow type of the upstream switch or network card.

[0144] The disclosed embodiment can determine the type of congested flow according to the length of the virtual queue in the outgoing direction when the PFC threshold is triggered, and send a corresponding PFC pause frame according to the type; at the same time, it can also stop the corresponding virtual queue from sending according to the received pause frame, thereby avoiding the victim flow phenomenon of pausing the sending of the port.

[0145] In addition, the present disclosure can actively manage the length of the virtual queue according to the load of the virtual queue, thereby increasing the speed of data caching and transmission and further reducing delay. In addition, the present disclosure can also perform differentiated caching for small flows and large flows, avoiding aggressive flow rate control due to interference between large flows and small flows, and avoiding the generation of victim flows and unfair phenomena.

[0146] In another embodiment, Figure 7 A flow chart of a data cache processing method in another embodiment of the present disclosure is shown as follows: Figure 7 As shown, the data cache processing method may include the following S701 to S714.

[0147] S701, receiving flow data from an inbound direction and a PFC pause frame sent by a downstream device.

[0148] S702, flow type identification, buffering the data packet into the corresponding second virtual queue according to the flow type. It should be noted that when a PFC pause frame is received, S704 is executed at the same time.

[0149] S703, polling and sending data to a downstream switch or network card.

[0150] S704, suspend the second virtual queue from sending data. It should be noted that the second virtual queue corresponding to the PFC pause frame is suspended from sending data.

[0151] S705, calculating the occupancy rate of the second virtual queue. It should be noted that the embodiment of the present disclosure can determine the occupancy rate of the second virtual queue at regular intervals.

[0152] S706, determine whether the occupancy rate of the second virtual queue exceeds 1 / 3. If so, execute S707. If not, execute S708.

[0153] S707, determine whether the spare memory is greater than 1 / 3. It should be noted that 1 / 3 is 1 / 3 of the total memory. If greater than, execute S709, if less than or equal to, execute S710.

[0154] S708, determine whether the occupancy rate of the second virtual queue is less than 1 / 6, if so, execute S709.

[0155] S709, adjust the second virtual queue length. Exemplarily, when the occupancy rate of the second virtual queue is less than 1 / 6, perform a shrink process to shorten the second virtual queue length to 1 / 2 of the original length. When the load exceeds 1 / 3 of the second virtual queue length, check whether there is enough allocable buffer space (standby memory), if there is enough buffer space, then allocate a buffer space of 1 / 2 of the original length to the second virtual queue.

[0156] S710, divide the remaining spare memory according to the ratio. Exemplarily, according to the remaining allocatable cache space, directly allocate the cache space to all second virtual queues according to a specific ratio (such as evenly allocate).

[0157] S711, determine whether the occupancy rate of the second virtual queue buffer area is greater than the ECN waterline. If so, execute S712.

[0158] S712: Calculate the second virtual queue length ratio.

[0159] S713: Calculate the ECN marking rate of the second virtual queue according to the length ratio of the second virtual queue.

[0160] S714, marking ECN. Exemplarily, ECN marking is performed when the second virtual queue sends a data packet. It should be noted that if the second virtual queue is full, the back pressure is switched to the first virtual queue corresponding to the input direction.

[0161] The disclosed embodiment can determine the type of congested flow according to the length of the virtual queue in the outgoing direction when the PFC threshold is triggered, and send a corresponding PFC pause frame according to the type; at the same time, it can also stop the corresponding virtual queue from sending according to the received pause frame, thereby avoiding the victim flow phenomenon of pausing the sending of the port.

[0162] In addition, the present disclosure can actively manage the length of the virtual queue according to the load of the virtual queue, thereby increasing the speed of data caching and transmission and further reducing delay. In addition, the present disclosure can also perform differentiated caching for small flows and large flows, avoiding aggressive flow rate control due to interference between large flows and small flows, and avoiding the generation of victim flows and unfair phenomena.

[0163] In addition, the present disclosure compares the virtual queue lengths and, when the cache load triggers the ENC waterline, performs ECN marking of data packets according to the virtual queue length ratio; performs congestion control on different types of flows according to the load conditions to avoid the victim flow phenomenon caused by mixed cache.

[0164] Based on the same inventive concept, the present disclosure also provides a data cache processing device, as described in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0165] Figure 8 A schematic diagram of a data cache processing device in an embodiment of the present disclosure is shown. Figure 8 As shown, it is applied to a data forwarding device, a first virtual queue buffer is established at a data inlet of the data forwarding device, and the first virtual queue buffer includes a plurality of first virtual queues. The device includes: an acquisition module 81, a shrinking module 82, and an expansion module 83. The acquisition module 81 can be used to acquire the occupancy rate of each first virtual queue in the first virtual queue buffer; the shrinking module 82 can be used to shrink the first virtual queue when the occupancy rate of the first virtual queue is less than the first occupancy threshold; the expansion module 83 can be used to expand the first virtual queue when the occupancy rate of the first virtual queue is greater than the second occupancy threshold; wherein the second occupancy threshold is greater than the first occupancy threshold.

[0166] In one embodiment, the expansion module 83 can also be used to obtain the spare memory of the first virtual queue buffer area when the occupancy rate of the first virtual queue is greater than the second occupancy threshold; if the spare memory of the first virtual queue buffer area is greater than the first capacity value, the first virtual queue is expanded; if the spare memory of the first virtual queue buffer area is less than or equal to the first capacity value, the spare memory is allocated to each first virtual queue.

[0167] In one embodiment, the data cache processing device further includes a sending module, which can be used to send a PFC pause frame to an upstream device when the occupancy rate of the first virtual queue buffer area is greater than a priority flow control PFC threshold.

[0168] In one embodiment, the first virtual queue includes multiple flow type areas; before obtaining the occupancy rate of each first virtual queue in the first virtual queue buffer area, the acquisition module 81 can also be used to obtain flow data sent by the upstream device, and the flow data includes at least one data packet; based on data priority and flow type, the data packets are classified, and the classified data packets are cached in the flow type area of ​​the corresponding first virtual queue.

[0169] In one embodiment, a second virtual queue buffer area is established at the data outlet of the data forwarding device, the second virtual queue buffer area includes multiple second virtual queues, and the second virtual queue includes multiple flow type areas; the acquisition module 81 can also be used to receive flow data output by the data forwarding device, the flow data includes at least one data packet; based on data priority and flow type, the data packets are classified, and the classified data packets are cached in the flow type area of ​​the corresponding second virtual queue.

[0170] In one embodiment, the sending module may also be configured to suspend the second virtual queue from sending data in response to a PFC pause frame sent by a downstream node.

[0171] In one embodiment, the acquisition module 81 can also be used to obtain the occupancy rate of each second virtual queue in the second virtual queue buffer area; the expansion module 83 can also be used to shrink the second virtual queue when the occupancy rate of the second virtual queue is less than the third occupancy threshold; and expand the second virtual queue when the occupancy rate of the second virtual queue is greater than the fourth occupancy threshold; wherein the fourth occupancy threshold is greater than the third occupancy threshold.

[0172] In one embodiment, the expansion module 83 can also be used to obtain the spare memory of the second virtual queue buffer area when the occupancy rate of the second virtual queue is greater than the fourth occupancy threshold; if the spare memory of the second virtual queue buffer area is greater than the second capacity value, the second virtual queue is expanded; if the spare memory of the second virtual queue buffer area is less than or equal to the second capacity value, the spare memory is allocated to each second virtual queue.

[0173] In one embodiment, the sending module may also be configured to perform ECN marking on the data packets according to the occupancy of each second virtual queue when the occupancy of the second virtual queue buffer area is greater than the explicit congestion notification ECN watermark.

[0174] The device disclosed in the embodiment of the present disclosure establishes a first virtual queue buffer area at the entrance of the data forwarding device to cache the flow data, and expands and shrinks the first virtual queue according to the occupancy rate of the first virtual queue, thereby improving the utilization rate of resources, avoiding data packet loss, and ensuring smooth transmission of data packets. Therefore, data transmission efficiency is improved and network delay is reduced.

[0175] It should be noted that the examples and application scenarios implemented by the modules in the above-mentioned device embodiment are the same as those of the corresponding steps in the method embodiment, but are not limited to the contents disclosed in the above-mentioned method embodiment. It should be noted that the above-mentioned modules as part of the device can be executed in a computer system such as a set of computer executable instructions.

[0176] Those skilled in the art will appreciate that various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0177] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present disclosure, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above data cache processing methods by executing the executable instructions. Since the principle of solving the problem in the electronic device embodiment is similar to that in the above method embodiment, the implementation of the electronic device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0178] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0179] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).

[0180] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 executes the steps described in the above “Exemplary Method” section of this specification according to various exemplary embodiments of the present disclosure.

[0181] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .

[0182] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0183] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0184] The electronic device 900 may also communicate with one or more external devices 940 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0185] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0186] Based on the same inventive concept, the embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, any of the above data cache processing methods is implemented. Since the principle of solving the problem in the computer-readable storage medium embodiment is similar to that in the above method embodiment, the implementation of the computer-readable storage medium embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0187] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, 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), 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 foregoing.

[0188] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0189] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0190] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0191] Based on the same inventive concept, a computer program product is also provided in the embodiments of the present disclosure, including a computer program product, including: a computer program or an instruction, wherein when the computer program or the instruction is executed by a processor, the data cache processing method of any one of the above method embodiments is implemented. Since the principle of solving the problem in the computer program product embodiment is similar to that in the above method embodiment, the implementation of the computer program product embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0192] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0193] Through the description of the above implementation modes, it is easy for those skilled in the art to understand that the example implementation modes described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation mode of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation mode of the present disclosure.

[0194] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A data cache processing method, characterized in that: Applied to a data forwarding device, a first virtual queue buffer is established at a data entry of the data forwarding device, wherein the first virtual queue buffer includes a plurality of first virtual queues, including: Obtaining the occupancy rate of each of the first virtual queues in the first virtual queue buffer area; When the occupancy rate of the first virtual queue is less than a first occupancy threshold, shrinking the first virtual queue; When the occupancy rate of the first virtual queue is greater than a second occupancy threshold, expanding the capacity of the first virtual queue; The second occupancy threshold is greater than the first occupancy threshold.

2. The data cache processing method according to claim 1, characterized in that: When the occupancy rate of the first virtual queue is greater than the second occupancy threshold, the first virtual queue is expanded, including: When the occupancy rate of the first virtual queue is greater than a second occupancy threshold, acquiring a spare memory of a buffer area of ​​the first virtual queue; If the spare memory of the first virtual queue buffer area is greater than the first capacity value, the first virtual queue is expanded; If the spare memory of the first virtual queue buffer area is less than or equal to the first capacity value, the spare memory is allocated to each first virtual queue.

3. The data cache processing method according to claim 1, characterized in that: The method further comprises: When the occupancy rate of the first virtual queue buffer area is greater than the priority flow control PFC threshold, a PFC pause frame is sent to the upstream device.

4. The data cache processing method according to claim 1, characterized in that: The first virtual queue includes a plurality of flow type areas; Before obtaining the occupancy rate of each of the first virtual queues in the first virtual queue buffer area, the method further includes: Acquire stream data sent by an upstream device, wherein the stream data includes at least one data packet; Based on the data priority and the flow type, the data packets are classified, and the classified data packets are cached in the flow type area of ​​the corresponding first virtual queue.

5. The data cache processing method according to claim 1, characterized in that: Establishing a second virtual queue buffer area at the data outlet of the data forwarding device, wherein the second virtual queue buffer area includes a plurality of second virtual queues, and the second virtual queue includes a plurality of flow type areas; The method further comprises: receiving stream data output by the data forwarding device, wherein the stream data includes at least one data packet; Based on the data priority and the flow type, the data packets are classified, and the classified data packets are cached in the flow type area of ​​the corresponding second virtual queue.

6. The data cache processing method according to claim 5, characterized in that: The method further comprises: In response to a PFC pause frame sent by a downstream node, the second virtual queue is paused from sending data.

7. The data cache processing method according to claim 5, characterized in that: The method further comprises: Obtaining the occupancy rate of each of the second virtual queues in the second virtual queue buffer area; When the occupancy rate of the second virtual queue is less than a third occupancy threshold, shrinking the second virtual queue; When the occupancy rate of the second virtual queue is greater than a fourth occupancy threshold, expanding the capacity of the second virtual queue; The fourth occupancy threshold is greater than the third occupancy threshold.

8. The data cache processing method according to claim 7, characterized in that: When the occupancy rate of the second virtual queue is greater than a fourth occupancy threshold, performing capacity expansion processing on the second virtual queue includes: When the occupancy rate of the second virtual queue is greater than a fourth occupancy threshold, acquiring a spare memory of a buffer area of ​​the second virtual queue; If the spare memory of the second virtual queue buffer area is greater than the second capacity value, the second virtual queue is expanded; If the spare memory of the second virtual queue buffer area is less than or equal to the second capacity value, the spare memory is allocated to each second virtual queue.

9. The data cache processing method according to claim 7, characterized in that: The method further comprises: When the occupancy rate of the second virtual queue buffer area is greater than the explicit congestion notification (ECN) watermark, the data packet is ECN marked according to the occupancy rate of each second virtual queue.

10. A data cache processing device, characterized in that: Applied to a data forwarding device, a first virtual queue buffer is established at a data entry of the data forwarding device, wherein the first virtual queue buffer includes a plurality of first virtual queues, including: An acquisition module, used for acquiring the occupancy rate of each of the first virtual queues in the first virtual queue buffer area; A capacity reduction module, configured to reduce the capacity of the first virtual queue when the occupancy rate of the first virtual queue is less than a first occupancy threshold; The expansion module is used to expand the first virtual queue when the occupancy rate of the first virtual queue is greater than a second occupancy threshold; wherein the second occupancy threshold is greater than the first occupancy threshold.

11. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the data cache processing method described in any one of claims 1 to 9 by executing the executable instructions.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data cache processing method according to any one of claims 1 to 9 is implemented.

13. A computer program product comprising: A computer program or instruction, characterized in that when the computer program or instruction is executed by a processor, it implements the data cache processing method described in any one of claims 1 to 9.

Citation Information

Cited By

  • Network load balancing method and device

    CN120825454A