Scheduling method and device
By receiving and calculating data packet traffic information in the data center network, encapsulating weight values and joining into the appropriate queue, flexible switching of multiple scheduling strategies is achieved, and the problem that the existing technology cannot adapt to different business needs is solved, and the problem of improving the problem of Scheduling efficiency and reduces the overhead of replacing the scheduling method.
Patent Information
- Application Number
- CN201910944756.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-30
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2039-09-30
AI Technical Summary
The existing data center network scheduling methods cannot adapt to changes in different business needs, and changing the scheduling methods will bring great overhead, and cannot meet the flexible switching of multiple business needs.
By receiving traffic information in the data packet, calculating and encapsulating the weight value, and joining the data packet to a suitable queue based on the weight value, achieving flexible switching of multiple scheduling strategies, which is suitable for a variety of business needs.
It improves the scheduling efficiency of data packets, can flexibly adapt to different business needs, reduces the overhead of changing scheduling methods, and meets the scheduling needs of multiple business needs.
Smart Images

Figure CN112583739B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to communication technology, and in particular to a scheduling method and device. Background Art
[0002] There are various businesses in the data center network, and different businesses have different requirements. Some businesses are sensitive to flow completion time (FCT), such as e-commerce business; some businesses are sensitive to deadlines (DDL), such as bank back-end data processing business; some businesses have requirements for fair queuing (FQ), such as cloud service leasing business.
[0003] In the related art, different scheduling methods are designed for different services. For FCT-sensitive services, based on whether the length of the flow is known, when the length of the flow is known, small flows are placed in a high priority queue and large flows are placed in a low priority queue. When the length of the flow is unknown, flows with a small amount of sent data are placed in a high priority queue, and flows with a large amount of sent data are placed in a low priority queue. For DDL-sensitive services, the rate requirement of the flow can be calculated based on the flow length and the deadline requirement of the flow, and then the rate is allocated to priority queues from high to low in order from small to large. For services with FQ requirements, the various queues to which the flow belongs can be served in turn through a polling mechanism.
[0004] However, no matter which of the above scheduling methods is adopted by the network device, it can only meet one business demand and cannot adapt to business changes. If you want to switch from one scheduling method to another, it will bring a lot of change overhead to the network device. Summary of the invention
[0005] The present application provides a scheduling method and device, which can be applicable to a variety of scheduling strategies, realize flexible switching of a variety of scheduling strategies, and meet a variety of business needs.
[0006] In a first aspect, the present application provides a scheduling method, comprising:
[0007] Receive a first data packet, the first data packet includes traffic information of a first data stream, the first data stream includes the first data packet; calculate a first weight value of the first data packet based on the traffic information; encapsulate the first weight value in the first data packet to obtain a second data packet; and send the second data packet.
[0008] In this embodiment, the end node calculates the weight value of the data packet based on the traffic information of the data flow to which the data packet belongs. The traffic information corresponds to the adopted scheduling strategy, so that the calculated weight value can be applied to multiple scheduling strategies, realizing flexible switching of multiple scheduling strategies and meeting multiple business needs.
[0009] In a possible implementation, calculating the first weight value of the first data packet based on the traffic information includes: determining a scheduling policy for the first data flow based on the traffic information, the scheduling policy including any one of a shortest remaining time first SRTF policy, a LAS policy, a deadline DDL policy, and a fair queue FQ policy; and calculating the first weight value based on the scheduling policy.
[0010] In a possible implementation, the traffic information includes at least one of the number of unsent bytes of the first data stream, the number of sent bytes of the first data stream, and the time from the DDL of the first data stream; determining the scheduling policy of the first data stream according to the traffic information includes: when the traffic information includes the number of unsent bytes of the first data stream, determining that the scheduling policy is the SRTF policy; when the traffic information includes the number of sent bytes of the first data stream, determining that the scheduling policy is the LAS policy or the FQ policy; when the traffic information includes the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or when the traffic information includes the time from the DDL of the first data stream, determining that the scheduling policy is the DDL policy;
[0011] The calculating the first weight value according to the scheduling policy includes: when the scheduling policy is the SRTF policy, calculating the first weight value according to the number of unsent bytes of the first data stream; when the scheduling policy is the LAS policy or the FQ policy, calculating the first weight value according to the number of sent bytes of the first data stream; when the scheduling policy is the DDL policy, calculating the first weight value according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or calculating the first weight value according to the time from the DDL of the first data stream.
[0012] In a second aspect, the present application provides a scheduling method, comprising:
[0013] Receive a second data packet, the second data packet includes a first weight value; transmit the second data packet to a first queue according to the first weight value, the first queue is one of N queues corresponding to the egress port, N is a positive integer; send the second data packet.
[0014] In this embodiment, the network node completes the scheduling of the data packet by enqueuing the data packet into an appropriate queue according to the weight value in the data packet sent by the end node. The weight value is related to the traffic information of the data flow to which the data packet belongs, and the calculated traffic information corresponds to the adopted scheduling strategy. This can be applied to multiple scheduling strategies, realize flexible switching of multiple scheduling strategies, meet multiple business needs, and improve the scheduling efficiency of data packets.
[0015] In a possible implementation, before transmitting the second data packet to the first queue according to the first weight value, it also includes: obtaining a weight value set of the N queues, the weight value set including N queue weight values, the N queue weight values being arranged in ascending order, and the N queues corresponding to the N queue weight values; determining a second weight value according to the first weight value, the second weight value being the one closest to the first weight value among the N queue weight values; and determining the queue corresponding to the second weight value as the first queue.
[0016] In a possible implementation, determining the second weight value according to the first weight value includes: determining a first interval according to the N queue weight values, the first interval is (m1, m2), and m1<w<m2, wherein w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents a value of the N queue weight values that is adjacent to m1 and greater than m1; determining the second weight value according to a first distance and a second distance, the second weight value corresponding to the smaller of the first distance and the second distance, the first distance being the distance between w and m1, and the second distance being the distance between w and m2.
[0017] In a possible implementation, it also includes: calculating the sum of weight values of all data packets in the first queue, and calculating the queue weight value of the first queue according to the total number of all data packets in the first queue and the sum of the weight values.
[0018] In a third aspect, the present application provides a scheduling method, comprising:
[0019] Receive a first data packet, the first data packet includes traffic information of a first data flow, the first data flow includes the first data packet; calculate a first weight value of the first data packet according to the traffic information; transmit the first data packet to a first queue according to the first weight value, the first queue is one of N queues corresponding to the egress port, N is a positive integer; send the first data packet.
[0020] In this embodiment, the network node calculates the weight value of the data packet based on the traffic information of the data flow to which the data packet belongs. The traffic information corresponds to the adopted scheduling strategy. The data packet is then queued into the appropriate queue according to the weight value to complete the scheduling of the data packet. This can be applied to multiple scheduling strategies, realize flexible switching of multiple scheduling strategies, meet multiple business needs, and improve the scheduling efficiency of data packets.
[0021] In a possible implementation, calculating the first weight value of the first data packet based on the traffic information includes: determining a scheduling policy for the first data flow based on the traffic information, the scheduling policy including any one of a shortest remaining time first SRTF policy, a LAS policy, a deadline DDL policy, and a fair queue FQ policy; and calculating the first weight value based on the scheduling policy.
[0022] In a possible implementation, the traffic information includes at least one of the number of unsent bytes of the first data stream, the number of sent bytes of the first data stream, and the time from the DDL of the first data stream; determining the scheduling policy of the first data stream according to the traffic information includes: when the traffic information includes the number of unsent bytes of the first data stream, determining that the scheduling policy is the SRTF policy; when the traffic information includes the number of sent bytes of the first data stream, determining that the scheduling policy is the LAS policy or the FQ policy; when the traffic information includes the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or when the traffic information includes the time from the DDL of the first data stream, determining that the scheduling policy is the DDL policy;
[0023] The calculating the first weight value according to the scheduling policy includes: when the scheduling policy is the SRTF policy, calculating the first weight value according to the number of unsent bytes of the first data stream; when the scheduling policy is the LAS policy or the FQ policy, calculating the first weight value according to the number of sent bytes of the first data stream; when the scheduling policy is the DDL policy, calculating the first weight value according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or calculating the first weight value according to the time from the DDL of the first data stream.
[0024] In a possible implementation, before transmitting the second data packet to the first queue according to the first weight value, it also includes: obtaining a weight value set of the N queues, the weight value set including N queue weight values, the N queue weight values being arranged in ascending order, and the N queues corresponding to the N queue weight values; determining a second weight value according to the first weight value, the second weight value being the one closest to the first weight value among the N queue weight values; and determining the queue corresponding to the second weight value as the first queue.
[0025] In a possible implementation, determining the second weight value according to the first weight value includes: determining a first interval according to the N queue weight values, the first interval is (m1, m2), and m1<w<m2, wherein w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents a value of the N queue weight values that is adjacent to m1 and greater than m1; determining the second weight value according to a first distance and a second distance, the second weight value corresponding to the smaller of the first distance and the second distance, the first distance being the distance between w and m1, and the second distance being the distance between w and m2.
[0026] In a possible implementation, it also includes: calculating the sum of weight values of all data packets in the first queue, and calculating the queue weight value of the first queue according to the total number of all data packets in the first queue and the sum of the weight values.
[0027] In a fourth aspect, an embodiment of the present application provides a device having the function of implementing any of the methods described in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0028] In a fifth aspect, an embodiment of the present application provides a device having the function of implementing the method described in any one of the second to third aspects above. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0029] In a sixth aspect, the present application provides an end node, including:
[0030] one or more processors;
[0031] A memory for storing one or more programs;
[0032] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the first aspects above.
[0033] Optionally, the end node may be a server, a terminal device, etc., or a chip.
[0034] In a seventh aspect, the present application provides a network node, including:
[0035] one or more processors;
[0036] A memory for storing one or more programs;
[0037] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the second to third aspects above.
[0038] Optionally, the network node may be a switch, a router, etc., or may be a chip.
[0039] In an eighth aspect, the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to execute the method described in any one of the first to third aspects above.
[0040] In a ninth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in any one of the first to third aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 An example of an application scenario of the scheduling method of the present application is shown;
[0042] Figure 2 This is a flow chart of Embodiment 1 of the scheduling method of this application;
[0043] Figure 3 Another application scenario schematic diagram of the scheduling method of the present application is shown exemplarily;
[0044] Figure 4 This is a flow chart of Embodiment 2 of the scheduling method of this application;
[0045] Figure 5 This is a schematic diagram of the structure of an embodiment of the device of the present application;
[0046] Figure 6 A schematic structural diagram of an end node provided for this application;
[0047] Figure 7 A schematic structural diagram of a network node provided in this application. DETAILED DESCRIPTION
[0048] The technical solution in this application will be clearly and completely described below in conjunction with the drawings in this application.
[0049] The terms "first", "second", etc. in the specification embodiments, claims, and drawings of the present application are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product, or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0050] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0051] Figure 1 An example of an application scenario of the scheduling method of the present application is shown as follows: Figure 1 As shown, the scenario includes end nodes and network nodes, wherein the end nodes may include terminal devices, servers, etc., and the network nodes include switches, routers, etc.
[0052] In the present application, after receiving the data packet to be transmitted, the end node can determine the weight value of the data packet according to the flow information of the data stream to which the data packet belongs (for example, the number of unsent bytes of the data stream, the number of sent bytes of the data stream, or the time from the DDL of the data stream, etc.), and then encapsulate the weight value in the data packet (for example, encapsulate the weight value in the reserved field of the packet header of the data packet, or put a label reflecting the weight value on the packet header of the data packet) and send it to the network node. After the network node receives the data packet with a weight value, it puts the data packet into a queue according to its weight value. The queue is one of the N queues (for example, queues 1-4) corresponding to the egress port of the network node. Each queue corresponds to a queue weight value. The network node can compare the weight value of the data packet with the weight values of all queues to determine the queue (for example, queue 2) to which the data packet is to be queued.
[0053] Figure 2This is a flow chart of the first embodiment of the scheduling method of this application, as shown in Figure 2 As shown, the method of this embodiment can be applied to Figure 1 The application scenario shown. The scheduling method may include:
[0054] 201. An end node receives a first data packet.
[0055] The first data packet includes the flow information of the first data stream, and the first data stream includes the first data packet. It should be noted that the first data packet may be the first packet in the first data stream, and the flow information carried in the first data packet may be the flow information of the entire first data stream, such as the time until the deadline (DDL) of the first data stream. Alternatively, the first data packet may also be any data packet in the first data stream, and the flow information carried in the first data packet may be flow information characterizing the flow processing status of the first data stream when it is the turn of the first data packet, such as the number of bytes sent of the first data stream, the number of bytes not sent of the first data stream, etc., or may be flow information of the entire first data stream, such as the time until the DDL of the first data stream.
[0056] 202. The end node calculates a first weight value of the first data packet according to the traffic information.
[0057] In the present application, the end node can determine the scheduling policy of the first data flow according to the above-mentioned traffic information, and the scheduling policy can be, for example, any one of the short remaining time first (SRTF) policy, the least attained service (LAS) policy, the DDL policy, and the fair queuing (FQ) policy. Exemplarily, when the traffic information includes the number of unsent bytes of the first data flow, the end node can determine that the scheduling policy of the first data flow is the SRTF policy; when the traffic information includes the number of sent bytes of the first data flow, the end node can determine that the scheduling policy of the first data flow is the LAS policy or the FQ policy; when the traffic information includes the number of unsent bytes of the first data flow and the time from the DDL of the first data flow, or the traffic information includes the time from the DDL of the first data flow, the end node can determine that the scheduling policy of the first data flow is the DDL policy.
[0058] Based on the above strategy, the end node can calculate the first weight value of the first data packet according to the scheduling strategy of the first data stream. Exemplarily, when the scheduling strategy is the SRTF strategy, the end node calculates the first weight value of the first data packet according to the number of unsent bytes of the first data stream; when the scheduling strategy is the LAS strategy or the FQ strategy, the end node calculates the first weight value of the first data packet according to the number of sent bytes of the first data stream; when the scheduling strategy is the DDL strategy, the end node calculates the first weight value according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or calculates the first weight value of the first data packet according to the time from the DDL of the first data stream.
[0059] 203. The end node encapsulates the first weight value in the first data packet to obtain a second data packet.
[0060] The end node can encapsulate the first weight value in the first data packet in a variety of ways. For example, the end node can add the first weight value in a reserved field in the header of the first data packet. For another example, the end node can add a label in the label stack of the first data packet to represent the first weight value through the label.
[0061] 204. The end node sends a second data packet to the network node.
[0062] 205. The network node transmits the second data packet to the first queue according to the first weight value.
[0063] The first queue is one of the N queues corresponding to the egress port of the network node, where N is a positive integer. In the present application, the network node may first obtain a set of weight values for the N queues, the set of weight values including N queue weight values, wherein the N queue weight values are arranged in ascending order of value, and the N queues correspond to the N queue weight values. Then the second weight value is determined according to the first weight value, and the second weight value is the one closest to the first weight value among the N queue weight values. Exemplarily, the network node may determine a first interval based on the N queue weight values, and the first interval is (m1, m2), and m1<w<m2, wherein w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents the value of the N queue weight values that is adjacent to m1 and greater than m1; calculate the first distance between w and m1, and the second distance between w and m2, and the second weight value is the queue weight value corresponding to the smaller of the first distance and the second distance. For example, the formula The distance between w and mi is calculated, where mi represents the queue weight value. The network node determines the queue corresponding to the second weight value as the first queue, and transmits the received second data packet to the first queue.
[0064] 206. The network node sends a second data packet.
[0065] The network node may send the second data packet when the second data packet reaches the head of the first queue and the first queue is polled, that is, the second data packet is polled.
[0066] In a possible implementation, the network node may calculate the sum of weight values of all data packets in the first queue, and calculate the queue weight value of the first queue according to the total number of all data packets in the first queue and the sum of the weight values.
[0067] In the present application, the network node can update the weight value of each queue in real time (after receiving a data packet and putting it into a queue for processing) or periodically (processing according to a set period) according to the processing of the data flow, for example, the sum of the calculated weight values of all data packets / the total number of all data packets is calculated to obtain the queue weight value of the corresponding queue. In this way, the network node can timely adjust the queue weight value of one or more of the N queues according to the processing of the data flow, so as to put the data packet into the appropriate queue and improve the scheduling efficiency of the data packet.
[0068] In this embodiment, the end node calculates the weight value of the data packet based on the traffic information of the data flow to which the data packet belongs. The traffic information corresponds to the adopted scheduling strategy. The network node queues the data packet into the appropriate queue according to the weight value to complete the scheduling of the data packet. This can be applied to multiple scheduling strategies, realize flexible switching of multiple scheduling strategies, meet multiple business needs, and improve the scheduling efficiency of data packets.
[0069] Figure 3 Another application scenario diagram of the scheduling method of the present application is shown as an example. Figure 3 As shown, the scenario includes network nodes, which include switches, routers, etc.
[0070] In the present application, after a network node receives a data packet to be transmitted, it can determine the weight value of the data packet based on the traffic information of the data stream to which the data packet belongs (for example, the total number of bytes of the data stream, the number of bytes sent of the data stream, the number of bytes not sent of the data stream, or the time away from the data stream DDL, etc.), and then put the data packet into a queue according to the weight value. The queue is one of the N queues (for example, queues 1-4) corresponding to the egress port of the network node, and each queue corresponds to a queue weight value. The network node can compare the weight value of the data packet with the weight values of all queues to determine the queue (for example, queue 2) into which the data packet is to be put.
[0071] Figure 4 This is a flow chart of Embodiment 2 of the scheduling method of this application, as shown in Figure 4 As shown, the method of this embodiment can be applied to Figure 3 The application scenario shown is composed of Figure 3 The scheduling method may include:
[0072] 401. Receive a first data packet.
[0073] The first data packet includes the traffic information of the first data stream, and the first data stream includes the first data packet. It should be noted that the first data packet may be the first packet in the first data stream, and the traffic information carried in the first data packet may be the traffic information of the entire first data stream, such as the time from the DDL of the first data stream. Alternatively, the first data packet may also be any data packet in the first data stream, and the traffic information carried in the first data packet may be the traffic information characterizing the traffic processing status of the first data stream when it is the turn of the first data packet, such as the number of bytes sent of the first data stream, the number of bytes not sent of the first data stream, etc., or it may be the traffic information of the entire first data stream, such as the time from the DDL of the first data stream.
[0074] 402. Calculate a first weight value of a first data packet according to traffic information.
[0075] In the present application, the network node can determine the scheduling policy of the first data flow based on the above-mentioned traffic information. The scheduling policy can be, for example, any one of the shortest remaining time first SRTF policy, the LAS policy, the DDL policy, and the fair queue FQ policy. Exemplarily, when the traffic information includes the number of unsent bytes of the first data flow, the network node can determine that the scheduling policy of the first data flow is the SRTF policy; when the traffic information includes the number of sent bytes of the first data flow, the network node can determine that the scheduling policy of the first data flow is the LAS policy or the FQ policy; when the traffic information includes the number of unsent bytes of the first data flow and the time from the DDL of the first data flow, or the traffic information includes the time from the DDL of the first data flow, the network node can determine that the scheduling policy of the first data flow is the DDL policy.
[0076] Based on the above strategy, the network node can calculate the first weight value of the first data packet according to the scheduling strategy of the first data stream. Exemplarily, when the scheduling strategy is the SRTF strategy, the network node calculates the first weight value of the first data packet according to the number of unsent bytes of the first data stream; when the scheduling strategy is the LAS strategy or the FQ strategy, the network node calculates the first weight value of the first data packet according to the number of sent bytes of the first data stream; when the scheduling strategy is the DDL strategy, the network node calculates the first weight value according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or calculates the first weight value of the first data packet according to the time from the DDL of the first data stream.
[0077] 403. Transmit the first data packet to the first queue according to the first weight value.
[0078] The first queue is one of the N queues corresponding to the egress port of the network node, where N is a positive integer. In the present application, the network node may first obtain a set of weight values for the N queues, the set of weight values including N queue weight values, wherein the N queue weight values are arranged in ascending order of value, and the N queues correspond to the N queue weight values. Then the second weight value is determined according to the first weight value, and the second weight value is the one closest to the first weight value among the N queue weight values. Exemplarily, the network node may determine a first interval based on the N queue weight values, and the first interval is (m1, m2), and m1<w<m2, wherein w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents the value of the N queue weight values that is adjacent to m1 and greater than m1; calculate the first distance between w and m1, and the second distance between w and m2, and the second weight value is the queue weight value corresponding to the smaller of the first distance and the second distance. For example, the formula The distance between w and mi is calculated, where mi represents a queue weight value. The network node determines the queue corresponding to the second weight value as the first queue, and transmits the received first data packet to the first queue.
[0079] 404. Send a first data packet.
[0080] The network node may send the first data packet when the first data packet reaches the head of the first queue and the first queue is polled, that is, when the first data packet is polled.
[0081] In a possible implementation, the network node may calculate the sum of weight values of all data packets in the first queue, and calculate the queue weight value of the first queue according to the total number of all data packets in the first queue and the sum of the weight values.
[0082] In the present application, the network node can update the weight value of each queue in real time (after receiving a data packet and putting it into a queue for processing) or periodically (processing according to a set period) according to the processing of the data flow, for example, the sum of the calculated weight values of all data packets / the total number of all data packets is calculated to obtain the queue weight value of the corresponding queue. In this way, the network node can timely adjust the queue weight value of one or more of the N queues according to the processing of the data flow, so as to put the data packet into the appropriate queue and improve the scheduling efficiency of the data packet.
[0083] In this embodiment, the network node calculates the weight value of the data packet based on the traffic information of the data flow to which the data packet belongs. The traffic information corresponds to the adopted scheduling strategy. The data packet is then queued into the appropriate queue according to the weight value to complete the scheduling of the data packet. This can be applied to multiple scheduling strategies, realize flexible switching of multiple scheduling strategies, meet multiple business needs, and improve the scheduling efficiency of data packets.
[0084] Figure 5Schematic diagram of the structure of the device embodiment of the present application, such as Figure 5 As shown, the device of this embodiment can be applied to Figure 1 an end node or network node in Figure 3 The device of this embodiment may include: a receiving module 501, a processing module 502 and a sending module 503.
[0085] When the device is applied to an end node, the receiving module 501 is used to receive a first data packet, which includes traffic information of a first data stream, and the first data stream includes the first data packet; the processing module 502 is used to calculate a first weight value of the first data packet based on the traffic information; encapsulate the first weight value in the first data packet to obtain a second data packet; and the sending module 503 is used to send the second data packet.
[0086] In a possible implementation, the processing module 502 is specifically used to determine the scheduling strategy of the first data flow based on the traffic information, and the scheduling strategy includes any one of the shortest remaining time first SRTF strategy, the LAS strategy, the deadline DDL strategy and the fair queue FQ strategy; and calculate the first weight value according to the scheduling strategy.
[0087] In a possible implementation, the traffic information includes at least one of the number of unsent bytes of the first data stream, the number of sent bytes of the first data stream, and the time from the DDL of the first data stream; the processing module 502 is specifically used to determine that the scheduling policy is the SRTF policy when the traffic information includes the number of unsent bytes of the first data stream; when the traffic information includes the number of sent bytes of the first data stream, determine that the scheduling policy is the LAS policy or the FQ policy; when the traffic information includes the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or the traffic information includes the time from the DDL of the first data stream, determine that the scheduling policy is the DDL policy;
[0088] When the scheduling policy is the SRTF policy, the first weight value is calculated according to the number of unsent bytes of the first data stream; when the scheduling policy is the LAS policy or the FQ policy, the first weight value is calculated according to the number of sent bytes of the first data stream; when the scheduling policy is the DDL policy, the first weight value is calculated according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or the first weight value is calculated according to the time from the DDL of the first data stream.
[0089] When the device is applied to a network node, the receiving module 501 is used to receive a second data packet, which includes a first weight value; the processing module 502 is used to transmit the second data packet to a first queue according to the first weight value, and the first queue is one of N queues corresponding to the output port, where N is a positive integer; the sending module 503 is used to send the second data packet.
[0090] In one possible implementation, the processing module 502 is also used to obtain a set of weight values for the N queues, the weight value set including N queue weight values, the N queue weight values being arranged in ascending order, and the N queues corresponding to the N queue weight values; determining a second weight value based on the first weight value, the second weight value being the one closest to the first weight value among the N queue weight values; and determining the queue corresponding to the second weight value as the first queue.
[0091] In a possible implementation, the processing module 502 is specifically used to determine a first interval based on the N queue weight values, where the first interval is (m1, m2), and m1<w<m2, wherein w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents a value of the N queue weight values that is adjacent to m1 and greater than m1; determine the second weight value based on a first distance and a second distance, where the second weight value corresponds to the smaller of the first distance and the second distance, the first distance is the distance between w and m1, and the second distance is the distance between w and m2.
[0092] In a possible implementation, the processing module 502 is further used to calculate the sum of weight values of all data packets in the first queue, and calculate the queue weight value of the first queue based on the total number of all data packets in the first queue and the sum of the weight values.
[0093] The device of this embodiment can be used to perform Figure 2-4 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0094] Figure 6 This is a schematic structural diagram of the end node provided in this application. Figure 6 As shown, the end node may include a terminal device, a server, etc. The end node 600 includes a processor 601 and a transceiver 602 .
[0095] Optionally, the end node 600 further includes a memory 603. The processor 601, the transceiver 602 and the memory 603 may communicate with each other through an internal connection path to transfer control signals and / or data signals.
[0096] The memory 603 is used to store computer programs. The processor 601 is used to execute the computer programs stored in the memory 603 .
[0097] Optionally, the memory 603 may also be integrated into the processor 601 , or independent of the processor 601 .
[0098] Optionally, the end node 600 may further include an antenna 604, which is used to transmit the signal output by the transceiver 602. Alternatively, the transceiver 602 receives the signal through the antenna.
[0099] Optionally, the end node 600 may further include a power supply 605 for providing power to various devices or circuits in the end node.
[0100] In addition, in order to make the functions of the end node more complete, the end node 600 may also include one or more of an input unit 606, a display unit 607 (which may also be considered as an output unit), an audio circuit 608, a camera 609, and a sensor 610. The audio circuit may also include a speaker 6081, a microphone 6082, etc., which will not be described in detail.
[0101] Figure 7 This is a schematic diagram of the network node provided in this application. Figure 7 As shown, the network node includes a switch, a router, etc. The network node 700 includes an antenna 701, a radio frequency device 702, and a baseband device 703. The antenna 701 is connected to the radio frequency device 702. In the uplink direction, the radio frequency device 702 receives a signal from a terminal device through the antenna 701, and sends the received signal to the baseband device 703 for processing. In the downlink direction, the baseband device 703 generates a signal to be sent to the terminal device, and sends the generated signal to the radio frequency device 702. The radio frequency device 702 transmits the signal through the antenna 701.
[0102] The baseband device 703 may include one or more processing units 7031. The processing unit 7031 may specifically be a processor.
[0103] In addition, the baseband device 703 may also include one or more storage units 7032 and one or more communication interfaces 7033. The storage unit 7032 is used to store computer programs and / or data. The communication interface 7033 is used to exchange information with the radio frequency device 702. The storage unit 7032 may be a memory, and the communication interface 7033 may be an input / output interface or a transceiver circuit.
[0104] Optionally, the storage unit 7032 may be a storage unit on the same chip as the processing unit 7031, ie, an on-chip storage unit, or may be a storage unit on a different chip from the processing unit 7031, ie, an off-chip storage unit. This application does not limit this.
[0105] In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware coding processor to be executed, or the hardware and software modules in the coding processor are combined to be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0106] The memory mentioned in the above embodiments may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0107] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0112] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A scheduling method, characterized in that: Applicable to end nodes, including: receiving a first data packet, wherein the first data packet includes flow information of a first data flow, and the first data flow includes the first data packet; Calculate a first weight value of the first data packet according to the traffic information; Encapsulating the first weight value in the first data packet to obtain a second data packet; Sending the second data packet to the network node; The step of calculating the first weight value of the first data packet according to the traffic information includes: Determine a scheduling strategy for the first data flow according to the traffic information, the scheduling strategy including any one of a shortest remaining time priority SRTF strategy, a least sent service priority scheduling LAS strategy, a deadline DDL strategy, and a fair queue FQ strategy; The first weight value is calculated according to the scheduling strategy, and the first weight value is used to determine whether the second data packet is queued into a first queue in the network node, and the first queue is one of N queues corresponding to the egress port of the network node, where N is a positive integer.
2. The method according to claim 1, characterized in that The traffic information includes at least one of the number of unsent bytes of the first data stream, the number of sent bytes of the first data stream, and the time from the DDL of the first data stream; The determining, according to the traffic information, a scheduling strategy for the first data flow includes: When the traffic information includes the number of unsent bytes of the first data flow, determining that the scheduling strategy is the SRTF strategy; When the traffic information includes the number of bytes sent by the first data flow, determining that the scheduling policy is the LAS policy or the FQ policy; When the traffic information includes the number of unsent bytes of the first data flow and the time from the DDL of the first data flow, or the traffic information includes the time from the DDL of the first data flow, determining that the scheduling strategy is the DDL strategy; The calculating the first weight value according to the scheduling strategy includes: When the scheduling strategy is the SRTF strategy, calculating the first weight value according to the number of unsent bytes of the first data flow; When the scheduling policy is the LAS policy or the FQ policy, calculating the first weight value according to the number of bytes sent by the first data flow; When the scheduling policy is the DDL policy, the first weight value is calculated according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or the first weight value is calculated according to the time from the DDL of the first data stream.
3. A scheduling method, characterized in that: Applied to network nodes, including: Receive a second data packet, the second data packet includes a first weight value, the first weight value is calculated according to a scheduling policy of a first data flow, the scheduling policy is determined according to traffic information of the first data flow, the first data flow includes a first data packet, the first data packet includes traffic information of the first data flow, the second data packet is obtained by encapsulating the first weight value in the first data packet, and the scheduling policy includes any one of a shortest remaining time priority SRTF policy, a least sent service priority scheduling LAS policy, a deadline DDL policy, and a fair queue FQ policy; Transmitting the second data packet to a first queue according to the first weight value, where the first queue is one of N queues corresponding to the egress port, where N is a positive integer; The second data packet is sent.
4. The method according to claim 3, characterized in that Before transmitting the second data packet to the first queue according to the first weight value, the method further includes: Obtain a weight value set of the N queues, where the weight value set includes N queue weight values, the N queue weight values are arranged in ascending order, and the N queues correspond to the N queue weight values; Determine a second weight value according to the first weight value, the second weight value being the one of the N queue weight values closest to the first weight value; The queue corresponding to the second weight value is determined as the first queue.
5. The method according to claim 4, characterized in that The determining the second weight value according to the first weight value comprises: Determine a first interval according to the N queue weight values, where the first interval is (m1, m2), and m1<w<m2, where w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents a value of the N queue weight values that is adjacent to m1 and greater than m1; The second weight value is determined according to the first distance and the second distance, and the second weight value corresponds to the smaller of the first distance and the second distance, the first distance is the distance between w and m1, and the second distance is the distance between w and m2.
6. The method according to any one of claims 3 to 5, characterized in that: Also includes: The sum of the weight values of all the data packets in the first queue is calculated, and the queue weight value of the first queue is calculated according to the total number of all the data packets in the first queue and the sum of the weight values.
7. A scheduling device, characterized in that: Applicable to end nodes, including: A receiving module, configured to receive a first data packet, wherein the first data packet includes flow information of a first data stream, and the first data stream includes the first data packet; A processing module, configured to calculate a first weight value of the first data packet according to the flow information; and encapsulate the first weight value in the first data packet to obtain a second data packet; A sending module, configured to send the second data packet to a network node; The processing module is specifically used to determine the scheduling strategy of the first data flow according to the traffic information; calculate the first weight value according to the scheduling strategy, and the scheduling strategy includes any one of the shortest remaining time priority SRTF strategy, the least sent service priority scheduling LAS strategy, the deadline DDL strategy and the fair queue FQ strategy; the first weight value is used to determine that the second data packet is queued into the first queue in the network node, and the first queue is one of N queues corresponding to the egress port of the network node, and N is a positive integer.
8. The device according to claim 7, characterized in that The traffic information includes at least one of the number of unsent bytes of the first data stream, the number of sent bytes of the first data stream, and the time from the DDL of the first data stream; the processing module is specifically used to determine that the scheduling policy is the SRTF policy when the traffic information includes the number of unsent bytes of the first data stream; when the traffic information includes the number of sent bytes of the first data stream, determine that the scheduling policy is the LAS policy or the FQ policy; when the traffic information includes the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or the traffic information includes the time from the DDL of the first data stream, determine that the scheduling policy is the DDL policy; When the scheduling policy is the SRTF policy, the first weight value is calculated according to the number of unsent bytes of the first data stream; when the scheduling policy is the LAS policy or the FQ policy, the first weight value is calculated according to the number of sent bytes of the first data stream; when the scheduling policy is the DDL policy, the first weight value is calculated according to the number of unsent bytes of the first data stream and the time from the DDL of the first data stream, or the first weight value is calculated according to the time from the DDL of the first data stream.
9. A scheduling device, characterized in that: Applied to network nodes, including: A receiving module, used for receiving a second data packet, the second data packet includes a first weight value, the first weight value is calculated according to a scheduling policy of a first data flow, the scheduling policy is determined according to traffic information of the first data flow, the first data flow includes a first data packet, the first data packet includes traffic information of the first data flow, the second data packet is obtained by encapsulating the first weight value in the first data packet, and the scheduling policy includes any one of a shortest remaining time priority SRTF policy, a least sent service priority scheduling LAS policy, a deadline DDL policy, and a fair queue FQ policy; a processing module, configured to transmit the second data packet to a first queue according to the first weight value, where the first queue is one of N queues corresponding to the egress port, where N is a positive integer; A sending module is used to send the second data packet.
10. The device according to claim 9, characterized in that The processing module is further configured to obtain a weight value set of the N queues, the weight value set comprising N queue weight values, the N queue weight values being arranged in ascending order, and the N queues corresponding to the N queue weight values; determine a second weight value according to the first weight value, the second weight value being the one of the N queue weight values that is closest to the first weight value; The queue corresponding to the second weight value is determined as the first queue.
11. The device according to claim 10, characterized in that The processing module is specifically used to determine a first interval according to the N queue weight values, where the first interval is (m1, m2), and m1<w<m2, wherein w represents the first weight value, m1 represents one of the N queue weight values, and m2 represents a value of the N queue weight values that is adjacent to m1 and greater than m1; determine the second weight value according to a first distance and a second distance, the second weight value corresponds to the smaller of the first distance and the second distance, the first distance is the distance between w and m1, and the second distance is the distance between w and m2.
12. The device according to any one of claims 9 to 11, characterized in that The processing module is further used to calculate the sum of weight values of all data packets in the first queue, and calculate the queue weight value of the first queue according to the total number of all data packets in the first queue and the sum of the weight values.
Citation Information
Patent Citations
Data flow scheduling method, equipment and system
CN103476062A
Video data packet transmission method and system based on wireless network
CN105681931A
Data flow scheduling method, electronic equipment and storage medium
CN110290178A