Traffic Scheduling Method, Apparatus, Electronic Device, and Computer-Readable Medium

The proposed traffic scheduling method addresses inefficiencies in current methods by using a programmable switch to determine optimal port identifiers based on traffic parameters, enhancing efficiency and reducing costs.

JP7683030B2Active Publication Date: 2025-05-26BEIJING HUIJUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023558462
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-03-23
Filing Date
2022-01-04
Publication Date
2025-05-26
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

Current traffic scheduling methods, such as evenly allocating traffic or manual port maintenance, are costly and inefficient, leading to high maintenance costs and low traffic scheduling efficiency.

Method used

A traffic scheduling method that involves a traffic egress switch acquiring messages and transferring them to a programmable switch, which determines target port identifiers based on communication parameters, including current traffic values and multi-communication fields, to optimize traffic routing.

Benefits of technology

This method improves traffic scheduling efficiency and reduces costs by reasonably distributing traffic, minimizing manual intervention, and optimizing the use of buyout and charging ports based on real-time traffic conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007683030000001
    Figure 0007683030000001
  • Figure 0007683030000002
    Figure 0007683030000002
  • Figure 0007683030000003
    Figure 0007683030000003
Patent Text Reader

Abstract

The present disclosure relates to a traffic scheduling method, apparatus, electronic device and computer-readable medium, in which the traffic scheduling method includes: obtaining a currently pending message by a traffic egress switch and forwarding the message to a programmable switch connected to the traffic egress switch, obtaining communication parameters corresponding to the message by the programmable switch and determining a target port identifier of the message based on the communication parameters, marking the message based on the target port identifier of the message and sending the marked message back to the traffic egress switch, determining a target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier, and sending the message by the target output port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Cross - reference to Related Applications This application claims the priority of a Chinese patent application with an application number of 202110307609.3, filed in China on March 23, 2021, and an invention title of "Traffic Scheduling Method, Apparatus, Electronic Device, and Computer - Readable Medium", and incorporates the entire disclosure of the Chinese patent application herein by reference.

[0002] This disclosure relates to the field of communication technologies, and more particularly, to a traffic scheduling method, a traffic scheduling apparatus, an electronic device, and a computer - readable medium.

Background Art

[0003] Currently, there are mainly two types of charging methods between the machine room exit and the operator, namely the buy - out port and the volume - based charging port. For these two types of charging ports, generally, traffic scheduling is performed by evenly allocating traffic or manually maintaining the ports.

[0004] However, evenly allocating traffic is costly, and manually maintaining the ports has high maintenance costs, causing a waste of human resources and low traffic scheduling efficiency.

[0005] In view of this, in this field, there is a need for a traffic scheduling method that can reasonably distribute traffic and reduce costs.

[0006] It should be noted that the information disclosed in the above background art section is only for deepening the understanding of the background of this disclosure, and thus may include information that is not prior art known to those skilled in the art.

Summary of the Invention

Problems to be Solved by the Invention

[0007] The object of the present disclosure is to provide a traffic scheduling method, a traffic scheduling apparatus, an electronic device, and a computer-readable medium, thereby improving the efficiency of traffic scheduling to at least a certain extent and reducing traffic costs.

Means for Solving the Problems

[0008] According to a first aspect of the present disclosure, a traffic scheduling method is provided. Acquiring a currently queued message by a traffic egress switch and transferring the message to a programmable switch connected to the traffic egress switch, acquiring communication parameters corresponding to the message by the programmable switch and determining a target port identifier of the message based on the communication parameters, marking the message based on the target port identifier of the message and returning the marked message to the traffic egress switch, determining a target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier and transmitting the message through the target output port, including.

[0009] In an exemplary embodiment of the present disclosure, the communication parameters include a current traffic value and a multi-communication field of the message, and determining the target port identifier of the message based on the communication parameters is determining an output port type corresponding to the message based on the current traffic value and the multi-communication field of the message, determining the target port identifier of the message from a plurality of port marking fields included in the output port type based on the multi-communication field of the message;

[0010] In an exemplary embodiment of the present disclosure, determining the output port type corresponding to the message based on the current traffic value and the multi-communication field of the message includes: determining a stream corresponding to the message based on the multi-communication field of the message, and obtaining a timestamp corresponding to the message one before the stream; obtaining a timestamp corresponding to the message, and determining a time interval between the message and the message one before based on the timestamp corresponding to the message and the timestamp corresponding to the message one before; determining the output port type of the message based on the current traffic value and the time interval between the message and the message one before.

[0011] In an exemplary embodiment of the present disclosure, determining a stream corresponding to the message based on the multi-communication field of the message includes: obtaining a hash identification code corresponding to the message based on the multi-communication field of the message, and determining a stream corresponding to the message based on the hash identification code.

[0012] In an exemplary embodiment of the present disclosure, determining the output port type of the message based on the current traffic value and the time interval between the message and the message one before includes: judging whether the current traffic value is greater than a threshold of the traffic rate limit, and whether the time interval between the message and the message one before is greater than a threshold of the time interval; When the current traffic value is greater than the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval, determining the port marking field of the message as the charging port type; When the current traffic value is less than or equal to the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval, determining the port marking field of the message as the buyout port type; When the time interval is less than or equal to the threshold of the time interval, determining the port marking field of the message as the output port type corresponding to the previous message.

[0013] In an exemplary embodiment of the present disclosure, after determining the target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier, the method includes: Obtaining the current traffic value of the target output port and determining whether the current traffic value of the target output port is less than or equal to the traffic threshold of the output port; When the current traffic value of the target output port is less than or equal to the traffic threshold of the output port, transmitting the message through the target output port; When the current traffic value of the target output port is greater than the traffic threshold of the output port, changing the target port identifier of the message to the default port identifier and transmitting the message through the output port corresponding to the default port identifier.

[0014] In an exemplary embodiment of the present disclosure, the total bandwidth of the connection line between the traffic egress switch and the programmable switch is greater than the total bandwidth of all output ports in the traffic egress switch.

[0015] According to a second aspect of the present disclosure, a traffic scheduling device is provided. A message acquisition module is arranged to acquire a currently queued message by a traffic egress switch and transfer the message to a programmable switch connected to the traffic egress switch. An identifier determination module is arranged to acquire communication parameters corresponding to the message by the programmable switch and determine a target port identifier of the message based on the communication parameters. A message marking module is arranged to mark the message based on the target port identifier of the message and return the marked message to the traffic egress switch. A message transmission module is arranged to determine a target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier and transmit the message through the target output port. It includes.

[0016] According to a third aspect of the present disclosure, an electronic device including a processor and a memory for storing executable instructions of the processor is provided, wherein the processor is arranged to execute the traffic scheduling method according to any one of the above by executing the executable instructions.

[0017] According to a fourth aspect of the present disclosure, a computer-readable medium storing a computer program is provided, and when the computer program is executed by a processor, the traffic scheduling method according to any one of the above is realized.

[0018] It should be noted that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit the present disclosure.

[0019] The accompanying drawings are incorporated herein and form a part hereof, showing embodiments that are referenced in the present disclosure and used to explain the principles of the present disclosure together with the specification. The drawings in the following description are only some embodiments of the present disclosure, and it is obvious that those skilled in the art can obtain other drawings from these drawings without creative work.

Brief Description of the Drawings

[0020]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Embodiments for Carrying Out the Invention

[0021] Hereinafter, exemplary embodiments will be described in more detail with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in many forms and should not be construed as being limited to the examples described herein. Rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to give a complete understanding of the embodiments of the present disclosure. However, those skilled in the art will recognize that the technical solutions of the present disclosure can be implemented by omitting one or more of the described specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known technical solutions are not shown in detail or described in order to avoid obscuring the aspects of the present disclosure.

[0022] Note that the drawings are only schematic diagrams of the present disclosure and are not necessarily drawn to scale. In the drawings, the same or similar parts are denoted by the same reference numerals and their descriptions are not repeated. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0023] There are the following two types of charging methods between the current machine room exit and the operator. 1. Buyout port: An output port with a fixed bandwidth. It is not necessary to count how much traffic the port actually transmits, and it is uniformly charged according to the fixed bandwidth.

[0024] 2. Usage-based charging port: An output port that is charged according to the actually used traffic. In some related embodiments, based on the above two charging methods, when the current machine room includes the above two ports, the following several traffic scheduling methods can be adopted.

[0025] 1. Ecmp (Equal Cost Multi-path): By calculating a 5-Tuple hash, traffic is evenly allocated to all ports without considering the charging method of each port.

[0026] The main drawback of Ecmp is that it simply distributes traffic evenly to all ports without considering the charging method of the ports. This may result in the bandwidth of the flat-rate port being insufficient, while conversely, a large amount of traffic is output from the charging port, increasing the cost of traffic.

[0027] 2. Manual port maintenance: Based on the current real-time traffic, ports can be manually added or removed, preferentially using the flat-rate port, and adding a volume-based charging port based on real-time traffic.

[0028] The method of manually maintaining the currently used ports has a high maintenance cost and causes human waste because they are all repetitive operations.

[0029] 3. Rate limiting for flat-rate ports: Set an acl (Access Control Lists) rate limit for the flat-rate port. When the current traffic is less than the rate limit, the traffic passes through the flat-rate port; when it exceeds the rate limit, the excess passes through the charging port.

[0030] By setting a rate limit for the flat-rate port and allowing only the portion exceeding the rate limit to pass through the charging port, there is a possibility that the same stream is transferred from different ports, thus resulting in packet loss or disruption.

[0031] Based on the above problems, an exemplary embodiment of the present disclosure first provides a traffic scheduling method. As shown in FIG. 1, the traffic scheduling method may include the following steps.

[0032] Step S110: The traffic egress switch acquires the currently waiting-to-be-transmitted message and transfers the message to the programmable switch connected to the traffic egress switch.

[0033] Step S120: The programmable switch acquires the communication parameters corresponding to the message and determines the target port identifier of the message based on the communication parameters.

[0034] Step S130: Mark the message based on the target port identifier of the message and return the marked message to the traffic egress switch.

[0035] Step S140: Determine the target output port corresponding to the message from the plurality of output ports of the traffic egress switch based on the target port identifier, and transmit the message through the target output port.

[0036] In the traffic scheduling method of the exemplary embodiment of the present disclosure, the currently waiting-to-be-transmitted message is transferred from the traffic egress switch to the programmable switch, and the message is marked based on the communication parameters corresponding to the current message by the programmable switch, and the traffic is reasonably allocated to different ports based on the marked message. The traffic scheduling method in the exemplary embodiment of the present disclosure can reasonably schedule the traffic, count the traffic by the programmable switch and allocate it to each port, reduce the maintenance and management cost, and improve the efficiency of traffic scheduling in saving traffic costs.

[0037] Hereinafter, with reference to FIGS. 2 to 6, the above steps of this exemplary embodiment will be described in more detail.

[0038] In step S110, the traffic egress switch acquires the currently queued message and transfers the message to a programmable switch connected to the traffic egress switch.

[0039] A switch is a network facility for transferring signals. In this exemplary embodiment, the traffic egress switch is a network facility for managing the outgoing traffic of the machine room, and the incoming traffic does not pass through the traffic egress switch.

[0040] A programmable switch is a network switch with programmable capabilities and can be controlled by a programming language. For example, it can be a P4 (Programming Protocol-independent Packet Processors) programmable switch controlled by the P4 language.

[0041] In this exemplary embodiment, by means of bypass deployment, the traffic egress switch and the programmable switch can be connected based on the total egress bandwidth, where the programmable switch may be, for example, a P4 programmable switch. Specifically, when connecting the traffic egress switch and the programmable switch, the total bandwidth of the connection lines between the traffic egress switch and the programmable switch is greater than the total bandwidth of all output ports in the traffic egress switch. After the connection, by starting the bgp (Border Gateway Protocol) in the traffic egress switch and the programmable switch, the default routing in the outgoing direction of the traffic egress switch is directed to the programmable switch, and the traffic egress direction is changed from the direction directly entering the default public network to the direction entering the programmable switch, and the programmable switch performs logical processing on the currently queued messages.

[0042] In step S120, the programmable switch obtains the communication parameters corresponding to the message and determines the target port identifier of the message based on the communication parameters.

[0043] In this exemplary embodiment, the communication parameters of the message include the current traffic value and the multi-communication field of the message, where the multi-communication field of the message may be, for example, 4-tuple, 5-tuple, 7-tuple, etc. Taking the 5-tuple as an example, it includes five fields such as source IP, source port, destination IP, destination port, and the layer 4 protocol.

[0044] In this exemplary embodiment, a programmable switch can determine the target port identifier of the current message based on the communication parameters of the message, and the target port identifier can be used to mark from which specific output port the message is transmitted.

[0045] In this exemplary embodiment, as shown in FIG. 2, determining the target port identifier of the message based on the communication parameters can specifically include the following steps.

[0046] Step S210: Determine the output port type corresponding to the message based on the current traffic value and the multi-communication field of the message.

[0047] The output port types include the buyout port type and the charging port type. Here, the buyout port type is an output port type with a fixed bandwidth and is charged in a lump sum according to the fixed bandwidth. The charging port type is an output port type charged according to the actually used traffic. Each type can include one or more corresponding output ports. For example, the buyout port type can include the first buyout output port and the second buyout output port, and the charging port type can include the first charging output port, the second charging output port, and the like.

[0048] In this exemplary embodiment, as shown in FIG. 3, determining the output port type corresponding to the message based on the current traffic value and the multi-communication field of the message can specifically include the following steps.

[0049] Step S310: Determine the stream corresponding to the message based on the multi-communication field of the message, and obtain the timestamp corresponding to the message one before the stream.

[0050] In this exemplary embodiment, a hash identification code corresponding to a message can be obtained based on a multi-communication field of the message, and a stream corresponding to the message can be determined based on the hash identification code. Specifically, first, a hash operation is performed on the 5-tuple of the message to obtain the hash id of the current message. Next, the stream corresponding to the message is searched from the flowlet entry according to the hash id, and information corresponding to the message one before this stream is obtained, including a time stamp and the like.

[0051] Step S320: Obtain the time stamp corresponding to the message, and determine the time interval between the message and the previous message based on the time stamp corresponding to the message and the time stamp corresponding to the previous message.

[0052] After obtaining the time stamps corresponding to the current message and the previous message, based on the information in the two time stamps, obtain the time interval between the current message and the previous message.

[0053] Step S330: Determine the output port type of the message based on the current traffic value and the time interval between the message and the previous message.

[0054] After obtaining the current traffic value and the time interval of the current message, determine whether the current traffic value is greater than the threshold of the traffic rate limit and whether the time interval between the message and the previous message is greater than the threshold of the time interval, thereby determining the output port type of the message. Specifically, when the current traffic value is greater than the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval, determine the port marking field of the message as the charging port type. When the current traffic value is less than or equal to the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval, determine the port marking field of the message as the prepaid port type. When the time interval is less than or equal to the threshold of the time interval, determine the port marking field of the message as the output port type corresponding to the previous message.

[0055] Step S220: Determine the target port identifier of the message from the multiple port marking fields included in the output port type based on the multi-communication field of the message.

[0056] Each output port type can include multiple output ports, corresponding to the multiple port marking fields respectively, for example, the dscp (Differentiated Services Code Point) number. After determining the output port type corresponding to the current message, one dscp number can be determined from the multiple port marking fields included in the output port type in a way of performing a hash operation on the 5-tuple of the message and used as the target port identifier of the message.

[0057] Realize that the traffic at the exit of the machine room preferentially passes through the buyout port via the programmable switch. When the real-time traffic value exceeds the threshold of the traffic rate limit of the buyout port, some streams are switched to the charging port at the granularity of the stream. In the programmable switch, traffic scheduling is realized by counting the streams and recording timestamps for the streams, and the streams are assigned to different types of ports, so as to use up the buyout port as much as possible and perform the remaining traffic at the charging port to save network costs.

[0058] In step S130, mark the message based on the target port identifier of the message, and return the marked message to the traffic egress switch.

[0059] After determining the target port identifier of the message, mark it on the message, and then return the marked message to the traffic egress switch. When returning the message, first obtain the port through which the message passes when it enters the programmable switch from the traffic egress switch, and then return the message to the traffic egress switch from this port.

[0060] In step S140, determine the target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier, and transmit the message through the target output port.

[0061] After receiving the message returned from the programmable switch, the traffic egress switch identifies the target output port corresponding to the dscp number by means of an acl (Access Control Lists) pre-arranged in the traffic egress switch based on the target port identifier contained therein, such as the dscp number, and then forwards the message through the target output port.

[0062] Also, in this exemplary embodiment, if the upper limit of the bandwidth of the target output port corresponding to the target port identifier is already full, and if a message is further transmitted from this port, a packet loss situation may occur. Therefore, it is possible to obtain in advance the current traffic value of the target output port and determine whether the current traffic value of the target output port is below the traffic threshold of the output port. If the current traffic value of the target output port is below the traffic threshold of the output port, the message is transmitted by the target output port. If the current traffic value of the target output port is greater than the traffic threshold of the output port, the target port identifier of the message is changed to the default port identifier, and the message is transmitted by the output port corresponding to the default port identifier.

[0063] FIG. 4 is a configured network topology diagram in one specific embodiment of the present disclosure and can be used to manage the traffic in the outbound direction of the machine room. As shown in FIG. 4, the p4 programmable switch is in a bypass configuration, and the egress switch and the p4 programmable switch are connected based on the total amount of the egress bandwidth. The total bandwidth of the connection line between the egress switch and the p4 programmable switch needs to be greater than the total egress bandwidth of the egress switch. Specifically, that is, the total bandwidth of ports 1, 2, and 3 in FIG. 4 needs to be greater than the total bandwidth of port buyout 1, buyout 2, charging 1, and charging 2.

[0064] After connecting the circuit, first, it is necessary to assign a DSCP number to each output port and write an ACL corresponding to the DSCP number and port to the egress switch. In this way, the P4 programmable switch determines the corresponding output port based on the DSCP number. Then, by starting BGP in the P4 programmable switch and the egress switch, the default routing in the egress direction of the egress switch is directed to the P4 programmable switch, so that the traffic in the egress direction passes through the P4 equipment. Through the logical processing in the P4 programmable switch, the DSCP number corresponding to each message is marked, and then the message is returned to the egress switch along the original path. The egress switch selects the corresponding target output port based on the DSCP number marked on the message and transfers and sends the message to the target output port.

[0065] Figure 5 shows a complete flowchart of the traffic scheduling method in one specific embodiment of the present disclosure. The above steps in this exemplary embodiment are illustrated and described, and the specific steps of this flowchart are as follows.

[0066] Step S502: Receive the current message. Step S504: Determine whether the time from the previous message to the current message is greater than 50 ms.

[0067] Perform a hash operation on the 5-tuple of the current message to obtain the hash ID of the current message. Next, search for the stream corresponding to the message from the flowlet entry according to the hash ID, and obtain the timestamp corresponding to the previous message of this stream. Then determine whether the time from the previous message of this stream to the current message is greater than 50 ms. If the time from the previous message to the current message is 50 ms or less, proceed to step S506. If the time from the previous message to the current message is greater than 50 ms, proceed to step S508 to determine the traffic threshold.

[0068] Step S506: Determine the output port type of the current message to be the output port type of the previous message.

[0069] Step S508: Determine whether the current traffic exceeds the threshold of the traffic rate limit.

[0070] If the current traffic exceeds the threshold of the traffic rate limit, proceed to step S510. If the current traffic does not exceed the threshold of the traffic rate limit, proceed to step S512.

[0071] Step S510: Determine the output port type of the current message to be the charging port type. Step S512: Determine the output port type of the current message to be the buyout port type.

[0072] Step S514: Obtain the port set corresponding to the current port type. Step S516: Determine the DSCP identifier of the current message from the port set.

[0073] One DSCP number can be randomly selected by performing a hash operation on the 5-tuple of the message to be the DSCP identifier of the current message.

[0074] Step S518: Determine whether the output port corresponding to the current message exceeds the bandwidth threshold.

[0075] If the output port corresponding to the current message has already reached the bandwidth threshold, proceed to step S520 and change the DSCP identifier of the current message to the DSCP identifier of another port. If the output port corresponding to the current message has not reached the bandwidth threshold, proceed to step S522.

[0076] Step S520: Change the DSCP identifier of the current message. Change the DSCP identifier of the current message to the DSCP identifier of the default port.

[0077] Step S522: Mark the current message based on the DSCP identifier of the current message.

[0078] Step S524: Output the current message. The message enters the P4 programmable switch from a certain port and is returned to the egress switch from a certain port. For example, the message enters the P4 programmable switch from port 1 in FIG. 4 and is returned to the egress switch from port 1 when being returned.

[0079] After receiving the message, the egress switch identifies the physical port corresponding to the DSCP number according to the pre-arranged ACL and forwards the message through this physical port.

[0080] The traffic scheduling method in this exemplary embodiment can also be realized by an x86 server. However, the server architecture cannot meet the requirements of T-class bandwidth and packet wire speed processing capabilities, and it is difficult to process a large number of messages in milliseconds. Therefore, the development cost and equipment cost are higher.

[0081] It should be noted that although each step of the method in this disclosure is described in a specific order in the accompanying drawings, this does not require or imply that the steps must be executed in a specific order or that all the shown steps must be executed to achieve the desired result. Additionally or alternatively, it is possible to omit some steps, combine multiple steps into one step for execution, and / or split one step into multiple steps for execution.

[0082] Furthermore, the present disclosure further provides a traffic scheduling device. As shown in FIG. 6, the traffic scheduling device may include a message acquisition module 610, an identifier determination module 620, a message marking module 630, and a message transmission module 640. Here, The message acquisition module 610 is arranged to execute acquiring the currently queued messages through a traffic egress switch and transferring the messages to a programmable switch connected to the traffic egress switch.

[0083] The identifier determination module 620 is arranged to execute acquiring communication parameters corresponding to the messages by the programmable switch and determining the target port identifier of the messages based on the communication parameters.

[0084] The message marking module 630 is arranged to execute marking the messages based on the target port identifiers of the messages and returning the marked messages to the traffic egress switch.

[0085] The message transmission module 640 is arranged to execute determining the target output port corresponding to the messages from a plurality of output ports of the traffic egress switch based on the target port identifiers and transmitting the messages through the target output ports.

[0086] In some exemplary embodiments of the present disclosure, the identifier determination module 620 may include an output port type determination unit and a target port identifier determination unit. Here, The output port type determination unit is arranged to execute determining the output port type corresponding to the messages based on the current traffic value and the multi-communication field of the messages.

[0087] The target port identifier determination unit is arranged to determine the target port identifier of the message from a plurality of port marking fields included in the output port type based on the multi-communication field of the message.

[0088] In some exemplary embodiments of the present disclosure, the output port type determination unit may include a timestamp acquisition unit, a time interval determination unit, and a port type determination unit. Here, The timestamp acquisition unit is arranged to determine the stream corresponding to the message based on the multi-communication field of the message and acquire the timestamp corresponding to the message one before the stream.

[0089] The time interval determination unit is arranged to acquire the timestamp corresponding to the message and determine the time interval between the message and the message one before based on the timestamp corresponding to the message and the timestamp corresponding to the message one before.

[0090] The port type determination unit is arranged to determine the output port type of the message based on the current traffic value and the time interval between the message and the message one before.

[0091] In some exemplary embodiments of the present disclosure, the timestamp acquisition unit may include a hash identification code determination unit. The hash identification code determination unit is arranged to acquire the hash identification code corresponding to the message based on the multi-communication field of the message and determine the stream corresponding to the message based on the hash identification code.

[0092] In some exemplary embodiments of the present disclosure, the port type determination unit may include a parameter threshold determination unit, a charging port type determination unit, a buyout port type determination unit, and a history port type determination unit. Here, The parameter threshold determination unit is arranged to determine whether the current traffic value is greater than the threshold of the traffic rate limit and whether the time interval between the message and the previous message is greater than the threshold of the time interval.

[0093] The charging port type determination unit is arranged to determine the port marking field of the message as the charging port type when the current traffic value is greater than the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval.

[0094] The buyout port type determination unit is arranged to determine the port marking field of the message as the buyout port type when the current traffic value is less than or equal to the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval.

[0095] The history port type determination unit is arranged to determine the port marking field of the message as the output port type corresponding to the previous message when the time interval is less than or equal to the threshold of the time interval.

[0096] In some exemplary embodiments of the present disclosure, the traffic scheduling device provided by the present disclosure may further include an output port traffic limit module, and the output port traffic limit module may include a port traffic threshold determination unit, an output port message sending unit, and a default port message sending unit. Here, The port traffic threshold determination unit is arranged to obtain the current traffic value of the target output port and determine whether the current traffic value of the target output port is less than or equal to the traffic threshold of the output port.

[0097] The output port message sending unit is arranged to send a message through the target output port when the current traffic value of the target output port is less than or equal to the traffic threshold of the output port.

[0098] The default port message sending unit is arranged to change the target port identifier of the message to the default port identifier and send the message through the output port corresponding to the default port identifier when the current traffic value of the target output port is greater than the traffic threshold of the output port.

[0099] The specific details of each module / unit in the above traffic scheduling device have already been described in detail in the corresponding method embodiment part and will not be described again here.

[0100] FIG. 7 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure.

[0101] It should be noted that the computer system 700 of the electronic device shown in FIG. 7 is only an example and does not limit the functions and usage scope of the embodiments of the present disclosure.

[0102] As shown in FIG. 7, the computer system 700 includes a central processing unit (CPU) 701, which can execute various appropriate operations and processes based on a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data necessary for the operation of the system are also stored in the RAM 703. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0103] Connected to the I / O interface 705 are an input unit 706 including a keyboard, a mouse, etc., an output unit 707 including a cathode ray tube (CRT), a liquid crystal display device (LCD), etc. and a speaker, etc., a storage unit 708 including a hard disk, etc., and a communication unit 709 including a network interface card such as a LAN card, a modem, etc. The communication unit 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. Removable media 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. are attached to the drive 710 as needed, and a computer program read from them is installed in the storage unit 708 as needed.

[0104] In particular, according to the embodiments of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication unit 709 and / or installed from the removable media 711. When the computer program is executed by the central processing unit (CPU) 701, various functions defined in the system of the present disclosure are executed.

[0105] Note that the computer-readable media shown in the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of both. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or any combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, electrical connections having one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present disclosure, the computer-readable storage medium may be any tangible medium that includes or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. Further, in the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such propagated data signals can take various forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code included on the computer-readable medium can be transmitted using any appropriate medium including, but not limited to, wireless, wired, optical fiber, RF, or any suitable combination of the above.

[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of code that includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions described in the blocks may be performed in an order different from that shown in the drawings. For example, two consecutive blocks shown may actually be executed substantially simultaneously, depending on the functions involved, or in reverse order in some cases. It should also be noted that each block of the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0107] In another aspect, the present disclosure further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, may exist alone, or may not be incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device is caused to implement the method described in the following embodiments.

[0108] It should be noted that in the above detailed description, some modules of the facilities for performing operations have been mentioned, but it should be noted that such a division is not essential. In fact, according to the embodiments of the present disclosure, the features and functions of the above two or more modules may be embodied in one module. Conversely, the features and functions of the above one module may be further divided so as to be embodied by a plurality of modules.

[0109] Those skilled in the art will readily conceive of other embodiments of the present disclosure from the considerations of this specification and the practice of the inventions disclosed herein. The present disclosure is intended to cover any modifications, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or customary technical means in the art not disclosed by the present disclosure.

[0110] It should be understood that the present disclosure is not limited to the exact configurations described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A traffic scheduling method, comprising: acquiring, by a traffic egress switch, a currently queued message, and transferring the message to a programmable switch connected to the traffic egress switch; acquiring, by the programmable switch, communication parameters corresponding to the message, and determining a target port identifier of the message based on the communication parameters; marking the message based on the target port identifier of the message, and returning the marked message to the traffic egress switch; determining, based on the target port identifier, a target output port corresponding to the message from a plurality of output ports of the traffic egress switch, and transmitting the message through the target output port; wherein the communication parameters include a current traffic value and a multi-communication field of the message; acquiring, by the programmable switch, communication parameters corresponding to the message, and determining a target port identifier of the message based on the communication parameters includes: determining a time interval between the message and the previous message based on the multi-communication field of the message; determining a port marking field of the message as a charging port type, a buyout port type, or an output port type corresponding to the previous message based on the current traffic value and the time interval between the message and the previous message; A traffic scheduling method.

2. Determining a target port identifier of the message based on the communication parameters includes: determining an output port type corresponding to the message based on the current traffic value and the multi-communication field of the message; determining the target port identifier of the message from a plurality of port marking fields included in the output port type based on the multi-communication field of the message; The traffic scheduling method according to claim 1.

3. Determining the output port type corresponding to the message based on the current traffic value and the multi-communication field of the message includes: Determining a stream corresponding to the message based on the multi-communication field of the message, and obtaining a time stamp corresponding to the message one before the stream; Obtaining a time stamp corresponding to the message, and determining a time interval between the message and the message one before based on the time stamp corresponding to the message and the time stamp corresponding to the message one before; Determining the output port type of the message based on the current traffic value and the time interval between the message and the message one before. The traffic scheduling method according to claim 2.

4. Determining a stream corresponding to the message based on the multi-communication field of the message includes: Obtaining a hash identification code corresponding to the message based on the multi-communication field of the message, and determining a stream corresponding to the message based on the hash identification code. The traffic scheduling method according to claim 3.

5. Determining the output port type of the message based on the current traffic value and the time interval between the message and the message one before includes: Determining whether the current traffic value is greater than a threshold of traffic rate limit and whether the time interval between the message and the message one before is greater than a threshold of time interval; When the current traffic value is greater than the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval, determining the port marking field of the message as the charging port type; When the current traffic value is less than or equal to the threshold of the traffic rate limit and the time interval is greater than the threshold of the time interval, determining the port marking field of the message as the buyout port type; When the time interval is less than or equal to the threshold of the time interval, determining the port marking field of the message as the output port type corresponding to the message one before. The traffic scheduling method according to claim 3.

6. After determining a target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier, the method further comprises: obtaining a current traffic value of the target output port, and determining whether the current traffic value of the target output port is less than or equal to a traffic threshold of the output port; if the current traffic value of the target output port is less than or equal to the traffic threshold of the output port, transmitting the message through the target output port; if the current traffic value of the target output port is greater than the traffic threshold of the output port, changing the target port identifier of the message to a default port identifier, and transmitting the message through an output port corresponding to the default port identifier. The traffic scheduling method according to claim 1.

7. The total bandwidth of a connection line between the traffic egress switch and the programmable switch is greater than the total bandwidth of all output ports of the traffic egress switch. The traffic scheduling method according to claim 1.

8. A traffic scheduling apparatus, comprising: a message acquisition module configured to acquire a message currently waiting for transmission by a traffic egress switch and used to transfer the message to a programmable switch connected to the traffic egress switch; an identifier determination module configured to acquire communication parameters corresponding to the message by the programmable switch and used to determine a target port identifier of the message based on the communication parameters; a message marking module configured to mark the message based on the target port identifier of the message and used to return the marked message to the traffic egress switch; a message transmission module configured to determine a target output port corresponding to the message from a plurality of output ports of the traffic egress switch based on the target port identifier and used to transmit the message through the target output port. The communication parameter includes a current traffic value and a multi-communication field of the message, and further includes an output port type determination module, wherein the output port type determination module determines a time interval between the message and the previous message based on the multi-communication field of the message, and based on the current traffic value and the time interval between the message and the previous message, determines the port marking field of the message as a charging port type, a buyout port type, or an output port type corresponding to the previous message. A traffic scheduling device.

9. An electronic device, comprising a processor, and a memory for storing one or more programs that, when executed by the processor, cause the processor to implement the traffic scheduling method according to any one of claims 1 to 7. An electronic device.

10. A computer-readable medium storing a computer program, wherein the program, when executed by a processor, implements the traffic scheduling method according to any one of claims 1 to 7. A computer-readable medium.

Citation Information

Patent Citations

  • Packet transfer device

    JP2006157537A

  • Network system, controller, and network control method

    WO2011083668A1