A method, apparatus, and system for scheduling network traffic
By combining traffic shaping technology with the correspondence between service flow type and time window in network nodes, peak scheduling of service flows can be achieved, solving network congestion problems and improving user experience.
Patent Information
- Application Number
- CN202180105279.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2041-12-31
AI Technical Summary
When multiple service flows in a network are heading to the same destination, it may cause network congestion at the destination, resulting in increased latency for services with low latency requirements and affecting the forwarding of other service traffic.
The system obtains the type of business flow by node and determines the transmission of different types of business flows within different time windows based on the correspondence between the business flow type and the preset time window. Combined with traffic shaping technology, it ensures that high-priority business flows are transmitted within the corresponding time window.
Reduce network traffic congestion, ensure the performance of high-priority services, improve user experience, and avoid network congestion caused by sudden traffic surges.
Smart Images

Figure CN118435565B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of communications, and more particularly, to a method, apparatus and system for scheduling network traffic. BACKGROUND
[0002] With the continuous development of technology, network traffic is rapidly increasing. When multiple service flows in the network go to the same destination, it can cause network congestion at the destination, thereby increasing the latency of low-latency-demand services. Meanwhile, the amount of traffic cached in the forwarding node increases, which seriously affects the forwarding of other service traffic.
[0003] To this end, embodiments of the present application provide a method for scheduling network traffic, which can reduce network traffic congestion and improve user experience. SUMMARY
[0004] Embodiments of the present application provide a method, apparatus and system for scheduling network traffic, which can reduce network traffic congestion and improve user experience.
[0005] In a first aspect, a method for scheduling network traffic is provided, comprising: a first node obtaining a first service flow, the type of the first service flow including at least one service flow type, the service flow type including a controlled service flow and an uncontrolled service flow; the first node determining at least one time window corresponding to each service flow type in the first service flow according to the at least one service flow type and a preset correspondence between service flow types and time windows, wherein the length of the time window corresponding to the controlled service flow is greater than the length of the time window corresponding to the uncontrolled service flow; and the first node sending the first service flow in the at least one time window.
[0006] By sending service flows in corresponding time windows by nodes, service flows of different types can be sent in different time windows, peak-shaving scheduling of service flows is achieved, thereby reducing network traffic congestion, ensuring the performance of high-priority services, and improving user experience.
[0007] In combination with the first aspect, in some implementations of the first aspect, the first node sending the first service flow in the at least one time window comprises: the first node performing traffic shaping on the first service flow; and the first node sending the first service flow after traffic shaping in the at least one time window.
[0008] By performing traffic shaping on service flows, service flows can be transmitted at a set rate, avoiding network congestion caused by traffic bursts. Furthermore, traffic shaping is combined with peak-shaving scheduling, further reducing the degree of network traffic congestion and improving user experience.
[0009] With reference to the first aspect, in some implementations of the first aspect, the method further includes: obtaining, by the first node, timing indication, the timing indication being used to indicate a time reference in a system in which the first node is located; and determining, by the first node, the start time of the at least one time window according to the timing indication.
[0010] With reference to the first aspect, in some implementations of the first aspect, the first traffic flow includes a first sub-traffic flow, the first sub-traffic flow being a controlled traffic flow or an uncontrolled traffic flow, and the sending, by the first node, the first traffic flow in the at least one time window includes: when the first sub-traffic flow is the controlled traffic flow, sending, by the first node, the first sub-traffic flow in a first sub-time window in a first time window corresponding to the controlled traffic flow in the at least one time window; and when the first sub-traffic flow is the uncontrolled traffic flow, sending, by the first node, the first sub-traffic flow in a second sub-time window in a second time window corresponding to the uncontrolled traffic flow in the at least one time window.
[0011] With reference to the first aspect, in some implementations of the first aspect, the sending, by the first node, the first traffic flow in the at least one time window includes: sending, by the first node, the first traffic flow in the at least one time window according to token valid indication information corresponding to the first traffic flow or output valid indication information corresponding to the first traffic flow, wherein the token valid indication information corresponding to the first traffic flow or the output valid indication information corresponding to the first traffic flow is used to indicate that the sending of the first traffic flow is allowed.
[0012] With reference to the first aspect, in some implementations of the first aspect, the time window corresponding to the controlled traffic flow and the time window corresponding to the uncontrolled traffic flow do not overlap.
[0013] With reference to the first aspect, in some implementations of the first aspect, the first node includes a source node or a forwarding node.
[0014] In a second aspect, a device for scheduling network traffic is provided. The device has the functions of the first node described in the first aspect. The functions can be implemented by hardware, or the corresponding software is executed by hardware. The hardware or software includes one or more modules corresponding to the functions. The device specifically includes: a first obtaining module configured to obtain a first traffic flow, wherein the first traffic flow includes at least one traffic flow type, and the traffic flow type includes a controlled traffic flow and an uncontrolled traffic flow; a first processing module configured to determine at least one time window corresponding to each traffic flow type in the first traffic flow according to the at least one traffic flow type and a preset correspondence between a traffic flow type and a time window, wherein the length of the time window corresponding to the controlled traffic flow is greater than the length of the time window corresponding to the uncontrolled traffic flow; and a first sending module configured to send the first traffic flow in the at least one time window.
[0015] With reference to the second aspect, in some implementations of the second aspect, the first sending module further includes a first traffic shaping module, and the first sending module is specifically configured to: the first traffic shaping module is configured to perform traffic shaping on the first traffic flow; and the first sending module sends the first traffic flow after traffic shaping in the at least one time window.
[0016] With reference to the second aspect, in some implementations of the second aspect, the first obtaining module is further configured to obtain a timing indication, and the timing indication is used to indicate a time reference in a system in which the device is located; and the first processing module is further configured to determine a starting time of the at least one time window according to the timing indication.
[0017] With reference to the second aspect, in some implementations of the second aspect, the first traffic flow includes a first sub-traffic flow, and the first sub-traffic flow is a controlled traffic flow or an uncontrolled traffic flow; and the first sending module sends the first traffic flow in the at least one time window, including: when the first sub-traffic flow is a controlled traffic flow, the first sending module sends the first sub-traffic flow in a first sub-time window in a first time window corresponding to the controlled traffic flow in the at least one time window; and when the first sub-traffic flow is an uncontrolled traffic flow, the first sending module sends the first sub-traffic flow in a second sub-time window in a second time window corresponding to the uncontrolled traffic flow in the at least one time window.
[0018] In some implementations of the second aspect, the first sending module is configured to send the first service flow in the at least one time window according to the token valid indication information corresponding to the first service flow or the output-allowable valid indication information corresponding to the first service flow, wherein the token valid indication information corresponding to the first service flow or the output-allowable valid indication information corresponding to the first service flow is used to indicate that the sending of the first service flow is allowed.
[0019] In some implementations of the second aspect, the time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow do not overlap.
[0020] In a third aspect, a communication system is provided, which includes at least one node, the at least one node including a first node configured to perform the method of the first aspect or any of the implementations of the first aspect.
[0021] In a fourth aspect, an apparatus for scheduling network traffic is provided, which includes at least one processor coupled with at least one memory, the at least one processor configured to execute computer programs or instructions stored in the at least one memory to cause the apparatus to perform the method of the first aspect or any of the implementations of the first aspect.
[0022] In a fifth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface configured to receive data and / or information and transmit the received data and / or information to the processor, the processor configured to process the data and / or information according to the method of the first aspect or any of the implementations of the first aspect.
[0023] In a sixth aspect, a computer readable medium is provided, which stores program codes, when the program codes are run on a computer, the computer is caused to perform the method of the first aspect or any of the implementations of the first aspect. The computer readable medium includes, but is not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), Flash memory, electrically EPROM (EEPROM), and hard drive.
[0024] In a seventh aspect, a computer program product is provided, which comprises computer program code which, when run on a computer, causes the computer to perform the method of the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0025] Figure 1 is an exemplary schematic diagram of a network architecture suitable for embodiments of the present application.
[0026] Figure 2 is a schematic diagram of a method for scheduling network traffic provided by embodiments of the present application.
[0027] Figure 3 is a schematic diagram of an exemplary method for scheduling network traffic provided by embodiments of the present application.
[0028] Figure 4 is a schematic diagram of the relationship between time windows in a method for scheduling network traffic provided by embodiments of the present application.
[0029] Figure 5 is a schematic diagram of implementing scheduling network traffic using a method for scheduling network traffic provided by embodiments of the present application.
[0030] Figure 6 is a schematic structural diagram of a device 600 for scheduling network traffic provided by embodiments of the present application.
[0031] Figure 7 is a schematic diagram of the hardware structure of a device 1000 for scheduling network traffic provided by embodiments of the present application.
[0032] Figure 8 is a schematic structural diagram of a communication system 1100 provided by embodiments of the present application. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0034] Network traffic is the amount of data transmitted on a network. Similar to the close correlation between the number of vehicles coming and going and the width and connection of the road, the size of network traffic is closely related to the network architecture design. Generally, with the development of technology, network traffic is rapidly and continuously growing. However, under the condition of network architecture determination, the growth of network traffic will cause congestion in part of the nodes in the network, which is not conducive to the sending, forwarding, receiving, etc. of network traffic, thereby causing poor user experience.
[0035] In addition, in the communication chip, traffic shaping is often needed for the network traffic to be forwarded, and the traffic shaping is to limit the traffic and speed of the network traffic to be forwarded sent from the communication chip, so that the network traffic to be forwarded is sent out at a relatively uniform speed. For example, at least one buffer unit for traffic shaping is configured in the communication chip, each buffer unit is allocated a token bucket, the token bucket stores tokens for indicating the network traffic to be forwarded by the communication chip, the buffer unit periodically replenishes tokens for the token bucket, and the communication chip puts the network traffic to be forwarded into the corresponding buffer unit. When the number of tokens in the token bucket of the buffer unit is greater than or equal to the byte number of the network traffic to be forwarded, the network traffic to be forwarded is sent, and the tokens in the token bucket are deducted, and the number of tokens deducted is the byte number of the network traffic to be forwarded. When the number of tokens in the token bucket is less than the byte number of the network traffic to be forwarded, the network traffic to be forwarded is waited to be sent after the number of tokens in the token bucket is replenished to be greater than or equal to the byte number of the network traffic to be forwarded, or the network traffic to be forwarded is discarded.
[0036] It should be understood that in the embodiments of the present application, the network traffic can be referred to as a packet, which is not limited in the present application.
[0037] Therefore, the embodiments of the present application provide a method for scheduling network traffic, which is beneficial to reduce network traffic congestion, guarantee high-priority service performance, improve user experience, and reduce the accumulation of node buffers, for example, reduce the accumulation and congestion degree of buffers of intermediate aggregation forwarding nodes or receiving nodes.
[0038] Figure 1 is an exemplary schematic diagram of a network architecture suitable for the embodiments of the present application. As shown in Figure 1 The network architecture 100 includes a global timer, a node 101, a node 102, a node 103, and a node 104. The global timer can be understood as a globally unified timer, which is used to generate global timing information for timing control of different nodes, for example, for unified timing control of the nodes 101-104. The nodes 101-104 are service processing nodes, which can be terminal devices, routers, switches, or switch chips, which are not limited in the embodiments of the present application. The nodes 101 and 102 can send a first service flow to the node 103, and the node 103 forwards the first service flow to the node 104, and the node 103 can be understood as a forwarding node at this time. The node 103 can also send a second service flow to the node 104.
[0039] It should be understood that the network architecture applicable to the embodiments of the present application can not include a global timer, in which case each node schedules the service flow by itself, and the service flow can be scheduled at the intermediate aggregation forwarding node, so that the subsequent node will not be congested due to too many burst service flows, for example, the node 103 schedules the service flows sent by the nodes 101 and 102 uniformly, so that there is no traffic burst at the subsequent node 104.
[0040] Optionally, the network structure 100 can further include a master unit, for example, a central processing unit (CPU). The master unit can control the global timer and the nodes 101-104, and can also generate the service flow sent or forwarded by the nodes 101-104. In addition, the master unit and the global timer can be two physically separated modules, or can be two logically separated modules in the same device, which is not limited in the present application.
[0041] Figure 2 FIG. 1 is a schematic diagram of a method for scheduling network traffic provided by an embodiment of the present application. The method 200 includes:
[0042] S201, a first node acquires a first service flow, the type of the first service flow including at least one service flow type, the service flow type including a controlled service flow and an uncontrolled service flow.
[0043] Specifically, in the embodiments of the present application, the first node can be a source node or a forwarding node, for example, a switching chip, a terminal device, a switch or a router, etc., which is not limited in the present application. The first node acquires the first service flow can be that the first node acquires the first service flow within a certain time period, for example, acquires the first service flow within a certain time period. In addition, the way the first node acquires the first service flow can be to generate or receive the first service flow: when the first node is a source node, the first node generates the first service flow; when the first node is a forwarding node, the first node receives the first service flow sent by other nodes, which can be a second node, for example, the second node acquires the first service flow and sends it to the first node.
[0044] It should be understood that the second node can be a source node or a forwarding node, for example, a switching chip, a terminal device, a switch or a router, etc., which is not limited in the present application.
[0045] It should also be understood that the first node can be any one of at least one node in a certain network architecture that implements network traffic scheduling. Optionally, the second node is any one of the at least one node other than the first node. Or in other words, the method of scheduling network traffic can be used for a source node or an intermediate convergent forwarding node in a certain network architecture, or for some nodes in a certain network architecture, or for all nodes in a certain network architecture, which is not limited in the present application.
[0046] In the embodiment of the present application, the type of the first service flow can include at least one service flow type, that is, one or more sub-service flows in the first service flow can belong to multiple service flow types, which include controlled service flows and uncontrolled service flows. For example, one or more sub-service flows in the first service flow can all be controlled service flows, or all be uncontrolled service flows, or part of the sub-service flows be controlled service flows and part of the sub-service flows be uncontrolled service flows, which is not limited in the present application.
[0047] It should be understood that the service flow type can include both controlled service flows and uncontrolled service flows, wherein the controlled service flow is more sensitive to delay than the uncontrolled service flow, and can be a high-priority low-delay service flow, such as a voice, an alarm, and the like. The uncontrolled service flow is not sensitive to delay, and can be a low-priority service flow, such as a temporary service flow of a spam short message.
[0048] S202, the first node determines at least one time window corresponding to each service flow type in the first service flow according to the at least one service flow type and a preset correspondence between the service flow type and the time window, wherein the length of the time window corresponding to the controlled service flow is greater than the length of the time window corresponding to the uncontrolled service flow.
[0049] Specifically, in the embodiment of the present application, the first node determines different types of time windows for different types of service flows in the first service flow according to the at least one service flow type in the first service flow, that is, the time window corresponding to the controlled service flow and / or the time window corresponding to the uncontrolled service flow. Or in other words, the at least one time window determined by the first node for the first service flow can all be the time window corresponding to the controlled service flow, or all be the time window corresponding to the uncontrolled service flow, or both types of time windows.
[0050] In a possible implementation, before determining the at least one time window corresponding to each service flow type in the first service flow, the first node can obtain a timing indication, the timing indication being used to indicate a time reference in a system where the first node is located, and the starting time of the at least one time window is determined according to the timing indication. That is, the timing indication can be understood as a time or a time point obtained by the first node, so that the first node can determine the starting time of the service flow according to the time or the time point, that is, the starting time of the time window for sending the service flow. Subsequently, the first node can determine the ending time of the time window according to the length of the time period for sending the service flow, that is, determine the time window for sending the service flow.
[0051] Optionally, the timing indication can be a timing indication sent by a global timer to the first node, or can also be a timing indication generated by the first node itself. The application does not limit this.
[0052] It should be understood that the correspondence between the service flow type and the time window can include a one-to-one correspondence between the service flow type and the time window, for example, one service flow type corresponds to one time window, and different types of time windows can be different in length or can be different in time point.
[0053] It should also be understood that the correspondence between the service flow type and the time window is preset for the first node, which can be set by the first node according to the received relevant indication, or can be set by the first node itself, and the application does not limit this.
[0054] Therefore, through the above method, the first node can divide the received first service flow into two types of service flows (controlled service flow and uncontrolled service flow), allocate time windows to the first service flow according to the service flow type, one service flow type corresponds to one time window, and different types of service flows are sent in time windows, that is, different service flows are staggered.
[0055] It should be understood that the time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow can partially overlap or can not overlap at all (for example, two time periods that are physically continuous), and the application does not limit this. Optionally, the time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow can partially overlap, which can be that the time window corresponding to the controlled service flow is a time period in which the first node operates, and the time window corresponding to the uncontrolled service flow is a part of the time period in which the first node operates. Or it can be understood that no time window is set for the controlled service flow, and the controlled service flow can be sent at any time point.
[0056] S203, the first node sends the first service flow in the at least one time window.
[0057] Specifically, in the embodiment of the present application, the first node transmits the first service flow in the at least one time window according to token valid indication information corresponding to the first service flow or output valid indication information corresponding to the first service flow, the token valid indication information or the output valid indication information being used to indicate that the transmission of the service flow is allowed.
[0058] It should be understood that after the first node determines the at least one time window corresponding to the first service flow in the step S202, the first node allocates token valid indication information or output valid indication information to a channel or a queue where the first service flow is located in the at least one time window, so that the first node transmits the first service flow.
[0059] Therefore, by the above method, the node transmits the service flow in the corresponding time window, and different types of service flows are transmitted in different time windows, so that the off-peak transmission of the service flow is realized, the network traffic congestion is reduced, the performance of high-priority services is ensured, and the user experience is improved.
[0060] In a possible implementation, the method in which the first node transmits the first service flow in the at least one time window corresponding to each service flow type in the first service flow can be a traffic shaping transmission method: the first node performs traffic shaping on the first service flow, and the first node transmits the first service flow after traffic shaping in the at least one time window; or in other words, the first node performs traffic shaping transmission on the first service flow in the at least one time window corresponding to each service flow type in the first service flow.
[0061] It should be understood that the traffic shaping transmission method can be that the first node allocates tokens to the first service flow according to traffic shaping parameters, so as to transmit the first service flow. Alternatively, the first node allocates token valid indication information or output valid indication information to a channel or a queue where the first service flow is located according to traffic shaping parameters, so that the first node transmits the first service flow.
[0062] Therefore, by performing traffic shaping on the network traffic, the network traffic can be transmitted between nodes at a set rate, network congestion caused by traffic bursts is avoided, and traffic shaping is combined with off-peak scheduling, so that the degree of network traffic congestion is further reduced, and the user experience is improved.
[0063] Optionally, the traffic shaping parameters can be traffic shaping parameters received by the first node. For example, when the first node is a chip, the chip receives configuration information sent by software, and the configuration information includes traffic shaping parameters.
[0064] Optionally, the first service flow can include a first sub-service flow, which can be a controlled service flow or an uncontrolled service flow. Alternatively, the first service flow includes at least one sub-service flow, and the first sub-service flow can be any one of the at least one sub-service flow. In the embodiments of the present application, when the first service flow includes a plurality of sub-service flows of the same type, the first node can determine a sub-time window corresponding to the first sub-service flow according to the time at which the plurality of sub-service flows of the same type are acquired, for example, the order of time, in a time window corresponding to a controlled service flow or a time window corresponding to an uncontrolled service flow, and transmit the first sub-service flow in the determined sub-time window.
[0065] In a possible implementation, when the first sub-service flow is a controlled service flow, the first node determines to transmit the first sub-service flow in a first sub-time window included in a first time window corresponding to the controlled service flow in at least one time window, that is, the first sub-service flow is transmitted in the first sub-time window, and the first sub-time window is one of the time windows corresponding to the controlled service flow (the first time window). Similarly, when the first service flow is an uncontrolled service flow, the first node determines to transmit the first sub-service flow in a second sub-time window included in a second time window corresponding to the uncontrolled service flow in at least one time window, that is, the first sub-service flow is transmitted in the second sub-time window, and the second sub-time window is one of the time windows corresponding to the uncontrolled service flow (the second time window). At this time, the controlled service flow and the uncontrolled service flow are further scheduled to be transmitted in different sub-time windows, and the peak shifting transmission of different service flows is realized.
[0066] In another possible implementation, when the first sub-service flow is an uncontrolled service flow, the first node can also determine to transmit the first sub-service flow in a certain sub-time window in the time window corresponding to the uncontrolled service flow, and when the first sub-service flow is a controlled service flow, no time window is set.
[0067] Optionally, when the first node receives the first service flow transmitted by the second node, the method 200 can further include steps S204-S206:
[0068] It should be noted that in the second node, the method for transmitting the first service flow is similar or the same as that of the first node, and for the same method description, reference can be made to the related description in the first node above, which will not be described herein again.
[0069] S204, the second node acquires a first service flow, and the type of the first service flow includes at least one service flow type, and the service flow type includes a controlled service flow and an uncontrolled service flow.
[0070] Specifically, in the embodiments of the present application, the second node can be a source node or a forwarding node, such as a switching chip, a terminal device, a switch or a router, etc., which is not limited in the present application. The second node obtaining the first service flow can be that the second node obtains the first service flow in a certain time period, such as obtaining the first service flow in a certain time period. In addition, the manner in which the second node obtains the first service flow can be that when the second node is a source node, the second node generates the first service flow; and when the second node is a forwarding node, the second node receives the first service flow and then sends the first service flow out, such as the second node sending the first service flow to the first node in the following step S206.
[0071] The detailed description of the first service flow can be referred to the related description in the above method S201, which will not be repeated here.
[0072] S205, the second node determines at least one time window corresponding to each service flow type in the first service flow according to the at least one service flow type and the preset correspondence between the service flow type and the time window, wherein the length of the time window corresponding to the controlled service flow is greater than the length of the time window corresponding to the uncontrolled service flow.
[0073] Specifically, in the embodiments of the present application, the second node determines different types of time windows for different types of service flows in the first service flow according to the at least one service flow type in the first service flow, i.e., the time window corresponding to the controlled service flow and / or the time window corresponding to the uncontrolled service flow. Or, the at least one time window determined by the second node for the first service flow can be the time window corresponding to the controlled service flow, or the time window corresponding to the uncontrolled service flow, or both.
[0074] In a possible implementation, before the second node determines at least one time window corresponding to each service flow type in the first service flow, the second node can obtain a timing indication, which is used to indicate a time reference in the system in which the second node is located, and determine the starting time of the at least one time window according to the timing indication. That is, the timing indication can be understood as a time or a point in time obtained by the second node, so that the second node can determine the starting time of the service flow according to the time or the point in time, i.e., the starting time of the time window for sending the service flow. Subsequently, the second node can determine the ending time of the time window according to the length of the time period for sending the service flow, i.e., determine the time window for sending the service flow.
[0075] Optionally, the timing indication can be a timing indication sent by a global timer to the second node, or it can also be a timing indication generated by the second node itself, which is not limited in the present application.
[0076] It should be understood that, in the above second node and first node, there is a certain correspondence between the time window corresponding to the same type of service flow in the first service flow, for example, for the same type of service flow in the first service flow, the time window in the two nodes is the same, or the length of the time window in the two nodes is the same, but the time sequence is different, that is, there is a certain offset between the time windows in the time sequence, and the present application does not limit this.
[0077] It should be understood that the time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow can be partially overlapped or completely overlapped (for example, two time periods that are physically continuous), and the present application does not limit this. Optionally, the time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow can be partially overlapped, that is, the time window corresponding to the controlled service flow is the time period in which the first node runs, and the time window corresponding to the uncontrolled service flow is a part of the time period in which the first node runs. Alternatively, it can be understood that no time window is set for the controlled service flow, and the controlled service flow can be sent at any time point.
[0078] Therefore, by the above method, the time point at which the first node receives the service flow sent by the second node is just within the time window in which the first node sends the service flow, which can avoid the accumulation of service flow in the node and cause network traffic congestion.
[0079] S206, the second node sends the first service flow to the first node in the at least one time window, and correspondingly, the first node receives the first service flow.
[0080] Specifically, in the embodiment of the present application, the second node sends the first service flow in the at least one time window corresponding to each service flow type in the first service flow according to the token valid indication information corresponding to the first service flow or the output valid indication information corresponding to the first service flow, which is used to indicate that the service flow is allowed to be sent. Correspondingly, the first node receives the first service flow.
[0081] It should be understood that, in the above step S206, after the second node determines the at least one time window corresponding to each service flow type in the first service flow, the second node allocates token valid indication information or output valid indication information to the channel or queue where the first service flow is located in the at least one time window corresponding to the first service flow, so as to send the first service flow.
[0082] In a possible implementation, the method for sending the first service flow by the second node in the at least one time window corresponding to each service flow type in the first service flow can be a traffic shaping sending method: the second node performs traffic shaping on the first service flow, and the second node sends the first service flow after traffic shaping in the at least one time window corresponding to each service flow type in the first service flow; or in other words, the second node performs traffic shaping sending on the first service flow in the at least one time window corresponding to the first service flow.
[0083] It should be understood that the traffic shaping sending method described above can be that the second node allocates tokens for the first service flow according to the traffic shaping parameter, so as to send the first service flow. Alternatively, the second node allocates token valid indication information or can output token valid indication information for a channel or a queue where the first service flow is located, so as to enable the second node to send the first service flow.
[0084] Optionally, the traffic shaping parameter described above can be a traffic shaping parameter received by the second node. For example, when the second node is a chip, the chip receives configuration information sent by software, and the configuration information includes the traffic shaping parameter.
[0085] In the following examples, the first node is chip C, the second node is chip A or chip B, and the method for scheduling network traffic provided by the embodiments of the present application is described in combination with Figure 3 and Figure 4 The method for scheduling network traffic provided by the embodiments of the present application is described in detail.
[0086] Figure 3 is a schematic diagram of an exemplary method for scheduling network traffic provided by the embodiments of the present application. As Figure 3 shown, the method 300 includes the following steps.
[0087] S301, the chip A obtains the second service flow, and the chip B obtains the third service flow.
[0088] Specifically, in the embodiments of the present application, the type of the second service flow can include a controlled service flow and / or an uncontrolled service flow, and the type of the third service flow can include a controlled service flow and / or an uncontrolled service flow. For example, the type of the second service flow includes a controlled service flow, and the type of the third service flow includes an uncontrolled service flow, at this time, the chip A obtains the controlled service flow, and the chip B obtains the uncontrolled service flow. It should be understood that the above-mentioned obtaining method can be "receiving or generating".
[0089] For detailed description of the controlled service flow and the uncontrolled service flow, reference can be made to the related description in the above-mentioned step S202, which will not be described here again.
[0090] S302, the chip A sends the second service flow to the chip C, and correspondingly, the chip C receives the second service flow.
[0091] Specifically, in the embodiment of the present application, when the type of the second service flow comprises the controlled service flow, the chip A can send the second service flow to the chip C in the time window corresponding to the controlled service flow. Optionally, the timing indication can be the timing indication sent by the global timer to the chip A, and can also be the timing indication generated by the chip A itself, which is not limited in the present application.
[0092] As to the time window corresponding to the service flow and the related manner of sending the service flow, reference can be made to the related description in the above method S202-S203, which will not be repeated here.
[0093] It should be understood that the chip A sends the controlled service flow to the chip C in a timed and quantitative manner.
[0094] Optionally, the chip A can send the second service flow to the chip C in a random and unquantitative manner, in which case the type of the second service flow can comprise the uncontrolled service flow, or the controlled service flow and the uncontrolled service flow, or the controlled service flow, which is not limited in the present application.
[0095] S303, the chip B sends a third service flow to the chip C, and correspondingly, the chip C receives the third service flow.
[0096] Specifically, in the embodiment of the present application, when the type of the third service flow comprises the uncontrolled service flow:
[0097] In one possible implementation, the chip B can send the third service flow to the chip C in the time window corresponding to the uncontrolled service flow. Optionally, the timing indication can be the timing indication sent by the global timer to the chip B, and can also be the timing indication generated by the chip B itself, which is not limited in the present application.
[0098] In another possible implementation, the chip B can send the third service flow to the chip C in a random and unquantitative manner.
[0099] As to the time window corresponding to the service flow and the related manner of sending the service flow, reference can be made to the related description in the above method S202-S203, which will not be repeated here.
[0100] S304, the chip C sends the second service flow and the third service flow to the chip D, and correspondingly, the chip D receives the second service flow and the third service flow.
[0101] Specifically, in the embodiment of the present application, after receiving the second service flow and the third service flow, the chip C forwards them to the chip D. Optionally, the chip D is the destination of the service flow, or the chip D serves as a forwarding node to forward the related service flow.
[0102] In a possible implementation, before transmitting the second service flow and the third service flow, the chip C can determine the time window corresponding to the second service flow and the time window corresponding to the third service flow according to the type of the second service flow and the type of the third service flow and the correspondence between the service flow type and the time window. For example, when the second service flow is a controlled service flow and the third service flow is an uncontrolled service flow, the chip C can determine that the time window corresponding to the second service flow is the first time window and the time window corresponding to the third service flow is the second time window, so that different types of service flows are forwarded in different time windows.
[0103] Optionally, the time period corresponding to the first time window (for example, the T0 time period) is different from the time period corresponding to the second time window (for example, the T1 time period), and the two time periods can be completely non-overlapping, for example, as shown in (a) of FIG. 2, the T0 time period and the T1 time period are non-overlapping. Figure 4 Optionally, the two time periods can be partially overlapping, and the length of the T0 time period is greater than the length of the T1 time period, for example, as shown in (b) of FIG. 2, the T0 time period and the T1 time period are partially overlapping, and the length of the T0 time period is greater than the length of the T1 time period. Figure 4 Optionally, the two time periods can be partially overlapping, and the length of the T0 time period is greater than the length of the T1 time period, for example, as shown in (b) of FIG. 2, the T0 time period and the T1 time period are partially overlapping, and the length of the T0 time period is greater than the length of the T1 time period.
[0104] Optionally, the two time periods (the T0 time period and the T1 time period) can be periodic time periods, and the cycle length is Ttotal=T0+T1, as shown in (c) of FIG. 2. Figure 4
[0105] For the time window corresponding to the service flow and the related manner of transmitting the service flow, refer to the related description in the above methods S202-S203, which will not be repeated here.
[0106] It should be understood that in the above method 300, the chips A, B, and C can be in the same system, for example, in a separate device. Optionally, the system can further include a global timer and / or a master unit, so that when the system is initialized, a user sets configuration information, and the master unit transmits the configuration information to the global timer, the chips A, B, and C, and other functional nodes, and the configuration information is used for the functional nodes to implement corresponding functions.
[0107] Optionally, in the embodiments of the present application, the controlled service flow can be referred to as service traffic, and the uncontrolled service flow can be referred to as background traffic.
[0108] It should be understood that the method for scheduling network traffic provided by the embodiments of the present application can be applied to a system including a plurality of nodes, that is, any one of the plurality of nodes can use the above method 200 to implement the scheduling of network traffic.
[0109] Exemplarily, the following Figure 5 The diagram illustrates a method for scheduling network traffic according to an embodiment of this application. In the diagram, the method provided by the embodiment of this application is applied to a system including four nodes (node 1, node 2, node 3, and node 4).
[0110] like Figure 5 As shown, the service flow is sequentially transmitted from node 1 to node 4 (e.g., node 4 is the destination node). Nodes 1, 2, and 3 generate their own service flows or receive service flows sent by other nodes. At this time, nodes 1-3 use the method 200 described above to send different service flows within different time windows. For example, for the controlled service flow 1 received and / or generated by node 1, it is sent to node 2 within time window 1 and bandwidth A. For the controlled service flows 1 and 2 received and / or generated by node 2, they are sent to node 3 within time window 1-2 and bandwidth A. For the controlled service flows 1, 2, and 3 received and / or generated by node 3, they are sent to node 4 within time window 1-3 and bandwidth A. In addition, for uncontrolled service flows, nodes 1-3 all send them within time window 4 and bandwidth A.
[0111] Optionally, time windows 1-3 can be understood as a single time window, with time windows 1, 2, and 3 being sub-time windows. That is, time windows 1-3 correspond to the time windows for controlled business flows, while time window 4 corresponds to the time window for uncontrolled business flows.
[0112] Therefore, the method provided in this application embodiment can stagger the scheduling of service flows, thereby reducing node congestion.
[0113] The above, combined with Figures 1 to 5 This paper details a method for scheduling network traffic applicable to embodiments of this application. Below, in conjunction with… Figures 6 to 8 This application provides a detailed description of the data transmission apparatus and system provided in the embodiments. It should be understood that the descriptions of the apparatus and system embodiments correspond to the descriptions of the method embodiments; therefore, any content not described in detail here can be found in the above method embodiments, and for the sake of brevity, will not be repeated here.
[0114] Figure 6 This is a schematic structural diagram of a device 600 for scheduling network traffic provided in an embodiment of this application. Figure 6 The 600 shown can perform the corresponding steps executed by the first node and / or the second node in the above method embodiments.
[0115] like Figure 6As shown, the apparatus 600 can include modules 601-603 and modules 604-606. Among them, the modules 601-603 can be used to execute the related steps of the first node in the above method 200, and the modules 604-606 can be used to execute the related steps of the second node in the above method 200. The steps can be specifically referred to the related steps in the above, and will not be described in detail here.
[0116] It should be understood that the apparatus 600 of the embodiments of the present application can be implemented by a central processing unit (CPU), or can be implemented by an application-specific integrated circuit (ASIC), or can be implemented by a programmable logic device (PLD), which can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can also be implemented by software Figures 1 to 5 When the method of scheduling network traffic is shown, the apparatus 600 and each module thereof can also be a software module.
[0117] Figure 7 FIG. 10 is a schematic diagram of a hardware structure of an apparatus 1000 for scheduling network traffic provided by an embodiment of the present application.
[0118] As shown in FIG. 10, the apparatus 1000 can include a processor 1001, a memory 1002, and a communication interface 1003. Figure 7As shown, the network traffic scheduling device 1000 includes a processor 1001, a memory 1002, an interface 1003, and a bus 1004. The interface 1003 can be implemented wirelessly or via a wired connection; specifically, it can be a network interface card (NIC). The processor 1001, memory 1002, and interface 1003 are connected via the bus 1004. The interface 1003 may specifically include a transmitter and a receiver, enabling the network traffic scheduling device to perform the aforementioned sending and receiving. The processor 1001 executes the processing performed by the network traffic scheduling device in the above embodiments. The memory 1002 includes an operating system 10021 and an application program 10022, used to store programs, code, or instructions. When the processor or hardware device executes these programs, code, or instructions, the processing in the method embodiments can be completed. Optionally, the memory 1002 may include read-only memory (ROM) and random access memory (RAM). The ROM includes a basic input / output system (BIOS) or an embedded system; the RAM includes the application program and the operating system. When the network traffic scheduling device 1000 needs to be run, the system is booted through the BIOS embedded in ROM or the bootloader in the embedded system, guiding the network traffic scheduling device 1000 into normal operation. After the network traffic scheduling device 1000 enters normal operation, the application program and operating system running in RAM complete the processing procedure of the network traffic scheduling device 1000 involved in the method embodiment. Figure 7 This is just a simplified design of the device 1000 for scheduling network traffic. In practical applications, the device for scheduling network traffic can include any number of interfaces, processors, or memory.
[0119] Optionally, in some implementations, the device 1000 for scheduling network traffic can be a hardware structure diagram of the device 600 for scheduling network traffic described above. In this case, the processor 1001 has the same function as the first processing module 602 or the second processing module 605, and the interface 1003 has the same function as the first acquisition module 601, the first sending module 603, the second acquisition module 604, or the second sending module 606 described above.
[0120] Figure 8 This is a schematic structural diagram of a communication system 1100 provided in an embodiment of this application. Figure 8 As shown, the communication system 1100 may include at least one node, which may include the first node in the above method embodiment. Optionally, the at least one node may also include a second node.
[0121] The embodiments of the present application further provide a computer readable medium storing program codes, which, when executed on a computer, cause the computer to perform the method executed by the first node or the second node in the method embodiments described above. The computer readable storage includes, but is not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), Flash memory, electrically EPROM (EEPROM), and hard drive.
[0122] The embodiments of the present application further provide a chip system, which comprises at least one processor, at least one memory and interface circuitry, the interface circuitry is responsible for information interaction between the chip system and the outside world, the at least one memory, the interface circuitry and the at least one processor are interconnected through a circuit, and the at least one memory stores instructions; the instructions are executed by the at least one processor to perform the operations of the first node or the second node in the methods described above. In the specific implementation process, the chip system can be realized in the form of a central processing unit (CPU), a micro controller unit (MCU), a micro processing unit (MPU), a digital signal processing (DSP), a system on chip (SoC), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a programmable logic device (PLD).
[0123] The embodiments of the present application further provide a computer program product applied in the first node or the second node, which comprises a series of instructions, when the instructions are executed, to perform the operations of the first node or the second node in the methods described above.
[0124] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).
[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0126] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0129] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0130] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0131] 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 can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of scheduling network traffic, characterized by, The method comprises the following steps: A first node acquires a first service flow, and types of the first service flow comprise at least one service flow type, wherein the service flow type comprises a controlled service flow and an uncontrolled service flow; The first node determines at least one time window corresponding to each service flow type in the first service flow according to the at least one service flow type and a preset correspondence between the service flow type and the time window, wherein a length of the time window corresponding to the controlled service flow is greater than a length of the time window corresponding to the uncontrolled service flow; The first node sends the first service flow in the at least one time window.
2. The method of claim 1, wherein, The first node sends the first service flow in the at least one time window, which comprises the following steps: The first node performs traffic shaping on the first service flow; The first node sends the first service flow after traffic shaping in the at least one time window.
3. The method of claim 1 or 2, wherein, The method further comprises the following steps: The first node acquires timing indication, and the timing indication is used to indicate a time reference in a system where the first node is located; The first node determines a starting time of the at least one time window according to the timing indication.
4. The method according to any one of claims 1 to 3, characterized in that, The first service flow comprises a first sub-service flow, the first sub-service flow is the controlled service flow or the uncontrolled service flow, and the first node sends the first service flow in the at least one time window, which comprises the following steps: When the first sub-service flow is the controlled service flow, the first node sends the first sub-service flow in a first sub-time window in a first time window corresponding to the controlled service flow in the at least one time window; When the first sub-service flow is the uncontrolled service flow, the first node sends the first sub-service flow in a second sub-time window in a second time window corresponding to the uncontrolled service flow in the at least one time window.
5. The method according to any one of claims 1 to 4, wherein The first node sends the first service flow in the at least one time window, which comprises the following steps: The first node sends the first service flow in the at least one time window according to token valid indication information corresponding to the first service flow or output valid indication information corresponding to the first service flow, wherein the token valid indication information corresponding to the first service flow or the output valid indication information corresponding to the first service flow is used to indicate that the first service flow is allowed to be sent.
6. The method of claim 4, wherein, The time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow do not overlap.
7. The method according to any one of claims 1 to 6, wherein The first node comprises a source node or a forwarding node.
8. An apparatus for scheduling network traffic, the apparatus comprising: The method comprises the following steps: A first acquisition module is used to acquire a first service flow, and types of the first service flow comprise at least one service flow type, wherein the service flow type comprises a controlled service flow and an uncontrolled service flow; A first processing module is used to determine at least one time window corresponding to each service flow type in the first service flow according to the at least one service flow type and a preset correspondence between the service flow type and the time window, wherein a length of the time window corresponding to the controlled service flow is greater than a length of the time window corresponding to the uncontrolled service flow; A first sending module is used to send the first service flow in the at least one time window.
9. The apparatus of claim 8, wherein, The first sending module further comprises a first traffic shaping module, and the first sending module is specifically used for: The first traffic shaping module is used for traffic shaping the first service flow; The first sending module sends the first service flow that is traffic shaped in the at least one time window.
10. The apparatus of claim 8 or 9, wherein, The first obtaining module is further used for obtaining timing indication, and the timing indication is used for indicating a time reference line in a system in which the device is located; The first processing module is further used for determining a starting time of the at least one time window according to the timing indication.
11. The device of any one of claims 8-10, wherein, The first service flow comprises a first sub-service flow, the first sub-service flow is a controlled service flow or an uncontrolled service flow, and the first sending module sends the first service flow in the at least one time window, comprising: When the first sub-service flow is a controlled service flow, the first sending module sends the first sub-service flow in a first sub-time window in a first time window corresponding to the controlled service flow in the at least one time window; When the first sub-service flow is an uncontrolled service flow, the first sending module sends the first sub-service flow in a second sub-time window in a second time window corresponding to the uncontrolled service flow in the at least one time window.
12. The device of any one of claims 8-11, wherein, The first sending module sends the first service flow in the at least one time window, and the first sending module is specifically used for: According to token valid indication information corresponding to the first service flow or output valid indication information corresponding to the first service flow, the first service flow is sent in the at least one time window, wherein the token valid indication information corresponding to the first service flow or the output valid indication information corresponding to the first service flow is used for indicating that the sending of the first service flow is allowed.
13. The apparatus of claim 11, wherein, The time window corresponding to the controlled service flow and the time window corresponding to the uncontrolled service flow do not overlap.
14. A communication system, characterized by The communication system comprises at least one node, and the at least one node comprises a first node, and the first node is used for executing the method in any one of claims 1-7.
15. An apparatus for scheduling network traffic, the apparatus comprising: The device comprises at least one processor, the at least one processor is coupled with at least one memory, and the at least one processor is used for executing computer programs or instructions stored in the at least one memory, so that the device executes the method in any one of claims 1-7.
16. A chip, characterized by The device comprises a processor and a communication interface, the communication interface is used for receiving data and / or information and transmitting the received data and / or information to the processor, and the processor processes the data and / or information according to the method in any one of claims 1-7.
17. A computer readable storage medium characterized by The computer readable storage medium stores computer instructions, and when the computer instructions run on a computer, the method in any one of claims 1-7 is realized.
18. A computer program product, characterised in that, The computer program product comprises computer program codes, and when the computer program codes run on a computer, the method in any one of claims 1-7 is realized.
Citation Information
Patent Citations
Immediate ready implementation of virtually congestion free guaranteed service capable network: external internet nextgentcp (square waveform) tcp friendly san
CN101112063A
Resource scheduling method, terminal device, and network device
CN112889322A