Flow control method, network device and storage medium

By controlling the packet interval duration of service flow packets according to the expected rate and distribution function in the network device, and determining the packet drop probability based on the cache queue length, the network congestion problem is solved, and the predictability of service flow and SLA satisfaction is achieved. .

CN114095449BActive Publication Date: 2025-02-25HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010659337.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-09
Publication Date
2025-02-25
Estimated Expiration
2040-07-09

AI Technical Summary

Technical Problem

In the network, when the transmission rate of the service flow exceeds the network service rate, it is easy to cause network congestion, which in turn affects the service level agreement (SLA) that affects the service flow.

Method used

The network device determines the target packet interval duration based on the desired rate and distribution function, and controls the packet interval duration of the service flow packets so that it is controllable and predictable. At the same time, the probability of packet discarding is determined based on the occupied length of the cache queue, and the traffic control of the service flow is realized.

Benefits of technology

By controlling the packet interval duration and discarding probability, network congestion can be effectively alleviated, the predictability of service flows is enhanced, and the SLA of service flows is met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114095449B_ABST
    Figure CN114095449B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a flow control method, a network device and a storage medium, which belongs to the field of communication technology. In the embodiment of the present application, the network device determines the target packet interval duration according to the expected rate and the first distribution function, and then sends the data packets of the first service flow according to the target packet interval duration, so that the packet interval duration between the data packets of the service flow is controllable, and the predictability of the service flow is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a flow control method, a network device, and a storage medium. Background Art

[0002] Currently, there are more and more types of services carried on the network. Many services require high-speed transmission, such as high-definition video services and virtual reality (VR) services. When the rate at which the service flow enters the network is greater than the service rate of the network, network congestion will occur. In this case, it is necessary to control the service flow to ensure that the service level agreement (SLA) of the service flow in the network can be met. Summary of the invention

[0003] The embodiment of the present application provides a flow control method, a network device and a storage medium, which can adjust the packet interval duration of data packets of a service flow, so that the packet interval duration between data packets can be controlled, and the predictability of the service flow is enhanced. The technical solution is as follows:

[0004] In a first aspect, a flow control method is provided, the method comprising: a network device determines a target packet interval duration based on an expected rate and a first distribution function, the first distribution function being used to indicate a functional relationship between a packet interval duration for sending a data packet by the network device and the expected rate, the expected rate being an allocated rate determined based on a business flow transmitted by the network device, the target packet interval duration being the time interval between data packets of the business flow transmitted by the network device sent by the network device; the network device receives a data packet belonging to a first business flow; the network device sends the data packet according to the target packet interval duration.

[0005] In an embodiment of the present application, the network device can send data packets of the business flow according to the target packet interval duration, so that the packet interval duration between the data packets of the business flow is controllable, thereby enhancing the predictability of the business flow.

[0006] In some possible embodiments, before sending the data packet according to the target packet interval duration, the network device determines the discard probability of the data packet according to the occupied queue length of the cache queue of the first service flow; if the network device determines not to discard the data packet according to the discard probability of the data packet, the data packet is added to the cache queue. If the network device determines to discard the data packet according to the discard probability of the data packet, the data packet is discarded.

[0007] In an embodiment of the present application, the probability of discarding a data packet is determined according to the occupied queue length of the cache queue of the business flow, and the discard probability is used to decide whether to discard the data packet, thereby alleviating network congestion when the business flow bursts and achieving quantitative control of the packet loss rate.

[0008] In some possible embodiments, the implementation process of the network device determining the discard probability of the data packet based on the occupied queue length of the cache queue of the first business flow is as follows: the network device determines the discard probability of the data packet corresponding to the occupied queue length of the cache queue of the first business flow based on a first mapping relationship, wherein the first mapping relationship indicates a mapping relationship between queue length and discard probability.

[0009] In some possible embodiments, the traffic control method further includes: the network device determines the first mapping relationship according to the SLA of the first service flow.

[0010] In some possible embodiments, the implementation process of the network device determining the first mapping relationship according to the SLA of the first service flow may be: the network device obtains the capacity of the cache used to cache the data packet and the forwarding bandwidth of the network device; the network device determines the first mapping relationship according to the forwarding rate requirement value, delay requirement value and packet loss rate requirement value included in the SLA of the first service flow, the capacity of the cache, the forwarding bandwidth of the network device, and the first distribution function.

[0011] When a network device forwards a data packet of a service flow, the data packet may need to enter a cache queue and wait. In this case, the waiting of the data packet in the cache queue will cause a certain delay, and subsequently, the action of the network device forwarding the data packet will also cause a certain delay. The embodiment of the present application considers these two delays at the same time, thereby determining the probability of data packet discard under different queue lengths, so as to ensure that the transmission of the data packet can meet both the delay requirement and the packet loss rate requirement.

[0012] In some possible embodiments, the implementation process of the network device determining the target packet interval duration based on the expected rate and the first distribution function is as follows: the network device determines the average packet interval duration based on the expected rate; and determines the target packet interval duration based on the average packet interval duration and the first distribution function, wherein the target packet interval duration is a random packet interval duration that obeys the first distribution function.

[0013] In this implementation, the first distribution function is used to indicate the functional relationship between the packet interval duration and the expected rate. The target packet interval duration is generated according to the first distribution function, and the target packet interval duration obeys the first distribution function. In this way, data packets are sent according to the target packet interval duration, making the packet interval duration of the data packets controllable and calculable.

[0014] In some possible embodiments, the implementation process of the network device determining the target packet interval duration based on the expected rate and the first distribution function is as follows: the network device determines the average packet interval duration based on the expected rate; the network device determines the second distribution function based on the average packet interval duration and the first distribution function; the network device determines the output rate based on the second distribution function, the second distribution function is used to indicate the functional relationship between the output rate and the expected rate, and the output rate is a random rate that obeys the second distribution function; the network device determines the target packet interval duration based on the output rate.

[0015] In this implementation, the second distribution function is used to indicate the functional relationship between the output rate and the expected rate. An output rate that obeys the second distribution function is generated according to the second distribution function, and the sending of data packets is subsequently controlled according to the output rate, thereby making the data packet output rate predictable and calculable.

[0016] In some possible embodiments, the first distribution function is an exponential distribution function, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

[0017] In some possible embodiments, the first distribution function is a uniform distribution function, the average packet interval duration is equal to the average of the maximum packet interval duration and the minimum packet interval duration, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

[0018] In some possible embodiments, when the target packet interval is a packet interval that obeys a first distribution function, the implementation process of the network device sending the data packet according to the target packet interval is as follows: from the moment when the first data packet is sent, the network device sends the second data packet after the target packet interval, the first data packet and the second data packet are adjacent, and the target packet interval refers to the packet interval used to control the sending of the second data packet.

[0019] In some possible embodiments, when the target packet interval is determined according to the output rate that obeys the second distribution function, the implementation process of the network device sending the data packet according to the target packet interval is: the network device obtains N tokens from the token bucket according to the output rate and the duration of the first cycle, where N is an integer greater than or equal to 0, and the first cycle refers to the effective time for the output rate to control the sending of data packets; from the start time of the first cycle, the network device uses one of the N tokens to send a data packet every target packet interval, and the target packet interval is the average interval duration for sending data packets within the first cycle.

[0020] In some possible embodiments, after the network device sends the data packet according to the N tokens, at the beginning of the next cycle of the first cycle, the network device adds the N tokens to the token bucket, so as to ensure that the token bucket is full at the beginning of each cycle, thereby avoiding the network device being unable to obtain a sufficient number of tokens due to insufficient number of tokens in the token bucket.

[0021] In some possible embodiments, the traffic control method also includes: the network device obtains the capacity of the cache used to cache the data packet and the forwarding bandwidth of the network device; the network device determines the first distribution function and the expected rate based on the forwarding rate requirement value and delay requirement value included in the SLA of the first service flow, the capacity of the cache and the forwarding bandwidth of the network device.

[0022] In some possible embodiments, before the network device obtains the capacity size of the cache for caching the data packet and the forwarding bandwidth of the network device, it obtains the upper limit value of the forwarding rate of the network device; if the forwarding rate requirement value is less than the upper limit value of the forwarding rate, the network device executes the step of obtaining the capacity size of the cache for caching the data packet and the forwarding bandwidth of the network device.

[0023] The upper limit of the forwarding rate of the network device reflects the maximum forwarding capacity of the network device. By comparing the upper limit of the forwarding rate of the network device with the required forwarding rate, it is determined whether the maximum forwarding capacity of the network device can meet the SLA of the service flow. The upper limit of the forwarding rate of the network device can be equal to the forwarding bandwidth of the network device, or it can be less than the value of the forwarding bandwidth of the network device.

[0024] In some possible embodiments, the network device determines the first mapping relationship and the expected rate according to SLAs of multiple service flows in the network, a topology matrix of the network, and link bandwidth information in the network.

[0025] In a network with a control device such as a campus network, the control device can also collect the SLAs of multiple service flows in the network, the topology matrix of the network, and the link bandwidth information in the network. The network device configures the first mapping relationship and the expected rate according to the above information, and then performs flow control according to the first mapping relationship and the expected rate. In this way, the resources in the network are integrated to perform flow control, thereby improving the flow control effect.

[0026] In a second aspect, a network device is provided, wherein the network device has the function of implementing the flow control method in the first aspect. The network device includes at least one module, and the at least one module is used to implement the flow control method provided in the first aspect.

[0027] In a third aspect, a network device is provided, wherein the structure of the network device includes a processor and a memory, wherein the memory is used to store a program that supports the network device to execute the flow control method provided in the first aspect, and to store data involved in implementing the flow control method provided in the first aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may also include a communication bus, which is used to establish a connection between the processor and the memory.

[0028] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the flow control method described in the first aspect.

[0029] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the flow control method described in the first aspect.

[0030] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and will not be repeated here.

[0031] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0032] In an embodiment of the present application, the packet interval duration between data packets of the output service flow is adjusted according to the expected rate and the target packet interval duration determined by the first distribution function. In this way, the packet interval duration between data packets of the service flow is controllable, thereby enhancing the predictability of the service flow. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is an implementation scenario diagram of a flow control method provided in an embodiment of the present application;

[0034] Figure 2 This is an implementation scenario diagram of another flow control method provided in an embodiment of the present application;

[0035] Figure 3 It is a structural diagram of a network device provided in an embodiment of the present application;

[0036] Figure 4 is a flow chart of a flow control method provided by an embodiment of the present application;

[0037] Figure 5 It is a schematic diagram of a data packet in a sending cache queue provided by an embodiment of the present application;

[0038] Figure 6 It is a structural diagram of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0040] Before explaining the flow control method provided in the embodiment of the present application in detail, the application scenarios involved in the embodiment of the present application are first introduced.

[0041] SLA is an agreement between a service provider and a customer on the performance and quality of a service. In the field of the Internet, the SLA of a service usually includes the latency, packet loss rate, bandwidth, etc. required by the service. With the widespread development of commercial applications in the network, it is increasingly important to ensure that the SLA of the service is met. At present, the services carried on the network are becoming increasingly complex, and many services require high-speed transmission, such as high-definition video services, VR services, and augmented reality (AR) services. Among them, when the rate at which the service flow enters the network is greater than the service rate of the network, network congestion will occur. In this case, if the service flow is not restricted, the convergence of a large number of bursty service flows will make the network more crowded. At the same time, the service flow has micro-bursts, self-similarities, and bursty modes after multi-flow convergence, which cannot be accurately quantified. Therefore, if the service flow is not restricted or shaped to a certain extent, it will be difficult to ensure that the SLA of the service flow in the network is met. Based on this, an embodiment of the present application provides a flow control method for controlling the service flow entering the network to ensure the SLA of the service flow.

[0042] Next, the implementation scenarios involved in the flow control method provided in the embodiments of the present application are introduced.

[0043] Figure 1 is an implementation scenario diagram of a flow control method provided in an embodiment of the present application. Figure 1 As shown, the implementation scenario includes a terminal device 101, a network device 102 and a server 103. The terminal device 101 communicates with the server 103 through the network device 102. The number of the network device 102 is one or more.

[0044] In the embodiment of the present application, the server 103 sends data packets of the service flow to the terminal device 101 through the network device 102. After receiving the data packets of the service flow sent by the server 103, the network device 102 forwards the data packets of the service flow through the flow control method provided in the embodiment of the present application, so as to adjust the output rate of the data packets of the service flow.

[0045] Among them, in a possible scenario, the server 103 is a broadband remote access server (BRAS), and the network device 102 is a routing device with data forwarding function in the access network between the BRAS and the terminal device 101. It should be noted that the BRAS is located at the edge of the Internet service provider (ISP) network and is used to route the service flow from the ISP network. Usually, the bandwidth of the access network from the BRAS to the terminal device is often tight, and network congestion is prone to occur. In this case, the method provided in the embodiment of the present application is used to impose certain restrictions on the service flow at the network device where congestion is prone to occur in the access network, so that the delay caused by congestion can be reduced.

[0046] Optionally, in another possible scenario, the server 103 is a server in a campus network, and the terminal device 101 is an access device in the campus network such as a gateway device with access control capabilities, or the terminal device 101 is a user terminal in the campus network such as a desktop computer, a laptop computer, a smart phone, etc. The network device 102 is a device with routing and forwarding functions between the server 103 and the terminal device 101, such as a router, a switch, etc.

[0047] Figure 2 is an implementation scenario diagram of the flow control method provided in the embodiment of the present application when it is applied to a data center network. Figure 2 The implementation scenario includes multiple cabinet servers 201, multiple top of rack (TOR) switches 202, multiple aggregation switches 203, and multiple core servers 204. The cabinet servers 201 have established a communication connection with the TOR switches 202, the TOR switches 202 have established a communication connection with the aggregation switches 203, and the aggregation switches 203 have established a communication connection with the core servers 204.

[0048] It should be noted that when the cabinet server 201 uploads data traffic, it first sends the data traffic to the corresponding TOR switch 202. After receiving the data traffic, the TOR switch 202 shapes the received data traffic by the method provided in the embodiment of the present application, and then transmits it to the aggregation switch 203, which uploads the data traffic to the core server 204. In this way, the network congestion caused by traffic bursts in the data center network can be reduced, and the upstream traffic in the data center network can be controlled.

[0049] It is worth noting that the various implementation scenarios and business scenarios mentioned above are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0050] Figure 3 is a schematic diagram of the structure of a network device provided in an embodiment of the present application, Figure 1 The network device 102 shown in FIG. Figure 2 The TOR switches 202 shown in the figure can all be implemented by the network device. The network device may include one or more processors 301, a communication bus 302, a memory 303 and one or more communication interfaces 304.

[0051] The processor 301 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0052] The communication bus 302 is used to transmit information between the above components. The communication bus 302 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0053] The memory 303 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 303 may exist independently and be connected to the processor 301 via the communication bus 302. The memory 303 may also be integrated with the processor 301.

[0054] The communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface 304 includes a wired communication interface and may also include a wireless communication interface. Among them, the wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.

[0055] In some embodiments, the network device may include multiple processors, such as Figure 3 301 and processor 305 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0056] In a specific implementation, as an embodiment, the network device may further include an output device 306 and an input device 307. The output device 306 communicates with the processor 301 and may display information in a variety of ways. For example, the output device 306 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 307 communicates with the processor 301 and may receive user input in a variety of ways. For example, the input device 307 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0057] In some embodiments, the memory 303 is used to store the program code 308 for executing the solution of the present application, and the processor 301 can execute the program code 308 stored in the memory 303. The program code may include one or more software modules, and the network device may implement the following by the processor 301 and the program code 308 in the memory 303. Figure 4 The flow control method provided by the embodiment.

[0058] Next, the flow control method provided in the embodiment of the present application is introduced.

[0059] Figure 4 is a flow chart of a flow control method provided by an embodiment of the present application. The method is executed by a network device, which may be the aforementioned Figure 1 The network devices shown in the figure, or the Figure 2 The TOR switch shown in , or a network device with data forwarding function in other scenarios. The method includes the following steps:

[0060] Step 401: The network device determines a target packet interval duration based on an expected rate and a first distribution function, where the first distribution function is used to indicate a functional relationship between a packet interval duration for sending data packets by the network device and the expected rate. The expected rate is an allocation rate determined based on a service flow transmitted by the network device, and the target packet interval duration is used to indicate the time interval between data packets sent by the network device for the service flow transmitted by the network device.

[0061] Among them, the service flow transmitted by the network device may refer to multiple service flows transmitted by the network device, and the expected rate is the allocation rate determined based on the multiple service flows. In this case, the multiple service flows correspond to the same expected rate. The following embodiments take one of the multiple service flows as an example to illustrate the implementation method of controlling the service flow. For the convenience of explanation, the service flow is referred to as the first service flow. Alternatively, the service flow transmitted by the network device refers to one of the multiple service flows transmitted by the network device. For the convenience of distinguishing the description, the service flow is referred to as the first service flow in the subsequent embodiments. In this case, the expected rate refers to the expected rate of the first service flow. Accordingly, each service flow transmitted by the network device corresponds to a different expected rate.

[0062] Since in this step, the network device determines the target packet interval duration according to the expected rate and the first distribution function, before executing this step, the network device may first obtain the expected rate and the first distribution function.

[0063] Exemplarily, the network device obtains the SLA of the first service flow, and determines the expected rate and the first distribution function according to the SLA of the first service flow, wherein the SLA of the first service flow includes a forwarding rate requirement value of the first service flow.

[0064] In a possible implementation, the network device obtains a rate value greater than or equal to the forwarding rate requirement value as the expected rate. Then, according to the expected rate, a first distribution function corresponding to the expected rate is obtained from a mapping relationship between the rate and the distribution function. The mapping relationship between the rate and the distribution function includes multiple rates and a distribution function applicable to each rate.

[0065] In another possible implementation, the SLA of the first service flow also includes a latency requirement value. On this basis, the network device obtains the capacity of the cache used to cache data packets of the first service flow and the forwarding bandwidth of the network device, and determines the first distribution function and the expected rate according to the forwarding rate requirement value and latency requirement value included in the SLA of the first service flow, the capacity of the cache, and the forwarding bandwidth of the network device.

[0066] It should be noted that after the data packet of the first service flow arrives at the network device, it may enter the cache queue cache to wait for the network device to forward. In this case, the process of the data packet waiting for forwarding in the cache will bring a part of the delay. In addition, the action of the network device forwarding the data packet will also bring a part of the delay. Based on this, in an embodiment of the present application, the network device obtains the capacity of the cache for caching the data packet of the first service flow and the forwarding bandwidth of the network device. The network device determines the first rate interval where the expected rate is located based on its own forwarding bandwidth and the forwarding rate requirement value included in the SLA of the first service flow, wherein the upper limit value of the first rate interval is the forwarding bandwidth of the network device, and the lower limit value is the forwarding rate requirement value. Afterwards, according to the capacity size of the cache and the average length of the data packet of the first service flow, the number of data packets that can be cached in the cache is determined, and the total amount of bytes that can be cached in the cache is calculated according to the number of data packets that can be cached. Assuming that the expected rate is v, the ratio of the total amount of bytes to v is the partial delay t1 brought by the data packet in the cache. Correspondingly, the ratio of the average length of the data packets of the first service flow to v is the other part of the delay t2 caused by the network device when forwarding the data packets. The sum of t1 and t2 is less than or equal to the delay requirement value t included in the SLA of the first service flow. From the above process, the functional relationship between the expected rate v and the byte capacity that can be cached in the cache, the average length of the data packet, and the delay requirement value can be obtained as shown in the following formula (1).

[0067]

[0068] Among them, L H is the total amount of bytes that can be cached in the cache, is the average length of the data packets of the first service flow, v is the expected rate, and t is the delay requirement value included in the SLA of the first service flow. The average length of the data packets is the actual length of the data packets of the first service flow, or the data packet length is a unit packet length, such as 1, or the data packet length is a maximum packet length value, such as 1500 bytes.

[0069] In formula (1), the byte capacity can be determined based on the cache capacity and the average length of the data packet. That is, the total amount of bytes is known, and the average length of the data packet and the delay requirement are also known. Therefore, according to formula (1), the expected rate can be obtained as shown in the following formula (2).

[0070]

[0071] if If the forwarding rate requirement value contained in the SLA of the first service flow is greater than the forwarding rate requirement value contained in the SLA of the first service flow, then according to the first rate interval determined above and formula (2), the final rate interval of the expected rate can be obtained. Among them, the lower limit of the final rate interval is The upper limit value is the forwarding bandwidth of the network device. In this case, the network device obtains a rate from the second rate interval as the expected rate.

[0072] Optionally, if If the expected rate is not greater than the forwarding rate requirement value included in the SLA of the first service flow, the final rate interval of the expected rate is the first rate interval. At this time, the network device obtains a rate from the first rate interval as the expected rate.

[0073] After obtaining the expected rate, the network device obtains the first distribution function corresponding to the expected rate from the mapping relationship between the rate and the distribution function according to the expected rate. The mapping relationship between the rate and the distribution function includes multiple rates and a distribution function applicable to each rate.

[0074] Optionally, in some possible situations, before obtaining the expected rate and the first distribution function, the network device may also determine whether the forwarding rate upper limit value of the network device has the possibility of meeting the SLA of the service flow by comparing the forwarding rate requirement value included in the SLA of the first service flow with the forwarding rate upper limit value of the network device. If the forwarding rate requirement value is less than the forwarding rate upper limit value, it means that the forwarding capability of the network device may meet the forwarding rate requirement in the SLA of the service flow. At this time, the above-mentioned operation of obtaining the expected rate and the first distribution function is performed. If the forwarding rate requirement value is not less than the forwarding rate upper limit value, it means that the forwarding capability of the network device cannot meet the forwarding rate requirement in the SLA of the service flow. In this case, the network device ends the operation. Among them, the forwarding rate upper limit value of the network device is equal to the forwarding bandwidth of the network device.

[0075] After obtaining the expected rate and the first distribution function, in a possible implementation, the network device determines the average packet interval duration according to the expected rate, and determines the target packet interval duration according to the average packet interval duration and the first distribution function. The first distribution function may be an exponential distribution function, a uniform distribution function, or other functions, which is not limited in the embodiments of the present application. The target packet interval duration is a random packet interval duration that obeys the first distribution function.

[0076] Exemplarily, the network device calculates the ratio of the average length of data packets of the first service flow to the expected rate, and uses the ratio as the average packet interval duration.

[0077] After determining the average packet interval duration, the network device determines a parameter value of the first distribution function according to the average packet interval duration.

[0078] Exemplarily, when the first distribution function is an exponential distribution function, as shown in the following formula (3), the unknown parameter in the exponential distribution function is λ, and the expected value of the exponential distribution function is 1 / λ. When x is the packet interval between data packets of the service flow, then when x obeys the above-mentioned exponential distribution, the expected value 1 / λ of the exponential distribution function represents the average packet interval duration between data packets of the service flow. Based on this, the network device can calculate λ by using the value of the average packet interval duration obtained by the above-mentioned calculation. Among them, λ is equal to the reciprocal of the average packet interval duration obtained by the above-mentioned calculation.

[0079]

[0080] For example, assuming that the value of the average packet interval calculated according to the data packet length and the expected rate is T1, then since 1 / λ=T1, it is determined that the parameter value λ of the exponential distribution function is equal to 1 / T1.

[0081] When the first distribution function is a uniform distribution function, as shown in the following formula (4), the parameters in the uniform distribution function include a and b, and the expected value of the uniform distribution function is When x is the packet interval between data packets of the service flow, then x obeys the above uniform distribution, and the expected value of the uniform distribution function is That is, it represents the average packet interval duration between the data packets of the service flow, and a and b are the minimum packet interval duration and the maximum packet interval duration of the service flow, respectively. In the embodiment of the present application, the minimum packet interval duration a is a specified duration, and the specified duration can be 0 or other values, that is, the minimum packet interval duration a is known. Based on this, the network device can calculate the value of the maximum packet interval duration b through the value of the average packet interval duration obtained by the above calculation and the value of the minimum packet interval duration a.

[0082]

[0083] After determining the parameter value of the first distribution function, the network device determines the target packet interval duration according to the first distribution function with known parameter value.

[0084] Among them, after the network device sends each data packet, it generates a random packet interval duration according to the first distribution function, and uses the random packet interval duration as the target packet interval duration for sending the next data packet. That is, the target packet interval duration is the packet interval duration between the data packet that has been sent and the next data packet.

[0085] Optionally, in another possible implementation, after determining the expected rate, the network device determines an average packet interval duration based on the expected rate; determines a second distribution function based on the average packet interval duration and the first distribution function; determines an output rate based on the second distribution function, the second distribution function being used to indicate a functional relationship between the output rate and the expected rate, the output rate being a random rate that obeys the second distribution function; and determines a target packet interval duration based on the output rate.

[0086] The network device determines the average packet interval duration with reference to the method introduced in the aforementioned first implementation manner, and determines the parameter value of the first distribution function according to the average packet interval duration.

[0087] After determining the parameter value of the first distribution function, when the first distribution function is an exponential distribution function as in formula (3), that is, when the packet interval duration obeys the exponential distribution, based on the relationship between the packet interval duration and the output rate of the data packet, it can be determined that the second distribution function obeyed by the output rate V is as shown in the following formula (5).

[0088]

[0089] Here, λ is equal to the inverse of the average packet interval time obtained by the above calculation. This embodiment of the present application will not be described in detail.

[0090] Optionally, when the first distribution function is a uniform distribution function as in formula (4), that is, when the packet interval duration obeys a uniform distribution, based on the relationship between the packet interval duration and the output rate of the data packet, the second distribution function obeyed by the output rate V can be determined as shown in the following formula (6).

[0091]

[0092] Among them, a is the minimum packet interval, b is the maximum packet interval, and V is the output rate.

[0093] After determining the second distribution function, the network device generates a random rate for each period according to the second distribution function at a certain period. The random rate is the output rate in the corresponding period. The so-called output rate in a certain period means that the output rate is valid in the period and can be used to control the sending of data packets, but is invalid in other periods outside the period.

[0094] In addition, it should be noted that for any cycle, the network device generates an output rate for controlling the sending of data packets within the cycle at the start time of the cycle, or generates an output rate for controlling the sending of data packets within the next cycle at the end time of the cycle, or the network device generates the output rate within the cycle for a specified time period in advance before the start time of the cycle, wherein the specified time period is an arbitrary time period and is not limited to this in the embodiments of the present application.

[0095] After determining the output rate within a certain period, calculate the product of the output rate and the duration of the period, round the product down to obtain a first value, which is the number N of data packets to be sent within the period. Based on the number N of data packets to be sent within the period, the duration of the period and the average length of the data packets, the average packet interval duration between each two adjacent data packets in the N data packets to be sent within the period can be determined, and this duration is used as the target packet interval duration.

[0096] Step 402: The network device receives a data packet belonging to a first service flow.

[0097] Step 403: The network device determines a probability of discarding a data packet according to the occupied queue length of the cache queue of the first service flow.

[0098] After receiving a data packet belonging to the first service flow, the network device determines, according to the first mapping relationship, a discard probability of the data packet corresponding to the occupied queue length of the buffer column of the first service flow.

[0099] The first mapping relationship indicates a mapping relationship between a queue length and a discard probability. In the embodiment of the present application, before executing this step, the network device may determine the first mapping relationship according to the SLA of the first service flow.

[0100] Exemplarily, the network device obtains the capacity of the cache for caching data packets of the first service flow and the forwarding bandwidth of the network device, and determines the first mapping relationship according to the forwarding rate requirement value, delay requirement value and packet loss rate requirement value included in the SLA of the first service flow, the capacity of the cache, the network bandwidth of the network device and the first distribution function.

[0101] It should be noted that the network device can obtain the rate expected by the network device in the process of forwarding data packets, that is, the aforementioned expected rate, according to the first distribution function, forwarding bandwidth and forwarding rate requirement value, with reference to the aforementioned method. According to the expected rate, the network device can determine the delay caused when forwarding data packets, and according to the delay caused when forwarding data packets and the delay requirement value, the network device can obtain the maximum delay allowed when the data packets of the first service flow are waiting in the cache queue. In this case, according to the number of data packets and the expected rate of the cache queue at different queue lengths, the delay corresponding to different queue lengths can be obtained. According to the delay corresponding to different queue lengths and the maximum delay allowed when the data packets are waiting in the cache queue, the probability of the data packet being discarded when the queue length of the cache queue is different is determined to ensure that the first service flow data packet can meet the packet loss rate requirement value of the SLA of the first service flow when it is discarded according to the corresponding discard probability under different queue lengths.

[0102] Optionally, in a possible scenario, a control device (such as a network controller, etc.) in the network where the network device is located can obtain the SLAs of multiple service flows in the network, the topology matrix of the network, and the link bandwidth information in the network, and send the SLAs of multiple service flows, the topology matrix of the network, and the link bandwidth information in the network to the network device. In this way, the network device can simultaneously obtain the first mapping relationship and the aforementioned expected rate based on the SLAs of multiple service flows, the topology matrix of the network, and the link bandwidth information in the network.

[0103] Exemplarily, the network device may use the SLAs of multiple service flows, the topology matrix of the network, and link bandwidth information as inputs of a specified optimization model, and obtain the first mapping relationship and the expected rate by solving the specified optimization model.

[0104] Among them, the specified optimization model is as follows:

[0105] Objective function:

[0106] Constraint: R[l]≤c l ;

[0107] Where R[l] is a path vector, each element in which is used to indicate whether the corresponding path passes through the lth link, c l is the bandwidth of the lth link, refers to the bandwidth allocated to service flow k on path z, λ j is the total output rate of network device j, φ(j) refers to the set of service flows passing through network device j. N(k) refers to the set of network devices through which service flow k passes.j,k It refers to the delay of service flow k on network device j. j,k It refers to the packet loss rate of service flow k on network device j. j,k It refers to the expected rate of service flow k on network device j. k Refers to the bandwidth requirement value included in the SLA of service flow k, D k It refers to the delay requirement value included in the SLA of service flow k, P k It refers to the packet loss rate requirement value included in the SLA of service flow k.

[0108] Table 1 is an example of a first mapping relationship provided by an embodiment of the present application. As shown in Table 1, when the queue length is 1, the corresponding drop probability is 0. When the queue length is 2, the corresponding queue length is still 0. When the queue length is 3, the corresponding drop probability is 0.3%, and so on. When the queue length is the maximum length K of the cache queue, max , the corresponding discard probability is 1. Assuming that when the network device receives a data packet belonging to the first service flow, the occupied queue length of the cache queue is 3, then the corresponding discard probability obtained by the network device from the first mapping relationship according to the occupied queue length is 0.3%. At this time, the discard probability of the data packet is 0.3%.

[0109] Table 1 The first mapping relationship

[0110] Queue length 1 2 3 ······ <![CDATA[K max ]]> Drop probability 0 0 0.3% ······ 1

[0111] Step 404: The network device determines whether to discard the data packet according to the discard probability of the data packet.

[0112] After determining the discard probability of the data packet, the network device determines whether to discard the data packet according to the discard probability of the data packet.

[0113] Exemplarily, the network device generates a random drop probability for the data packet through a random probability generator, and if the random drop probability is less than or equal to the drop probability of the data packet, it is determined to drop the data packet, in which case the network device executes step 405. If the random drop probability is greater than the drop probability of the data packet, it is determined not to drop the data packet, and at this time, the network device executes step 406.

[0114] Step 405: The network device discards the data packet.

[0115] Step 406: The network device adds the data packet to a cache queue.

[0116] It should be noted that, in the embodiment of the present application, steps 403 to 406 are all optional steps, that is, after receiving the data packet belonging to the first service flow, the network device may also directly execute step 407. Alternatively, steps 403 to 405 are optional steps, that is, after receiving the data packet belonging to the first service flow, the network device directly adds the data packet to the cache queue. The embodiment of the present application does not limit this.

[0117] Step 407: The network device sends a data packet according to the target packet interval duration.

[0118] For data packets added to the cache queue of the first service flow, the network device sends the data packets in the cache queue in sequence according to the first-in-first-out principle.

[0119] Among them, it can be seen from the introduction in the aforementioned step 401 that if the network device generates a random packet interval duration according to the first distribution function as the target packet interval duration for sending the next data packet after each data packet is sent, then in this step, when the network device sends the first data packet, the timing starts from the moment when the first data packet is sent. After the target packet interval duration has passed, the network device obtains a token from the token bucket and uses the obtained token to send the second data packet, wherein the first data packet and the second data packet are two adjacent data packets.

[0120] Optionally, if the network device generates an output rate for each cycle according to a second distribution function at a certain period, and generates an average packet interval duration within the corresponding cycle according to the output rate of each cycle, and uses the average packet interval duration as the target packet interval duration of the corresponding cycle, then at the beginning of each cycle, the network device obtains N tokens within the corresponding cycle from the token bucket according to the determined output rate and cycle duration within the corresponding cycle, where N is an integer greater than or equal to 0, and starting from the beginning of the corresponding cycle, uses one token to send a data packet every target packet interval duration.

[0121] Exemplarily, taking the first cycle as an example, at the beginning of the first cycle, the network device calculates the product of the duration of the first cycle and the output rate of the first cycle, rounds the product down to an integer, and obtains a first value. Afterwards, the network device obtains N tokens from the token bucket, where N is equal to the aforementioned first value. At the same time, from the beginning of the first cycle, the network device starts timing, and each time a target packet interval passes, the network device uses one of the N tokens to send a data packet according to the first-in-first-out principle. Among them, if there are less than N data packets in the cache queue, there will be remaining tokens after the tokens are distributed. In this case, the number of data packets sent in the first cycle will be less than N. If the total number of data packets in the cache queue is greater than or equal to N, it will continue until N data packets are sent according to the N tokens, that is, until the end of this cycle.

[0122] For example, see Figure 5 , assuming that there are 10 data packets in the cache queue of the first service flow, according to the first-in-first-out principle, the order of each data packet is as follows Figure 5 As shown in . Assuming that at the beginning of the first cycle, the value of N determined by the network device is 3, then starting from the beginning of the first cycle, when one target packet interval duration has passed, the network device uses one token to send data packet A, when two target packet interval durations have passed, it uses one token to send data packet B, and when three target packet interval durations have passed, it uses one token to send data packet C.

[0123] Optionally, in one possible implementation, after the network device obtains N tokens according to the output rate, it sends less than or equal to N data packets according to the N tokens in the first cycle and in accordance with the first-in-first-out principle in the cache queue, wherein the packet interval duration between two adjacent data packets may be different, some may be greater than the target packet interval duration, and some may be less than the target packet interval duration, as long as the average packet interval duration of the data packets sent in the first cycle meets the target packet interval duration.

[0124] Optionally, at the beginning of each cycle, the network device may also add the tokens obtained from the token bucket in the previous cycle of the corresponding cycle to the token bucket. Still taking the first cycle as an example, at the beginning of the next cycle of the first cycle, the network device may fill the N tokens obtained from the token bucket at the beginning of the first cycle back into the token bucket, so as to ensure that the token bucket is full at the beginning of each cycle, thereby avoiding the network device being unable to obtain a sufficient number of tokens due to insufficient number of tokens in the token bucket.

[0125] Optionally, in another possible implementation, when the number of tokens in the token bucket is lower than a reference value, the network device fills tokens into the token bucket to restore the token bucket to a full state, thereby avoiding the inability to obtain a sufficient number of tokens due to insufficient number of tokens in the token bucket.

[0126] In an embodiment of the present application, the packet interval duration between data packets of the output service flow is adjusted according to the expected rate and the target packet interval duration determined by the first distribution function. In this way, the packet interval duration between data packets of the service flow is controllable, thereby enhancing the predictability of the service flow.

[0127] In addition, in the embodiment of the present application, the random packet interval duration is determined according to the first distribution function, and the random packet interval duration is used as the target packet interval duration to control the forwarding of the data packet. Since the random packet interval duration obeys the first distribution function, the packet interval distribution of the service flow is predictable and calculable. In addition, since the packet interval distribution of a single service flow is calculable, even after multiple service flows converge, the packet interval distribution of the aggregated flow is relatively easy to calculate.

[0128] Exemplarily, when the first distribution function is an exponential distribution function, the data packets of the service flow are forwarded according to the method provided in the embodiment of the present application. For a single service flow, the packet interval distribution of the service flow obeys the exponential distribution shown in the above formula (3). On this basis, when N service flows converge to form an aggregate flow, the packet interval distribution of the aggregate flow obeys the distribution shown in the following formula (7).

[0129] f p (y)=λNexp(-λNy) y≥0 (7)

[0130] When the first distribution function is a uniform distribution function, when forwarding data packets of a service flow according to the method provided in an embodiment of the present application, for a single service flow, the packet interval distribution of the service flow obeys the uniform distribution shown in the above formula (4). On this basis, when N service flows converge to form an aggregate flow, the packet interval distribution of the aggregate flow obeys the distribution shown in the following formula (8).

[0131]

[0132] Similarly, in an embodiment of the present application, the output rate of a certain period determined according to the second distribution function is used to control the number of tokens flowing out of the token bucket within the period, and then the forwarding of data packets is controlled according to the outflowing tokens within the corresponding period, so that the output rate of the data packets obeys the second distribution function, thereby achieving the predictability and calculability of the data packet output rate.

[0133] Finally, it should be noted that in an embodiment of the present application, the probability of discarding a data packet is determined according to the occupied queue length of the cache queue of the business flow, and the discard probability is used to decide whether to discard the data packet, thereby alleviating network congestion when the business flow bursts and achieving quantitative control of the packet loss rate.

[0134] See also Figure 6 The embodiment of the present application further provides a network device 600, the network device 600 comprising:

[0135] Processing module 601, used to execute the above Figure 4 Step 401 in the illustrated embodiment;

[0136] Receiving module 602, used to execute the above Figure 4 Step 402 in the illustrated embodiment;

[0137] The sending module 603 is used to execute the above Figure 4 Step 407 in the embodiment shown.

[0138] The processing module 601 may be composed of the aforementioned Figure 3 The processor in the network device shown in the figure is executed, and the receiving module 602 and the sending module 603 can be executed by the aforementioned Figure 3 The processor in the network device shown controls the communication interface to achieve this.

[0139] Optionally, the processing module 601 is further configured to:

[0140] Determining a probability of discarding a data packet according to an occupied queue length of a cache queue of the first service flow;

[0141] If it is determined that the data packet is not to be discarded according to the discard probability of the data packet, the data packet is added to the cache queue.

[0142] Optionally, the processing module 601 is further configured to:

[0143] If it is determined to discard the data packet according to the discard probability of the data packet, the data packet is discarded.

[0144] Optionally, the processing module 601 is mainly used for:

[0145] The discard probability of a data packet corresponding to the occupied queue length of the cache queue of the first service flow is determined according to the first mapping relationship, wherein the first mapping relationship indicates a mapping relationship between the queue length and the discard probability.

[0146] Optionally, the processing module 601 is further configured to:

[0147] A first mapping relationship is determined according to the SLA of the first service flow.

[0148] Optionally, the processing module 601 is mainly used for:

[0149] Obtain the capacity of the cache used to cache data packets and the forwarding bandwidth of the network device;

[0150] The first mapping relationship is determined based on the forwarding rate requirement value, delay requirement value and packet loss rate requirement value included in the SLA of the first service flow, the capacity of the cache, the forwarding bandwidth of the network device, and the first distribution function.

[0151] Optionally, the processing module 601 is mainly used for:

[0152] Determine the average packet interval duration based on the expected rate;

[0153] According to the average packet interval duration and the first distribution function, a target packet interval duration is determined, where the target packet interval duration is a random packet interval duration that obeys the first distribution function.

[0154] Optionally, the processing module 601 is mainly used for:

[0155] Determine the average packet interval duration based on the expected rate;

[0156] Determine a second distribution function according to the average packet interval duration and the first distribution function;

[0157] Determine an output rate according to a second distribution function, where the second distribution function is used to indicate a functional relationship between the output rate and the expected rate, and the output rate is a random rate that obeys the second distribution function;

[0158] Determine the target packet interval duration based on the output rate.

[0159] Optionally, the first distribution function is an exponential distribution function, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

[0160] Optionally, the first distribution function is a uniform distribution function, the average packet interval duration is equal to the average of the maximum packet interval duration and the minimum packet interval duration, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

[0161] Optionally, the sending module 603 is mainly used for:

[0162] From the moment when the first data packet is sent, the second data packet is sent after a target packet interval, the first data packet and the second data packet are adjacent, and the target packet interval refers to the packet interval used to control the sending of the second data packet.

[0163] Optionally, the sending module 603 is mainly used for:

[0164] According to the output rate and the duration of the first cycle, N tokens are obtained from the token bucket, where N is an integer greater than or equal to 0. The first cycle refers to the effective time during which the output rate is used to control the sending of data packets.

[0165] From the beginning of the first cycle, a data packet is sent using one token among the N tokens every target packet interval duration, and the target packet interval duration is the average interval duration of sending data packets in the first cycle.

[0166] Optionally, the processing module 601 is further configured to:

[0167] At the beginning of the next cycle of the first cycle, N tokens are added to the token bucket.

[0168] Optionally, the processing module 601 is further configured to:

[0169] Obtain the capacity of the cache used to cache data packets and the forwarding bandwidth of the network device;

[0170] The first distribution function and the expected rate are determined according to the forwarding rate requirement value and the delay requirement value included in the SLA of the first service flow, the capacity of the cache, and the forwarding bandwidth of the network device.

[0171] Optionally, the processing module 601 is further configured to:

[0172] Get the upper limit of the forwarding rate of the network device;

[0173] If the forwarding rate requirement value is less than the forwarding rate upper limit value, the step of obtaining the capacity size of the buffer for caching data packets and the forwarding bandwidth of the network device is performed.

[0174] Optionally, the processing module 601 is further configured to:

[0175] The network device determines a first mapping relationship and an expected rate according to SLAs of multiple service flows in the network, a topology matrix of the network, and link bandwidth information in the network.

[0176] To summarize, the embodiment of the present application adjusts the packet interval duration between data packets of the output business flow by adjusting the target packet interval duration determined according to the expected rate and the first distribution function. In this way, the packet interval duration between data packets of the business flow is controllable, thereby enhancing the predictability of the business flow.

[0177] It should be noted that: the network device provided in the above embodiment only uses the division of the above functional modules as an example when performing flow control. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the network device and flow control method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0178] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (for example: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0179] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0180] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description herein, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.

[0181] The above-described embodiments are provided for the embodiments of the present application and are not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A flow control method, characterized in that: Applied to a network device, the method includes: The network device determines a target packet interval duration according to an expected rate and a first distribution function corresponding to the expected rate, wherein a parameter value of the first distribution function is determined according to an average packet interval duration, the average packet interval duration is determined according to the expected rate, the expected rate is determined according to a service flow transmitted by the network device, and the target packet interval duration is used to indicate a time interval between data packets of the service flow transmitted by the network device; The network device receives a data packet belonging to a first service flow; The network device sends the data packet according to the target packet interval duration.

2. The method according to claim 1, characterized in that Before the network device sends the data packet according to the target packet interval, the method further includes: The network device determines, according to an occupied queue length of a cache queue of the first service flow, a probability of discarding the data packet; If the network device determines not to discard the data packet according to the discard probability of the data packet, the data packet is added to the cache queue.

3. The method according to claim 2, characterized in that The method further comprises: If the network device determines to discard the data packet according to the discard probability of the data packet, the data packet is discarded.

4. The method according to claim 2 or 3, characterized in that The network device determines, according to an occupied queue length of a cache queue of the first service flow, a probability of discarding the data packet, including: The network device determines the discard probability of the data packet corresponding to the occupied queue length of the cache queue of the first service flow according to a first mapping relationship, wherein the first mapping relationship indicates a mapping relationship between queue length and discard probability.

5. The method according to claim 4, characterized in that The method further comprises: The network device determines the first mapping relationship according to the SLA of the first service flow.

6. The method according to claim 5, characterized in that The network device determines the first mapping relationship according to the SLA of the first service flow, including: The network device obtains a capacity of a cache for caching the data packet and a forwarding bandwidth of the network device; The network device determines the first mapping relationship based on the forwarding rate requirement value, delay requirement value and packet loss rate requirement value included in the SLA of the first business flow, the capacity of the cache, the forwarding bandwidth of the network device, and the first distribution function.

7. The method according to claim 1, characterized in that The network device determines a target packet interval duration according to an expected rate and a first distribution function corresponding to the expected rate, including: The network device determines the average packet interval duration according to the expected rate; The target packet interval duration is determined according to the average packet interval duration and the first distribution function. The target packet interval duration is a random packet interval duration that obeys the first distribution function.

8. The method according to claim 1, characterized in that The network device determines a target packet interval duration according to an expected rate and a first distribution function corresponding to the expected rate, including: The network device determines the average packet interval duration according to the expected rate; The network device determines a second distribution function according to the average packet interval duration and the first distribution function; The network device determines an output rate according to the second distribution function, where the second distribution function is used to indicate a functional relationship between the output rate and the expected rate, and the output rate is a random rate that obeys the second distribution function; The network device determines the target packet interval duration according to the output rate.

9. The method according to claim 7 or 8, characterized in that The first distribution function is an exponential distribution function, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

10. The method according to claim 7 or 8, characterized in that The first distribution function is a uniform distribution function, the average packet interval duration is equal to the average of the maximum packet interval duration and the minimum packet interval duration, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

11. The method according to claim 7, characterized in that The network device sending the data packet according to the target packet interval duration includes: From the moment the first data packet is sent, the network device sends a second data packet after the target packet interval, the first data packet and the second data packet are adjacent, and the target packet interval refers to the packet interval used to control the sending of the second data packet.

12. The method according to claim 8, characterized in that The network device sending the data packet according to the target packet interval duration includes: The network device obtains N tokens from a token bucket according to the output rate and a duration of a first period, where N is an integer greater than or equal to 0, and the first period refers to a valid time during which the output rate is used to control data packet transmission; From the start of the first cycle, the network device uses one of the N tokens to send a data packet every target packet interval, and the target packet interval is the average interval of sending data packets in the first cycle.

13. The method according to claim 12, characterized in that After the network device obtains N tokens from the token bucket according to the output rate and the duration of the first cycle, the method further includes: At the start time of a next cycle of the first cycle, the network device adds the N tokens to the token bucket.

14. The method according to any one of claims 1-3, 5-8 and 11-13, characterized in that: The method further comprises: The network device obtains a capacity of a cache for caching the data packet and a forwarding bandwidth of the network device; The network device determines the first distribution function and the expected rate according to the forwarding rate requirement value and the delay requirement value included in the SLA of the first service flow, the capacity of the cache, and the forwarding bandwidth of the network device.

15. The method according to claim 14, characterized in that Before the network device obtains the capacity of the cache for caching the data packet and the forwarding bandwidth of the network device, the method further includes: The network device obtains an upper limit value of a forwarding rate of the network device; If the forwarding rate requirement value is less than the forwarding rate upper limit value, the network device executes the step of obtaining the capacity of the buffer for buffering the data packet and the forwarding bandwidth of the network device.

16. The method according to claim 4, characterized in that The method further comprises: The network device determines the first mapping relationship and the expected rate according to SLAs of multiple service flows in the network, a topology matrix of the network, and link bandwidth information in the network.

17. A network device, characterized in that: The network equipment includes: a processing module, configured to determine a target packet interval duration based on an expected rate and a first distribution function corresponding to the expected rate, wherein a parameter value of the first distribution function is determined based on an average packet interval duration, the average packet interval duration is determined based on the expected rate, the expected rate is determined based on a service flow transmitted by the network device, and the target packet interval duration is used to indicate a time interval between data packets of the service flow transmitted by the network device; A receiving module, configured to receive a data packet belonging to a first service flow; The sending module is used to send the data packet according to the target packet interval duration.

18. The network device according to claim 17, wherein: The processing module is further configured to: determining a discard probability of the data packet according to an occupied queue length of the cache queue of the first service flow; If it is determined not to discard the data packet according to the discard probability of the data packet, the data packet is added to the cache queue.

19. The network device according to claim 18, wherein: The processing module is further configured to: If it is determined to discard the data packet according to the discard probability of the data packet, the data packet is discarded.

20. The network device according to claim 18 or 19, characterized in that: The processing module is mainly used for: The discard probability of the data packet corresponding to the occupied queue length of the cache queue of the first service flow is determined according to a first mapping relationship, wherein the first mapping relationship indicates a mapping relationship between queue length and discard probability.

21. The network device according to claim 20, wherein: The processing module is further configured to: The first mapping relationship is determined according to the SLA of the first service flow.

22. The network device according to claim 21, wherein: The processing module is mainly used for: Obtaining the capacity of a cache for caching the data packet and the forwarding bandwidth of the network device; The first mapping relationship is determined based on the forwarding rate requirement value, delay requirement value and packet loss rate requirement value included in the SLA of the first business flow, the capacity of the cache, the forwarding bandwidth of the network device, and the first distribution function.

23. The network device according to claim 17, wherein: The processing module is mainly used for: Determining the average packet interval duration according to the expected rate; The target packet interval duration is determined according to the average packet interval duration and the first distribution function. The target packet interval duration is a random packet interval duration that obeys the first distribution function.

24. The network device according to claim 17, wherein: The processing module is mainly used for: Determining the average packet interval duration according to the expected rate; Determining a second distribution function according to the average packet interval duration and the first distribution function; determining an output rate according to the second distribution function, where the second distribution function is used to indicate a functional relationship between the output rate and the expected rate, and the output rate is a random rate that obeys the second distribution function; The target packet interval duration is determined according to the output rate.

25. The network device according to claim 23 or 24, characterized in that: The first distribution function is an exponential distribution function, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

26. The network device according to claim 23 or 24, characterized in that: The first distribution function is a uniform distribution function, the average packet interval duration is equal to the average of the maximum packet interval duration and the minimum packet interval duration, and the average packet interval duration is equal to the ratio of the average length of the data packet to the expected rate.

27. The network device according to claim 23, wherein: The sending module is mainly used for: From the moment the first data packet is sent, the second data packet is sent after the target packet interval, the first data packet and the second data packet are adjacent, and the target packet interval refers to the packet interval used to control the sending of the second data packet.

28. The network device according to claim 24, wherein: The sending module is mainly used for: Obtain N tokens from a token bucket according to the output rate and a duration of a first period, where N is an integer greater than or equal to 0, and the first period refers to the effective time during which the output rate is used to control data packet transmission; From the start of the first cycle, a data packet is sent using one token in the N tokens every target packet interval, where the target packet interval is the average interval duration for sending data packets in the first cycle.

29. The network device according to claim 28, wherein: The processing module is further configured to: At the start time of a next cycle of the first cycle, the N tokens are added to the token bucket.

30. The network device according to any one of claims 17-19, 21-24 and 27-29, characterized in that: The processing module is further configured to: Obtaining the capacity of a cache for caching the data packet and the forwarding bandwidth of the network device; The first distribution function and the expected rate are determined based on the forwarding rate requirement value and the delay requirement value included in the SLA of the first service flow, the capacity of the cache, and the forwarding bandwidth of the network device.

31. The network device according to claim 30, wherein: The processing module is further configured to: Obtaining an upper limit value of the forwarding rate of the network device; If the forwarding rate requirement value is less than the forwarding rate upper limit value, the step of obtaining the capacity of the buffer for caching the data packet and the forwarding bandwidth of the network device is performed.

32. The network device according to claim 20, wherein: The processing module is further configured to: The first mapping relationship and the expected rate are determined according to SLAs of multiple service flows in the network, a topology matrix of the network, and link bandwidth information in the network.

33. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the flow control method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Method, device and system for controlling network congestion

    CN111355669A

  • Transmission network system and its traffic generation method and method for evaluating network performance

    JP2000252987A