A data transmission method, system, electronic device, and storage medium

CN116366563BActive Publication Date: 2026-08-14CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-12
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

对于多活P4可编程交换机网关的限速问题,目前仍存在精度不够,限速不均匀的问题

Benefits of technology

[0033]Therefore, the data processing method in this application forwards external data access requests based on the token count of the P4 devices using the default request ordering among P4 devices, and handles packet loss according to the default probability. It does not rely on frequent control plane adjustments, thus enabling finer-grained limitation of the traffic rate accessing the VPC from the public network, while not affecting the high-speed packet forwarding service of the P4 data plane (data layer). Compared to other rate-limiting methods that do not rely on control plane adjustments, this application has higher accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366563B_ABST
    Figure CN116366563B_ABST
Patent Text Reader

Abstract

This application provides a data transmission method, system, electronic device, and storage medium. The method includes: periodically refreshing the traffic rate limit of each P4 device based on historical statistical information of a P4 device cluster, wherein the traffic rate limit includes a number of tokens within a window, the number of tokens within the window representing the remaining bandwidth of the P4 device; setting a default request sorting for each P4 device according to the communication latency between the P4 devices; in response to an external data packet request, if the number of tokens within the window corresponding to the first P4 device in the P4 device cluster is higher than a token count warning line, the first P4 device subtracts the number of tokens consumed by the external data packet from its own token count and processes the external data packet request based on the remaining token count; otherwise, the first P4 device processes the request according to its default packet loss policy. This application does not rely on frequent control plane adjustments and can limit the traffic rate from public network access at a finer time granularity, while not affecting the high-speed data packet forwarding service of the P4 data plane.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data transmission technology, specifically relating to a data transmission method, system, electronic device, and storage medium. Background Technology

[0002] With the development of Software Defined Networking (SDN) technology, programmable data planes (data layers) enable cloud network developers to create customized protocols in a top-down manner. During development, the Programming Protocol-Independent Packet Processors (P4) language is widely adopted. P4 can describe the forwarding behavior of the programmable data plane (data layer), providing a standardized way to describe how packets are processed on an architecture independent of the destination. P4 programmable switches offer high performance, high throughput, can offload network stack operations and server workloads, and have high functional flexibility. Many cloud vendors have also launched cloud gateway products based on P4 programmable switches. In a cloud network, the cloud gateway sits between the Virtual Private Cloud (VPC) and the public network. Its main functions include switching and forwarding between the underlying physical network and the upper-layer virtual network, and providing traffic shaping. However, the rate limiting issue for multi-active P4 programmable switch gateways still suffers from insufficient accuracy and uneven rate limiting. Summary of the Invention

[0003] In view of the above-mentioned shortcomings of related technologies, this application provides a data transmission method, system, electronic device and storage medium that can provide adaptive and reliable bandwidth limiting services in uneven access traffic environments, while not affecting the normal processing and forwarding of legitimate data packets on P4 devices.

[0004] In a first aspect, this application provides a data transmission method, comprising: periodically refreshing the traffic rate limit of each P4 device according to historical statistical information of the P4 device cluster, wherein the traffic rate limit includes the number of tokens within a window, and the number of tokens within the window is used to represent the remaining bandwidth of the P4 device;

[0005] Set the default request sorting for each P4 device according to the communication latency between each P4 device;

[0006] In response to an external data packet request, if the number of tokens in the window of the first P4 device in the P4 device cluster is higher than the token count warning line, the first P4 device subtracts the number of tokens consumed by the external data packet from its token count and processes the external data packet request based on the remaining token count; otherwise, the first P4 device processes the request according to its default packet loss policy.

[0007] Furthermore, in some embodiments of this application, subtracting the number of tokens consumed by the external data packet from the first P4 device token count and processing the external data packet request based on the remaining token count specifically includes:

[0008] If the number of remaining tokens in the first P4 device is higher than the token count warning line, then the first P4 device forwards the external data packet request.

[0009] Otherwise, the first P4 device sends bandwidth request packets to the second P4 device according to the default request order.

[0010] Furthermore, in some embodiments of this application, the method further includes: in response to the first P4 device sending a bandwidth request packet to the second P4 device according to a default request order,

[0011] If the number of tokens in the window of the second P4 device meets the bandwidth request packet, the second P4 device sends a bandwidth response packet to the first P4 device.

[0012] Otherwise, the second P4 device determines whether the number of tokens in its window is higher than the token count warning line.

[0013] Furthermore, in some embodiments of this application, the second P4 device determines whether the number of tokens within its window is higher than the token count warning line:

[0014] If so, the second P4 device sends a bandwidth request packet to the third P4 device according to its default request order and sends a bandwidth response packet to the first P4 device;

[0015] If not, the second P4 device discards the bandwidth request packet sent by the first P4 device.

[0016] Furthermore, in some embodiments of this application, the data transmission method further includes a first P4 device receiving a bandwidth response packet sent by a second P4 device, wherein the number of tokens in the window of the first P4 device is increased by the number of tokens corresponding to the bandwidth response packet.

[0017] Furthermore, in some embodiments of this application, the default packet loss strategy is further defined as follows:

[0018] If the number of tokens in the window of the P4 device falls below the token count warning threshold, check if the bandwidth request has timed out.

[0019] If the bandwidth request has not timed out, the data packet is dropped according to probability.

[0020] Otherwise, the data packet is discarded.

[0021] Furthermore, in some embodiments of this application, the probability is:

[0022]

[0023] Where Q is the packet loss probability, and i is a positive integer representing the P4 device number in the P4 device cluster. This is the token count warning line for the i-th P4 device. It is the number of tokens in the window and the token count warning line. The difference represents the number of tokens sent beyond the alarm threshold. Represents the exponential progression factor. It is a easing factor used to adjust the expected value of the final over-issued packets.

[0024] Secondly, this application provides a data transmission system, comprising:

[0025] The bandwidth limiting module is used to periodically refresh the traffic rate limit of each P4 device based on the historical statistical information of the P4 device cluster. The traffic rate limit includes the number of tokens in the window, which is used to represent the remaining bandwidth of the P4 device.

[0026] The bandwidth forwarding module is used to set the default request sorting of each P4 device according to the communication delay between each P4 device.

[0027] The bandwidth response module is used to respond to external data packet requests. If the number of tokens in the window of the first P4 device in the P4 device cluster is higher than the token count warning line, the number of tokens consumed by the external data packet is subtracted from the number of tokens in the first P4 device's token count. Otherwise, the first P4 device handles the packet loss according to its default packet loss policy.

[0028] Thirdly, an electronic device is provided, comprising:

[0029] Processor, memory, among which,

[0030] This memory is used to store computer programs.

[0031] The processor is used to retrieve and run the computer program from memory, causing the electronic device to perform the aforementioned electronic device method.

[0032] Fourthly, a computer storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the methods described in the above aspects.

[0033] Therefore, the data processing method in this application forwards external data access requests based on the token count of the P4 devices using the default request ordering among P4 devices, and handles packet loss according to the default probability. It does not rely on frequent control plane adjustments, thus enabling finer-grained limitation of the traffic rate accessing the VPC from the public network, while not affecting the high-speed packet forwarding service of the P4 data plane (data layer). Compared to other rate-limiting methods that do not rely on control plane adjustments, this application has higher accuracy. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is a schematic diagram illustrating a rate limiting application scenario for the P4 network management cluster in related technologies.

[0036] Figure 2 It is a data center network control plane and data plane analysis architecture in related technologies;

[0037] Figure 3 These are schematic diagrams illustrating data transmission methods in some embodiments of this application;

[0038] Figure 4 This is an overall flowchart of the data transmission method in some embodiments of this application;

[0039] Figure 5 This is an internal flowchart of the data transmission method in some embodiments of this application;

[0040] Figure 6 This is a simulation diagram showing the effect of applying the data transmission method of this application;

[0041] Figure 7 This is a schematic block diagram of a data transmission system according to an embodiment of this application;

[0042] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0043] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of this application.

[0044] The following are definitions of some relevant abbreviations and key terms in this application:

[0045] GW (Gateway);

[0046] SDN (Software Defined Network).

[0047] P4 (Programming Protocol-independent Packet Processors).

[0048] VPC (Virtual Private Cloud);

[0049] RL (Rate Limiting).

[0050] GRD (Global Random Drop).

[0051] With the development of Software Defined Networking (SDN) technology, programmable data planes (data layers) enable cloud network developers to create customized protocols in a top-down manner. During development, the Programming Protocol-Independent Packet Processors (P4) language is widely used. P4 can describe the forwarding behavior of the programmable data plane (data layer), providing a standardized way to describe how packets are processed on an architecture independent of their destination. P4 programmable switches offer high performance, high throughput, can offload network stack operations and server workloads, and have high functional flexibility. Many cloud vendors have also launched cloud gateway products based on P4 programmable switches.

[0052] Figure 1 This is a schematic diagram illustrating a rate limiting application scenario for a P4 network management cluster in related technologies. For example... Figure 1As shown, the cloud gateway sits between the Virtual Private Cloud (VPC) and the public network within the cloud network. Its main functions include switching and forwarding between the underlying physical network and the upper-layer virtual network, and providing traffic shaping. Currently, rate limiting for multi-active P4 programmable switch gateways still suffers from insufficient accuracy and uneven rate limiting. The challenge lies in how to adjust the forwarding behavior of each P4 device in a timely manner based on traffic changes. Traffic from the VPC to the public network is generally easily and evenly distributed to each multi-active P4 device through load balancing. However, traffic from the public network to the VPC must pass through a specific P4 device, resulting in uneven distribution across the P4 devices. Furthermore, the traffic model is difficult to predict in advance, making accurate rate limiting through distributed methods challenging.

[0053] Figure 2 This refers to the data center network control plane and data plane analysis architecture in related technologies. For example... Figure 2 As shown, in the existing SDN framework, the network is divided into a control plane (control layer) and a data plane (data layer). The control plane (control layer) can achieve rate limiting by communicating with the P4 programmable switch cluster through the management network and dynamically adjusting its forwarding behavior. However, this communication is time-consuming and the information is outdated, making it difficult to accurately implement rate limiting functionality for multiple active P4 devices at a fine time granularity.

[0054] On the other hand, distributed rate limiting methods in related technologies, such as the Global Random Drop (GRD) method, face the challenge of inaccurate control when it is difficult to predict traffic access characteristics in advance. Figure 6 As shown in (b). Distributed rate limiting methods applied to general-purpose server (such as x86) clusters, in some related technologies, require synchronous messages to inform each node of its traffic status, thus resulting in inaccurate rate limiting at a finer time granularity. Furthermore, the control protocol of this method is divided into a token bucket module, a message processing module, and a synchronization module, making the protocol logic relatively complex, unfriendly to P4 implementations, and unsuitable for commercial P4 switches designed for high-speed forwarding.

[0055] Figure 3 These are schematic diagrams illustrating data transmission methods in some embodiments of this application. Figure 4 This is an overall flowchart of the data transmission method in some embodiments of this application. Figure 5 This is an internal flowchart of a data transmission method in some embodiments of this application. For example... Figure 3 As shown, this application improves upon the rate limiting methods of related technologies and the distributed rate limiting methods of general server clusters, which can be divided into two main stages:

[0056] In the first phase, during system initialization, the control plane limits the flow rate based on historical statistical information collected from each P4 device. , split into , ,..., They are distributed to the following in the form of flow tables: One P4 device. Among them, , ,..., The sum of them is The control plane then pushes a default request order to each P4 device in the form of a flow table. , ,..., . For push devices Other than The order of P4 devices. One P4 device and its associated devices. The lower the latency of communication between them, the better. China and Vietnam are ranked higher.

[0057] In the second phase, each P4 device processes traffic from the public network to the VPC according to its local rate-limiting algorithm. During this phase, the control plane operates on a long-term cycle. The monitoring system, based on statistical information, re-splits the traffic rate limits. for , ,..., And distributed to each P4 device. , ,..., The sum of these is R.

[0058] like Figure 4 As shown, the local rate-limiting algorithm for each P4 device in the second phase is detailed below:

[0059] The first step is to set a timer timeout. Based on the token bucket rate limiting method, the local rate is limited. Refined into token bucket window time ( Greater than But much smaller ) and the number of tokens in the window (In P4 programming, token counting is implemented using a counter, with one token corresponding to one byte.) Additionally, an early warning threshold is set. If the number of tokens falls below the warning threshold, the P4 device will be triggered to send a bandwidth request packet.

[0060] The second step is to consider data packets entering from the P4 device ingress point:

[0061] If you need to monitor the rate of this data packet, proceed to step three;

[0062] If the packet is a bandwidth request packet from another device, skip to step four;

[0063] If the data packet is a response packet to a bandwidth request packet that you have sent, then skip to step five.

[0064] Thirdly, on the one hand, if the number of tokens in the token counter is still higher than the warning line. If the number of tokens consumed by the received data packet is subtracted from the token counter, the data packet is forwarded. If the remaining token count is found to be less than the warning threshold... Sort locally. The first W P4 devices in the middle of the multicast bandwidth request packet start a local timer. The bandwidth request packet specifies the number of tokens required, which is equal to... , This represents the total number of tokens allowed to be consumed within this window. Its source is the device that triggered the alarm. The goal is to sort. The front of the middle A set of devices (which can be implemented in P4 via multicast).

[0065] On the other hand, if the number of tokens in the token counter is already higher than the warning line when the data packet is received. If the value is low, first check if the timer has expired. If the timer has not expired, then proceed according to probability. Discarding data packets, probability The settings can be compared to active queue management strategies, such as packet loss functions.

[0066]

[0067] in, It is a counter and The difference represents the number of tokens sent beyond the alarm threshold. Represents the exponential progression factor. The smaller the value, the more sensitive the system is to alarms, and the faster the packet loss probability rises to (1). This is a leniency factor; by setting this factor, the expected value of the final oversent packet count can be adjusted. If the timer has expired, the packet is discarded.

[0068] It should be noted that because P4 devices are not good at real number operations, the packet loss strategy is implemented in the first stage by the controller sampling and calculating the value of the continuous function (1), and then distributing it to each P4 device in the form of a flow table. When developing network functions on P4 devices, it is not convenient to implement floating-point operations and complex branch judgments, loop control, etc. Therefore, the packet loss function (1) is calculated by the controller in the first stage based on the changing characteristics of (1) using Latin hypercube sampling. At the same time as the controller distributes the flow table, it will distribute the result of the sampling calculation to each P4 device in the form of a table. The P4 devices still use the Match-Action method to quickly look up the pre-calculated probability table to decide whether to drop the data packet. In other words, each P4 device can... , , and The parameters are determined by the controller in the first phase based on historical information. Sorting is also distributed to each P4 forwarding device via multicast packets. Random discarding requires a random number generation algorithm, which can be implemented using the hashing method employed by the P4 pipeline to achieve a near-uniform random number distribution.

[0069] Finally, because the control plane periodically initializes the system and needs to collect historical data to determine the method parameters for the next round, an efficient data acquisition mechanism must be provided. This application can achieve the aggregation and analysis of network information from the data plane based on a network monitoring system (such as Barefoot Deep Insight) deployed in conjunction with the P4 device.

[0070] Step four, as Figure 5 As shown, the device Received from device The bandwidth request packet. If The remaining tokens are sufficient to satisfy the requirements. If required, then send a response packet, with the sending source being the device. The target is equipment. The package contains a number of relief tokens. and order

[0071] .

[0072] if The remaining tokens are insufficient to satisfy The requirements were met, but the alarm threshold was not reached. Then only keep One token, the rest A token to help Send response packet and set

[0073] ,

[0074] Similarly to step three, sort locally. The front-end W P4 devices request multicast bandwidth packets and start a local timer. If If the remaining tokens are below the alarm threshold, the request packet will be discarded and no response will be given.

[0075] Step 5, Equipment The system received a reply packet containing the number of relief tokens for the bandwidth request packet it had previously sent. This will increase the token counter. and order

[0076] .

[0077] It should be further noted that the data transmission method in this application should be adjusted in implementation when facing P4 devices with different architectures.

[0078] Figure 6 This is a simulation diagram showing the effect of applying the data transmission method of this application. The blue line represents the total inbound traffic (9 Gbps) from the Internet to the data center's intranet, the black line represents the gateway's rate limiting requirement (3 Gbps), and the red line represents the actual inbound traffic after the gateway's rate limiting. Figure 6 (a) When customers access the gateway randomly from multiple points, the GRD method is ideal for gateway rate limiting. Figure 6 (b) When a customer has a single point of access, using the GRD method for gateway rate limiting is ineffective, mainly because it is limited by the single point of access. Figure 6 (c) When customers are randomly located at multiple points, the method described in this application is used to limit gateway speeds, and the effect is ideal. Figure 6 (d) When using the method described in this application for gateway rate limiting in the case of single-point access by a customer, the effect is ideal.

[0079] This application does not rely on frequent control plane adjustments, thus enabling finer-grained time-based limiting of traffic rates accessing the VPC from the public network, while maintaining high-speed packet forwarding services on the P4 data plane (data layer). Compared to other rate-limiting methods that do not rely on control plane adjustments, this application offers higher accuracy.

[0080] According to another aspect of the embodiments of this application, a system for implementing the above-described data transmission method is also provided, such as... Figure 7 As shown, the system 200 includes:

[0081] The bandwidth limiting module 210 is used to periodically refresh the traffic rate limit of each P4 device based on the historical statistical information of the P4 device cluster. The traffic rate limit includes the number of tokens in the window, which is used to represent the remaining bandwidth of the P4 device.

[0082] The bandwidth forwarding module 220 is used to set the default request sorting of each P4 device according to the communication delay between each P4 device.

[0083] The bandwidth response module 230 is used to respond to external data packet requests. If the number of tokens in the window of the first P4 device in the P4 device cluster is higher than the token count warning line, the number of tokens consumed by the external data packet is subtracted from the number of tokens in the first P4 device. Otherwise, the first P4 device is processed according to its default packet loss policy.

[0084] Figure 8 This is a schematic diagram of the structure of an electronic device 300 provided in an embodiment of this application. The electronic device 300 can be used to execute the data transmission method provided in the embodiment of this application.

[0085] The electronic device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of this application. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0086] The memory 320 can be used to store execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage electronic device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the electronic device 300 is able to perform some or all of the steps in the above method embodiments.

[0087] The processor 310 serves as the control center of the storage electronic device, connecting various parts of the device via interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.

[0088] The communication unit 330 is used to establish a communication channel, enabling the storage electronic device to communicate with other electronic devices. It can receive user data sent by other electronic devices or send user data to other electronic devices.

[0089] This application also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of this application. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0090] Therefore, this application proposes a preemption optimization method based on the divide-and-conquer approach to improve the algorithm's feasibility, running speed, and stability. Based on the allocation scheme of virtual machines on host machines in a server cluster, it proposes resource preemption formulas for a single host machine and for the entire server cluster. Based on the virtual machine's occupation of the host machine and the host machine's resource usage, it proposes a formula for the preemption contribution of a single virtual machine to the host machine. Based on the general scenario of offline preemption optimization, it proposes an accelerated convergence method for the preemption optimization algorithm. The technical effects achieved by this embodiment can be found in the description above, and will not be repeated here.

[0091] Those skilled in the art will clearly understand that the techniques in the embodiments of this application can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer electronic device (which may be a personal computer, server, or a second electronic device, network electronic device, etc.) to execute all or part of the steps of the data transmission methods described in the various embodiments of this application.

[0092] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the electronic device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[0093] In the embodiments provided in this application, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between systems or units may be electrical, mechanical, or other forms.

[0094] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0095] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0096] Although this application has been described in detail with reference to the accompanying drawings and preferred embodiments, it is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of this application by those skilled in the art without departing from the spirit and essence of this application, and such modifications or substitutions should all be within the scope of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should also be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the scope of the claims.

Claims

1. A data transmission method, characterized in that, include: Based on historical statistics of the P4 device cluster, the traffic rate limit of each P4 device is periodically refreshed. The traffic rate limit includes the number of tokens within a window, which represents the remaining bandwidth of the P4 device. Set the default request sorting for each P4 device according to the communication latency between each P4 device; In response to an external data packet request, if the number of tokens in the window of the first P4 device in the P4 device cluster is higher than the token count warning line, the first P4 device subtracts the number of tokens consumed by the external data packet from its token count and processes the external data packet request based on the remaining token count; otherwise, the first P4 device processes the request according to its default packet loss policy. The default request sorting is as follows: , ,..., ,in, For push devices Other than The sorting of P4 devices, one P4 device and the device The lower the latency of communication between them, the better. China and Vietnam are ranked higher; The process of subtracting the number of tokens consumed by the external data packet from the first P4 device token count and processing the external data packet request based on the remaining token count specifically includes: If the number of remaining tokens in the first P4 device is higher than the token count warning line, then the first P4 device forwards the external data packet request. Otherwise, the first P4 device sends bandwidth request packets to the second P4 device according to the default request order; The data transmission method further includes the first P4 device receiving a bandwidth response packet sent by the second P4 device, and the number of tokens in the window of the first P4 device increasing by the number of tokens corresponding to the bandwidth response packet.

2. The data transmission method according to claim 1, characterized in that, The method further includes: in response to the first P4 device sending a bandwidth request packet to the second P4 device according to the default request order. If the number of tokens in the window of the second P4 device meets the bandwidth request packet, the second P4 device sends a bandwidth response packet to the first P4 device. Otherwise, the second P4 device determines whether the number of tokens in its window is higher than the token count warning line.

3. The data transmission method according to claim 2, characterized in that, The second P4 device determines whether the number of tokens in its window exceeds the token count warning threshold: If so, the second P4 device sends a bandwidth request packet to the third P4 device according to its default request order and sends a bandwidth response packet to the first P4 device; If not, the second P4 device discards the bandwidth request packet sent by the first P4 device.

4. The data transmission method according to claim 1, characterized in that, Also includes: The default packet loss policy is as follows: If the number of tokens in the window of the P4 device is lower than the token count warning line, check if the bandwidth request has timed out: If the bandwidth request has not timed out, the data packet is dropped according to probability; Otherwise, the data packet is discarded.

5. The data transmission method according to claim 4, characterized in that, The probability is: Where Q is the packet loss probability, and i is a positive integer representing the P4 device number in the P4 device cluster. This is the token count warning line for the i-th P4 device. It is the number of tokens in the window and the token count warning line. The difference represents the number of tokens sent beyond the alarm threshold. Represents the exponential progression factor. It is a easing factor used to adjust the expected value of the final over-issued packets.

6. A data transmission system, characterized in that, include: The bandwidth limiting module is used to periodically refresh the traffic rate limit of each P4 device based on the historical statistical information of the P4 device cluster. The traffic rate limit includes the number of tokens in the window, which is used to represent the remaining bandwidth of the P4 device. The bandwidth forwarding module is used to set the default request sorting of each P4 device according to the communication delay between each P4 device. The bandwidth response module is used to respond to external data packet requests. If the number of tokens in the window of the first P4 device in the P4 device cluster is higher than the token count warning line, the number of tokens consumed by the external data packet is subtracted from the number of tokens in the first P4 device. Otherwise, the first P4 device is handled according to its default packet loss policy. The default request sorting is as follows: , ,..., ,in, For push devices Other than The sorting of P4 devices, one P4 device and the device The lower the latency of communication between them, the better. China and Vietnam are ranked higher; The process of subtracting the number of tokens consumed by the external data packet from the first P4 device token count and processing the external data packet request based on the remaining token count specifically includes: If the number of remaining tokens in the first P4 device is higher than the token count warning line, then the first P4 device forwards the external data packet request. Otherwise, the first P4 device sends bandwidth request packets to the second P4 device according to the default request order; The data transmission system further includes a first P4 device receiving a bandwidth response packet sent by a second P4 device, wherein the number of tokens in the window of the first P4 device is increased by the number of tokens corresponding to the bandwidth response packet.

7. An electronic device, characterized in that, include: processor; Memory used to store the processor's execution instructions; The processor is configured to perform the method according to any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Message processing method and device

    CN109981478A